From 80a3f59e2d3df07805bc67e329300b8de90a5b3a Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 11 七月 2023 14:13:08 +0800
Subject: [PATCH] Merge branch 'LEXCommunityLiJun' into LEXUpgrade2023-Deloitte
---
force-app/main/default/experiences/Partner21/views/仪表板関連リスト.json | 45
force-app/main/default/classes/LexCancelRemoveBoxControllerTest.cls | 832
force-app/main/default/experiences/Consumable1/views/createRecord.json | 72
force-app/main/default/experiences/Site3/routes/error.json | 10
force-app/main/default/experiences/Consumable1/routes/文件関連リスト.json | 14
force-app/main/default/experiences/Consumable1/routes/reportBuilder.json | 14
force-app/main/default/lwc/lexCustomInventoryColor/lexCustomInventoryColor.html | 52
force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js | 345
force-app/main/default/experiences/Consumable1/routes/小组関連リスト.json | 14
force-app/main/default/lwc/lexTopPage/lexTopPage.js | 631
manifest/LEXC04packagecommdeploy.xml | 6
force-app/main/default/experiences/Partner21/routes/loginError.json | 9
force-app/main/default/lwc/lexCustomLightningDatatable/lexCustomLightningDatatable.js | 89
force-app/main/default/experiences/Consumable_21/routes/campaignList.json | 9
force-app/main/default/classes/LexProductLimitEditControllerTest.cls | 62
force-app/main/default/experiences/Consumable_21/routes/fileList.json | 9
force-app/main/default/experiences/Partner21/views/error.json | 57
force-app/main/default/experiences/Partner21/views/relatedRecordList.json | 45
force-app/main/default/experiences/Consumable_21/routes/lexConsumableAccount.json | 10
force-app/main/default/experiences/Consumable1/views/lexOverdueStock.json | 148
force-app/main/default/experiences/Consumable_21/routes/reportRelatedList.json | 9
force-app/main/default/experiences/Consumable_21/config/mainAppPage.json | 10
force-app/main/default/classes/ContactTriggerHandler.cls | 314
force-app/main/default/experiences/Consumable1/routes/用户RelatedList.json | 9
force-app/main/default/experiences/Consumable1/views/报表RelatedList.json | 45
force-app/main/default/experiences/Consumable_21/routes/createRecord.json | 9
force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityRenderer.js | 3
force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.design | 3
force-app/main/default/experiences/Consumable_21/views/lexConsumableAccountInfoPrint.json | 81
force-app/main/default/reports/ConsumableSalesReport/LastMonthSalesByAccount1.report-meta.xml | 116
force-app/main/default/classes/LexArriveGoodsMainControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/mDFAndCoop.json | 198
force-app/main/default/aura/CreateTarget/CreateTargetHelper.js | 798
force-app/main/default/experiences/Consumable1/views/campaignList.json | 286
force-app/main/default/experiences/Site3/routes/register.json | 9
force-app/main/default/classes/LexOverdueStockControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Partner21/routes/messages.json | 9
force-app/main/default/experiences/Site3/config/languages.json | 6
force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunRenderer.js | 3
force-app/main/default/experiences/Consumable1/routes/messages.json | 14
force-app/main/default/experiences/Consumable1/views/lexInventoryView.json | 148
force-app/main/default/experiences/Consumable_21/views/topicDetail.json | 93
force-app/main/default/experiences/Consumable_21/routes/accountManagement.json | 9
force-app/main/default/classes/LexOutboundorderImportController.cls | 25
force-app/main/default/experiences/Consumable1/views/fileDetail.json | 66
force-app/main/default/experiences/Consumable_21/routes/groupRelatedList.json | 9
force-app/main/default/experiences/Consumable1/routes/流RelatedList.json | 9
force-app/main/default/classes/LexConsumableGoodsInfoTest.cls-meta.xml | 5
force-app/main/default/experiences/Partner21/views/cIC関連リスト.json | 45
force-app/main/default/experiences/Consumable_21/routes/contactSupport.json | 10
force-app/main/default/experiences/Consumable1/routes/库存.json | 10
force-app/main/default/experiences/Consumable_21/routes/cICList.json | 9
force-app/main/default/experiences/Partner21/routes/reportBuilder.json | 9
force-app/main/default/experiences/Consumable1/views/库存.json | 81
force-app/main/default/classes/LexCancelRemoveBoxControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/checkPassword.json | 67
force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.js | 43
force-app/main/default/experiences/Consumable1/routes/cICRelatedList.json | 9
force-app/main/default/experiences/Consumable1/routes/lexInventoryView.json | 16
force-app/main/default/experiences/Partner21/views/fileList.json | 39
force-app/main/default/experiences/Consumable_21/routes/flow.json | 10
force-app/main/default/experiences/Consumable_21/routes/search.json | 10
force-app/main/default/experiences/Site3/routes/recordList.json | 10
force-app/main/default/experiences/Consumable_21/routes/lexConsumableAccountInfoPrint.json | 10
force-app/main/default/lwc/lexInventory/lexInventory.js | 1479
force-app/main/default/classes/LookupSearchResultTest.cls | 46
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.cmp | 2692
force-app/main/default/experiences/Consumable1/views/lexTopPage.json | 148
force-app/main/default/experiences/Consumable1/views/消耗品订单相关列表.json | 82
force-app/main/default/experiences/Consumable1/views/homeFlexible.json | 190
force-app/main/default/experiences/Partner21/views/reportList.json | 37
force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html | 301
force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityHelper.js | 341
force-app/main/default/experiences/Partner21/routes/accountManagement.json | 9
force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.auradoc | 6
force-app/main/default/experiences/Consumable1/routes/streamList.json | 14
force-app/main/default/experiences/Consumable_21/views/contactSupport.json | 106
force-app/main/default/experiences/Partner21/routes/groupDetail.json | 9
force-app/main/default/experiences/Consumable1/views/cICList.json | 52
force-app/main/default/experiences/Site3/themes/buildYourOwn.json | 149
force-app/main/default/classes/Batch_FixAttachmentToFilesTest.cls | 52
force-app/main/default/experiences/Consumable1/routes/lexConsumable.json | 16
force-app/main/default/classes/LexInventoryViewControllerTest.cls-meta.xml | 5
force-app/main/default/classes/LexSearchContractControllerTest.cls | 74
force-app/main/default/experiences/Consumable1/routes/报表関連リスト.json | 14
force-app/main/default/experiences/Consumable_21/routes/lexSaleAndDelivery.json | 10
force-app/main/default/experiences/Site3/views/奥林巴斯电子签收系统.json | 55
force-app/main/default/experiences/Consumable1/routes/cICリスト.json | 14
force-app/main/default/experiences/Consumable1/views/myAccount.json | 204
force-app/main/default/experiences/Partner21/routes/reportList.json | 9
force-app/main/default/experiences/Consumable1/views/groupDetail.json | 114
force-app/main/default/experiences/Consumable_21/views/recordDetail.json | 76
force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.js | 448
force-app/main/default/experiences/Consumable_21/views/fileRelatedList.json | 45
force-app/main/default/experiences/Partner21/views/流関連リスト.json | 27
force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.auradoc | 6
force-app/main/default/experiences/Consumable1/routes/flow.json | 16
force-app/main/default/experiences/Site3/routes/进口单证明细.json | 10
force-app/main/default/experiences/Consumable1/routes/recordDetail.json | 14
force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.js | 301
force-app/main/default/classes/LexSaleAndDeliveryControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Partner21/routes/userSettings.json | 9
force-app/main/default/experiences/Consumable_21/routes/dashboardDetail.json | 9
force-app/main/default/experiences/Partner21/views/reportDetail.json | 57
force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.auradoc | 6
force-app/main/default/experiences/Consumable_21/views/quipDocsRelatedList.json | 39
force-app/main/default/experiences/Consumable1/routes/caseDetail.json | 14
force-app/main/default/experiences/Consumable1/views/流RelatedList.json | 27
force-app/main/default/experiences/Consumable1/views/caseDetail.json | 138
force-app/main/default/experiences/Consumable_21/views/campaignDetail.json | 76
force-app/main/default/experiences/Consumable_21/routes/streamDetail.json | 9
force-app/main/default/experiences/Consumable1/routes/createRecord.json | 14
force-app/main/default/experiences/Consumable_21/routes/recordList.json | 10
force-app/main/default/experiences/Consumable_21/routes/topicDetail.json | 9
force-app/main/default/experiences/Consumable1/views/小组RelatedList.json | 45
force-app/main/default/experiences/Site3/views/recordList.json | 52
force-app/main/default/classes/LexArriveGoodsControllerTest.cls | 426
force-app/main/default/experiences/Partner21/routes/login.json | 9
force-app/main/default/classes/LexConsumableOrderManageController.cls | 69
force-app/main/default/classes/LexSaleOrderController.cls | 40
force-app/main/default/experiences/Partner21/config/mainAppPage.json | 10
force-app/main/default/experiences/Consumable1/views/lexProductLimitEdit.json | 148
force-app/main/default/experiences/Consumable_21/config/consumable系统2.json | 11
force-app/main/default/classes/LexUpAccountProLimitControllerTest.cls | 130
force-app/main/default/experiences/Consumable_21/views/feedDetail.json | 39
force-app/main/default/experiences/Consumable1/routes/lexArriveGoods.json | 16
force-app/main/default/experiences/Consumable_21/views/homeFlexible.json | 102
force-app/main/default/classes/LexLicenceReminderControllerTest.cls | 199
force-app/main/default/experiences/Site3/brandingSets/buildYourOwn.json | 54
force-app/main/default/classes/lexSearchAgencyHospitalControllerTest.cls | 93
force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.css | 17
force-app/main/default/experiences/Consumable_21/views/flow.json | 40
force-app/main/default/experiences/Consumable1/views/lexArriveGsDetails.json | 148
force-app/main/default/experiences/Site3/views/home.json | 45
force-app/main/default/classes/LexConInvoiceListTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/routes/recordList.json | 16
force-app/main/default/experiences/Consumable_21/views/loginError.json | 57
force-app/main/default/lwc/customMydrComp/customMydrComp.html | 10
force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.html | 148
force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.css | 2
force-app/main/default/experiences/Partner21/routes/topicCatalog.json | 10
force-app/main/default/experiences/Consumable1/routes/lexArriveGsDetails.json | 16
force-app/main/default/experiences/Consumable_21/views/dashboardDetail.json | 58
force-app/main/default/experiences/Consumable1/routes/cICList.json | 9
force-app/main/default/experiences/Consumable1/views/lexInventory.json | 148
force-app/main/default/experiences/Consumable1/routes/register.json | 14
force-app/main/default/experiences/Partner21/routes/register.json | 9
force-app/main/default/aura/CreateTarget/CreateTarget.css | 8
force-app/main/default/classes/DealerInquiryModifyStateControllerTest.cls | 101
force-app/main/default/classes/LexNewAndEditBasePIPLController.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/routes/groupDetail.json | 9
force-app/main/default/lwc/lexCustomLightningDatatable/customdeleteReason.html | 6
force-app/main/default/classes/LexRemoveBoxControllerTest.cls | 713
force-app/main/default/experiences/Consumable1/views/lexConsumableAccount.json | 148
force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImport.cmp | 244
force-app/main/default/experiences/Consumable_21/views/consumableDetailFix.json | 156
force-app/main/default/experiences/Consumable1/routes/forgotPassword.json | 14
force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html | 1215
force-app/main/default/experiences/Consumable1/routes/questionDetail.json | 14
force-app/main/default/experiences/Site3/views/recordDetail.json | 75
force-app/main/default/experiences/Consumable1/routes/relatedRecordList.json | 16
force-app/main/default/experiences/Consumable_21/routes/lexConsumable.json | 10
force-app/main/default/experiences/Partner21/views/loginError.json | 57
force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger-meta.xml | 4
force-app/main/default/experiences/Consumable_21/views/lexConsumableAccount.json | 81
force-app/main/default/experiences/Consumable_21/views/reportList.json | 37
.sf/orgs/00D0k000000EKIhEAO/localSourceTracking/config | 7
force-app/main/default/classes/LexUpAccountProLimitControllerTest.cls-meta.xml | 5
force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js | 1216
force-app/main/default/experiences/Consumable1/views/messages.json | 46
force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunController.js | 5
force-app/main/default/classes/LexProductLimitEditControllerTest.cls-meta.xml | 5
force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls | 210
force-app/main/default/experiences/Partner21/themes/partnerCentral.json | 180
force-app/main/default/experiences/Consumable1/routes/lexTopPage.json | 16
force-app/main/default/experiences/Consumable1/views/contactSupport.json | 200
force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityController.js | 334
force-app/main/default/classes/LexConInvoicedetailsController.cls | 60
force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.html | 68
force-app/main/default/classes/LexUtilityTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/views/userProfile.json | 222
force-app/main/default/experiences/Partner21/views/contactSupport.json | 106
force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportController.js | 21
force-app/main/default/experiences/Consumable_21/routes/caseDetail.json | 9
force-app/main/default/experiences/Consumable1/routes/学会・培训Detail.json | 9
force-app/main/default/experiences/Partner21/views/login.json | 84
force-app/main/default/experiences/Partner21/views/flow.json | 40
manifest/LEXC01packagelexcommunitynew.xml | 52
force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraHelper.js | 3
force-app/main/default/classes/LexNewAndEditBasePIPLController.cls | 215
force-app/main/default/experiences/Consumable1/routes/消耗品订单相关列表.json | 16
force-app/main/default/experiences/Consumable1/views/cIC関連リスト.json | 82
force-app/main/default/experiences/Site3/routes/forgotPassword.json | 9
force-app/main/default/experiences/Consumable_21/routes/userRelatedList.json | 9
force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.html | 19
force-app/main/default/classes/MetaDataUtility.cls | 199
force-app/main/default/sites/Consumable.site-meta.xml | 4
force-app/main/default/experiences/Consumable_21/views/createRecord.json | 40
force-app/main/default/experiences/Partner21/brandingSets/partnerCentral.json | 56
force-app/main/default/experiences/Consumable1/routes/lexCancelRemoveBox.json | 16
force-app/main/default/experiences/Consumable1/routes/streamDetail.json | 14
force-app/main/default/experiences/Consumable_21/routes/reportDetail.json | 9
force-app/main/default/reports/ConsumableSalesReport/LastMonthSalesByProduct.report-meta.xml | 122
manifest/LEXC02packagelexcommunityupdate.xml | 32
force-app/main/default/experiences/Consumable_21/routes/lexTopPage.json | 10
force-app/main/default/classes/LookupSearchResultTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/routes/loginError.json | 9
force-app/main/default/experiences/Partner21/routes/topicDetail.json | 9
force-app/main/default/experiences/Consumable1/routes/dashboardDetail.json | 14
force-app/main/default/classes/LexArriveGoodsControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/routes/resources.json | 10
force-app/main/default/classes/ArriveGoodsControllerTestV2.cls | 207
force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.cmp | 233
force-app/main/default/lwc/lexCustomDiffReasonComp/lexCustomDiffReasonComp.html | 13
force-app/main/default/experiences/Consumable1/routes/学会・培训詳細.json | 14
force-app/main/default/experiences/Consumable_21/routes/error.json | 10
force-app/main/default/experiences/Partner21/views/学会・培训詳細.json | 76
manifest/LEXC03Dahsboard.xml | 10
force-app/main/default/staticresources/lexdatatable.css | 2
force-app/main/default/experiences/Partner21/config/languages.json | 6
force-app/main/default/experiences/Consumable1/views/小组関連リスト.json | 82
force-app/main/default/experiences/Consumable_21/views/lexProductLimitEdit.json | 81
force-app/main/default/experiences/Partner21/views/topicDetail.json | 93
force-app/main/default/classes/LexConsumableAccountControllerTest.cls | 189
force-app/main/default/experiences/Site3/config/mainAppPage.json | 10
force-app/main/default/experiences/Consumable_21/routes/lexRemoveBox.json | 10
force-app/main/default/experiences/Site3/views/search.json | 59
force-app/main/default/classes/LexInventoryListControllerTest.cls | 152
force-app/main/default/experiences/Consumable_21/routes/dashboardList.json | 9
force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.html | 23
force-app/main/default/experiences/Consumable_21/views/userRelatedList.json | 45
force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.html | 467
force-app/main/default/experiences/Partner21/routes/questionDetail.json | 9
force-app/main/default/experiences/Partner21/views/用户リスト.json | 27
force-app/main/default/classes/NewAndEditLeadController.cls | 1174
force-app/main/default/experiences/Consumable1/routes/lexInventory.json | 16
force-app/main/default/experiences/Consumable1/routes/学会・培训関連リスト.json | 14
force-app/main/default/experiences/Consumable1/views/用户List.json | 27
force-app/main/default/experiences/Consumable1/routes/库存上下限编辑.json | 10
force-app/main/default/dashboards/ConsumableSalesDashboard/ezyQWhsDlQfrUPdIMqUmGsdMeWiYAH2.dashboard-meta.xml | 187
force-app/main/default/reports/ConsumableSalesReport/Consumable_Outstock_Invoice_Lex.report-meta.xml | 80
force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.cmp | 21
force-app/main/default/experiences/Partner21/routes/search.json | 10
force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.cmp-meta.xml | 5
force-app/main/default/classes/LexSaleAndDeliveryControllerTest.cls | 97
force-app/main/default/experiences/Consumable_21/routes/reportList.json | 9
force-app/main/default/experiences/Consumable_21/views/groupDetail.json | 62
force-app/main/default/experiences/Consumable1/views/groupList.json | 82
force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.html | 143
force-app/main/default/experiences/Consumable_21/views/消耗品订单RelatedList.json | 45
force-app/main/default/experiences/Consumable_21/routes/streamList.json | 9
force-app/main/default/experiences/Site3/routes/home.json | 10
force-app/main/default/classes/LexUtilityTest.cls | 17
force-app/main/default/experiences/Consumable_21/routes/lexAgencyInfo.json | 10
force-app/main/default/classes/LexNewAndEditContactPIPLController.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/routes/userProfile.json | 9
force-app/main/default/experiences/Partner21/routes/流関連リスト.json | 9
force-app/main/default/experiences/Consumable_21/themes/partnerCentral.json | 184
force-app/main/default/lwc/customMydrComp/customMydrComp.js-meta.xml | 5
force-app/main/default/experiences/Site3/views/error.json | 57
force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.css | 10
force-app/main/default/classes/LexInventoryViewController.cls | 58
force-app/main/default/experiences/Consumable1/views/register.json | 180
force-app/main/default/experiences/Partner21/views/quipDocsRelatedList.json | 39
force-app/main/default/experiences/Partner21/views/学会・培训関連リスト.json | 45
force-app/main/default/networks/Consumable系统.network-meta.xml | 20
force-app/main/default/classes/lexSearchAgencyHospitalControllerTest.cls-meta.xml | 5
force-app/main/default/pages/OFSInsReportLayout.page | 2569
force-app/main/default/experiences/Consumable1/views/lexConInvoiceView.json | 148
force-app/main/default/classes/Batch_FixAttachmentToFiles.cls | 96
force-app/main/default/experiences/Consumable1/views/消耗品订单详细信息.json | 138
force-app/main/default/aura/WeeklyReport/WeeklyReport.css | 85
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportController.js | 749
force-app/main/default/experiences/Consumable_21/routes/fileRelatedList.json | 9
force-app/main/default/classes/WeeklyReportCmp.cls | 1611
force-app/main/default/experiences/Consumable1/views/flow.json | 72
force-app/main/default/experiences/Partner21/routes/reportDetail.json | 9
force-app/main/default/experiences/Consumable1/views/学会・培训Detail.json | 76
force-app/main/default/classes/LexOverdueStockController.cls | 353
force-app/main/default/experiences/Consumable1/routes/lexArriveGoodsMain.json | 16
force-app/main/default/experiences/Partner21/routes/contactSupport.json | 10
force-app/main/default/classes/EquipmentSetShippmentReceived3Controller.cls | 652
force-app/main/default/experiences/Consumable1/views/lexSummonsCreat.json | 148
force-app/main/default/experiences/Partner21/views/search.json | 59
force-app/main/default/experiences/Consumable1/views/streamDetail.json | 70
force-app/main/default/classes/LexOverdueStockControllerTest.cls | 219
force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js | 2175
force-app/main/default/experiences/Consumable1/routes/accountManagement.json | 14
force-app/main/default/experiences/Consumable1/views/用户RelatedList.json | 45
force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html | 279
force-app/main/default/classes/LexSaleOrderControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Partner21/routes/campaignList.json | 9
force-app/main/default/lwc/lexTopPage/lexTopPage.html | 149
force-app/main/default/experiences/Consumable1/routes/仪表板RelatedList.json | 9
force-app/main/default/experiences/Consumable_21/routes/campaignDetail.json | 9
force-app/main/default/experiences/Consumable_21/views/dashboardList.json | 37
force-app/main/default/classes/LexInventoryControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/routes/lexSaleAndDelivery.json | 16
force-app/main/default/classes/DealerInquiryModifyStateController.cls | 125
force-app/main/default/experiences/Consumable1/routes/lexOutboundorderImport.json | 16
force-app/main/default/experiences/Partner21/views/recordList.json | 52
force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.js-meta.xml | 5
force-app/main/default/experiences/Consumable1/routes/topicCatalog.json | 16
force-app/main/default/experiences/Partner21/routes/error.json | 10
force-app/main/default/experiences/Consumable1/views/报表関連リスト.json | 82
force-app/main/default/experiences/Consumable1/views/relatedRecordList.json | 82
force-app/main/default/experiences/Partner21/views/topicCatalog.json | 73
force-app/main/default/experiences/Consumable1/routes/dashboardList.json | 14
force-app/main/default/experiences/Partner21/config/partner2.json | 11
force-app/main/default/experiences/Consumable_21/routes/userSettings.json | 9
force-app/main/default/experiences/Consumable_21/views/login.json | 84
force-app/main/default/experiences/Partner21/routes/relatedRecordList.json | 10
force-app/main/default/reports/ConsumableSalesReport/CurrentMonthSalesRankByProduct.report-meta.xml | 122
force-app/main/default/experiences/Consumable_21/views/resources.json | 75
force-app/main/default/classes/LexConsumableAccountInfoControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/lexConsumable.json | 81
force-app/main/default/experiences/Site3/config/电子签收系统.json | 11
force-app/main/default/experiences/Consumable_21/views/questionDetail.json | 105
force-app/main/default/classes/LexCancelRemoveBoxController.cls | 825
force-app/main/default/experiences/Site3/views/进口单证明细.json | 81
force-app/main/default/experiences/Consumable1/routes/文件RelatedList.json | 9
force-app/main/default/experiences/Consumable_21/views/accountManagement.json | 153
force-app/main/default/experiences/Partner21/routes/userProfile.json | 9
force-app/main/default/experiences/Partner21/views/myAccount.json | 109
force-app/main/default/classes/LexTopPageControllerTest.cls | 424
force-app/main/default/experiences/Consumable1/routes/用户リスト.json | 14
force-app/main/default/experiences/Partner21/routes/报表関連リスト.json | 9
force-app/main/default/classes/LexConsumableAccountControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Site3/routes/recordDetail.json | 9
force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.js | 286
force-app/main/default/experiences/Consumable_21/views/lexArriveGoods.json | 81
force-app/main/default/experiences/Site3/routes/search.json | 10
force-app/main/default/experiences/Consumable1/routes/groupList.json | 14
force-app/main/default/classes/LexArriveGoodsControllerTest1.cls | 214
force-app/main/default/experiences/Consumable_21/routes/lexOutboundorderImport.json | 10
force-app/main/default/experiences/Partner21/views/mDFAndCoop.json | 198
force-app/main/default/experiences/Consumable1/views/cICリスト.json | 96
force-app/main/default/experiences/Consumable1/views/fileList.json | 70
force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.design | 3
force-app/main/default/experiences/Consumable1/routes/groupDetail.json | 14
force-app/main/default/experiences/Consumable1/routes/feedDetail.json | 14
force-app/main/default/experiences/Partner21/views/resources.json | 75
force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraController.js | 9
force-app/main/default/experiences/Partner21/views/recordDetail.json | 76
force-app/main/default/sites/Partner_Sales.site-meta.xml | 34
force-app/main/default/contentassets/OlympusCommunityLoginBG.asset-meta.xml | 28
force-app/main/default/classes/AssetHandler.cls-meta.xml | 4
force-app/main/default/experiences/Consumable1/config/loginAppPage.json | 10
force-app/main/default/experiences/Consumable1/routes/lexConsumableAccountInfoPrint.json | 16
force-app/main/default/experiences/Partner21/views/createRecord.json | 40
force-app/main/default/pages/StraightBackAddress.page | 2143
force-app/main/default/lwc/lexConsumableOrderManage/lexConsumableOrderManage.html | 191
force-app/main/default/experiences/Consumable1/views/neworder.json | 71
force-app/main/default/experiences/Partner21/routes/用户関連リスト.json | 9
force-app/main/default/experiences/Consumable_21/views/reportRelatedList.json | 45
force-app/main/default/experiences/Partner21/views/caseDetail.json | 76
force-app/main/default/aura/CreateTarget/CreateTarget.cmp | 1226
force-app/main/default/experiences/Site3/routes/createRecord.json | 9
force-app/main/default/lwc/lexCustomLightningDatatable/customaccountUrl.html | 10
force-app/main/default/experiences/Consumable_21/routes/feedDetail.json | 9
force-app/main/default/experiences/Partner21/routes/仪表板関連リスト.json | 9
force-app/main/default/classes/LexArriveGoodsMainControllerTest.cls | 133
.sf/orgs/00D6D00000043GHUAY/localSourceTracking/HEAD | 1
force-app/main/default/experiences/Consumable1/routes/contactSupport.json | 16
force-app/main/default/classes/LexNewAndEditContactPIPLController.cls | 59
force-app/main/default/experiences/Partner21/views/dashboardList.json | 37
force-app/main/default/experiences/Partner21/views/userProfile.json | 121
force-app/main/default/classes/LexConsumableControllerTest.cls | 1245
force-app/main/default/reports/ConsumableSalesReport/WeeklyReportForAgency.report-meta.xml | 44
force-app/main/default/experiences/Consumable_21/views/topicCatalog.json | 73
force-app/main/default/classes/LexInventoryViewControllerTest.cls | 1178
force-app/main/default/experiences/Consumable_21/routes/lexOverdueStock.json | 10
force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.css | 2
force-app/main/default/experiences/Consumable_21/routes/register.json | 9
force-app/main/default/experiences/Partner21/routes/groupList.json | 9
force-app/main/default/classes/LayoutDescriberHelperTest.cls | 172
.sf/orgs/00D0l0000004CqBEAU/localSourceTracking/config | 7
force-app/main/default/experiences/Consumable1/routes/checkPassword.json | 14
force-app/main/default/experiences/Consumable1/routes/用户List.json | 9
force-app/main/default/experiences/Consumable1/views/cICRelatedList.json | 45
force-app/main/default/experiences/Partner21/views/streamList.json | 27
force-app/main/default/experiences/Site3/views/forgotPassword.json | 79
force-app/main/default/experiences/Consumable1/routes/error.json | 16
force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html | 207
force-app/main/default/experiences/Consumable1/routes/userSettings.json | 14
force-app/main/default/experiences/Consumable_21/views/reportBuilder.json | 39
force-app/main/default/experiences/Partner21/views/accountManagement.json | 153
force-app/main/default/experiences/Partner21/views/小组関連リスト.json | 45
force-app/main/default/experiences/Consumable_21/routes/forgotPassword.json | 9
force-app/main/default/experiences/Consumable_21/routes/dashboardRelatedList.json | 9
force-app/main/default/experiences/Consumable_21/views/caseDetail.json | 76
force-app/main/default/experiences/Partner21/views/文件関連リスト.json | 45
force-app/main/default/experiences/Consumable1/routes/quipDocsRelatedList.json | 16
force-app/main/default/experiences/Consumable1/routes/loginError.json | 14
force-app/main/default/experiences/Consumable_21/views/recordList.json | 52
force-app/main/default/classes/LexConsumableGoodsInfoTest.cls | 975
force-app/main/default/experiences/Consumable_21/views/lexRemoveBox.json | 81
force-app/main/default/experiences/Partner21/routes/fileDetail.json | 9
force-app/main/default/experiences/Consumable_21/views/myAccount.json | 109
force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.svg | 7
force-app/main/default/experiences/Partner21/config/loginAppPage.json | 7
force-app/main/default/experiences/Consumable1/routes/小组RelatedList.json | 9
force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js | 88
force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.html | 264
force-app/main/default/sites/Site.site-meta.xml | 33
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportHelper.js | 7809 +-
force-app/main/default/experiences/Consumable1/routes/仪表板関連リスト.json | 14
force-app/main/default/experiences/Consumable1/views/lexConsumableAccountInfoPrint.json | 148
force-app/main/default/experiences/Consumable1/views/loginError.json | 104
force-app/main/default/experiences/Consumable_21/routes/消耗品订单RelatedList.json | 10
force-app/main/default/classes/LexInventoryControllerTest.cls | 1087
force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.js | 400
force-app/main/default/experiences/Consumable1/views/用户関連リスト.json | 82
force-app/main/default/classes/LexConInvoiceViewControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/routes/cICRelatedList.json | 9
force-app/main/default/aura/WeeklyReport/WeeklyReport.cmp | 1182
force-app/main/default/classes/LexSummonsCreatControllerTest.cls | 3489 +
force-app/main/default/experiences/Consumable1/views/库存上下限编辑.json | 81
force-app/main/default/experiences/Consumable_21/routes/login.json | 9
force-app/main/default/experiences/Consumable1/routes/search.json | 16
force-app/main/default/experiences/Partner21/routes/streamList.json | 9
force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraRenderer.js | 3
force-app/main/default/experiences/Consumable1/routes/fileList.json | 14
force-app/main/default/experiences/Consumable_21/views/消耗品订单List.json | 52
force-app/main/default/lwc/lexLookup/lexLookup.html | 222
force-app/main/default/classes/LexSearchContractControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/lexInventory.json | 81
force-app/main/default/permissionsets/Community_Consumable_LEX_PS.permissionset-meta.xml | 161
force-app/main/default/classes/LexArriveGoodsMainController.cls | 98
force-app/main/default/experiences/Consumable1/views/home.json | 474
force-app/main/default/experiences/Consumable1/views/lexSaleAndDelivery.json | 148
force-app/main/default/experiences/Consumable_21/routes/lexConsumableOrderManage.json | 10
force-app/main/default/experiences/Consumable_21/views/forgotPassword.json | 79
force-app/main/default/experiences/Consumable1/routes/lexRemoveBox.json | 16
force-app/main/default/experiences/Consumable1/views/lexAgencyInfo.json | 148
force-app/main/default/experiences/Consumable_21/views/lexArriveGoodsMain.json | 81
force-app/main/default/experiences/Partner21/routes/checkPassword.json | 9
force-app/main/default/experiences/Partner21/views/questionDetail.json | 105
force-app/main/default/experiences/Consumable_21/routes/relatedRecordList.json | 10
force-app/main/default/experiences/Consumable_21/views/lexOverdueStock.json | 81
force-app/main/default/experiences/Partner21/views/home.json | 154
force-app/main/default/experiences/Consumable_21/routes/quipDocsRelatedList.json | 10
force-app/main/default/experiences/Consumable_21/views/register.json | 96
force-app/main/default/experiences/Consumable_21/routes/lexArriveGsDetails.json | 10
force-app/main/default/experiences/Consumable1/views/login.json | 136
force-app/main/default/experiences/Partner21/views/streamDetail.json | 39
force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.css | 67
force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.cmp-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/lexConsumableOrderManage.json | 81
force-app/main/default/experiences/Consumable1/views/lexArriveGoods.json | 148
force-app/main/default/experiences/Partner21/views/groupDetail.json | 62
.sf/orgs/00D0l0000004CqBEAU/localSourceTracking/HEAD | 1
force-app/main/default/experiences/Consumable1/routes/流関連リスト.json | 14
force-app/main/default/experiences/Partner21/views/cICリスト.json | 52
force-app/main/default/networks/Consumable系统2.network-meta.xml | 62
force-app/main/default/classes/LexArriveGoodsControllerTest1.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/routes/reportList.json | 14
force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.svg | 7
force-app/main/default/experiences/Site3/routes/checkPassword.json | 9
force-app/main/default/experiences/Consumable1/views/dashboardDetail.json | 106
force-app/main/default/experiences/Partner21/views/报表関連リスト.json | 45
force-app/main/default/experiences/Partner21/views/messages.json | 27
force-app/main/default/experiences/Consumable1/routes/lexSummonsCreat.json | 16
force-app/main/default/experiences/Consumable_21/views/search.json | 55
force-app/main/default/experiences/Partner21/routes/cIC関連リスト.json | 9
force-app/main/default/experiences/Consumable_21/views/lexTopPage.json | 81
force-app/main/default/experiences/Partner21/routes/createRecord.json | 9
force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.css | 2
force-app/main/default/experiences/Consumable_21/views/streamDetail.json | 39
force-app/main/default/experiences/Consumable_21/routes/lexSummonsCreat.json | 10
force-app/main/default/pages/StraightBackAddress.page-meta.xml | 4
force-app/main/default/classes/LexInventoryListController.cls | 86
force-app/main/default/classes/ResponseBodyLWCTest.cls | 8
force-app/main/default/experiences/Consumable_21/routes/questionDetail.json | 9
force-app/main/default/experiences/Consumable1/views/mDFAndCoop.json | 376
force-app/main/default/experiences/Consumable1/views/userSettings.json | 112
force-app/main/default/experiences/Consumable_21/routes/groupList.json | 9
force-app/main/default/classes/LexSearchHospitalControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/cICList.json | 52
force-app/main/default/experiences/Consumable_21/views/userList.json | 27
force-app/main/default/lwc/customMydrComp/customMydrComp.js | 16
force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.cmp-meta.xml | 5
force-app/main/default/classes/LexTopPageControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/routes/mDFAndCoop.json | 9
force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Site3/config/loginAppPage.json | 7
force-app/main/default/experiences/Consumable_21/routes/myAccount.json | 9
force-app/main/default/experiences/Partner21/routes/recordDetail.json | 9
force-app/main/default/classes/LexSaleOrderControllerTest.cls | 1665
force-app/main/default/classes/LightningUtil.cls | 1432
force-app/main/default/lwc/lexCssUtility/lexCssUtility.css | 90
force-app/main/default/experiences/Consumable1/routes/userProfile.json | 14
force-app/main/default/experiences/Consumable_21/views/messages.json | 27
force-app/main/default/classes/LexConInvoiceViewControllerTest.cls | 3696 +
force-app/main/default/experiences/Partner21/routes/home.json | 10
force-app/main/default/experiences/Consumable1/routes/消耗品订单详细信息.json | 16
force-app/main/default/experiences/Consumable1/views/reportBuilder.json | 70
force-app/main/default/experiences/Consumable_21/routes/streamRelatedList.json | 9
force-app/main/default/classes/LexInventoryController.cls | 1748
force-app/main/default/classes/LexConsumableOrderManageControllerTest.cls | 109
force-app/main/default/experiences/Consumable1/views/questionDetail.json | 196
force-app/main/default/experiences/Partner21.site-meta.xml | 5
force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.js | 505
force-app/main/default/classes/LexConsumableController.cls | 283
force-app/main/default/sites/extsurvey.site-meta.xml | 30
force-app/main/default/experiences/Partner21/views/checkPassword.json | 67
force-app/main/default/pages/DealerInquiryModifyState.page | 1386
force-app/main/default/experiences/Consumable1/variations/defaultCustomComponentPropertiesComponentProperties.json | 28
force-app/main/default/experiences/Consumable1/routes/mDFAndCoop.json | 14
force-app/main/default/experiences/Consumable_21/views/cICRelatedList.json | 45
force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.html | 10
force-app/main/default/lwc/lexInventory/lexInventory.html | 313
.gitignore | 1
force-app/main/default/experiences/Partner21/routes/feedDetail.json | 9
force-app/main/default/experiences/Site3/views/createRecord.json | 39
force-app/main/default/experiences/Partner21/routes/学会・培训詳細.json | 9
force-app/main/default/experiences/Partner21/views/dashboardDetail.json | 58
force-app/main/default/experiences/Site3/routes/loginError.json | 9
force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.css | 2
force-app/main/default/classes/LexConsumableAccountSOQL.cls | 34
force-app/main/default/experiences/Consumable1/views/学会・培训RelatedList.json | 45
force-app/main/default/networks/电子签收系统.network-meta.xml | 57
force-app/main/default/experiences/Partner21/routes/dashboardDetail.json | 9
force-app/main/default/experiences/Partner21/views/fileDetail.json | 37
force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css | 39
force-app/main/default/experiences/Consumable_21/routes/lexArriveGoods.json | 10
force-app/main/default/lwc/lexCustomLightningDatatable/customShipmentNumber.html | 11
force-app/main/default/experiences/Consumable1/views/error.json | 102
force-app/main/default/experiences/Consumable_21/config/languages.json | 6
force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js | 984
force-app/main/default/experiences/Consumable1/routes/新建消耗品订单.json | 10
force-app/main/default/reports/ConsumableSalesReport/Report_Outbound_Lex.report-meta.xml | 67
force-app/main/default/experiences/Partner21/routes/fileList.json | 9
force-app/main/default/labels/CustomLabels.labels-meta.xml | 6345 ++
force-app/main/default/experiences/Consumable_21/views/dashboardRelatedList.json | 45
force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.css | 17
force-app/main/default/experiences/Consumable1/routes/lexOverdueStock.json | 16
force-app/main/default/experiences/Site3/views/register.json | 96
force-app/main/default/classes/LexConsumableControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/views/学会・培训詳細.json | 138
force-app/main/default/experiences/Consumable1/views/消耗品订单列表.json | 96
force-app/main/default/experiences/Partner21/views/register.json | 96
force-app/main/default/experiences/Consumable_21/routes/checkPassword.json | 9
.vscode/settings.json | 4
force-app/main/default/experiences/Consumable1/views/lexOutboundorderImport.json | 148
force-app/main/default/experiences/Consumable_21/views/relatedRecordList.json | 45
force-app/main/default/experiences/Partner21/routes/resources.json | 10
force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js | 520
force-app/main/default/experiences/Partner21/routes/quipDocsRelatedList.json | 10
force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.html | 217
force-app/main/default/experiences/Partner21/routes/小组関連リスト.json | 9
force-app/main/default/sites/Partner2.site-meta.xml | 34
force-app/main/default/triggers/ContentDocumentTrigger.trigger | 5
force-app/main/default/experiences/Partner21/views/feedDetail.json | 39
force-app/main/default/experiences/Consumable1/views/search.json | 104
force-app/main/default/experiences/Partner21/views/forgotPassword.json | 79
force-app/main/default/experiences/Consumable1/views/accountManagement.json | 284
force-app/main/default/classes/Batch_FixAttachmentToFilesTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/views/forgotPassword.json | 146
force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.js | 561
force-app/main/default/experiences/Consumable1/routes/cIC関連リスト.json | 14
force-app/main/default/experiences/Consumable_21/routes/消耗品订单List.json | 10
force-app/main/default/experiences/Consumable_21/views/streamList.json | 27
force-app/main/default/experiences/Site3/routes/relatedRecordList.json | 10
force-app/main/default/experiences/Partner21/routes/myAccount.json | 9
force-app/main/default/experiences/Consumable_21/views/groupList.json | 47
force-app/main/default/experiences/Consumable_21/views/campaignRelatedList.json | 45
force-app/main/default/reports/ConsumableSalesReport.reportFolder-meta.xml | 19
force-app/main/default/experiences/Consumable1/routes/用户関連リスト.json | 14
force-app/main/default/experiences/Consumable1/views/reportDetail.json | 104
force-app/main/default/classes/AssetHandler.cls | 941
force-app/main/default/experiences/Consumable1/routes/login.json | 14
force-app/main/default/experiences/Consumable_21/brandingSets/partnerCentral.json | 56
force-app/main/default/experiences/Consumable1/views/recordDetail.json | 138
force-app/main/default/experiences/Consumable1/routes/lexAgencyInfo.json | 16
force-app/main/default/experiences/Consumable_21/routes/recordDetail.json | 9
force-app/main/default/experiences/Consumable1/views/quipDocsRelatedList.json | 70
force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportHelper.js | 316
force-app/main/default/experiences/Consumable1/routes/myAccount.json | 14
force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.html | 146
force-app/main/default/experiences/Consumable1/config/languages.json | 8
force-app/main/default/experiences/Consumable1/views/topicCatalog.json | 134
force-app/main/default/experiences/Consumable_21/variations/defaultNavigationMenuComponentProperties.json | 17
force-app/main/default/experiences/Consumable_21/routes/topicCatalog.json | 10
force-app/main/default/experiences/Consumable1/views/topicDetail.json | 172
force-app/main/default/classes/LexLicenceReminderControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/userProfile.json | 121
force-app/main/default/experiences/Partner21/views/用户関連リスト.json | 45
force-app/main/default/contentassets/OlympusCommunityLogo.asset-meta.xml | 28
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.css | 109
force-app/main/default/classes/LexSearchHospitalControllerTest.cls | 9
force-app/main/default/experiences/Partner21/routes/flow.json | 10
force-app/main/default/aura/CreateTarget/CreateTarget.cmp-meta.xml | 4
force-app/main/default/experiences/Consumable1/config/mainAppPage.json | 16
force-app/main/default/experiences/Consumable1/views/lexCancelRemoveBox.json | 148
force-app/main/default/experiences/Consumable1/views/lexConsumable.json | 148
force-app/main/default/experiences/Consumable_21/routes/campaignRelatedList.json | 9
force-app/main/default/experiences/Consumable_21/routes/lexConInvoiceView.json | 10
force-app/main/default/experiences/Partner21/routes/用户リスト.json | 9
force-app/main/default/experiences/Consumable_21/routes/消耗品订单Detail.json | 10
force-app/main/default/classes/ArriveGoodsControllerTestV2.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/lexAgencyInfo.json | 81
force-app/main/default/classes/LexArriveGsDetailsController.cls | 114
force-app/main/default/experiences/Consumable1/views/仪表板RelatedList.json | 45
force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.html | 7
force-app/main/default/experiences/Consumable1/views/文件関連リスト.json | 82
force-app/main/default/experiences/Consumable_21/routes/lexArriveGoodsMain.json | 10
force-app/main/default/experiences/Consumable_21/views/fileDetail.json | 37
force-app/main/default/classes/LexConsumableAccountSOQLTest.cls | 134
force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.cmp | 25
force-app/main/default/experiences/Consumable_21/routes/lexInventory.json | 10
force-app/main/default/experiences/Consumable_21/views/error.json | 57
force-app/main/default/classes/LexConInvoiceListTest.cls | 184
force-app/main/default/experiences/Partner21/views/campaignList.json | 150
force-app/main/default/experiences/Site3/views/relatedRecordList.json | 45
force-app/main/default/pages/DealerInquiryModifyState.page-meta.xml | 4
force-app/main/default/classes/LexConInvoiceViewController.cls | 130
force-app/main/default/classes/LexInventoryListControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/routes/lexConInvoiceView.json | 16
force-app/main/default/experiences/Consumable1/variations/defaultNavigationMenuComponentProperties.json | 17
force-app/main/default/experiences/Consumable_21/views/home.json | 254
force-app/main/default/sites/Site2.site-meta.xml | 33
force-app/main/default/classes/Product2Handler.cls | 440
force-app/main/default/aura/WeeklyReport/WeeklyReportController.js | 347
force-app/main/default/experiences/Consumable1/views/feedDetail.json | 70
force-app/main/default/experiences/Consumable1/views/checkPassword.json | 122
force-app/main/default/classes/NewAndEditLeadControllerTest.cls | 252
force-app/main/default/experiences/Consumable1/routes/报表RelatedList.json | 9
force-app/main/default/classes/LayoutDescriberHelper.cls | 1070
force-app/main/default/experiences/Consumable1/views/lexRemoveBox.json | 148
force-app/main/default/classes/LexConsumableGoodsInfo.cls | 781
force-app/main/default/experiences/Partner21/routes/学会・培训関連リスト.json | 9
force-app/main/default/experiences/Partner21/views/userSettings.json | 60
force-app/main/default/experiences/Site3/routes/奥林巴斯电子签收系统.json | 10
force-app/main/default/experiences/Consumable_21/views/groupRelatedList.json | 45
force-app/main/default/experiences/Consumable_21/views/lexSaleAndDelivery.json | 81
force-app/main/default/experiences/Partner21/routes/cICリスト.json | 9
force-app/main/default/experiences/Consumable_21/routes/lexInventoryView.json | 10
force-app/main/default/experiences/Consumable1/views/仪表板関連リスト.json | 82
force-app/main/default/contentassets/OlympusCommunityLogo.asset | 0
force-app/main/default/experiences/Consumable_21/views/lexInventoryView.json | 81
force-app/main/default/lwc/lexCustomLightningDatatable/customMyDrCheckBox.html | 10
force-app/main/default/experiences/Partner21/routes/文件関連リスト.json | 9
force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.js-meta.xml | 5
manifest/LEXC03report.xml | 18
force-app/main/default/experiences/Consumable1/views/resources.json | 138
manifest/LEXC00basecmp.xml | 41
force-app/main/default/experiences/Consumable_21/views/lexArriveGsDetails.json | 81
force-app/main/default/experiences/Consumable1/views/consumableDetailFix.json | 294
force-app/main/default/experiences/Partner21/routes/streamDetail.json | 9
force-app/main/default/networks/消耗品管理系统.network-meta.xml | 67
force-app/main/default/classes/LexSummonsCreatController.cls | 2310
force-app/main/default/experiences/Consumable1/routes/home.json | 16
force-app/main/default/experiences/Consumable1/views/recordList.json | 96
force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.js-meta.xml | 5
force-app/main/default/classes/LexConsumableOrderManageControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/lexConInvoiceView.json | 81
force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.js | 15
force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js | 3108
force-app/main/default/experiences/Partner21/routes/mDFAndCoop.json | 9
force-app/main/default/classes/LexConInvoicedetailsControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/routes/学会・培训RelatedList.json | 9
force-app/main/default/experiences/Site3.site-meta.xml | 5
force-app/main/default/experiences/Partner21/views/reportBuilder.json | 39
force-app/main/default/classes/LexConsumableAccountController.cls | 73
force-app/main/default/experiences/Consumable_21.site-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/userSettings.json | 60
force-app/main/default/classes/ArriveGoodsController.cls | 5071 +
force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.html | 190
force-app/main/default/classes/Batch_FixAttachmentToFiles.cls-meta.xml | 5
force-app/main/default/experiences/Consumable_21/views/消耗品订单Detail.json | 76
force-app/main/default/experiences/Consumable_21/routes/messages.json | 9
force-app/main/default/experiences/Partner21/routes/forgotPassword.json | 9
force-app/main/default/experiences/Consumable1/themes/partnerCentral.json | 342
force-app/main/default/reports/ConsumableSalesReport/CurrentMonthSalesRankByAccount.report-meta.xml | 116
force-app/main/default/experiences/Partner21/routes/dashboardList.json | 9
force-app/main/default/sites/Consumable_2.site-meta.xml | 34
force-app/main/default/experiences/Consumable1/config/consumable系统.json | 18
force-app/main/default/classes/LexUpAccountProLimit.cls | 129
force-app/main/default/contentassets/OlympusCommunityLoginBG.asset | 0
force-app/main/default/experiences/Consumable1/routes/消耗品订单列表.json | 16
force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js | 3323
force-app/main/default/triggers/ConsumableOrderTrigger.trigger | 200
force-app/main/default/experiences/Site3/views/checkPassword.json | 67
force-app/main/default/experiences/Consumable_21/routes/userList.json | 9
.sf/orgs/00D6D00000043GHUAY/localSourceTracking/config | 7
force-app/main/default/classes/LexConInvoicedetailsControllerTest.cls | 356
force-app/main/default/experiences/Partner21/routes/recordList.json | 10
force-app/main/default/experiences/Consumable1/routes/resources.json | 16
force-app/main/default/classes/LexOutboundorderImportControllerTest.cls | 612
force-app/main/default/classes/ResponseBodyLWCTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/routes/lexConsumableAccount.json | 16
force-app/main/default/dashboards/ConsumableSalesDashboard.dashboardFolder-meta.xml | 19
force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.js | 287
force-app/main/default/experiences/Consumable1/views/reportList.json | 66
force-app/main/default/experiences/Consumable1/routes/fileDetail.json | 14
force-app/main/default/experiences/Consumable_21/routes/reportBuilder.json | 9
force-app/main/default/experiences/Consumable1/views/lexConsumableOrderManage.json | 148
force-app/main/default/classes/LexConsumableAccountSOQLTest.cls-meta.xml | 5
force-app/main/default/classes/LexRemoveBoxControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/routes/lexProductLimitEdit.json | 16
force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.html | 244
force-app/main/default/classes/LexSummonsCreatControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/views/学会・培训関連リスト.json | 82
force-app/main/default/experiences/Consumable_21/views/lexCancelRemoveBox.json | 81
force-app/main/default/classes/RentalApplyEquipmentSetDetailHandler.cls | 4218 -
force-app/main/default/experiences/Consumable1/brandingSets/partnerCentral.json | 108
force-app/main/default/experiences/Consumable_21/views/lexOutboundorderImport.json | 81
force-app/main/default/experiences/Partner21/views/groupList.json | 47
force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.html | 793
force-app/main/default/networks/Partner2.network-meta.xml | 57
force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunHelper.js | 3
force-app/main/default/experiences/Consumable_21/routes/fileDetail.json | 9
force-app/main/default/experiences/Consumable_21/views/lexSummonsCreat.json | 81
force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js | 1645
force-app/main/default/classes/LexOutboundorderImportControllerTest.cls-meta.xml | 5
force-app/main/default/experiences/Consumable1/views/用户リスト.json | 50
force-app/main/default/experiences/Consumable1/views/流関連リスト.json | 50
force-app/main/default/experiences/Consumable_21/config/loginAppPage.json | 7
force-app/main/default/experiences/Consumable_21/routes/lexProductLimitEdit.json | 10
force-app/main/default/experiences/Site3/views/loginError.json | 57
force-app/main/default/networks/Partner Sales.network-meta.xml | 60
force-app/main/default/permissionsets/Community_LEX_PS.permissionset-meta.xml | 166
force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger | 584
force-app/main/default/experiences/Partner21/routes/caseDetail.json | 9
force-app/main/default/experiences/Consumable1/views/文件RelatedList.json | 45
force-app/main/default/classes/LexConsumableAccountInfoControllerTest.cls | 16
force-app/main/default/experiences/Consumable_21/routes/home.json | 10
force-app/main/default/lwc/lexConsumable/lexConsumable.js | 3040
force-app/main/default/lwc/lexInventory/lexInventory.css | 19
force-app/main/default/experiences/Site3/routes/login.json | 9
/dev/null | 9
force-app/main/default/experiences/Consumable1/views/lexArriveGoodsMain.json | 148
force-app/main/default/lwc/lexConsumable/lexConsumable.html | 981
force-app/main/default/experiences/Consumable1/routes/reportDetail.json | 14
force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html | 1715
force-app/main/default/experiences/Consumable1/views/dashboardList.json | 66
force-app/main/default/experiences/Consumable_21/views/campaignList.json | 150
force-app/main/default/triggers/ContentDocumentLink.trigger | 10
force-app/main/default/classes/ArriveGoodsControllerTest.cls | 7326 +-
force-app/main/default/experiences/Consumable1/routes/lexConsumableOrderManage.json | 16
force-app/main/default/experiences/Consumable1/views/streamList.json | 46
force-app/main/default/classes/LexArriveGoodsController.cls | 257
force-app/main/default/experiences/Consumable1/routes/campaignList.json | 14
force-app/main/default/experiences/Consumable1/routes/topicDetail.json | 14
force-app/main/default/experiences/Consumable_21/views/streamRelatedList.json | 27
force-app/main/default/experiences/Site3/views/login.json | 84
force-app/main/default/experiences/Consumable_21/views/fileList.json | 39
force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.js | 3
.sf/orgs/00D0k000000EKIhEAO/localSourceTracking/HEAD | 1
force-app/main/default/experiences/Consumable_21/views/reportDetail.json | 57
force-app/main/default/experiences/Consumable_21/routes/lexCancelRemoveBox.json | 10
752 files changed, 96,141 insertions(+), 42,333 deletions(-)
diff --git a/.gitignore b/.gitignore
index cecd6fb..dc55618 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,4 @@
# Local environment variables
.env
.vim-force.com/session.properties
+.sf/config.json
diff --git a/.sf/orgs/00D0k000000EKIhEAO/localSourceTracking/HEAD b/.sf/orgs/00D0k000000EKIhEAO/localSourceTracking/HEAD
new file mode 100644
index 0000000..b870d82
--- /dev/null
+++ b/.sf/orgs/00D0k000000EKIhEAO/localSourceTracking/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/main
diff --git a/.sf/orgs/00D0k000000EKIhEAO/localSourceTracking/config b/.sf/orgs/00D0k000000EKIhEAO/localSourceTracking/config
new file mode 100644
index 0000000..d545cda
--- /dev/null
+++ b/.sf/orgs/00D0k000000EKIhEAO/localSourceTracking/config
@@ -0,0 +1,7 @@
+[core]
+ repositoryformatversion = 0
+ filemode = false
+ bare = false
+ logallrefupdates = true
+ symlinks = false
+ ignorecase = true
diff --git a/.sf/orgs/00D0l0000004CqBEAU/localSourceTracking/HEAD b/.sf/orgs/00D0l0000004CqBEAU/localSourceTracking/HEAD
new file mode 100644
index 0000000..b870d82
--- /dev/null
+++ b/.sf/orgs/00D0l0000004CqBEAU/localSourceTracking/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/main
diff --git a/.sf/orgs/00D0l0000004CqBEAU/localSourceTracking/config b/.sf/orgs/00D0l0000004CqBEAU/localSourceTracking/config
new file mode 100644
index 0000000..d545cda
--- /dev/null
+++ b/.sf/orgs/00D0l0000004CqBEAU/localSourceTracking/config
@@ -0,0 +1,7 @@
+[core]
+ repositoryformatversion = 0
+ filemode = false
+ bare = false
+ logallrefupdates = true
+ symlinks = false
+ ignorecase = true
diff --git a/.sf/orgs/00D6D00000043GHUAY/localSourceTracking/HEAD b/.sf/orgs/00D6D00000043GHUAY/localSourceTracking/HEAD
new file mode 100644
index 0000000..b870d82
--- /dev/null
+++ b/.sf/orgs/00D6D00000043GHUAY/localSourceTracking/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/main
diff --git a/.sf/orgs/00D6D00000043GHUAY/localSourceTracking/config b/.sf/orgs/00D6D00000043GHUAY/localSourceTracking/config
new file mode 100644
index 0000000..d545cda
--- /dev/null
+++ b/.sf/orgs/00D6D00000043GHUAY/localSourceTracking/config
@@ -0,0 +1,7 @@
+[core]
+ repositoryformatversion = 0
+ filemode = false
+ bare = false
+ logallrefupdates = true
+ symlinks = false
+ ignorecase = true
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 35948a3..f2bf3ab 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -5,6 +5,6 @@
"**/.sfdx": true
},
"salesforcedx-vscode-core.show-cli-success-msg": false,
- "open-in-browser.default": "{\"opn-in-browser.default\":\"Microsoft Edge\"}",
- "salesforcedx-vscode-apex.java.home": "C:\\Users\\buli\\Documents\\Software\\JDK\\jdk19\\bin"
+ "salesforcedx-vscode-apex.java.home": "C:\\Users\\buli\\Documents\\Software\\JDK11\\",
+ "open-in-browser.default": "{\"opn-in-browser.default\":\"Microsoft Edge\"}"
}
diff --git a/force-app/main/default/aura/CreateTarget/CreateTarget.cmp b/force-app/main/default/aura/CreateTarget/CreateTarget.cmp
index cd40cf4..225f3e3 100644
--- a/force-app/main/default/aura/CreateTarget/CreateTarget.cmp
+++ b/force-app/main/default/aura/CreateTarget/CreateTarget.cmp
@@ -1,318 +1,926 @@
-<aura:component controller="CreateTargetCmp" implements="forceCommunity:availableForAllPageTypes,force:hasRecordId" access="global" >
- <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
- <aura:attribute name="recordId" type="Id" />
- <aura:attribute name="hospital" type="string" default=""/>
- <aura:attribute name="test" type="string" default="1"/>
- <aura:handler event="force:refreshView" action="{!c.isRefreshed}" />
- <aura:attribute name="hospitalId" type="string" default=""/>
- <aura:attribute name="GIAmount" type="string" default="0.00"/>
- <aura:attribute name="BFAmount" type="string" default="0.00"/>
- <aura:attribute name="ETAmount" type="string" default="0.00"/>
- <aura:attribute name="GSAmount" type="string" default="0.00"/>
- <aura:attribute name="UROAmount" type="string" default="0.00"/>
- <aura:attribute name="GYNAmount" type="string" default="0.00"/>
- <aura:attribute name="ENTAmount" type="string" default="0.00"/>
- <aura:attribute name="OTHAmount" type="string" default="0.00"/>
- <aura:attribute name="OCMTerm" type="string" default=""/>
- <aura:attribute name="button_text" type="string" default="鏂板缓"/>
- <aura:handler name="change" value="{!v.record.Agency_Hospital__c}" action="{!c.hosChange}"/>
- <aura:attribute name="hospitalList" type="sobject[]" />
- <aura:attribute name="record" type="Agency_Opportunity__c" default="{'sobjectType':'Agency_Opportunity__c'}"/>
- <aura:handler name="change" value="{!v.recordET.Product_Category1__c}" action="{!c.productcategoryETChange1}"/>
- <aura:handler name="change" value="{!v.recordET.Product_Category2__c}" action="{!c.productcategoryETChange2}"/>
- <aura:handler name="change" value="{!v.recordET.Product_Category3__c}" action="{!c.productcategoryETChange3}"/>
-
+<aura:component
+ controller="CreateTargetCmp"
+ implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes"
+ access="global"
+>
+ <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
+ <aura:attribute name="recordId" type="Id" />
+ <aura:attribute name="hospital" type="string" default="" />
+ <aura:attribute name="test" type="string" default="1" />
+ <aura:handler event="force:refreshView" action="{!c.isRefreshed}" />
+ <aura:attribute name="hospitalId" type="string" default="" />
+ <aura:attribute name="GIAmount" type="string" default="0.00" />
+ <aura:attribute name="BFAmount" type="string" default="0.00" />
+ <aura:attribute name="ETAmount" type="string" default="0.00" />
+ <aura:attribute name="GSAmount" type="string" default="0.00" />
+ <aura:attribute name="UROAmount" type="string" default="0.00" />
+ <aura:attribute name="GYNAmount" type="string" default="0.00" />
+ <aura:attribute name="ENTAmount" type="string" default="0.00" />
+ <aura:attribute name="OTHAmount" type="string" default="0.00" />
+ <aura:attribute name="OCMTerm" type="string" default="" />
+ <aura:attribute name="button_text" type="string" default="鏂板缓" />
+ <aura:handler
+ name="change"
+ value="{!v.record.Agency_Hospital__c}"
+ action="{!c.hosChange}"
+ />
+ <aura:attribute name="hospitalList" type="sobject[]" />
+ <aura:attribute
+ name="record"
+ type="Agency_Opportunity__c"
+ default="{'sobjectType':'Agency_Opportunity__c'}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordET.Product_Category1__c}"
+ action="{!c.productcategoryETChange1}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordET.Product_Category2__c}"
+ action="{!c.productcategoryETChange2}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordET.Product_Category3__c}"
+ action="{!c.productcategoryETChange3}"
+ />
- <aura:handler name="change" value="{!v.recordBF.Product_Category1__c}" action="{!c.productcategoryBFChange1}"/>
- <aura:handler name="change" value="{!v.recordBF.Product_Category2__c}" action="{!c.productcategoryBFChange2}"/>
- <aura:handler name="change" value="{!v.recordBF.Product_Category3__c}" action="{!c.productcategoryBFChange3}"/>
- <aura:handler name="change" value="{!v.recordGS.Product_Category1__c}" action="{!c.productcategoryGSChange1}"/>
- <aura:handler name="change" value="{!v.recordGS.Product_Category2__c}" action="{!c.productcategoryGSChange2}"/>
- <aura:handler name="change" value="{!v.recordGS.Product_Category3__c}" action="{!c.productcategoryGSChange3}"/>
- <aura:handler name="change" value="{!v.recordURO.Product_Category1__c}" action="{!c.productcategoryUROChange1}"/>
- <aura:handler name="change" value="{!v.recordURO.Product_Category2__c}" action="{!c.productcategoryUROChange2}"/>
- <aura:handler name="change" value="{!v.recordURO.Product_Category3__c}" action="{!c.productcategoryUROChange3}"/>
- <aura:handler name="change" value="{!v.recordGYN.Product_Category1__c}" action="{!c.productcategoryGYNChange1}"/>
- <aura:handler name="change" value="{!v.recordGYN.Product_Category2__c}" action="{!c.productcategoryGYNChange2}"/>
- <aura:handler name="change" value="{!v.recordGYN.Product_Category3__c}" action="{!c.productcategoryGYNChange3}"/>
- <aura:handler name="change" value="{!v.recordENT.Product_Category1__c}" action="{!c.productcategoryENTChange1}"/>
- <aura:handler name="change" value="{!v.recordENT.Product_Category2__c}" action="{!c.productcategoryENTChange2}"/>
- <aura:handler name="change" value="{!v.recordENT.Product_Category3__c}" action="{!c.productcategoryENTChange3}"/>
- <aura:handler name="change" value="{!v.recordOTH.Product_Category1__c}" action="{!c.productcategoryOTHChange1}"/>
- <aura:handler name="change" value="{!v.recordOTH.Product_Category2__c}" action="{!c.productcategoryOTHChange2}"/>
- <aura:handler name="change" value="{!v.recordOTH.Product_Category3__c}" action="{!c.productcategoryOTHChange3}"/>
- <div class="button_area">
- <ui:button label="{!v.button_text}" press="{!c.toggle_report}"/>
+ <aura:handler
+ name="change"
+ value="{!v.recordBF.Product_Category1__c}"
+ action="{!c.productcategoryBFChange1}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordBF.Product_Category2__c}"
+ action="{!c.productcategoryBFChange2}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordBF.Product_Category3__c}"
+ action="{!c.productcategoryBFChange3}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordGS.Product_Category1__c}"
+ action="{!c.productcategoryGSChange1}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordGS.Product_Category2__c}"
+ action="{!c.productcategoryGSChange2}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordGS.Product_Category3__c}"
+ action="{!c.productcategoryGSChange3}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordURO.Product_Category1__c}"
+ action="{!c.productcategoryUROChange1}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordURO.Product_Category2__c}"
+ action="{!c.productcategoryUROChange2}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordURO.Product_Category3__c}"
+ action="{!c.productcategoryUROChange3}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordGYN.Product_Category1__c}"
+ action="{!c.productcategoryGYNChange1}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordGYN.Product_Category2__c}"
+ action="{!c.productcategoryGYNChange2}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordGYN.Product_Category3__c}"
+ action="{!c.productcategoryGYNChange3}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordENT.Product_Category1__c}"
+ action="{!c.productcategoryENTChange1}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordENT.Product_Category2__c}"
+ action="{!c.productcategoryENTChange2}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordENT.Product_Category3__c}"
+ action="{!c.productcategoryENTChange3}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordOTH.Product_Category1__c}"
+ action="{!c.productcategoryOTHChange1}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordOTH.Product_Category2__c}"
+ action="{!c.productcategoryOTHChange2}"
+ />
+ <aura:handler
+ name="change"
+ value="{!v.recordOTH.Product_Category3__c}"
+ action="{!c.productcategoryOTHChange3}"
+ />
+ <div class="button_area">
+ <ui:button label="{!v.button_text}" press="{!c.toggle_report}" />
</div>
- <div aura:id="modal_window" role="dialog" tabindex="-1" class="disp_none slds-modal slds-fade-in-open slds-modal--large" aria-labelledby="headerTarget">
- <div class="slds-modal__container">
- <div class="slds-modal__header">
- <button class="slds-button slds-modal__close slds-button--icon-inverse" title="Close" onclick="{!c.toggle_report}">
- <lightning:icon class="close_icn" iconName="utility:close" size="medium" alternativeText="Indicates approval"/>
- <span class="slds-assistive-text">Close</span>
- </button>
- <h2 id="headerTarget" class="slds-text-heading--medium">鐩爣({!v.OCMTerm})</h2>
- </div>
- <div class="slds-modal__content slds-grow slds-p-around--medium">
- <div class="slds-box slds-theme--shade ">
- <fieldset class="slds-form--compound">
- <div class="slds-form-element__group">
- <div class="slds-form-element__row">
- <div class="slds-form-element slds-size--1-of-2">
- <label class="slds-form-element__label" for="input-hos">鍖婚櫌</label>
- <force:inputField value="{!v.record.Agency_Hospital__c}" aura:id="input-hos"/>
- </div>
- </div>
- <!-- <h4 class="slds-section__title">璁块棶鐩爣</h4>
+ <div
+ aura:id="modal_window"
+ role="dialog"
+ tabindex="-1"
+ class="disp_none slds-modal slds-fade-in-open slds-modal--large"
+ aria-labelledby="headerTarget"
+ >
+ <div class="slds-modal__container">
+ <div class="slds-modal__header">
+ <button
+ class="slds-button slds-modal__close slds-button--icon-inverse"
+ title="Close"
+ onclick="{!c.toggle_report}"
+ >
+ <lightning:icon
+ iconName="utility:close"
+ size="medium"
+ alternative-text="close"
+ variant="inverse"
+ />
+ <span class="slds-assistive-text">Close</span>
+ </button>
+ <h2 id="headerTarget" class="slds-text-heading--medium">
+ 鐩爣({!v.OCMTerm})
+ </h2>
+ </div>
+ <div class="slds-modal__content slds-grow slds-p-around--medium">
+ <div class="slds-box slds-theme--shade">
+ <fieldset class="slds-form--compound">
+ <div class="slds-form-element__group">
+ <div class="slds-form-element__row">
+ <div
+ class="slds-form-element slds-size--1-of-2"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >鍖婚櫌</label
+ >
+ <!-- <force:inputField value="{!v.record.Agency_Hospital__c}" aura:id="input-hos"/> -->
+ <lightning:recordEditForm
+ objectApiName="Agency_Opportunity__c"
+ >
+ <lightning:inputField
+ variant="label-hidden"
+ fieldName="Agency_Hospital__c"
+ value="{!v.record.Agency_Hospital__c}"
+ aura:id="input-hos"
+ />
+ </lightning:recordEditForm>
+ </div>
+ </div>
+ <!-- <h4 class="slds-section__title">璁块棶鐩爣</h4>
<div class="slds-form-element__row">
<div class="slds-form-element slds-size-1-of-2">
<label class="slds-form-element__label" for="input-target">鐩爣鍖婚櫌</label>
<force:inputField value="{!v.record2.TargetHospital__c}" aura:id="input-target"/>
</div>
</div> -->
- <h4 class="slds-section__title">浜у搧鐩爣</h4>
- <div class="slds-form-element__row">
- <div class="slds-size--1-of-7 slds-grid--align-center">
- <div style="margin-top: 32px;">娑堝寲绉�</div>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎1</label>
- <ui:inputSelect aura:id="select_GI1" class="slds-select" change="{!c.productcategoryGIChange1}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_GI4_1" class="slds-select"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎2</label>
- <ui:inputSelect aura:id="select_GI2" class="slds-select" change="{!c.productcategoryGIChange2}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_GI4_2" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎3</label>
- <ui:inputSelect aura:id="select_GI3" class="slds-select" change="{!c.productcategoryGIChange3}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_GI4_3" class="slds-select"/>
- </div>
- </div>
- <div class="slds-form-element__row">
- <div class="slds-size--1-of-7 slds-grid--align-center">
- <div style="margin-top: 32px;">ET鑰楁潗</div>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎1</label>
- <ui:inputSelect aura:id="select_ET1" class="slds-select" change="{!c.productcategoryETChange1}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_ET4_1" class="slds-select"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎2</label>
- <ui:inputSelect aura:id="select_ET2" class="slds-select" change="{!c.productcategoryETChange2}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_ET4_2" class="slds-select"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎3</label>
- <ui:inputSelect aura:id="select_ET3" class="slds-select" change="{!c.productcategoryETChange3}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_ET4_3" class="slds-select" />
- </div>
- </div>
- <div class="slds-form-element__row">
- <div class="slds-size--1-of-7 slds-grid--align-center">
- <div style="margin-top: 32px;">鍛煎惛绉�</div>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎1</label>
- <ui:inputSelect aura:id="select_BF1" class="slds-select" change="{!c.productcategoryBFChange1}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_BF4_1" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎2</label>
- <ui:inputSelect aura:id="select_BF2" class="slds-select" change="{!c.productcategoryBFChange2}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_BF4_2" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎3</label>
- <ui:inputSelect aura:id="select_BF3" class="slds-select" change="{!c.productcategoryBFChange3}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_BF4_3" class="slds-select" />
- </div>
- </div>
- <div class="slds-form-element__row">
- <div class="slds-size--1-of-7 slds-grid--align-center">
- <div style="margin-top: 32px;">鏅绉�</div>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎1</label>
- <ui:inputSelect aura:id="select_GS1" class="slds-select" change="{!c.productcategoryGSChange1}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_GS4_1" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎2</label>
- <ui:inputSelect aura:id="select_GS2" class="slds-select" change="{!c.productcategoryGSChange2}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_GS4_2" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎3</label>
- <ui:inputSelect aura:id="select_GS3" class="slds-select" change="{!c.productcategoryGSChange3}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_GS4_3" class="slds-select" />
- </div>
- </div>
- <div class="slds-form-element__row">
- <div class="slds-size--1-of-7 slds-grid--align-center">
- <div style="margin-top: 32px;">娉屽翱绉�</div>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎1</label>
- <ui:inputSelect aura:id="select_URO1" class="slds-select" change="{!c.productcategoryUROChange1}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_URO4_1" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎2</label>
- <ui:inputSelect aura:id="select_URO2" class="slds-select" change="{!c.productcategoryUROChange2}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_URO4_2" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎3</label>
- <ui:inputSelect aura:id="select_URO3" class="slds-select" change="{!c.productcategoryUROChange3}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_URO4_3" class="slds-select" />
- </div>
- </div>
- <div class="slds-form-element__row">
- <div class="slds-size--1-of-7 slds-grid--align-center">
- <div style="margin-top: 32px;">濡囩</div>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎1</label>
- <ui:inputSelect aura:id="select_GYN1" class="slds-select" change="{!c.productcategoryGYNChange1}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_GYN4_1" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎2</label>
- <ui:inputSelect aura:id="select_GYN2" class="slds-select" change="{!c.productcategoryGYNChange2}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_GYN4_2" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎3</label>
- <ui:inputSelect aura:id="select_GYN3" class="slds-select" change="{!c.productcategoryGYNChange3}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_GYN4_3" class="slds-select" />
- </div>
- </div>
- <div class="slds-form-element__row">
- <div class="slds-size--1-of-7 slds-grid--align-center">
- <div style="margin-top: 32px;">鑰抽蓟鍠夌</div>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎1</label>
- <ui:inputSelect aura:id="select_ENT1" class="slds-select" change="{!c.productcategoryENTChange1}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_ENT4_1" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎2</label>
- <ui:inputSelect aura:id="select_ENT2" class="slds-select" change="{!c.productcategoryENTChange2}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_ENT4_2" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎3</label>
- <ui:inputSelect aura:id="select_ENT3" class="slds-select" change="{!c.productcategoryENTChange3}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_ENT4_3" class="slds-select" />
- </div>
- </div>
- <div class="slds-form-element__row">
- <div class="slds-size--1-of-7 slds-grid--align-center">
- <div style="margin-top: 32px;">鍏朵粬</div>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎1</label>
- <ui:inputSelect aura:id="select_OTH1" class="slds-select" change="{!c.productcategoryOTHChange1}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_OTH4_1" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎2</label>
- <ui:inputSelect aura:id="select_OTH2" class="slds-select" change="{!c.productcategoryOTHChange2}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_OTH4_2" class="slds-select" />
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">浜у搧鍖哄垎3</label>
- <ui:inputSelect aura:id="select_OTH3" class="slds-select" change="{!c.productcategoryOTHChange3}"/>
- </div>
- <div class="slds-form-element slds-size--1-of-7">
- <label class="slds-form-element__label" for="input-hos">閲戦鐩爣(涓嶅惈绋�)</label>
- <ui:inputText aura:id="select_OTH4_3" class="slds-select" />
- </div>
- </div>
- </div>
- </fieldset>
- </div>
- </div>
- <div class="slds-modal__footer slds-grid slds-grid--align-spread">
- <div class="slds-order--1" />
- <ui:button aura:id="save_button" label="淇濆瓨" class="slds-button slds-button--brand slds-order--2" press="{!c.createTarget}"/>
- <div class="slds-order--3" />
- </div>
- </div>
+ <h4 class="slds-section__title">浜у搧鐩爣</h4>
+ <div class="slds-form-element__row">
+ <div
+ class="slds-size--1-of-7 slds-grid--align-center"
+ >
+ <div style="margin-top: 32px">娑堝寲绉�</div>
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎1</label
+ >
+ <ui:inputSelect
+ aura:id="select_GI1"
+ class="slds-select"
+ change="{!c.productcategoryGIChange1}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_GI4_1"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎2</label
+ >
+ <ui:inputSelect
+ aura:id="select_GI2"
+ class="slds-select"
+ change="{!c.productcategoryGIChange2}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_GI4_2"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎3</label
+ >
+ <ui:inputSelect
+ aura:id="select_GI3"
+ class="slds-select"
+ change="{!c.productcategoryGIChange3}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_GI4_3"
+ class="slds-select"
+ />
+ </div>
+ </div>
+ <div class="slds-form-element__row">
+ <div
+ class="slds-size--1-of-7 slds-grid--align-center"
+ >
+ <div style="margin-top: 32px">ET鑰楁潗</div>
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎1</label
+ >
+ <ui:inputSelect
+ aura:id="select_ET1"
+ class="slds-select"
+ change="{!c.productcategoryETChange1}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_ET4_1"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎2</label
+ >
+ <ui:inputSelect
+ aura:id="select_ET2"
+ class="slds-select"
+ change="{!c.productcategoryETChange2}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_ET4_2"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎3</label
+ >
+ <ui:inputSelect
+ aura:id="select_ET3"
+ class="slds-select"
+ change="{!c.productcategoryETChange3}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_ET4_3"
+ class="slds-select"
+ />
+ </div>
+ </div>
+ <div class="slds-form-element__row">
+ <div
+ class="slds-size--1-of-7 slds-grid--align-center"
+ >
+ <div style="margin-top: 32px">鍛煎惛绉�</div>
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎1</label
+ >
+ <ui:inputSelect
+ aura:id="select_BF1"
+ class="slds-select"
+ change="{!c.productcategoryBFChange1}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_BF4_1"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎2</label
+ >
+ <ui:inputSelect
+ aura:id="select_BF2"
+ class="slds-select"
+ change="{!c.productcategoryBFChange2}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_BF4_2"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎3</label
+ >
+ <ui:inputSelect
+ aura:id="select_BF3"
+ class="slds-select"
+ change="{!c.productcategoryBFChange3}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_BF4_3"
+ class="slds-select"
+ />
+ </div>
+ </div>
+ <div class="slds-form-element__row">
+ <div
+ class="slds-size--1-of-7 slds-grid--align-center"
+ >
+ <div style="margin-top: 32px">鏅绉�</div>
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎1</label
+ >
+ <ui:inputSelect
+ aura:id="select_GS1"
+ class="slds-select"
+ change="{!c.productcategoryGSChange1}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_GS4_1"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎2</label
+ >
+ <ui:inputSelect
+ aura:id="select_GS2"
+ class="slds-select"
+ change="{!c.productcategoryGSChange2}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_GS4_2"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎3</label
+ >
+ <ui:inputSelect
+ aura:id="select_GS3"
+ class="slds-select"
+ change="{!c.productcategoryGSChange3}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_GS4_3"
+ class="slds-select"
+ />
+ </div>
+ </div>
+ <div class="slds-form-element__row">
+ <div
+ class="slds-size--1-of-7 slds-grid--align-center"
+ >
+ <div style="margin-top: 32px">娉屽翱绉�</div>
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎1</label
+ >
+ <ui:inputSelect
+ aura:id="select_URO1"
+ class="slds-select"
+ change="{!c.productcategoryUROChange1}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_URO4_1"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎2</label
+ >
+ <ui:inputSelect
+ aura:id="select_URO2"
+ class="slds-select"
+ change="{!c.productcategoryUROChange2}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_URO4_2"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎3</label
+ >
+ <ui:inputSelect
+ aura:id="select_URO3"
+ class="slds-select"
+ change="{!c.productcategoryUROChange3}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_URO4_3"
+ class="slds-select"
+ />
+ </div>
+ </div>
+ <div class="slds-form-element__row">
+ <div
+ class="slds-size--1-of-7 slds-grid--align-center"
+ >
+ <div style="margin-top: 32px">濡囩</div>
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎1</label
+ >
+ <ui:inputSelect
+ aura:id="select_GYN1"
+ class="slds-select"
+ change="{!c.productcategoryGYNChange1}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_GYN4_1"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎2</label
+ >
+ <ui:inputSelect
+ aura:id="select_GYN2"
+ class="slds-select"
+ change="{!c.productcategoryGYNChange2}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_GYN4_2"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎3</label
+ >
+ <ui:inputSelect
+ aura:id="select_GYN3"
+ class="slds-select"
+ change="{!c.productcategoryGYNChange3}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_GYN4_3"
+ class="slds-select"
+ />
+ </div>
+ </div>
+ <div class="slds-form-element__row">
+ <div
+ class="slds-size--1-of-7 slds-grid--align-center"
+ >
+ <div style="margin-top: 32px">鑰抽蓟鍠夌</div>
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎1</label
+ >
+ <ui:inputSelect
+ aura:id="select_ENT1"
+ class="slds-select"
+ change="{!c.productcategoryENTChange1}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_ENT4_1"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎2</label
+ >
+ <ui:inputSelect
+ aura:id="select_ENT2"
+ class="slds-select"
+ change="{!c.productcategoryENTChange2}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_ENT4_2"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎3</label
+ >
+ <ui:inputSelect
+ aura:id="select_ENT3"
+ class="slds-select"
+ change="{!c.productcategoryENTChange3}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_ENT4_3"
+ class="slds-select"
+ />
+ </div>
+ </div>
+ <div class="slds-form-element__row">
+ <div
+ class="slds-size--1-of-7 slds-grid--align-center"
+ >
+ <div style="margin-top: 32px">鍏朵粬</div>
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎1</label
+ >
+ <ui:inputSelect
+ aura:id="select_OTH1"
+ class="slds-select"
+ change="{!c.productcategoryOTHChange1}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_OTH4_1"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎2</label
+ >
+ <ui:inputSelect
+ aura:id="select_OTH2"
+ class="slds-select"
+ change="{!c.productcategoryOTHChange2}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_OTH4_2"
+ class="slds-select"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >浜у搧鍖哄垎3</label
+ >
+ <ui:inputSelect
+ aura:id="select_OTH3"
+ class="slds-select"
+ change="{!c.productcategoryOTHChange3}"
+ />
+ </div>
+ <div
+ class="slds-form-element slds-size--1-of-7"
+ >
+ <label
+ class="slds-form-element__label"
+ for="input-hos"
+ >閲戦鐩爣(涓嶅惈绋�)</label
+ >
+ <ui:inputText
+ aura:id="select_OTH4_3"
+ class="slds-select"
+ />
+ </div>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ </div>
+ <div class="slds-modal__footer slds-grid slds-grid--align-spread">
+ <div class="slds-order--1" />
+ <ui:button
+ aura:id="save_button"
+ label="淇濆瓨"
+ class="slds-button slds-button--brand slds-order--2"
+ press="{!c.createTarget}"
+ />
+ <div class="slds-order--3" />
+ </div>
+ </div>
</div>
- <div aura:id="modal_bg" class="disp_none slds-backdrop slds-backdrop--open"></div>
-</aura:component>
\ No newline at end of file
+ <div
+ aura:id="modal_bg"
+ class="disp_none slds-backdrop slds-backdrop--open"
+ ></div>
+</aura:component>
diff --git a/force-app/main/default/aura/CreateTarget/CreateTarget.cmp-meta.xml b/force-app/main/default/aura/CreateTarget/CreateTarget.cmp-meta.xml
index 17a8a42..171ac69 100644
--- a/force-app/main/default/aura/CreateTarget/CreateTarget.cmp-meta.xml
+++ b/force-app/main/default/aura/CreateTarget/CreateTarget.cmp-meta.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" ?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>39.0</apiVersion>
+ <apiVersion>42.0</apiVersion>
<description>A Lightning Component Bundle</description>
</AuraDefinitionBundle>
diff --git a/force-app/main/default/aura/CreateTarget/CreateTarget.css b/force-app/main/default/aura/CreateTarget/CreateTarget.css
index 9365600..f17614f 100644
--- a/force-app/main/default/aura/CreateTarget/CreateTarget.css
+++ b/force-app/main/default/aura/CreateTarget/CreateTarget.css
@@ -3,4 +3,10 @@
}
.THIS.disp_none {
display: none;
-}
\ No newline at end of file
+}
+.THIS select {
+ --lwc-lineHeightButton: 36px;
+ --lwc-heightInput: 36px;
+ min-height: 0px !important;
+ height: 36px !important;
+}
diff --git a/force-app/main/default/aura/CreateTarget/CreateTargetHelper.js b/force-app/main/default/aura/CreateTarget/CreateTargetHelper.js
index e28ad09..5d97e95 100644
--- a/force-app/main/default/aura/CreateTarget/CreateTargetHelper.js
+++ b/force-app/main/default/aura/CreateTarget/CreateTargetHelper.js
@@ -1,116 +1,192 @@
({
- doinit : function(component, event, helper) {
- component.set("v.OCMTerm", this.getOCMTerm());
- if (component.get("v.recordId")) {
- component.set("v.button_text", "缂栬緫");
- var recordId = component.get("v.recordId");
- var action = component.get("c.getHospital");
- action.setParams({"recordId": recordId});
- action.setCallback(this, function(response) {
- var state = response.getState();
- if(state === "SUCCESS") {
+ doinit: function (component, event, helper) {
+ component.set('v.OCMTerm', this.getOCMTerm());
+ if (component.get('v.recordId')) {
+ component.set('v.button_text', '缂栬緫');
+ var recordId = component.get('v.recordId');
+ var action = component.get('c.getHospital');
+ action.setParams({ recordId: recordId });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ console.log('state1:' + state);
+ if (state === 'SUCCESS') {
var ah = response.getReturnValue();
var select_ah = ah.Id;
var select_ah_name = ah.Name;
-
- component.set('v.record.Agency_Hospital__c', select_ah);
+ // component.set('v.record.Agency_Hospital__c', select_ah);
+ //add by Deloitte 2023-6-8
+ let agency = component.get('v.record');
+ agency.Agency_Hospital__c = select_ah;
+ // component.set("v.record", agency);
// alert(JSON.stringify(component.find('input-hos').get("v.body")[0].get('v.values')));
- if ($A.get("$Browser.formFactor") == 'DESKTOP') {
- var values = [{
- type: 'Agency_Hospital_Link__c',
- id: select_ah,
- label: select_ah_name,
- icon : {
- url:'/img/icon/t4v35/custom/custom24_120.png',
- backgroundColor:'dc71d1',
- alt:'Agency_Hospital_Link__c'
+ if ($A.get('$Browser.formFactor') == 'DESKTOP') {
+ console.log('flag1');
+ var values = [
+ {
+ type: 'Agency_Hospital_Link__c',
+ id: select_ah,
+ label: select_ah_name,
+ icon: {
+ url: '/img/icon/t4v35/custom/custom24_120.png',
+ backgroundColor: 'dc71d1',
+ alt: 'Agency_Hospital_Link__c'
+ }
}
- }];
- component.find('input-hos').get("v.body")[0].set('v.values', values);
+ ];
+ // component.find('input-hos').get("v.body")[0].set('v.values', values);
+ //add by Deloitte 2023-6-8
+ if (
+ component.find('input-hos').get('v.body') &&
+ component.find('input-hos').get('v.body').length > 0
+ ) {
+ component
+ .find('input-hos')
+ .get('v.body')[0]
+ .set('v.values', values);
+ }
} else {
- component.find('input-hos').get("v.body")[0].set('v.selectedLabel', select_ah_name);
+ // component.find('input-hos').get("v.body")[0].set('v.selectedLabel', select_ah_name);
+ //add by Deloitte 2023-6-8
+ if (
+ component.find('input-hos').get('v.body') &&
+ component.find('input-hos').get('v.body').length > 0
+ ) {
+ component
+ .find('input-hos')
+ .get('v.body')[0]
+ .set('v.selectedLabel', select_ah_name);
+ }
}
-
- } else if (state === "ERROR") {
+ } else if (state === 'ERROR') {
var errors = response.getError();
- var toastEvent = $A.get("e.force:showToast");
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "閿欒",
- "type":"error",
- "message": errors[0].message
+ title: '閿欒',
+ type: 'error',
+ message: errors[0].message
});
toastEvent.fire();
-
}
});
$A.enqueueAction(action);
}
- var action = component.get("c.getProductList");
- action.setCallback(this, function(response) {
+ var action = component.get('c.getProductList');
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state === "SUCCESS") {
+ console.log('state2:' + state);
+ if (state === 'SUCCESS') {
var opts = response.getReturnValue();
// alert(JSON.stringify(opts["GI"]));
- component.find("select_GI1").set("v.options", JSON.parse(JSON.stringify(opts["GI"])));
- component.find("select_GI2").set("v.options", JSON.parse(JSON.stringify(opts["GI"])));
- component.find("select_GI3").set("v.options", JSON.parse(JSON.stringify(opts["GI"])));
+ component
+ .find('select_GI1')
+ .set('v.options', JSON.parse(JSON.stringify(opts['GI'])));
+ component
+ .find('select_GI2')
+ .set('v.options', JSON.parse(JSON.stringify(opts['GI'])));
+ component
+ .find('select_GI3')
+ .set('v.options', JSON.parse(JSON.stringify(opts['GI'])));
- component.find("select_GS1").set("v.options", JSON.parse(JSON.stringify(opts["GS"])));
- component.find("select_GS2").set("v.options", JSON.parse(JSON.stringify(opts["GS"])));
- component.find("select_GS3").set("v.options", JSON.parse(JSON.stringify(opts["GS"])));
+ component
+ .find('select_GS1')
+ .set('v.options', JSON.parse(JSON.stringify(opts['GS'])));
+ component
+ .find('select_GS2')
+ .set('v.options', JSON.parse(JSON.stringify(opts['GS'])));
+ component
+ .find('select_GS3')
+ .set('v.options', JSON.parse(JSON.stringify(opts['GS'])));
- component.find("select_GYN1").set("v.options", JSON.parse(JSON.stringify(opts["GYN"])));
- component.find("select_GYN2").set("v.options", JSON.parse(JSON.stringify(opts["GYN"])));
- component.find("select_GYN3").set("v.options", JSON.parse(JSON.stringify(opts["GYN"])));
+ component
+ .find('select_GYN1')
+ .set('v.options', JSON.parse(JSON.stringify(opts['GYN'])));
+ component
+ .find('select_GYN2')
+ .set('v.options', JSON.parse(JSON.stringify(opts['GYN'])));
+ component
+ .find('select_GYN3')
+ .set('v.options', JSON.parse(JSON.stringify(opts['GYN'])));
- component.find("select_URO1").set("v.options", JSON.parse(JSON.stringify(opts["URO"])));
- component.find("select_URO2").set("v.options", JSON.parse(JSON.stringify(opts["URO"])));
- component.find("select_URO3").set("v.options", JSON.parse(JSON.stringify(opts["URO"])));
+ component
+ .find('select_URO1')
+ .set('v.options', JSON.parse(JSON.stringify(opts['URO'])));
+ component
+ .find('select_URO2')
+ .set('v.options', JSON.parse(JSON.stringify(opts['URO'])));
+ component
+ .find('select_URO3')
+ .set('v.options', JSON.parse(JSON.stringify(opts['URO'])));
- component.find("select_ENT1").set("v.options", JSON.parse(JSON.stringify(opts["ENT"])));
- component.find("select_ENT2").set("v.options", JSON.parse(JSON.stringify(opts["ENT"])));
- component.find("select_ENT3").set("v.options", JSON.parse(JSON.stringify(opts["ENT"])));
+ component
+ .find('select_ENT1')
+ .set('v.options', JSON.parse(JSON.stringify(opts['ENT'])));
+ component
+ .find('select_ENT2')
+ .set('v.options', JSON.parse(JSON.stringify(opts['ENT'])));
+ component
+ .find('select_ENT3')
+ .set('v.options', JSON.parse(JSON.stringify(opts['ENT'])));
- component.find("select_OTH1").set("v.options", JSON.parse(JSON.stringify(opts["OTH"])));
- component.find("select_OTH2").set("v.options", JSON.parse(JSON.stringify(opts["OTH"])));
- component.find("select_OTH3").set("v.options", JSON.parse(JSON.stringify(opts["OTH"])));
+ component
+ .find('select_OTH1')
+ .set('v.options', JSON.parse(JSON.stringify(opts['OTH'])));
+ component
+ .find('select_OTH2')
+ .set('v.options', JSON.parse(JSON.stringify(opts['OTH'])));
+ component
+ .find('select_OTH3')
+ .set('v.options', JSON.parse(JSON.stringify(opts['OTH'])));
- component.find("select_ET1").set("v.options", JSON.parse(JSON.stringify(opts["ET"])));
- component.find("select_ET2").set("v.options", JSON.parse(JSON.stringify(opts["ET"])));
- component.find("select_ET3").set("v.options", JSON.parse(JSON.stringify(opts["ET"])));
+ component
+ .find('select_ET1')
+ .set('v.options', JSON.parse(JSON.stringify(opts['ET'])));
+ component
+ .find('select_ET2')
+ .set('v.options', JSON.parse(JSON.stringify(opts['ET'])));
+ component
+ .find('select_ET3')
+ .set('v.options', JSON.parse(JSON.stringify(opts['ET'])));
- component.find("select_BF1").set("v.options", JSON.parse(JSON.stringify(opts["BF"])));
- component.find("select_BF2").set("v.options", JSON.parse(JSON.stringify(opts["BF"])));
- component.find("select_BF3").set("v.options", JSON.parse(JSON.stringify(opts["BF"])));
- } else if (state === "ERROR") {
+ component
+ .find('select_BF1')
+ .set('v.options', JSON.parse(JSON.stringify(opts['BF'])));
+ component
+ .find('select_BF2')
+ .set('v.options', JSON.parse(JSON.stringify(opts['BF'])));
+ component
+ .find('select_BF3')
+ .set('v.options', JSON.parse(JSON.stringify(opts['BF'])));
+ } else if (state === 'ERROR') {
var errors = response.getError();
- var toastEvent = $A.get("e.force:showToast");
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "閿欒",
- "type":"error",
- "message": errors[0].message
+ title: '閿欒',
+ type: 'error',
+ message: errors[0].message
});
toastEvent.fire();
-
}
});
$A.enqueueAction(action);
},
- toggle_report : function(component, event, helper) {
+ toggle_report: function (component, event, helper) {
var modal_window = component.find('modal_window');
var modal_bg = component.find('modal_bg');
$A.util.toggleClass(modal_window, 'disp_none');
$A.util.toggleClass(modal_bg, 'disp_none');
- if ($A.util.hasClass(modal_window, 'disp_none') && !component.get("v.recordId")) {
+ if (
+ $A.util.hasClass(modal_window, 'disp_none') &&
+ !component.get('v.recordId')
+ ) {
$A.get('e.force:refreshView').fire();
}
},
- productcategoryChange : function(component, event, helper, dept, index) {
- var cmpId = 'select_'+dept;
+ productcategoryChange: function (component, event, helper, dept, index) {
+ var cmpId = 'select_' + dept;
var myId;
var o1Id;
var o2Id;
@@ -118,7 +194,7 @@
myId = cmpId + '1';
o1Id = cmpId + '2';
o2Id = cmpId + '3';
- } else if (index == 2){
+ } else if (index == 2) {
myId = cmpId + '2';
o1Id = cmpId + '1';
o2Id = cmpId + '3';
@@ -133,22 +209,27 @@
var pcId2 = component.find(o2Id).get('v.value');
var p1bool = pcId1 != '' && pcId1 != null && pcId1 != undefined;
var p2bool = pcId2 != '' && pcId2 != null && pcId2 != undefined;
- var p0bool = product_category_id != '' && product_category_id != null && product_category_id != undefined;
- if ((p1bool && p0bool && product_category_id == pcId1) || (p2bool && p0bool && product_category_id == pcId2)) {
+ var p0bool =
+ product_category_id != '' &&
+ product_category_id != null &&
+ product_category_id != undefined;
+ if (
+ (p1bool && p0bool && product_category_id == pcId1) ||
+ (p2bool && p0bool && product_category_id == pcId2)
+ ) {
this.warning('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
- component.find(myId).set('v.value','');
+ component.find(myId).set('v.value', '');
}
},
- selectHos : function(component, event, helper) {
-
- var accid = component.get("v.record.Agency_Hospital__c");
- var action = component.get("c.getDeptAmount");
- action.setParams({ "hospitalId" : accid });
- action.setCallback(this, function(response) {
- var state = response.getState();
- if (state === "SUCCESS") {
- var amountMap = response.getReturnValue();
+ selectHos: function (component, event, helper) {
+ var accid = component.get('v.record.Agency_Hospital__c');
+ var action = component.get('c.getDeptAmount');
+ action.setParams({ hospitalId: accid });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var amountMap = response.getReturnValue();
var GIProduct_Category1 = '';
var GIProduct_Category2 = '';
var GIProduct_Category3 = '';
@@ -158,24 +239,36 @@
if (amountMap.GI.length > 0) {
GIProduct_Category1 = amountMap.GI[0].Product_Category__c;
if (amountMap.GI.length > 1) {
- GIProduct_Category2 = amountMap.GI[1].Product_Category__c;
+ GIProduct_Category2 =
+ amountMap.GI[1].Product_Category__c;
}
if (amountMap.GI.length > 2) {
- GIProduct_Category3 = amountMap.GI[2].Product_Category__c;
+ GIProduct_Category3 =
+ amountMap.GI[2].Product_Category__c;
}
GIAim_Price__c1 = amountMap.GI[0].Aim_Price__c;
GIAim_Price__c2 = amountMap.GI[1].Aim_Price__c;
GIAim_Price__c3 = amountMap.GI[2].Aim_Price__c;
- console.warn(GIAim_Price__c1+"-"+GIAim_Price__c2+"-"+GIAim_Price__c3);
-
+ console.warn(
+ GIAim_Price__c1 +
+ '-' +
+ GIAim_Price__c2 +
+ '-' +
+ GIAim_Price__c3
+ );
}
- component.find('select_GI1').set('v.value',GIProduct_Category1);
- component.find('select_GI2').set('v.value',GIProduct_Category2);
- component.find('select_GI3').set('v.value',GIProduct_Category3);
- component.find('select_GI4_1').set('v.value',GIAim_Price__c1);
- component.find('select_GI4_2').set('v.value',GIAim_Price__c2);
- component.find('select_GI4_3').set('v.value',GIAim_Price__c3);
-
+ component
+ .find('select_GI1')
+ .set('v.value', GIProduct_Category1);
+ component
+ .find('select_GI2')
+ .set('v.value', GIProduct_Category2);
+ component
+ .find('select_GI3')
+ .set('v.value', GIProduct_Category3);
+ component.find('select_GI4_1').set('v.value', GIAim_Price__c1);
+ component.find('select_GI4_2').set('v.value', GIAim_Price__c2);
+ component.find('select_GI4_3').set('v.value', GIAim_Price__c3);
var ETProduct_Category1 = '';
var ETProduct_Category2 = '';
@@ -186,22 +279,29 @@
if (amountMap.ET.length > 0) {
ETProduct_Category1 = amountMap.ET[0].Product_Category__c;
if (amountMap.ET.length > 1) {
- ETProduct_Category2 = amountMap.ET[1].Product_Category__c;
+ ETProduct_Category2 =
+ amountMap.ET[1].Product_Category__c;
}
if (amountMap.ET.length > 2) {
- ETProduct_Category3 = amountMap.ET[2].Product_Category__c;
+ ETProduct_Category3 =
+ amountMap.ET[2].Product_Category__c;
}
ETAim_Price__c1 = amountMap.ET[0].Aim_Price__c;
ETAim_Price__c2 = amountMap.ET[1].Aim_Price__c;
ETAim_Price__c3 = amountMap.ET[2].Aim_Price__c;
- }
- component.find('select_ET1').set('v.value',ETProduct_Category1);
- component.find('select_ET2').set('v.value',ETProduct_Category2);
- component.find('select_ET3').set('v.value',ETProduct_Category3);
- component.find('select_ET4_1').set('v.value',ETAim_Price__c1);
- component.find('select_ET4_2').set('v.value',ETAim_Price__c2);
- component.find('select_ET4_3').set('v.value',ETAim_Price__c3);
-
+ }
+ component
+ .find('select_ET1')
+ .set('v.value', ETProduct_Category1);
+ component
+ .find('select_ET2')
+ .set('v.value', ETProduct_Category2);
+ component
+ .find('select_ET3')
+ .set('v.value', ETProduct_Category3);
+ component.find('select_ET4_1').set('v.value', ETAim_Price__c1);
+ component.find('select_ET4_2').set('v.value', ETAim_Price__c2);
+ component.find('select_ET4_3').set('v.value', ETAim_Price__c3);
var BFProduct_Category1 = '';
var BFProduct_Category2 = '';
@@ -212,22 +312,29 @@
if (amountMap.BF.length > 0) {
BFProduct_Category1 = amountMap.BF[0].Product_Category__c;
if (amountMap.BF.length > 1) {
- BFProduct_Category2 = amountMap.BF[1].Product_Category__c;
+ BFProduct_Category2 =
+ amountMap.BF[1].Product_Category__c;
}
if (amountMap.BF.length > 2) {
- BFProduct_Category3 = amountMap.BF[2].Product_Category__c;
+ BFProduct_Category3 =
+ amountMap.BF[2].Product_Category__c;
}
BFAim_Price__c1 = amountMap.BF[0].Aim_Price__c;
BFAim_Price__c2 = amountMap.BF[1].Aim_Price__c;
BFAim_Price__c3 = amountMap.BF[2].Aim_Price__c;
- }
- component.find('select_BF1').set('v.value',BFProduct_Category1);
- component.find('select_BF2').set('v.value',BFProduct_Category2);
- component.find('select_BF3').set('v.value',BFProduct_Category3);
- component.find('select_BF4_1').set('v.value',BFAim_Price__c1);
- component.find('select_BF4_2').set('v.value',BFAim_Price__c2);
- component.find('select_BF4_3').set('v.value',BFAim_Price__c3);
-
+ }
+ component
+ .find('select_BF1')
+ .set('v.value', BFProduct_Category1);
+ component
+ .find('select_BF2')
+ .set('v.value', BFProduct_Category2);
+ component
+ .find('select_BF3')
+ .set('v.value', BFProduct_Category3);
+ component.find('select_BF4_1').set('v.value', BFAim_Price__c1);
+ component.find('select_BF4_2').set('v.value', BFAim_Price__c2);
+ component.find('select_BF4_3').set('v.value', BFAim_Price__c3);
var OTHProduct_Category1 = '';
var OTHProduct_Category2 = '';
@@ -236,25 +343,38 @@
var OTHAim_Price__c2 = '';
var OTHAim_Price__c3 = '';
if (amountMap.OTH.length > 0) {
-
OTHProduct_Category1 = amountMap.OTH[0].Product_Category__c;
if (amountMap.OTH.length > 1) {
- OTHProduct_Category2 = amountMap.OTH[1].Product_Category__c;
+ OTHProduct_Category2 =
+ amountMap.OTH[1].Product_Category__c;
}
if (amountMap.OTH.length > 2) {
- OTHProduct_Category3 = amountMap.OTH[2].Product_Category__c;
+ OTHProduct_Category3 =
+ amountMap.OTH[2].Product_Category__c;
}
OTHAim_Price__c1 = amountMap.OTH[0].Aim_Price__c;
OTHAim_Price__c2 = amountMap.OTH[1].Aim_Price__c;
OTHAim_Price__c3 = amountMap.OTH[2].Aim_Price__c;
- }
- component.find('select_OTH1').set('v.value',OTHProduct_Category1);
- component.find('select_OTH2').set('v.value',OTHProduct_Category2);
- component.find('select_OTH3').set('v.value',OTHProduct_Category3);
- component.find('select_OTH4_1').set('v.value',OTHAim_Price__c1);
- component.find('select_OTH4_2').set('v.value',OTHAim_Price__c2);
- component.find('select_OTH4_3').set('v.value',OTHAim_Price__c3);
-
+ }
+ component
+ .find('select_OTH1')
+ .set('v.value', OTHProduct_Category1);
+ component
+ .find('select_OTH2')
+ .set('v.value', OTHProduct_Category2);
+ component
+ .find('select_OTH3')
+ .set('v.value', OTHProduct_Category3);
+ component
+ .find('select_OTH4_1')
+ .set('v.value', OTHAim_Price__c1);
+ component
+ .find('select_OTH4_2')
+ .set('v.value', OTHAim_Price__c2);
+ component
+ .find('select_OTH4_3')
+ .set('v.value', OTHAim_Price__c3);
+
var GSProduct_Category1 = '';
var GSProduct_Category2 = '';
var GSProduct_Category3 = '';
@@ -264,22 +384,30 @@
if (amountMap.GS.length > 0) {
GSProduct_Category1 = amountMap.GS[0].Product_Category__c;
if (amountMap.GS.length > 1) {
- GSProduct_Category2 = amountMap.GS[1].Product_Category__c;
+ GSProduct_Category2 =
+ amountMap.GS[1].Product_Category__c;
}
if (amountMap.GS.length > 2) {
- GSProduct_Category3 = amountMap.GS[2].Product_Category__c;
+ GSProduct_Category3 =
+ amountMap.GS[2].Product_Category__c;
}
GSPAim_Price__c1 = amountMap.GS[0].Aim_Price__c;
GSPAim_Price__c2 = amountMap.GS[1].Aim_Price__c;
- GSPAim_Price__c3= amountMap.GS[2].Aim_Price__c;
- }
- component.find('select_GS1').set('v.value',GSProduct_Category1);
- component.find('select_GS2').set('v.value',GSProduct_Category2);
- component.find('select_GS3').set('v.value',GSProduct_Category3);
- component.find('select_GS4_1').set('v.value',GSPAim_Price__c1);
- component.find('select_GS4_2').set('v.value',GSPAim_Price__c2);
- component.find('select_GS4_3').set('v.value',GSPAim_Price__c3);
-
+ GSPAim_Price__c3 = amountMap.GS[2].Aim_Price__c;
+ }
+ component
+ .find('select_GS1')
+ .set('v.value', GSProduct_Category1);
+ component
+ .find('select_GS2')
+ .set('v.value', GSProduct_Category2);
+ component
+ .find('select_GS3')
+ .set('v.value', GSProduct_Category3);
+ component.find('select_GS4_1').set('v.value', GSPAim_Price__c1);
+ component.find('select_GS4_2').set('v.value', GSPAim_Price__c2);
+ component.find('select_GS4_3').set('v.value', GSPAim_Price__c3);
+
var UROProduct_Category1 = '';
var UROProduct_Category2 = '';
var UROProduct_Category3 = '';
@@ -287,26 +415,38 @@
var UROAim_Price__c2 = '';
var UROAim_Price__c3 = '';
if (amountMap.URO.length > 0) {
-
UROProduct_Category1 = amountMap.URO[0].Product_Category__c;
if (amountMap.URO.length > 1) {
- UROProduct_Category2 = amountMap.URO[1].Product_Category__c;
+ UROProduct_Category2 =
+ amountMap.URO[1].Product_Category__c;
}
if (amountMap.URO.length > 2) {
- UROProduct_Category3 = amountMap.URO[2].Product_Category__c;
+ UROProduct_Category3 =
+ amountMap.URO[2].Product_Category__c;
}
UROAim_Price__c1 = amountMap.URO[0].Aim_Price__c;
UROAim_Price__c2 = amountMap.URO[1].Aim_Price__c;
UROAim_Price__c3 = amountMap.URO[2].Aim_Price__c;
- }
- component.find('select_URO1').set('v.value',UROProduct_Category1);
- component.find('select_URO2').set('v.value',UROProduct_Category2);
- component.find('select_URO3').set('v.value',UROProduct_Category3);
- component.find('select_URO4_1').set('v.value',UROAim_Price__c1);
- component.find('select_URO4_2').set('v.value',UROAim_Price__c2);
- component.find('select_URO4_3').set('v.value',UROAim_Price__c3);
+ }
+ component
+ .find('select_URO1')
+ .set('v.value', UROProduct_Category1);
+ component
+ .find('select_URO2')
+ .set('v.value', UROProduct_Category2);
+ component
+ .find('select_URO3')
+ .set('v.value', UROProduct_Category3);
+ component
+ .find('select_URO4_1')
+ .set('v.value', UROAim_Price__c1);
+ component
+ .find('select_URO4_2')
+ .set('v.value', UROAim_Price__c2);
+ component
+ .find('select_URO4_3')
+ .set('v.value', UROAim_Price__c3);
-
var GYNProduct_Category1 = '';
var GYNProduct_Category2 = '';
var GYNProduct_Category3 = '';
@@ -314,26 +454,38 @@
var GYNAim_Price__c2 = '';
var GYNAim_Price__c3 = '';
if (amountMap.GYN.length > 0) {
-
GYNProduct_Category1 = amountMap.GYN[0].Product_Category__c;
if (amountMap.GYN.length > 1) {
- GYNProduct_Category2 = amountMap.GYN[1].Product_Category__c;
+ GYNProduct_Category2 =
+ amountMap.GYN[1].Product_Category__c;
}
if (amountMap.GYN.length > 2) {
- GYNProduct_Category3 = amountMap.GYN[2].Product_Category__c;
+ GYNProduct_Category3 =
+ amountMap.GYN[2].Product_Category__c;
}
- GYNAim_Price__c1= amountMap.GYN[0].Aim_Price__c;
+ GYNAim_Price__c1 = amountMap.GYN[0].Aim_Price__c;
GYNAim_Price__c2 = amountMap.GYN[1].Aim_Price__c;
GYNAim_Price__c3 = amountMap.GYN[2].Aim_Price__c;
- }
- component.find('select_GYN1').set('v.value',GYNProduct_Category1);
- component.find('select_GYN2').set('v.value',GYNProduct_Category2);
- component.find('select_GYN3').set('v.value',GYNProduct_Category3);
- component.find('select_GYN4_1').set('v.value',GYNAim_Price__c1);
- component.find('select_GYN4_2').set('v.value',GYNAim_Price__c2);
- component.find('select_GYN4_3').set('v.value',GYNAim_Price__c3);
+ }
+ component
+ .find('select_GYN1')
+ .set('v.value', GYNProduct_Category1);
+ component
+ .find('select_GYN2')
+ .set('v.value', GYNProduct_Category2);
+ component
+ .find('select_GYN3')
+ .set('v.value', GYNProduct_Category3);
+ component
+ .find('select_GYN4_1')
+ .set('v.value', GYNAim_Price__c1);
+ component
+ .find('select_GYN4_2')
+ .set('v.value', GYNAim_Price__c2);
+ component
+ .find('select_GYN4_3')
+ .set('v.value', GYNAim_Price__c3);
-
var ENTProduct_Category1 = '';
var ENTProduct_Category2 = '';
var ENTProduct_Category3 = '';
@@ -341,32 +493,48 @@
var ENTAim_Price__c2 = '';
var ENTAim_Price__c3 = '';
if (amountMap.ENT.length > 0) {
-
ENTProduct_Category1 = amountMap.ENT[0].Product_Category__c;
if (amountMap.ENT.length > 1) {
- ENTProduct_Category2 = amountMap.ENT[1].Product_Category__c;
+ ENTProduct_Category2 =
+ amountMap.ENT[1].Product_Category__c;
}
if (amountMap.ENT.length > 2) {
- ENTProduct_Category3 = amountMap.ENT[2].Product_Category__c;
+ ENTProduct_Category3 =
+ amountMap.ENT[2].Product_Category__c;
}
ENTAim_Price__c1 = amountMap.ENT[0].Aim_Price__c;
ENTAim_Price__c2 = amountMap.ENT[1].Aim_Price__c;
ENTAim_Price__c3 = amountMap.ENT[2].Aim_Price__c;
- }
- component.find('select_ENT1').set('v.value',ENTProduct_Category1);
- component.find('select_ENT2').set('v.value',ENTProduct_Category2);
- component.find('select_ENT3').set('v.value',ENTProduct_Category3);
- component.find('select_ENT4_1').set('v.value',ENTAim_Price__c1);
- component.find('select_ENT4_2').set('v.value',ENTAim_Price__c2);
- component.find('select_ENT4_3').set('v.value',ENTAim_Price__c3);
-
- }
- });
- $A.enqueueAction(action);
- console.log(JSON.stringify(component.find('input-hos').get("v.body")[0].get('v')));
+ }
+ component
+ .find('select_ENT1')
+ .set('v.value', ENTProduct_Category1);
+ component
+ .find('select_ENT2')
+ .set('v.value', ENTProduct_Category2);
+ component
+ .find('select_ENT3')
+ .set('v.value', ENTProduct_Category3);
+ component
+ .find('select_ENT4_1')
+ .set('v.value', ENTAim_Price__c1);
+ component
+ .find('select_ENT4_2')
+ .set('v.value', ENTAim_Price__c2);
+ component
+ .find('select_ENT4_3')
+ .set('v.value', ENTAim_Price__c3);
+ }
+ });
+ $A.enqueueAction(action);
+ console.log(
+ JSON.stringify(
+ component.find('input-hos').get('v.body')[0].get('v')
+ )
+ );
},
- getOCMTerm : function() {
+ getOCMTerm: function () {
var today = new Date();
var year = today.getFullYear();
var month = today.getMonth();
@@ -377,203 +545,243 @@
return thisYearOCMPeriod;
},
- createTarget : function(component, event, helper) {
- var action = component.get("c.createSFTarget");
- // alert(component.get("v.GIAmount"));
+ createTarget: function (component, event, helper) {
+ var action = component.get('c.createSFTarget');
+ // alert(component.get("v.GIAmount"));
+ var p1_1 = component.find('select_GI4_1').get('v.value');
+ var p1_2 = component.find('select_GI4_2').get('v.value');
+ var p1_3 = component.find('select_GI4_3').get('v.value');
-
- var p1_1 = component.find('select_GI4_1').get('v.value') ;
- var p1_2 = component.find('select_GI4_2').get('v.value') ;
- var p1_3 = component.find('select_GI4_3').get('v.value') ;
-
- if (p1_1 == undefined || p1_1 == "") {
+ if (p1_1 == undefined || p1_1 == '') {
p1_1 = 0;
}
- if (p1_2 == undefined || p1_2 == "") {
+ if (p1_2 == undefined || p1_2 == '') {
p1_2 = 0;
}
- if (p1_3 == undefined || p1_3 == "") {
+ if (p1_3 == undefined || p1_3 == '') {
p1_3 = 0;
}
- console.warn(p1_1+"-"+p1_2+"-"+p1_3);
+ console.warn(p1_1 + '-' + p1_2 + '-' + p1_3);
- var p2_1 = component.find('select_ET4_1').get('v.value') ;
- var p2_2 = component.find('select_ET4_2').get('v.value') ;
- var p2_3 = component.find('select_ET4_3').get('v.value') ;
- if (p2_1 == undefined || p2_1 == "") {
+ var p2_1 = component.find('select_ET4_1').get('v.value');
+ var p2_2 = component.find('select_ET4_2').get('v.value');
+ var p2_3 = component.find('select_ET4_3').get('v.value');
+ if (p2_1 == undefined || p2_1 == '') {
p2_1 = 0;
}
- if (p2_2 == undefined || p2_2 == "") {
+ if (p2_2 == undefined || p2_2 == '') {
p2_2 = 0;
}
- if (p2_3 == undefined || p2_3 == "") {
+ if (p2_3 == undefined || p2_3 == '') {
p2_3 = 0;
}
-
- var p3_1 = component.find('select_BF4_1').get('v.value') ;
- var p3_2 = component.find('select_BF4_2').get('v.value') ;
- var p3_3 = component.find('select_BF4_3').get('v.value') ;
- if (p3_1 == undefined || p3_1 == "") {
+ var p3_1 = component.find('select_BF4_1').get('v.value');
+ var p3_2 = component.find('select_BF4_2').get('v.value');
+ var p3_3 = component.find('select_BF4_3').get('v.value');
+ if (p3_1 == undefined || p3_1 == '') {
p3_1 = 0;
}
- if (p3_2 == undefined || p3_2 == "") {
+ if (p3_2 == undefined || p3_2 == '') {
p3_2 = 0;
}
- if (p3_3 == undefined || p3_3 == "") {
+ if (p3_3 == undefined || p3_3 == '') {
p3_3 = 0;
}
-
-
- var p4_1 = component.find('select_OTH4_1').get('v.value') ;
- var p4_2 = component.find('select_OTH4_2').get('v.value') ;
- var p4_3 = component.find('select_OTH4_3').get('v.value') ;
- if (p4_1 == undefined || p4_1 == "") {
+ var p4_1 = component.find('select_OTH4_1').get('v.value');
+ var p4_2 = component.find('select_OTH4_2').get('v.value');
+ var p4_3 = component.find('select_OTH4_3').get('v.value');
+ if (p4_1 == undefined || p4_1 == '') {
p4_1 = 0;
}
- if (p4_2 == undefined || p4_2 == "") {
+ if (p4_2 == undefined || p4_2 == '') {
p4_2 = 0;
}
- if (p4_3 == undefined || p4_3 == "") {
+ if (p4_3 == undefined || p4_3 == '') {
p4_3 = 0;
}
-
-
- var p5_1 = component.find('select_GS4_1').get('v.value') ;
- var p5_2 = component.find('select_GS4_2').get('v.value') ;
- var p5_3 = component.find('select_GS4_3').get('v.value') ;
- if (p5_1 == undefined || p5_1 == "") {
+ var p5_1 = component.find('select_GS4_1').get('v.value');
+ var p5_2 = component.find('select_GS4_2').get('v.value');
+ var p5_3 = component.find('select_GS4_3').get('v.value');
+ if (p5_1 == undefined || p5_1 == '') {
p5_1 = 0;
}
- if (p5_2 == undefined || p5_2 == "") {
+ if (p5_2 == undefined || p5_2 == '') {
p5_2 = 0;
}
- if (p5_3 == undefined || p5_3 == "") {
+ if (p5_3 == undefined || p5_3 == '') {
p5_3 = 0;
}
-
-
- var p6_1 = component.find('select_URO4_1').get('v.value') ;
- var p6_2 = component.find('select_URO4_2').get('v.value') ;
- var p6_3 = component.find('select_URO4_3').get('v.value') ;
- if (p6_1 == undefined || p6_1 == "") {
+ var p6_1 = component.find('select_URO4_1').get('v.value');
+ var p6_2 = component.find('select_URO4_2').get('v.value');
+ var p6_3 = component.find('select_URO4_3').get('v.value');
+ if (p6_1 == undefined || p6_1 == '') {
p6_1 = 0;
}
- if (p6_2 == undefined || p6_2 == "") {
+ if (p6_2 == undefined || p6_2 == '') {
p6_2 = 0;
}
- if (p6_3 == undefined || p6_3 == "") {
+ if (p6_3 == undefined || p6_3 == '') {
p6_3 = 0;
}
- var p7_1 = component.find('select_GYN4_1').get('v.value') ;
- var p7_2 = component.find('select_GYN4_2').get('v.value') ;
- var p7_3 = component.find('select_GYN4_3').get('v.value') ;
- if (p7_1 == undefined || p7_1 == "") {
+ var p7_1 = component.find('select_GYN4_1').get('v.value');
+ var p7_2 = component.find('select_GYN4_2').get('v.value');
+ var p7_3 = component.find('select_GYN4_3').get('v.value');
+ if (p7_1 == undefined || p7_1 == '') {
p7_1 = 0;
}
- if (p7_2 == undefined || p7_2 == "") {
+ if (p7_2 == undefined || p7_2 == '') {
p7_2 = 0;
}
- if (p7_3 == undefined || p7_3 == "") {
+ if (p7_3 == undefined || p7_3 == '') {
p7_3 = 0;
}
-
-
- var p8_1 = component.find('select_ENT4_1').get('v.value') ;
- var p8_2 = component.find('select_ENT4_2').get('v.value') ;
- var p8_3 = component.find('select_ENT4_3').get('v.value') ;
- if (p8_1 == undefined || p8_1 == "") {
+ var p8_1 = component.find('select_ENT4_1').get('v.value');
+ var p8_2 = component.find('select_ENT4_2').get('v.value');
+ var p8_3 = component.find('select_ENT4_3').get('v.value');
+ if (p8_1 == undefined || p8_1 == '') {
p8_1 = 0;
}
- if (p8_2 == undefined || p8_2 == "") {
+ if (p8_2 == undefined || p8_2 == '') {
p8_2 = 0;
}
- if (p8_3 == undefined || p8_3 == "") {
+ if (p8_3 == undefined || p8_3 == '') {
p8_3 = 0;
}
-
-
-
- action.setParams({
- "hospitalId" : component.get("v.record.Agency_Hospital__c"),
- "GIProduct" : [component.find('select_GI1').get('v.value'),component.find('select_GI2').get('v.value'),component.find('select_GI3').get('v.value'),p1_1,p1_2,p1_3],
- "ETProduct" : [component.find('select_ET1').get('v.value'),component.find('select_ET2').get('v.value'),component.find('select_ET3').get('v.value'),p2_1, p2_2,p2_3 ],
- "BFProduct" : [component.find('select_BF1').get('v.value'),component.find('select_BF2').get('v.value'),component.find('select_BF3').get('v.value'),p3_1 ,p3_2 ,p3_3 ],
- "OTHProduct" : [component.find('select_OTH1').get('v.value'),component.find('select_OTH2').get('v.value'),component.find('select_OTH3').get('v.value'),p4_1,p4_2 ,p4_3],
- "GSProduct" : [component.find('select_GS1').get('v.value'),component.find('select_GS2').get('v.value'),component.find('select_GS3').get('v.value'),p5_1,p5_2,p5_3],
- "UROProduct" : [component.find('select_URO1').get('v.value'),component.find('select_URO2').get('v.value'),component.find('select_URO3').get('v.value'),p6_1,p6_2 ,p6_2 ],
- "GYNProduct" : [component.find('select_GYN1').get('v.value'),component.find('select_GYN2').get('v.value'),component.find('select_GYN3').get('v.value'),p7_1,p7_2 ,p7_3 ],
- "ENTProduct" : [component.find('select_ENT1').get('v.value'),component.find('select_ENT2').get('v.value'),component.find('select_ENT3').get('v.value'),p8_1 ,p8_2 ,p8_3],
- "OCMTerm" : component.get("v.OCMTerm")
- });
- action.setCallback(this, function(response) {
+ action.setParams({
+ hospitalId: component.get('v.record.Agency_Hospital__c'),
+ GIProduct: [
+ component.find('select_GI1').get('v.value'),
+ component.find('select_GI2').get('v.value'),
+ component.find('select_GI3').get('v.value'),
+ p1_1,
+ p1_2,
+ p1_3
+ ],
+ ETProduct: [
+ component.find('select_ET1').get('v.value'),
+ component.find('select_ET2').get('v.value'),
+ component.find('select_ET3').get('v.value'),
+ p2_1,
+ p2_2,
+ p2_3
+ ],
+ BFProduct: [
+ component.find('select_BF1').get('v.value'),
+ component.find('select_BF2').get('v.value'),
+ component.find('select_BF3').get('v.value'),
+ p3_1,
+ p3_2,
+ p3_3
+ ],
+ OTHProduct: [
+ component.find('select_OTH1').get('v.value'),
+ component.find('select_OTH2').get('v.value'),
+ component.find('select_OTH3').get('v.value'),
+ p4_1,
+ p4_2,
+ p4_3
+ ],
+ GSProduct: [
+ component.find('select_GS1').get('v.value'),
+ component.find('select_GS2').get('v.value'),
+ component.find('select_GS3').get('v.value'),
+ p5_1,
+ p5_2,
+ p5_3
+ ],
+ UROProduct: [
+ component.find('select_URO1').get('v.value'),
+ component.find('select_URO2').get('v.value'),
+ component.find('select_URO3').get('v.value'),
+ p6_1,
+ p6_2,
+ p6_2
+ ],
+ GYNProduct: [
+ component.find('select_GYN1').get('v.value'),
+ component.find('select_GYN2').get('v.value'),
+ component.find('select_GYN3').get('v.value'),
+ p7_1,
+ p7_2,
+ p7_3
+ ],
+ ENTProduct: [
+ component.find('select_ENT1').get('v.value'),
+ component.find('select_ENT2').get('v.value'),
+ component.find('select_ENT3').get('v.value'),
+ p8_1,
+ p8_2,
+ p8_3
+ ],
+ OCMTerm: component.get('v.OCMTerm')
+ });
+ action.setCallback(this, function (response) {
console.warn(response);
- var state = response.getState();
- if (state === "SUCCESS") {
- var modal_window = component.find('modal_window');
- var modal_bg = component.find('modal_bg');
- $A.util.toggleClass(modal_window, 'disp_none');
- $A.util.toggleClass(modal_bg, 'disp_none');
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var modal_window = component.find('modal_window');
+ var modal_bg = component.find('modal_bg');
+ $A.util.toggleClass(modal_window, 'disp_none');
+ $A.util.toggleClass(modal_bg, 'disp_none');
- var toastEvent = $A.get("e.force:showToast");
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "鎴愬姛",
- "type":"success",
- "message": "淇濆瓨鎴愬姛"
+ title: '鎴愬姛',
+ type: 'success',
+ message: '淇濆瓨鎴愬姛'
});
toastEvent.fire();
$A.get('e.force:refreshView').fire();
- } else if (state === "INCOMPLETE") {
- var toastEvent = $A.get("e.force:showToast");
+ } else if (state === 'INCOMPLETE') {
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "鏈畬鎴�!",
- "type":"error",
- "message": "鏈畬鎴�"
+ title: '鏈畬鎴�!',
+ type: 'error',
+ message: '鏈畬鎴�'
});
toastEvent.fire();
- } else if (state === "ERROR") {
- var errors = response.getError();
- var toastEvent = $A.get("e.force:showToast");
+ } else if (state === 'ERROR') {
+ var errors = response.getError();
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "閿欒",
- "type":"error",
- "message": errors[0].message
+ title: '閿欒',
+ type: 'error',
+ message: errors[0].message
});
toastEvent.fire();
-
- }
- });
- $A.enqueueAction(action);
+ }
+ });
+ $A.enqueueAction(action);
},
- warning : function(message) {
- var toastEvent = $A.get("e.force:showToast");
+ warning: function (message) {
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "璀﹀憡!",
- "message": message,
- "type":"warning",
- "duration" : "10000"
- });
- toastEvent.fire();
- },
-
- error : function(message) {
- var toastEvent = $A.get("e.force:showToast");
- toastEvent.setParams({
- "title": "閿欒!",
- "message": message,
- "type":"error",
- "duration" : "10000"
+ title: '璀﹀憡!',
+ message: message,
+ type: 'warning',
+ duration: '10000'
});
toastEvent.fire();
},
-})
\ No newline at end of file
+ error: function (message) {
+ var toastEvent = $A.get('e.force:showToast');
+ toastEvent.setParams({
+ title: '閿欒!',
+ message: message,
+ type: 'error',
+ duration: '10000'
+ });
+ toastEvent.fire();
+ }
+});
diff --git a/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImport.cmp b/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImport.cmp
index fd092dc..10aa3b5 100644
--- a/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImport.cmp
+++ b/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImport.cmp
@@ -1,101 +1,181 @@
-<!--
- * @Author: Thhto 997058689@qq.com
- * @Date: 2022-07-08 10:47:25
- * @LastEditors: Thhto 997058689@qq.com
- * @LastEditTime: 2023-02-03 15:25:46
- * @FilePath: \ceshihuanj\force-app\main\default\aura\DealerPersonnelInformationImport\DealerPersonnelInformationImport.cmp
- * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--->
-<aura:component controller="DealerPersonnelController"
-implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes"
-access="global">
-<!-- 鎵归噺娣诲姞鍛ㄦ姤 start-->
-<!-- <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> -->
-<aura:attribute name="reports_date" type="List" />
-<aura:attribute name="errorMessage" type="String" />
-<aura:attribute name="TableContent" type="String" description=" Show the Result class" />
-<aura:attribute name="TableContent2" type="String" description=" Show the Result class" />
-<aura:attribute name="TargetFileName" type="String" description="Name of the file" />
-<aura:attribute name="tableheaders" type="Object[]" />
-<aura:attribute name="fileContentData" type="String" />
-<aura:attribute name="filename" type="String" />
-<aura:attribute name="NumOfRecords" type="Integer" default="1000" />
-<aura:attribute name="showMain" type="Boolean" default="true" />
-<aura:attribute name="IsEventDefault" type="Boolean" default="true" />
-<aura:attribute name="login" type="Boolean" default="false" />
-<aura:attribute name="successMessage" type="String" />
-<!-- 鎵归噺娣诲姞鍛ㄦ姤 end-->
-<aura:renderIf isTrue="{!v.login}">
+<aura:component
+ controller="DealerPersonnelController"
+ implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes"
+ access="global"
+>
+ <!-- 鎵归噺娣诲姞鍛ㄦ姤 start-->
+ <!-- <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> -->
+ <aura:attribute name="reports_date" type="List" />
+ <aura:attribute name="errorMessage" type="String" />
+ <aura:attribute
+ name="TableContent"
+ type="String"
+ description=" Show the Result class"
+ />
+ <aura:attribute
+ name="TableContent2"
+ type="String"
+ description=" Show the Result class"
+ />
+ <aura:attribute
+ name="TargetFileName"
+ type="String"
+ description="Name of the file"
+ />
+ <aura:attribute name="tableheaders" type="Object[]" />
+ <aura:attribute name="fileContentData" type="String" />
+ <aura:attribute name="filename" type="String" />
+ <aura:attribute name="NumOfRecords" type="Integer" default="1000" />
+ <aura:attribute name="showMain" type="Boolean" default="true" />
+ <aura:attribute name="IsEventDefault" type="Boolean" default="true" />
+ <aura:attribute name="login" type="Boolean" default="false" />
+ <aura:attribute name="successMessage" type="String" />
+ <!-- start DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
+ <aura:attribute name="errorData" type="Object" />
+ <aura:attribute name="errorColumns" type="List" />
+ <!-- show Error information -->
+ <aura:attribute name="showErrorInfo" type="Boolean" default="false" />
+ <!-- end DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
+
+ <!-- 鎵归噺娣诲姞鍛ㄦ姤 end-->
+ <aura:renderIf isTrue="{!v.login}">
<div class="slds-spinner_container height100vh">
- <div class="slds-spinner--brand slds-spinner slds-spinner--medium" role="alert">
+ <div
+ class="slds-spinner--brand slds-spinner slds-spinner--medium"
+ role="alert"
+ >
<span class="slds-assistive-text">Loading</span>
<div class="slds-spinner__dot-a"></div>
<div class="slds-spinner__dot-b"></div>
</div>
</div>
</aura:renderIf>
-<!-- 鎵归噺娣诲姞鍛ㄦ姤 start-->
-<div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv" style="z-index: 10001">
- <!-- <ui:inputText aura:id="articleURL" /> -->
- <div class="demo-only" style="height: 8rem;">
- <div class="slds-notify_container slds-is-relative">
- <div class="slds-notify slds-notify_toast slds-theme_error" role="status">
- <div class=" slds-m-left_xx-large">
- <div
- class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large">
- <lightning:icon alternativeText="error" iconName="utility:error" size="small"
- class="buttonColor slds-m-right_small" />
- <!-- DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start -->
- <!-- <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2> -->
- <pre class="slds-text-heading_small ">{!v.errorMessage}</pre>
- <!-- DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� end -->
+ <!-- 鎵归噺娣诲姞鍛ㄦ姤 start-->
+ <div
+ class="slds-modal slds-fade-in-open slds-hide"
+ aura:id="errorDiv"
+ style="z-index: 10001"
+ >
+ <ui:inputText aura:id="articleURL" />
+ <div class="demo-only" style="height: 8rem">
+ <div class="slds-notify_container slds-is-relative">
+ <div
+ class="slds-notify slds-notify_toast slds-theme_error"
+ role="status"
+ >
+ <div class="slds-m-left_xx-large">
+ <div
+ class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
+ >
+ <lightning:icon
+ alternativeText="error"
+ iconName="utility:error"
+ size="small"
+ class="buttonColor slds-m-right_small"
+ />
+ <h2 class="slds-text-heading_small">
+ {!v.errorMessage}
+ </h2>
+ </div>
</div>
</div>
</div>
</div>
</div>
-</div>
-<div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01">
- <!-- <ui:inputText aura:id="articleURL" /> -->
- <div class="demo-only" style="height: 8rem;">
- <div class="slds-notify_container slds-is-relative">
- <div class="slds-notify slds-notify_toast slds-theme_success" role="alert">
- <div class=" slds-m-left_xx-large">
- <div
- class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large">
- <lightning:icon alternativeText="Success" iconName="utility:success" size="small"
- class="buttonColor slds-m-right_small" />
- <h2 class="slds-text-heading_small ">{!v.successMessage}</h2>
+ <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01">
+ <ui:inputText aura:id="articleURL" />
+ <div class="demo-only" style="height: 8rem">
+ <div class="slds-notify_container slds-is-relative">
+ <div
+ class="slds-notify slds-notify_toast slds-theme_success"
+ role="alert"
+ >
+ <div class="slds-m-left_xx-large">
+ <div
+ class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
+ >
+ <lightning:icon
+ alternativeText="Success"
+ iconName="utility:success"
+ size="small"
+ class="buttonColor slds-m-right_small"
+ />
+ <h2 class="slds-text-heading_small">
+ {!v.successMessage}
+ </h2>
+ </div>
</div>
</div>
</div>
</div>
</div>
-</div>
-<div >
- <div class="slds-modal__header ">
- <h4 id="headerTarget" class="slds-float--left"></h4>
- <h2 id="headerTarget" class="slds-text-heading--medium">瀹㈡埛浜哄憳鎵归噺瀵煎叆</h2>
- </div>
- <div class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium ">
- <aura:if isTrue="{!v.showMain}">
- <div>
- <center>
- <lightning:input type="file" class="file" uara:id="file" onchange="{!c.CreateRecord}" />
- </center>
- </div>
- <aura:set attribute="else">
- <ui:outputRichText class="uiOutputRichText slds-m--around-large" value="{!v.TableContent}" />
- <div class="slds-p-around--large slds-align--absolute-center">
- <lightning:button aura:id="save_con" label="淇濆瓨" variant="brand" onclick="{!c.processFileContent}" disabled="false" />
- <lightning:button label="鍙栨秷" variant="brand" onclick="{!c.cancel}" />
+ <div>
+ <div class="slds-modal__header">
+ <h4 id="headerTarget" class="slds-float--left"></h4>
+ <h2 id="headerTarget" class="slds-text-heading--medium">
+ 瀹㈡埛浜哄憳鎵归噺瀵煎叆
+ </h2>
+ </div>
+ <div
+ class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium"
+ >
+ <aura:if isTrue="{!v.showMain}">
+ <div>
+ <center>
+ <lightning:input
+ type="file"
+ class="file"
+ uara:id="file"
+ onchange="{!c.CreateRecord}"
+ />
+ </center>
</div>
-
- </aura:set>
- </aura:if>
+ <aura:set attribute="else">
+ <ui:outputRichText
+ class="uiOutputRichText slds-m--around-large"
+ value="{!v.TableContent}"
+ />
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="淇濆瓨"
+ variant="brand"
+ onclick="{!c.processFileContent}"
+ />
+ <lightning:button
+ label="鍙栨秷"
+ variant="brand"
+ onclick="{!c.cancel}"
+ />
+ </div>
+ <aura:if isTrue="{!v.showErrorInfo}">
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="瀵煎嚭閿欒淇℃伅"
+ variant="brand"
+ onclick="{!c.exportErrorInfo}"
+ />
+ </div>
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <div style="height: 300px; overflow-x: scroll">
+ <lightning:datatable
+ keyField="id"
+ data="{! v.errorData }"
+ columns="{! v.errorColumns }"
+ hideCheckboxColumn="true"
+ minColumnWidth="120"
+ />
+ </div>
+ </div>
+ </aura:if>
+ </aura:set>
+ </aura:if>
+ </div>
</div>
-
-</div>
-<!-- 鎵归噺娣诲姞鍛ㄦ姤 end-->
-
-</aura:component>
\ No newline at end of file
+ <!-- 鎵归噺娣诲姞鍛ㄦ姤 end-->
+</aura:component>
diff --git a/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportController.js b/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportController.js
index f521073..a2f994a 100644
--- a/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportController.js
+++ b/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportController.js
@@ -1,12 +1,17 @@
({
- CreateRecord : function(component, event, helper){
- var files = event.getSource().get("v.files");
- helper.readFile(component,helper,files[0]);
+ CreateRecord: function (component, event, helper) {
+ var files = event.getSource().get('v.files');
+ helper.readFile(component, helper, files[0]);
},
- processFileContent : function(component,event,helper){
- helper.saveRecords(component,event,helper);
+ processFileContent: function (component, event, helper) {
+ component.set('v.showErrorInfo', false);
+ helper.saveRecords(component, event, helper);
},
- cancel : function(component,event,helper){
- component.set("v.showMain",true);
+ cancel: function (component, event, helper) {
+ component.set('v.showMain', true);
+ },
+ exportErrorInfo: function (component, event, helper) {
+ console.log('enter exportErrorInfo');
+ helper.exportErrorInfoHelper(component);
}
-})
\ No newline at end of file
+});
diff --git a/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportHelper.js b/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportHelper.js
index 3048485..c3c47b7 100644
--- a/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportHelper.js
+++ b/force-app/main/default/aura/DealerPersonnelInformationImport/DealerPersonnelInformationImportHelper.js
@@ -1,6 +1,5 @@
({
readFile: function (component, helper, file) {
- debugger
if (!file) return;
if (!file.name.match(/\.(csv||CSV)$/)) {
return alert('only support csv files');
@@ -18,168 +17,339 @@
break; // noop
default:
alert('An error occurred reading this file.');
- };
- }
+ }
+ };
reader.onabort = function (e) {
alert('File read cancelled');
};
reader.onloadstart = function (e) {
- var output = '<ui type=\"disc\"><li><strong>' + file.name + '</strong> (' + file.type + ')- ' + file.size + 'bytes, last modified: ' + file.lastModifiedDate.toLocaleDateString() + '</li></ui>';
- component.set("v.filename", file.name);
- component.set("v.TargetFileName", output);
+ var output =
+ '<ui type="disc"><li><strong>' +
+ file.name +
+ '</strong> (' +
+ file.type +
+ ')- ' +
+ file.size +
+ 'bytes, last modified: ' +
+ file.lastModifiedDate.toLocaleDateString() +
+ '</li></ui>';
+ component.set('v.filename', file.name);
+ component.set('v.TargetFileName', output);
};
reader.onload = function (e) {
var data = e.target.result;
// data.replace(/\n/,"")
var allTextLines11 = data.split(/\r/);
var s = allTextLines11.toString();
- component.set("v.fileContentData", s);
- console.log("file dataqqq" + JSON.stringify(s));
+ component.set('v.fileContentData', s);
+ console.log('file dataqqq' + JSON.stringify(s));
var allTextLines = data.split(/\r\n|\n/);
var dataRows = allTextLines.length - 1;
var headers = allTextLines[0].split(',');
- var numOfRows = component.get("v.NumOfRecords");
- if (dataRows > numOfRows + 1 || dataRows == 1 || dataRows == 0) {
- alert("File Rows between 1 to " + numOfRows + " .");
- component.set("v.showMain", true);
- }
- else {
+ var numOfRows = component.get('v.NumOfRecords');
+ if (
+ dataRows > numOfRows + 1 ||
+ dataRows == 1 ||
+ dataRows == 0
+ ) {
+ alert('File Rows between 1 to ' + numOfRows + ' .');
+ component.set('v.showMain', true);
+ } else {
var lines = [];
var filecontentdata;
- var content = "<table class=\"table slds-table slds-table--bordered slds-table--cell-buffer\">";
- content += "<thead><tr class=\"slds-text-title--caps\">";
- content += '<th scope=\"col"\>' + '琛屽彿' + '</th>';
+ var content =
+ '<table class="table slds-table slds-table--bordered slds-table--cell-buffer">';
+ content += '<thead><tr class="slds-text-title--caps">';
+ content += '<th scope="col">' + '琛屽彿' + '</th>';
for (i = 0; i < headers.length; i++) {
- content += '<th scope=\"col"\>' + headers[i] + '</th>';
+ content += '<th scope="col">' + headers[i] + '</th>';
}
- content += "</tr></thead>";
+ content += '</tr></thead>';
for (var i = 1; i < allTextLines.length; i++) {
filecontentdata = allTextLines[i].split(',');
if (filecontentdata[0] != '') {
- content += "<tr>";
- content += "<td>" + i + "</td>";
+ content += '<tr>';
+ content += '<td>' + i + '</td>';
for (var j = 0; j < filecontentdata.length; j++) {
- content += '<td>' + filecontentdata[j] + '</td>';
+ content +=
+ '<td>' + filecontentdata[j] + '</td>';
}
- content += "</tr>";
+ content += '</tr>';
}
}
- content += "</table>";
+ content += '</table>';
console.log(content);
- component.set("v.TableContent", content);
- component.set("v.showMain", false);
+ component.set('v.TableContent', content);
+ component.set('v.showMain', false);
}
- }
+ };
reader.readAsText(file, 'gb2312');
-
}
var reader = new FileReader();
- reader.onloadend = function () {
- };
+ reader.onloadend = function () {};
reader.readAsDataURL(file);
},
saveRecords: function (component, event, helper) {
- debugger
component.set('v.login', true);
- var action = component.get("c.processData");
+ var action = component.get('c.processData');
var fieldsList = ['Name', 'Phone', 'AccountNumber']; //Please write your code dynamic fields
action.setParams({
- fileData: component.get("v.fileContentData"),
+ fileData: component.get('v.fileContentData'),
sobjectName: 'Account', //Any object
fields: fieldsList
});
action.setCallback(this, function (response) {
var state = response.getState();
- if (state === "SUCCESS") {
+ if (state === 'SUCCESS') {
var res = response.getReturnValue();
var res1 = '';
- debugger;
if (res != 'success') {
var ress = res.split('=');
console.log(ress);
+ let errorDatas = [];
+ let errorDataRow = [];
+ debugger;
for (var i = 0; i < ress.length; i++) {
res1 += ress[i].substr(7) + '\n';
+ if (ress[i] != '') {
+ let errorData = {};
+ let index = errorDataRow.indexOf(
+ ress[i].substr(7).substring(1, 2)
+ );
+ if (index == -1) {
+ errorData.errorRow = ress[i]
+ .substr(7)
+ .substring(1, 2);
+ errorDataRow.push(errorData.errorRow);
+ errorData.errorInfo = ress[i]
+ .substr(7)
+ .substring(6);
+ errorDatas.push(errorData);
+ } else {
+ errorDatas[index].errorInfo +=
+ '; ' + ress[i].substr(7).substring(6);
+ }
+ }
}
- console.log("==" + res1);
+ var fileContentData = component
+ .get('v.fileContentData')
+ .split('\n');
+ let errorColumns = [
+ {
+ label: '閿欒琛�',
+ fieldName: 'errorRow',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 50
+ },
+ {
+ label: '閿欒淇℃伅',
+ fieldName: 'errorInfo',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 300,
+ wrapText: true
+ }
+ ];
+ for (
+ var i = 0;
+ i < fileContentData[0].split(',').length - 1;
+ i++
+ ) {
+ errorColumns.push({
+ label: fileContentData[0].split(',')[i],
+ fieldName: 'field' + i,
+ type: 'text',
+ hideDefaultActions: true,
+ wrapText: true
+ });
+ }
+
+ for (var i = 0; i < errorDatas.length; i++) {
+ let data = fileContentData[errorDatas[i].errorRow];
+ console.log('data = ' + JSON.stringify(data));
+ for (var j = 0; j < data.split(',').length; j++) {
+ let label = 'field' + j;
+ errorDatas[i][label] = data.split(',')[j];
+ }
+ }
+ console.log('errorDatas = ' + JSON.stringify(errorDatas));
+
+ component.set('v.errorColumns', errorColumns);
+ component.set('v.errorData', errorDatas);
+ component.set('v.showErrorInfo', true);
+
+ console.log('==' + res1);
// this.error( "璇蜂慨鏀瑰悗閲嶆柊涓婁紶");
- component.set('v.errorMessage', res1 + "璇蜂慨鏀瑰悗閲嶆柊涓婁紶");
+ component.set('v.errorMessage', res1 + '璇蜂慨鏀瑰悗閲嶆柊涓婁紶');
this.showErrorToast(component);
component.set('v.login', false);
- component.find('save_con').set('v.disabled', true);
} else {
// this.success('瀵煎叆鎴愬姛');
component.set('v.successMessage', '瀵煎叆鎴愬姛');
this.showSuccessToast01(component);
- component.set("v.showMain", true);
+ component.set('v.showMain', true);
component.set('v.login', false);
- component.find('save_con').set('v.disabled', false);
}
- }
- else if (state === "INCOMPLETE") {
+ } else if (state === 'INCOMPLETE') {
component.set('v.login', false);
- }
- else if (state === "ERROR") {
+ } else if (state === 'ERROR') {
var errors = response.getError();
if (errors) {
if (errors[0] && errors[0].message) {
- console.log("Error message: " +
- errors[0].message);
+ console.log('Error message: ' + errors[0].message);
+ let errorDatas = [
+ {
+ errorRow: '1',
+ errorInfo: errors[0].message
+ }
+ ];
+ let errorColumns = [
+ {
+ label: '閿欒琛�',
+ fieldName: 'errorRow',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 50
+ },
+ {
+ label: '閿欒淇℃伅',
+ fieldName: 'errorInfo',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 300,
+ wrapText: true
+ }
+ ];
+ component.set('v.errorData', errorDatas);
+ component.set('v.errorColumns', errorColumns);
+ component.set('v.showErrorInfo', true);
component.set('v.login', false);
}
} else {
- console.log("Unknown error");
+ console.log('Unknown error');
component.set('v.login', false);
}
}
});
$A.enqueueAction(action);
-
},
//寮瑰嚭 鎴愬姛鎻愮ず
showSuccessToast01: function (component) {
$A.util.removeClass(component.find('successDiv01'), 'slds-hide');
- window.setTimeout($A.getCallback(function () {
- $A.util.addClass(component.find('successDiv01'), 'slds-hide');
- }),
+ window.setTimeout(
+ $A.getCallback(function () {
+ $A.util.addClass(component.find('successDiv01'), 'slds-hide');
+ }),
3000
);
},
//寮瑰嚭 閿欒鎻愮ず
showErrorToast: function (component) {
$A.util.removeClass(component.find('errorDiv'), 'slds-hide');
- window.setTimeout($A.getCallback(function () {
- $A.util.addClass(component.find('errorDiv'), 'slds-hide');
- }),
- 7000
+ window.setTimeout(
+ $A.getCallback(function () {
+ $A.util.addClass(component.find('errorDiv'), 'slds-hide');
+ }),
+ 4000
);
},
- success : function(message) {
- var toastEvent = $A.get("e.force:showToast");
+ success: function (message) {
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title" : "鎴愬姛!",
- "message" : message,
- "duration" : "5000"
+ title: '鎴愬姛!',
+ message: message,
+ duration: '5000'
});
toastEvent.fire();
},
-
- warning : function(message) {
- var toastEvent = $A.get("e.force:showToast");
+
+ warning: function (message) {
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "璀﹀憡!",
- "message": message,
- "duration" : "10000"
+ title: '璀﹀憡!',
+ message: message,
+ duration: '10000'
});
toastEvent.fire();
},
-
- error : function(message) {
- var toastEvent = $A.get("e.force:showToast");
+
+ error: function (message) {
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "閿欒!",
- "message": message,
- "duration" : "sticky"
+ title: '閿欒!',
+ message: message,
+ duration: 'sticky'
});
toastEvent.fire();
},
-})
\ No newline at end of file
+ //zhj 瀵煎嚭閿欒淇℃伅 2023-05-16 start
+ exportErrorInfoHelper: function (component) {
+ var errorData = component.get('v.errorData');
+ var errorColumns = component.get('v.errorColumns');
+
+ var datas = [];
+ let errorColumnsArray = [];
+ for (var i in errorColumns) {
+ errorColumnsArray.push(errorColumns[i].label);
+ }
+ datas.push(errorColumnsArray);
+ //datas.push(errorColumns);
+
+ for (var i in errorData) {
+ let data = [];
+ data.push(errorData[i].errorRow);
+ data.push(errorData[i].errorInfo);
+ for (var j = 0; j < Object.keys(errorData[i]).length - 2; j++) {
+ data.push(errorData[i]['field' + j]);
+ }
+ datas.push(data);
+ }
+
+ console.log('datas = ' + JSON.stringify(datas));
+ var csv = this.convertToCSV(component, datas);
+ console.log('csv = ' + JSON.stringify(csv));
+ this.downloadCSV(component, csv);
+ },
+
+ convertToCSV: function (component, data) {
+ console.log('enter convertToCSV');
+ console.log('data = ' + data);
+ var csv = '';
+ for (var i = 0; i < data.length; i++) {
+ var row = data[i];
+ console.log('row = ' + JSON.stringify(row));
+ for (var j = 0; j < row.length; j++) {
+ var val = '';
+ val = row[j] === null ? '' : row[j].toString();
+ console.log('val = ' + val);
+ if (
+ val.indexOf(',') !== -1 ||
+ val.indexOf('"') !== -1 ||
+ val.indexOf('\n') !== -1
+ ) {
+ //val = '"' + val.replace(/"/g,'""') + '"';
+ }
+ if (j > 0) {
+ csv += ',';
+ }
+ csv += val;
+ }
+ csv += '\n';
+ }
+ return csv;
+ },
+
+ downloadCSV: function (component, csv) {
+ var link = document.createElement('a');
+ // 璁剧疆瀛楃闆嗗拰鏂囦欢澶�
+ let bom = '\uFEFF';
+ link.href =
+ 'data:text/csv;charset=utf-8,' + encodeURIComponent(bom + csv);
+ link.download = 'data.csv';
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ }
+ //zhj 瀵煎嚭閿欒淇℃伅 2023-05-16 end
+});
diff --git a/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.auradoc b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.auradoc
new file mode 100644
index 0000000..d0d6eb5
--- /dev/null
+++ b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.auradoc
@@ -0,0 +1,6 @@
+<aura:documentation>
+ <aura:description>Documentation</aura:description>
+ <aura:example name="ExampleName" ref="exampleComponentName" label="Label">
+ Example Description
+ </aura:example>
+</aura:documentation>
\ No newline at end of file
diff --git a/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.cmp b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.cmp
new file mode 100644
index 0000000..36cc3c8
--- /dev/null
+++ b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.cmp
@@ -0,0 +1,21 @@
+<aura:component
+ implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,lightning:actionOverride"
+ access="global"
+>
+ 聽 聽
+ <aura:html tag="style">
+ 聽 聽 聽 聽 .slds-modal__container{ 聽 聽 聽 聽 max-width: 65rem !important; 聽 聽
+ 聽 聽 width:100% !important; 聽 聽 聽 聽 } 聽 聽 聽 聽 .cuf-content { 聽 聽 聽 聽
+ padding: 0 0rem !important; 聽 聽 聽 聽 } 聽 聽 聽 聽 .slds-p-around--medium { 聽
+ 聽 聽 聽 padding: 0rem !important; 聽 聽 聽 聽 } 聽 聽 聽 聽 .slds-modal__content{
+ 聽 聽 聽 聽 overflow-y:auto !important; 聽 聽 聽 聽 height:unset !important; 聽 聽
+ 聽 聽 max-height:unset !important; 聽 聽 聽 聽 min-height:8rem; 聽 聽 聽 聽 } 聽 聽
+ 聽 聽 .slds-tile_board{ 聽 聽 聽 聽 padding:20px 40px; 聽 聽 聽 聽 } 聽 聽
+ </aura:html>
+ 聽 聽
+ <c:lexNewAndEditContactPIPL
+ onclose="{!c.closeModal}"
+ onrefresh="{!c.refreshView}"
+ recordId="{!v.recordId}"
+ />
+</aura:component>
diff --git a/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.cmp-meta.xml b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.cmp-meta.xml
new file mode 100644
index 0000000..80d73fe
--- /dev/null
+++ b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.cmp-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <description>A Lightning Component Bundle</description>
+</AuraDefinitionBundle>
diff --git a/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.css b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.css
new file mode 100644
index 0000000..f407185
--- /dev/null
+++ b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.css
@@ -0,0 +1,2 @@
+.THIS {
+}
diff --git a/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.design b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.design
new file mode 100644
index 0000000..d247163
--- /dev/null
+++ b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.design
@@ -0,0 +1,3 @@
+<design:component >
+
+</design:component>
\ No newline at end of file
diff --git a/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.svg b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.svg
new file mode 100644
index 0000000..e201ae9
--- /dev/null
+++ b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAura.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <path d="M120,108 C120,114.6 114.6,120 108,120 L12,120 C5.4,120 0,114.6 0,108 L0,12 C0,5.4 5.4,0 12,0 L108,0 C114.6,0 120,5.4 120,12 L120,108 L120,108 Z" id="Shape" fill="#2A739E" />
+ <path d="M77.7383308,20 L61.1640113,20 L44.7300055,63.2000173 L56.0543288,63.2000173 L40,99.623291 L72.7458388,54.5871812 L60.907727,54.5871812 L77.7383308,20 Z" id="Path-1" fill="#FFFFFF" />
+ </g>
+</svg>
\ No newline at end of file
diff --git a/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraController.js b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraController.js
new file mode 100644
index 0000000..a042c53
--- /dev/null
+++ b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraController.js
@@ -0,0 +1,9 @@
+({
+ closeModal: function (cmp, event, helper) {
+ $A.get('e.force:closeQuickAction').fire();
+ },
+
+ refreshView: function (cmp, event, helper) {
+ $A.get('e.force:refreshView').fire();
+ }
+});
diff --git a/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraHelper.js b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraHelper.js
new file mode 100644
index 0000000..c2a6e9e
--- /dev/null
+++ b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraHelper.js
@@ -0,0 +1,3 @@
+({
+ helperMethod: function () {}
+});
diff --git a/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraRenderer.js b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraRenderer.js
new file mode 100644
index 0000000..605447f
--- /dev/null
+++ b/force-app/main/default/aura/LexContactPIPLAura/LexContactPIPLAuraRenderer.js
@@ -0,0 +1,3 @@
+({
+ // Your renderer method overrides go here
+});
diff --git a/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.auradoc b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.auradoc
new file mode 100644
index 0000000..d0d6eb5
--- /dev/null
+++ b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.auradoc
@@ -0,0 +1,6 @@
+<aura:documentation>
+ <aura:description>Documentation</aura:description>
+ <aura:example name="ExampleName" ref="exampleComponentName" label="Label">
+ Example Description
+ </aura:example>
+</aura:documentation>
\ No newline at end of file
diff --git a/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.cmp b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.cmp
new file mode 100644
index 0000000..6cc8450
--- /dev/null
+++ b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.cmp
@@ -0,0 +1,233 @@
+<!--
+ @description :
+ @author : ChangeMeIn@UserSettingsUnder.SFDoc
+ @group :
+ @last modified on : 07-08-2022
+ @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
+-->
+<aura:component
+ implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable"
+ access="global"
+ controller="NewAgencyOpportunityController"
+>
+ <aura:attribute name="recordId" type="Id" default="" />
+ <aura:attribute name="recordTypeId" type="Id" default="" />
+ <aura:attribute name="ac_name" type="string" />
+ <aura:attribute name="title" type="string" />
+ <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
+ <aura:attribute name="layout" type="LayoutDescriberHelper.LayoutWrapper" />
+ <aura:attribute name="record_data" type="Map" />
+ <aura:attribute name="section_names" type="List" />
+ <aura:attribute name="showSpinner" type="Boolean" default="False" />
+ <aura:attribute name="showSpinner2" type="Boolean" default="False" />
+ <aura:attribute name="staticResource" type="Map" />
+ <aura:attribute name="pi_fields_map" type="Map" />
+ <aura:attribute name="isClone" type="Boolean" default="False" />
+ <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" />
+ <ltng:require scripts="{! $Resource.jquery183minjs }" />
+ <aura:attribute name="isModalOpen" type="boolean" default="false" />
+ <aura:attribute name="searchKeyWord" type="string" default="" />
+ <aura:attribute name="contactAWSIds" type="List" />
+ <aura:attribute name="login" type="Boolean" default="false" />
+ <aura:attribute name="show" type="Boolean" default="false" />
+ <aura:attribute
+ name="showNewAgencyContact"
+ type="Boolean"
+ default="false"
+ />
+ <aura:handler
+ name="NewAgencyContactEvent"
+ event="c:NewAgencyContactEvent"
+ action="{!c.closeAgencyContact}"
+ />
+
+ <div class="{! v.container_class}">
+ <!-- header -->
+ <header class="slds-modal__header">
+ <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate">
+ {!v.title}
+ </h2>
+ </header>
+
+ <div class="slds-modal__content slds-p-around_medium">
+ <aura:if isTrue="{!v.showSpinner}">
+ <lightning:spinner alternativeText="Loading" size="medium" />
+ </aura:if>
+ <lightning:recordEditForm objectApiName="Agency_Opportunity__c">
+ <lightning:accordion
+ activeSectionName="{! v.section_names }"
+ allowMultipleSectionsOpen="true"
+ class="greyyyy"
+ >
+ <aura:iteration items="{!v.layout}" var="section">
+ <aura:if isTrue="{! section.editHeading }">
+ <lightning:accordionSection
+ name="{! section.label }"
+ label="缁忛攢鍟嗚浠蜂俊鎭�"
+ >
+ <aura:iteration
+ items="{! section.layoutColumns}"
+ var="col"
+ >
+ <aura:iteration
+ items="{! col.layoutItems}"
+ var="field"
+ >
+ <aura:if
+ isTrue="{!and(field.behavior != 'Readonly', field.field != 'Agency_Contact__c')}"
+ >
+ <lightning:inputField
+ required="{! field.behavior == 'Required' }"
+ aura:id="field"
+ fieldName="{! field.field}"
+ value="{! field.value}"
+ />
+ </aura:if>
+ <aura:if
+ isTrue="{!field.field == 'Agency_Contact__c' }"
+ >
+ <lightning:layout>
+ <lightning:layoutItem size="12">
+ <lightning:input
+ required="{! field.behavior == 'Required' }"
+ label="瀹㈡埛浜哄憳"
+ value="{! field.value}"
+ variant="label-inline"
+ style="
+ margin-left: 0cm;
+ display: none;
+ "
+ onclick="{! c.openModel }"
+ />
+ <lightning:input
+ required="{! field.behavior == 'Required' }"
+ label="瀹㈡埛浜哄憳"
+ value="{! v.ac_name}"
+ variant="label-inline"
+ style="margin-left: 0cm"
+ onclick="{! c.openModel }"
+ />
+ </lightning:layoutItem>
+ </lightning:layout>
+ </aura:if>
+ </aura:iteration>
+ </aura:iteration>
+ </lightning:accordionSection>
+ </aura:if>
+ </aura:iteration>
+ </lightning:accordion>
+ </lightning:recordEditForm>
+
+ <div style="text-align: center; margin: 5px">
+ <lightning:button
+ class="slds-button slds-button_neutral"
+ label="鍙栨秷"
+ onclick="{! c.cancelClick }"
+ />
+ <lightning:button
+ class="slds-button slds-button_brand"
+ variant="brand"
+ label="淇濆瓨"
+ onclick="{! c.saveClick }"
+ />
+ </div>
+ </div>
+ <aura:if isTrue="{!v.isModalOpen}">
+ <!-- Modal/Popup Box starts here-->
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-01"
+ aria-modal="true"
+ aria-describedby="modal-content-id-1"
+ class="slds-modal slds-fade-in-open"
+ >
+ <aura:renderIf isTrue="{!v.login}">
+ <div class="slds-spinner_container height100vh">
+ <div
+ class="slds-spinner--brand slds-spinner slds-spinner--medium"
+ role="alert"
+ >
+ <span id="aa" class="slds-assistive-text"
+ >Loading</span
+ >
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
+ </aura:renderIf>
+
+ <div class="slds-modal__container">
+ <!-- Modal/Popup Box Header Starts here-->
+ <header class="slds-modal__header">
+ <lightning:buttonIcon
+ iconName="utility:close"
+ onclick="{! c.closeModel }"
+ alternativeText="close"
+ variant="bare-inverse"
+ class="slds-modal__close"
+ />
+ <h2
+ id="modal-heading-01"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
+ 鎼滅储瀹㈡埛浜哄憳
+ </h2>
+ </header>
+
+ <!--Modal Body Start here-->
+ <div
+ class="slds-modal__content slds-p-around_medium modal-body"
+ id="modal-content-id-1"
+ >
+ <lightning:layout>
+ <lightning:layoutItem size="7">
+ <ui:inputText
+ label="璇疯緭鍏ュ鎴峰鍚�"
+ class="field"
+ value="{!v.searchKeyWord}"
+ />
+ </lightning:layoutItem>
+ <lightning:layoutItem size="2" class="searchButton">
+ <ui:button
+ aura:id="button"
+ buttonTitle="Click to see agency contact"
+ class="button"
+ label="鎼滅储"
+ press="{!c.searchAgencyContact}"
+ disabled="false"
+ />
+ </lightning:layoutItem>
+ <lightning:layoutItem size="3" class="searchButton">
+ <ui:button
+ aura:id="newAgencyContact"
+ buttonTitle="Click to see agency contact"
+ class="newAgencyContact"
+ label="鏂板缓.瀹㈡埛浜哄憳"
+ disabled="false"
+ press="{!c.showNewAgency}"
+ />
+ </lightning:layoutItem>
+ </lightning:layout>
+ <div id="QueryResult" style="margin-top: 20px"></div>
+ </div>
+
+ <aura:if isTrue="{!v.showNewAgencyContact}">
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-modal="true"
+ aria-labelledby="modal-heading-01"
+ class="slds-modal slds-fade-in-open"
+ aura:id="NewAgencyContact"
+ id="NewAgencyContact"
+ >
+ <c:NewAgencyContact2 />
+ </section>
+ </aura:if>
+ </div>
+ </section>
+ <div class="slds-backdrop slds-backdrop_open"></div>
+ </aura:if>
+ </div>
+</aura:component>
diff --git a/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.cmp-meta.xml b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.cmp-meta.xml
new file mode 100644
index 0000000..2c30e5a
--- /dev/null
+++ b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.cmp-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>54.0</apiVersion>
+ <description>A Lightning Component Bundle</description>
+</AuraDefinitionBundle>
diff --git a/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.css b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.css
new file mode 100644
index 0000000..0df5018
--- /dev/null
+++ b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunity.css
@@ -0,0 +1,67 @@
+.THIS {
+}
+
+.THIS .name {
+ margin-right: 0.5cm;
+}
+
+.THIS .wh {
+ width: 670px;
+ height: 500px;
+}
+
+.THIS .slds-modal__container {
+ max-width: 70rem !important;
+ width: 90% !important;
+}
+
+.THIS .modal-body {
+ height: 500px !important;
+ max-height: 500px !important;
+}
+
+.THIS table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ width: 98%;
+ margin-left: 5px;
+ /* border: 1px solid #000000; */
+ text-align: center;
+}
+.THIS tr {
+ /* border: 1px solid #000000; */
+ text-align: center;
+}
+.THIS td {
+ /* border: 1px solid #000000; */
+ text-align: center;
+}
+
+.THIS th {
+ /* border: 1px solid #000000; */
+ text-align: center;
+}
+
+.THIS.backgroundInverse {
+ position: relative;
+ background-color: #16325c;
+ height: 80px;
+}
+
+.THIS.exampleHolder {
+ position: relative;
+ display: inline-block;
+ margin-left: 15px;
+ width: 55px;
+ vertical-align: middle;
+ white-space: nowrap;
+}
+
+.THIS .searchButton {
+ margin-top: 20px;
+ margin-left: 20px;
+}
+
+.THIS .slds-spinner_container {
+ position: revert;
+}
diff --git a/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityController.js b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityController.js
new file mode 100644
index 0000000..671f8e3
--- /dev/null
+++ b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityController.js
@@ -0,0 +1,334 @@
+({
+ doInit: function (component, event, helper) {
+ let rid = component.get('v.recordId');
+ let pid = null;
+ if (!rid) {
+ pid = window.location.href.replace('https://', '').split('/')[4];
+ }
+
+ let record_type_id = '';
+ let pageref = component.get('v.pageReference');
+ if (!record_type_id && pageref) {
+ record_type_id = pageref.state.recordTypeId
+ ? pageref.state.recordTypeId
+ : '';
+ }
+
+ let isClone = component.get('v.isClone');
+ if (!rid || isClone) {
+ component.set('v.title', $A.get('$Label.c.New') + '缁忛攢鍟嗚浠�');
+ component.set('v.recordTypeId', record_type_id);
+ } else {
+ component.set('v.title', $A.get('$Label.c.Edit') + '缁忛攢鍟嗚浠�');
+ }
+ console.log('rid: ' + rid);
+ console.log('pid: ' + pid);
+ console.log('record_type_id: ' + record_type_id);
+ component.set('v.showSpinner', true);
+ helper.CallBackAction(
+ component,
+ 'Init',
+ {
+ rid: rid,
+ pid: pid,
+ //rid : component.get('v.recordId'),
+ record_type_id: record_type_id
+ },
+ function (data) {
+ console.log('data: ' + data);
+ var rv = data.getReturnValue();
+ console.log('rv:' + rv);
+ console.log('rv.Data:' + rv.Data);
+ console.log('rv.IsSuccess:' + rv.IsSuccess);
+ if (data.getState() == 'SUCCESS') {
+ if (rv.IsSuccess) {
+ debugger;
+ let layout = JSON.parse(rv.Data.layout);
+ debugger;
+ let fields = rv.Data.fields;
+ debugger;
+ let staticResource = JSON.parse(rv.Data.staticResource);
+ debugger;
+ let section_names = layout.map((s) => s.label);
+ debugger;
+ // let awsData = rv.Data.awsDataIds;
+ // section_names = layout.map(s=>s.label);
+ component.set('v.section_names', section_names);
+ component.set('v.layout', layout);
+ component.set('v.fields', fields);
+ component.set('v.staticResource', staticResource);
+ debugger;
+ let m = {};
+ for (let f of staticResource.PIDetails) {
+ m[f.SF_Field_API_Name__c] = f;
+ }
+ component.set('v.pi_fields_map', m);
+ if (rv.Data && rv.Data.data) {
+ debugger;
+ console.log('rv.Data.data = ' + rv.Data.data);
+ for (let s of layout) {
+ for (let c of s.layoutColumns) {
+ for (let item of c.layoutItems) {
+ if (
+ rv.Data.data.hasOwnProperty(
+ item.field
+ )
+ ) {
+ item.value =
+ rv.Data.data[item.field];
+ }
+ if (fields.hasOwnProperty(item.field)) {
+ item.fi = fields[item.field];
+ }
+ }
+ }
+ }
+ // component.set('v.layout',layout);
+ component.set('v.record_data', rv.Data.data);
+ if (rv.Data.data.Agency_Contact__r) {
+ if (
+ rv.Data.data.Agency_Contact__r
+ .AWS_Data_Id__c
+ ) {
+ helper.AwsGet(
+ staticResource.queryUrl,
+ {
+ dataId: rv.Data.data
+ .Agency_Contact__r
+ .AWS_Data_Id__c
+ },
+ function (data) {
+ console.log('data = ' + data);
+ if (data.object) {
+ component.set(
+ 'v.ac_name',
+ data.object.name
+ );
+ }
+ },
+ staticResource.token
+ );
+ }
+ }
+ // }, staticResource.token);
+ } else {
+ debugger;
+ console.log('rv.Data.data = ' + rv.Data.data);
+ console.log('layout = ' + layout);
+ for (let s of layout) {
+ for (let c of s.layoutColumns) {
+ for (let item of c.layoutItems) {
+ if (
+ rv.Data &&
+ fields.hasOwnProperty(item.field) &&
+ fields[item.field].References &&
+ fields[item.field].References.map(
+ (m) => m.value
+ ).indexOf(rv.Data.pidType) > -1
+ ) {
+ item.value = pid;
+ }
+ }
+ }
+ }
+ debugger;
+ // component.set('v.layout',layout);
+ }
+ // component.set('v.fields',fields);
+ // component.set('v.staticResource',staticResource);
+ component.set('v.showSpinner', false);
+ } else {
+ component.set('v.showSpinner', false);
+ helper.ShowToast({
+ message: rv.Message,
+ type: 'error'
+ });
+ }
+ } else {
+ component.set('v.showSpinner', false);
+ helper.ShowToast({
+ message: 'Init error',
+ type: 'error'
+ });
+ }
+ }
+ );
+ },
+ saveClick: function (component, event, helper) {
+ let staticResource = component.get('v.staticResource');
+ let record_id = component.get('v.recordId');
+ let record_type_id = component.get('v.recordTypeId');
+
+ let isClone = component.get('v.isClone');
+ let url = staticResource.newUrl;
+ let payloadPi = {};
+ if (record_id && !isClone) {
+ url = staticResource.updateUrl;
+ payloadPi['dataId'] = component.get('v.record_data').AWS_Data_Id__c;
+ }
+ let layout = component.get('v.layout');
+
+ let pi_fields_map = component.get('v.pi_fields_map');
+
+ for (let s of layout) {
+ for (let c of s.layoutColumns) {
+ for (let item of c.layoutItems) {
+ if (pi_fields_map.hasOwnProperty(item.field)) {
+ payloadPi[pi_fields_map[item.field].AWS_Field_API__c] =
+ item.value;
+ }
+
+ if (item.behavior == 'Required' && !item.value) {
+ let fs = component.find('field');
+ for (let fi in fs) {
+ let f = fs[fi];
+ if (!f.get('v.value')) {
+ f.reset();
+ }
+ }
+ return;
+ }
+ }
+ }
+ }
+
+ component.set('v.showSpinner', true);
+ debugger;
+ let data = {};
+ if (record_id && !isClone) {
+ data.Id = record_id;
+ }
+ for (let s of layout) {
+ for (let c of s.layoutColumns) {
+ for (let item of c.layoutItems) {
+ if (item.field && item.behavior != 'Readonly') {
+ data[item.field] = item.value;
+ }
+ }
+ }
+ }
+ let x = 1;
+ helper.CallBackAction(
+ component,
+ 'Save',
+ {
+ data: data,
+ transId: '1',
+ recordTypeId: record_type_id
+ },
+ function (data) {
+ component.set('v.showSpinner', false);
+ if (data.getState() == 'SUCCESS') {
+ var rv = data.getReturnValue();
+ console.log(rv);
+ var sfId = null;
+ if (rv.IsSuccess) {
+ sfId = rv.Data.recordId;
+ helper.ShowToast({
+ message: '鎴愬姛',
+ type: 'success'
+ });
+ if (record_id) {
+ $A.get('e.force:closeQuickAction').fire();
+ $A.get('e.force:refreshView').fire();
+ } else {
+ var sObjectEvent = $A.get(
+ 'e.force:navigateToSObject'
+ );
+ sObjectEvent.setParams({
+ recordId: sfId
+ });
+ sObjectEvent.fire();
+ }
+ } else {
+ helper.ShowToast({
+ message: rv.Message,
+ type: 'error'
+ });
+ }
+ } else {
+ helper.ShowToast({
+ message: 'Init error',
+ type: 'error'
+ });
+ }
+ }
+ );
+ },
+ cancelClick: function (component, event, helper) {
+ $A.get('e.force:closeQuickAction').fire();
+ //component.set("v.showNewAgencyContact", false);
+ },
+ searchAgencyContact: function (component, event, helper) {
+ component.find('button').set('v.disabled', true);
+ helper.resetTable();
+ helper.preparePayloadForSearchAgencyContact(component, event, helper);
+ },
+ initContactTable: function (component, event, helper) {
+ let cols = ['Name', 'AgencyHospital', 'DoctorDivision1', 'Type'];
+ let contactInfoList = [];
+ let awsDataIds = [];
+ let data = component.get('v.result');
+ if (data.object) {
+ for (var i = 0; i < data.object.length; i++) {
+ if (data.object[i].dataId) {
+ let contactInfo = new Object();
+ //闇�瑕佷慨鏀�
+ contactInfo.Name = data.object[i].name;
+ contactInfo.DoctorDivision1 =
+ data.object[i].doctorDivision1;
+ contactInfo.AWSDataId = data.object[i].dataId;
+ contactInfo.Type = data.object[i].type;
+ contactInfo.pi = true;
+ awsDataIds.push(contactInfo.AWSDataId);
+ contactInfo.sfRecordId = '';
+ contactInfoList.push(contactInfo);
+ }
+ }
+ }
+ let AWSIdToSFIdMapValue = {};
+ },
+ openModel: function (component, event, helper) {
+ let layout = component.get('v.layout');
+ for (let s of layout) {
+ for (let c of s.layoutColumns) {
+ for (let item of c.layoutItems) {
+ if (item.field == 'Agency_Hospital__c' && !item.value) {
+ console.log('item.value = ' + item.value);
+ helper.ShowToast({
+ message: '璇峰厛閫夋嫨缁忛攢鍟嗗尰闄�',
+ type: 'warning'
+ });
+ return;
+ }
+ }
+ }
+ }
+ // Set isModalOpen true
+ component.set('v.isModalOpen', true);
+ component.find('button').set('v.disabled', true);
+ helper.preparePayloadForSearchAgencyContact(component, event, helper);
+ },
+
+ closeModel: function (component, event, helper) {
+ // Set isModalOpen false
+ component.set('v.isModalOpen', false);
+ },
+
+ saveDetails: function (component, event, helper) {
+ //do something
+ component.set('v.isModalOpen', false);
+ },
+
+ showNewAgency: function (component, event, helper) {
+ //do something
+ component.set('v.showNewAgencyContact', true);
+ },
+ closeAgencyContact: function (component, event, helper) {
+ var message = event.getParam('showNewAgencyContact');
+ component.set('v.showNewAgencyContact', message);
+ component.find('button').set('v.disabled', true);
+ helper.resetTable();
+ helper.preparePayloadForSearchAgencyContact(component, event, helper);
+ }
+});
diff --git a/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityHelper.js b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityHelper.js
new file mode 100644
index 0000000..6377482
--- /dev/null
+++ b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityHelper.js
@@ -0,0 +1,341 @@
+({
+ CallBackAction: function (component, action_name, para, callback) {
+ var action = component.get(
+ 'c.' + action_name.trimStart().replace('c.', '')
+ );
+ if (para) {
+ action.setParams(para);
+ }
+ if (callback) {
+ action.setCallback(this, function (data) {
+ callback(data);
+ });
+ }
+
+ $A.enqueueAction(action);
+ },
+ ShowToast: function (paras) {
+ var toastEvent = $A.get('e.force:showToast');
+ toastEvent.setParams(paras);
+ toastEvent.fire();
+ },
+ AwsPost: function (postURL, data, callback, token) {
+ let payloadForNewPI = '';
+ if (typeof data == 'string') {
+ payloadForNewPI = data;
+ } else {
+ payloadForNewPI = JSON.stringify(data);
+ }
+
+ AWSService.post(
+ postURL,
+ payloadForNewPI,
+ function (result) {
+ //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(result),this.successStatus);
+ if (callback) callback(result);
+ },
+ token
+ );
+ },
+ AwsGet: function (url, data, callback, token) {
+ if (typeof data == 'string') {
+ url += data;
+ } else {
+ let i = 0;
+ for (let p in data) {
+ url += i++ ? '&' : '?';
+ url += p + '=' + data[p];
+ }
+ }
+
+ AWSService.get(
+ url,
+ function (result) {
+ //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(result),this.successStatus);
+ if (callback) callback(result);
+ },
+ token
+ );
+ },
+ refreshTable: function (
+ component,
+ event,
+ helper,
+ cols,
+ contactInfoList,
+ contactsInfo
+ ) {
+ let that = this;
+ let myTableDiv = document.getElementById('QueryResult');
+ let table = document.createElement('TABLE');
+ table.border = '1';
+ table.id = 'table';
+ table.setAttribute(
+ 'class',
+ 'slds-table slds-table_cell-buffer slds-table_bordered'
+ );
+ let tableBody = document.createElement('TBODY');
+ table.appendChild(tableBody);
+ let headerTR = document.createElement('TR');
+ headerTR.setAttribute('class', 'slds-line-height_reset');
+ let colsHeader = ['濮撳悕', '鍖婚櫌', '鍖荤敓鍖哄垎(鑱屽姟)', '鍒嗙被'];
+ tableBody.appendChild(headerTR);
+ for (let i = 0; i < colsHeader.length; i++) {
+ let td = document.createElement('TH');
+ td.width = '75';
+ td.setAttribute('class', 'slds-truncate slds-border_right');
+ td.appendChild(document.createTextNode(colsHeader[i]));
+ headerTR.appendChild(td);
+ }
+ //3. Init the AWS data
+ for (let i = 0; i < contactInfoList.length; i++) {
+ let tr = document.createElement('TR');
+ tableBody.appendChild(tr);
+ let contactInfoTemp = contactInfoList[i];
+ for (let j = 0; j < cols.length; j++) {
+ let td = document.createElement('TD');
+ td.width = '75';
+ if (contactInfoTemp.pi) {
+ if (
+ !contactsInfo.hasOwnProperty(contactInfoTemp.AWSDataId)
+ ) {
+ continue;
+ }
+ if (j == 0 && contactsInfo[contactInfoTemp.AWSDataId]) {
+ td.id = contactsInfo[contactInfoTemp.AWSDataId].Id;
+ }
+ } else {
+ td.id = contactInfoTemp.sfRecordId;
+ }
+ td.appendChild(
+ document.createTextNode(
+ contactInfoTemp[cols[j]] != null
+ ? contactInfoTemp[cols[j]]
+ : ''
+ )
+ );
+ if (cols[j] == 'Name') {
+ td.addEventListener('click', function (obj) {
+ that.redirectToParentPage(
+ component,
+ event,
+ helper,
+ obj
+ );
+ });
+ }
+ tr.appendChild(td);
+ }
+ }
+ myTableDiv.appendChild(table);
+ component.find('button').set('v.disabled', false);
+ },
+ redirectToParentPage: function (component, event, helper, obj) {
+ let agencyContactName = obj.currentTarget.innerText;
+ let id = obj.currentTarget.id;
+ component.set('v.ac_name', agencyContactName);
+ let layout = component.get('v.layout');
+ for (let s of layout) {
+ for (let c of s.layoutColumns) {
+ for (let item of c.layoutItems) {
+ if (item.field == 'Agency_Contact__c') {
+ item.value = id;
+ }
+ }
+ }
+ }
+ component.set('v.isModalOpen', false);
+ },
+ resetTable: function () {
+ let queryResult = document.getElementById('QueryResult');
+ let table = document.getElementsByTagName('table');
+ debugger;
+ console.log('table:' + table);
+ debugger;
+ if (table.length > 1) {
+ for (var i = 1; i < table.length; i++) {
+ queryResult.removeChild(table[i]);
+ }
+ }
+ },
+ preparePayloadForSearchAgencyContact: function (component, event, helper) {
+ let that = this;
+ let agencyHospitalId = '';
+ let accountId = '';
+ let layout = component.get('v.layout');
+ for (let s of layout) {
+ for (let c of s.layoutColumns) {
+ for (let item of c.layoutItems) {
+ if (item.field == 'Agency_Hospital__c') {
+ agencyHospitalId = item.value;
+ }
+ if (item.field == 'Account_Opp__c') {
+ accountId = item.value;
+ }
+ }
+ }
+ }
+ var action = component.get('c.getAWSDataIds');
+ action.setParams({
+ agencyHospitalId: agencyHospitalId,
+ accountId: accountId
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var rv = response.getReturnValue();
+ if (rv.Data.length == 0) {
+ component.find('button').set('v.disabled', false);
+ helper.ShowToast({
+ message: '璇ョ粡閿�鍟嗗尰闄笅闈㈡病鏈夊鎴蜂汉鍛�',
+ type: 'warning'
+ });
+ return;
+ }
+ let searchPayload = new Object();
+ let searchAgencyContactName = component.get('v.searchKeyWord');
+ searchPayload.dataIds = rv.Data;
+ searchPayload.name = searchAgencyContactName;
+ component.set('v.contactAWSIds', rv.Data);
+ let staticResource = component.get('v.staticResource');
+ let url = staticResource.searchUrl;
+ let token = staticResource.token;
+ this.AwsPost(
+ url,
+ searchPayload,
+ function (data) {
+ if (data.success) {
+ let cols = [
+ 'Name',
+ 'AgencyHospital',
+ 'DoctorDivision1',
+ 'Type'
+ ];
+ let contactInfoList = [];
+ let awsDataIds = [];
+ if (data.object.length == 0) {
+ component
+ .find('button')
+ .set('v.disabled', false);
+ that.ShowToast({
+ message: '娌℃湁鏌ヨ鍒拌瀹㈡埛浜哄憳',
+ type: 'warning'
+ });
+ return;
+ }
+ for (var i = 0; i < data.object.length; i++) {
+ if (data.object[i].dataId) {
+ let contactInfo = new Object();
+ //闇�瑕佷慨鏀�
+ contactInfo.Name = data.object[i].name;
+ contactInfo.AgencyHospital = '';
+ contactInfo.DoctorDivision1 =
+ data.object[i].doctorDivision1;
+ contactInfo.AWSDataId =
+ data.object[i].dataId;
+ contactInfo.Type = data.object[i].type;
+ contactInfo.pi = true;
+ awsDataIds.push(contactInfo.AWSDataId);
+ contactInfo.sfRecordId = '';
+ contactInfoList.push(contactInfo);
+ }
+ }
+ //let AWSIdToSFIdMapValue = {};
+ var searchAgencyContacts = component.get(
+ 'c.searchAgencyContacts'
+ );
+ searchAgencyContacts.setParams({
+ awsAgencyContactIds: JSON.stringify(awsDataIds),
+ agencyHospitalId: agencyHospitalId,
+ accountId: accountId
+ });
+ searchAgencyContacts.setCallback(
+ this,
+ function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var rv = response.getReturnValue();
+ if (rv.IsSuccess) {
+ let contactsInfo = '';
+ if (rv.Data) {
+ contactsInfo = JSON.parse(
+ rv.Data.replace(
+ /("\;)/g,
+ '"'
+ )
+ );
+ if (
+ Object.keys(contactsInfo)
+ .length > 0
+ ) {
+ for (
+ let i = 0;
+ i <
+ contactInfoList.length;
+ i++
+ ) {
+ let contactFromSF =
+ contactsInfo[
+ contactInfoList[
+ i
+ ]['AWSDataId']
+ ];
+ if (contactFromSF) {
+ contactInfoList[
+ i
+ ].sfRecordId =
+ contactFromSF[
+ 'Id'
+ ];
+ if (
+ contactFromSF[
+ 'Agency_Hospital__r'
+ ]
+ ) {
+ contactInfoList[
+ i
+ ].AgencyHospital =
+ contactFromSF[
+ 'Agency_Hospital__r'
+ ]['Name'];
+ }
+ if (
+ contactFromSF[
+ 'Department_Class__r'
+ ]
+ ) {
+ contactInfoList[
+ i
+ ].AgencyHospital =
+ contactFromSF[
+ 'Department_Class__r'
+ ]['Parent'][
+ 'Name'
+ ];
+ }
+ }
+ }
+ }
+ }
+ that.refreshTable(
+ component,
+ event,
+ helper,
+ cols,
+ contactInfoList,
+ contactsInfo
+ );
+ }
+ }
+ }
+ );
+ $A.enqueueAction(searchAgencyContacts);
+ }
+ },
+ token
+ );
+ }
+ });
+ $A.enqueueAction(action);
+ }
+});
diff --git a/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityRenderer.js b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityRenderer.js
new file mode 100644
index 0000000..605447f
--- /dev/null
+++ b/force-app/main/default/aura/NewAgencyOpportunity/NewAgencyOpportunityRenderer.js
@@ -0,0 +1,3 @@
+({
+ // Your renderer method overrides go here
+});
diff --git a/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.cmp b/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.cmp
index 0d58c27..3a97a6b 100644
--- a/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.cmp
+++ b/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.cmp
@@ -1,1289 +1,1455 @@
<aura:component
- controller="RetrospectiveWeeklyReportController"
- implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens"
- access="global"
+ controller="RetrospectiveWeeklyReportController"
+ implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens"
+ access="global"
>
- <ltng:require styles="{!$Resource.multilineToastCSS}" />聽
- <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
- <aura:handler
- event="c:strike_evt"
- action="{!c.createAopp}"
- name="strike_evt_addNewRecord"
- />
- <aura:attribute
- name="data"
- type="Agency_Report__c"
- default="{sobjectType:'Agency_Report__c'}"
- />
- <aura:attribute
- name="oppdata"
- type="Agency_Opportunity__c"
- default="{sobjectType:'Agency_Opportunity__c'}"
- />
- <aura:attribute
- name="acondata"
- type="Agency_Contact__c"
- default="{sobjectType:'Ag
+ <ltng:require styles="{!$Resource.multilineToastCSS}" />聽
+ <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
+ <aura:handler
+ event="c:strike_evt"
+ action="{!c.createAopp}"
+ name="strike_evt_addNewRecord"
+ />
+ <aura:attribute
+ name="data"
+ type="Agency_Report__c"
+ default="{sobjectType:'Agency_Report__c'}"
+ />
+ <aura:attribute
+ name="oppdata"
+ type="Agency_Opportunity__c"
+ default="{sobjectType:'Agency_Opportunity__c'}"
+ />
+ <aura:attribute
+ name="acondata"
+ type="Agency_Contact__c"
+ default="{sobjectType:'Ag
ency_Contact__c'}"
- />
- <aura:attribute name="successMessage" type="String" />
- <aura:attribute name="etEng" type="String" />
- <aura:attribute name="errorMessage" type="String" />
- <aura:attribute name="Close_Forecasted_Date__c_o" type="Date" />
- <aura:attribute name="Amount__c_o" type="String" />
- <aura:attribute name="OCMSale_Price__c_o" type="String" />
- <aura:attribute name="StageName__c_o" type="String" />
- <aura:attribute name="fieldsmap" type="Map" />
- <aura:attribute name="AgencyReportMap" type="Boolean" default="false" />
- <!-- 鏃ユ姤鍒嗙被 -->
+ />
+ <aura:attribute name="successMessage" type="String" />
+ <aura:attribute name="etEng" type="String" />
+ <aura:attribute name="errorMessage" type="String" />
+ <aura:attribute name="Close_Forecasted_Date__c_o" type="Date" />
+ <aura:attribute name="Amount__c_o" type="String" />
+ <aura:attribute name="OCMSale_Price__c_o" type="String" />
+ <aura:attribute name="StageName__c_o" type="String" />
+ <aura:attribute name="fieldsmap" type="Map" />
+ <aura:attribute name="AgencyReportMap" type="Boolean" default="false" />
+ <!-- 鏃ユ姤鍒嗙被 -->
- <aura:attribute name="alldata" type="List" />
- <aura:attribute name="setdoctorlisthos" type="Boolean" default="false" />
- <aura:attribute name="allselectlist" type="Map" />
- <aura:attribute name="doclist" type="List" />
- <aura:attribute name="docmap" type="Map" />
- <aura:attribute name="login" type="Boolean" default="false" />
- <aura:attribute name="loadOpp" type="Boolean" default="false" />
- <aura:attribute name="reportPageData" type="Map" />
- <aura:attribute name="selectbody" type="String" />
- <aura:attribute name="report_date_list" type="Map" />
- <aura:attribute name="selected_date" type="String" />
- <aura:attribute name="selected_agency_person" type="String" />
- <aura:attribute name="agency_report_header" type="String" />
- <aura:attribute name="agency_report_header_id" type="String" />
- <aura:attribute name="result" type="String" default="" />
- <!-- //鍖婚櫌 鐐归�夐渶瑕� -->
- <aura:attribute name="hospital" type="string" default="" />
- <aura:attribute name="hospitalId" type="string" default="" />
- <aura:attribute name="hospitals" type="string" default="" />
- <aura:attribute name="hospitalLinkId" type="string" default="" />
- <aura:handler name="change" value="{!v.hospital}" action="{!c.hosChange}" />
- <aura:attribute name="hospitalList" type="Map" />
- <!-- 浣跨敤浜у搧1(浜у搧鍨嬪彿) -->
- <aura:attribute name="UseProduct1" type="string" default="" />
- <aura:attribute name="UseProduct1s" type="string" default="" />
- <aura:handler
- name="change"
- value="{!v.UseProduct1}"
- action="{!c.UseProduct1Change}"
- />
- <aura:attribute name="UseProduct1List" type="Map" />
- <aura:attribute name="UseProduct1Id" type="string" default="" />
- <!-- 浣跨敤浜у搧2 -->
- <aura:attribute name="UseProduct2" type="string" default="" />
- <aura:attribute name="UseProduct2s" type="string" default="" />
- <aura:handler
- name="change"
- value="{!v.UseProduct2}"
- action="{!c.UseProduct2Change}"
- />
- <aura:attribute name="UseProduct2List" type="Map" />
- <aura:attribute name="UseProduct2Id" type="string" default="" />
- <!-- 浣跨敤浜у搧3 -->
- <aura:attribute name="UseProduct3" type="string" default="" />
- <aura:attribute name="UseProduct3s" type="string" default="" />
- <aura:handler
- name="change"
- value="{!v.UseProduct3}"
- action="{!c.UseProduct3Change}"
- />
- <aura:attribute name="UseProduct3List" type="Map" />
- <aura:attribute name="UseProduct3Id" type="string" default="" />
- <!--SWAG-CF58C3 fy start -->
- <aura:attribute name="AWStoken" type="String" />
- <aura:attribute name="AWSsearch" type="String" />
- <aura:attribute name="AWSinsert" type="String" />
- <aura:attribute name="AWStransactionURL" type="String" />
- <aura:attribute name="AWSDoctor2Map" type="String" />
- <aura:attribute name="awsurl" type="Map" />
- <aura:attribute name="contactawsurl" type="Map" />
- <aura:attribute name="allselectlistAgencyPerson" type="Map" />
- <!--SWAG-CF58C3 fy end -->
+ <aura:attribute name="alldata" type="List" />
+ <aura:attribute name="setdoctorlisthos" type="Boolean" default="false" />
+ <aura:attribute name="allselectlist" type="Map" />
+ <aura:attribute name="doclist" type="List" />
+ <aura:attribute name="docmap" type="Map" />
+ <aura:attribute name="login" type="Boolean" default="false" />
+ <aura:attribute name="loginEdit" type="Boolean" default="false" />
+ <aura:attribute
+ name="modal_import_spinner"
+ type="Boolean"
+ default="false"
+ />
+ <aura:attribute name="loadOpp" type="Boolean" default="false" />
+ <aura:attribute name="reportPageData" type="Map" />
+ <aura:attribute name="selectbody" type="String" />
+ <aura:attribute name="report_date_list" type="Map" />
+ <aura:attribute name="selected_date" type="String" />
+ <aura:attribute name="selected_agency_person" type="String" />
+ <aura:attribute name="agency_report_header" type="String" />
+ <aura:attribute name="agency_report_header_id" type="String" />
+ <aura:attribute name="result" type="String" default="" />
+ <!-- //鍖婚櫌 鐐归�夐渶瑕� -->
+ <aura:attribute name="hospital" type="string" default="" />
+ <aura:attribute name="hospitalId" type="string" default="" />
+ <aura:attribute name="hospitals" type="string" default="" />
+ <aura:attribute name="hospitalLinkId" type="string" default="" />
+ <aura:handler name="change" value="{!v.hospital}" action="{!c.hosChange}" />
+ <aura:attribute name="hospitalList" type="Map" />
+ <!-- 浣跨敤浜у搧1(浜у搧鍨嬪彿) -->
+ <aura:attribute name="UseProduct1" type="string" default="" />
+ <aura:attribute name="UseProduct1s" type="string" default="" />
+ <aura:handler
+ name="change"
+ value="{!v.UseProduct1}"
+ action="{!c.UseProduct1Change}"
+ />
+ <aura:attribute name="UseProduct1List" type="Map" />
+ <aura:attribute name="UseProduct1Id" type="string" default="" />
+ <!-- 浣跨敤浜у搧2 -->
+ <aura:attribute name="UseProduct2" type="string" default="" />
+ <aura:attribute name="UseProduct2s" type="string" default="" />
+ <aura:handler
+ name="change"
+ value="{!v.UseProduct2}"
+ action="{!c.UseProduct2Change}"
+ />
+ <aura:attribute name="UseProduct2List" type="Map" />
+ <aura:attribute name="UseProduct2Id" type="string" default="" />
+ <!-- 浣跨敤浜у搧3 -->
+ <aura:attribute name="UseProduct3" type="string" default="" />
+ <aura:attribute name="UseProduct3s" type="string" default="" />
+ <aura:handler
+ name="change"
+ value="{!v.UseProduct3}"
+ action="{!c.UseProduct3Change}"
+ />
+ <aura:attribute name="UseProduct3List" type="Map" />
+ <aura:attribute name="UseProduct3Id" type="string" default="" />
+ <!--SWAG-CF58C3 fy start -->
+ <aura:attribute name="AWStoken" type="String" />
+ <aura:attribute name="AWSsearch" type="String" />
+ <aura:attribute name="AWSinsert" type="String" />
+ <aura:attribute name="AWStransactionURL" type="String" />
+ <aura:attribute name="AWSDoctor2Map" type="String" />
+ <aura:attribute name="awsurl" type="Map" />
+ <aura:attribute name="contactawsurl" type="Map" />
+ <aura:attribute name="allselectlistAgencyPerson" type="Map" />
+ <!--SWAG-CF58C3 fy end -->
- <aura:attribute name="doctor_list" type="Map" />
- <!-- <aura:attribute name="doctor_title" type="String" /> -->
- <aura:attribute name="opportunity_list" type="Map" />
- <aura:attribute name="edit_copy_select_report_id" type="String" />
- <aura:attribute name="create_agency_report_id" type="String" />
- <aura:attribute name="reports" type="List" />
- <aura:attribute name="reports_now" type="List" />
- <aura:attribute name="reports_now_count" type="Integer" />
- <aura:attribute name="mode" type="String" />
- <aura:attribute name="select_report_data" type="Map" />
- <aura:attribute name="select_report_data_radio" type="Map" />
- <aura:attribute name="default_select_doctor_id" type="String" />
- <aura:attribute name="default_select_doctor_id2" type="String" />
- <aura:attribute name="default_select_opportunity_id" type="String" />
- <aura:attribute name="report_count" type="Integer" />
- <aura:attribute name="dialog_type" type="String" />
- <aura:attribute name="truthy" type="Boolean" default="false" />
- <aura:attribute name="list_message" type="String" default="鎼滅储" />
- <aura:attribute name="confirm_status" type="Integer" default="0" />
- <aura:attribute name="modal_confirm_title" type="String" />
- <aura:attribute name="modal_confirm_text" type="String" />
- <!-- <aura:attribute name="new_falg" type="String" /> -->
- <!-- fy -->
- <aura:attribute name="UserProType" type="String" />
- <!-- 绉戝 -->
- <aura:attribute name="opportunity_cfilter" type="String" />
- <aura:attribute
- name="update_select_report_data_id"
- type="String"
- default=""
- />
- <!-- 鎵归噺娣诲姞鏃ユ姤 start-->
- <aura:attribute name="reports_date" type="List" />
- <aura:attribute
- name="TableContent"
- type="String"
- description=" Show the Result class"
- />
- <aura:attribute
- name="TableContent2"
- type="String"
- description=" Show the Result class"
- />
- <aura:attribute
- name="TargetFileName"
- type="String"
- description="Name of the file"
- />
- <aura:attribute name="tableheaders" type="Object[]" />
- <aura:attribute name="fileContentData" type="String" />
- <aura:attribute name="filename" type="String" />
- <aura:attribute name="NumOfRecords" type="Integer" default="1000" />
- <aura:attribute name="showMain" type="Boolean" default="true" />
- <aura:attribute name="IsEventDefault" type="Boolean" default="true" />
- <!-- start DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
- <!-- Imports -->
- <!-- <aura:import library="lightningcomponentdemo:mockdataFaker" property="mockdataLibrary"/> -->
- <!-- attributes -->
- <aura:attribute name="errorData" type="Object" />
- <aura:attribute name="errorColumns" type="List" />
- <!-- show Error information -->
- <aura:attribute name="showErrorInfo" type="Boolean" default="false" />
- <!-- end DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
+ <aura:attribute name="doctor_list" type="Map" />
+ <!-- <aura:attribute name="doctor_title" type="String" /> -->
+ <aura:attribute name="opportunity_list" type="Map" />
+ <aura:attribute name="edit_copy_select_report_id" type="String" />
+ <aura:attribute name="create_agency_report_id" type="String" />
+ <aura:attribute name="reports" type="List" />
+ <aura:attribute name="reports_now" type="List" />
+ <aura:attribute name="reports_now_count" type="Integer" />
+ <aura:attribute name="mode" type="String" />
+ <aura:attribute name="select_report_data" type="Map" />
+ <aura:attribute name="select_report_data_radio" type="Map" />
+ <aura:attribute name="default_select_doctor_id" type="String" />
+ <aura:attribute name="default_select_doctor_id2" type="String" />
+ <aura:attribute name="default_select_opportunity_id" type="String" />
+ <aura:attribute name="report_count" type="Integer" />
+ <aura:attribute name="dialog_type" type="String" />
+ <aura:attribute name="truthy" type="Boolean" default="false" />
+ <aura:attribute name="list_message" type="String" default="鎼滅储" />
+ <aura:attribute name="confirm_status" type="Integer" default="0" />
+ <aura:attribute name="modal_confirm_title" type="String" />
+ <aura:attribute name="modal_confirm_text" type="String" />
+ <!-- <aura:attribute name="new_falg" type="String" /> -->
+ <!-- fy -->
+ <aura:attribute name="UserProType" type="String" />
+ <!-- 绉戝 -->
+ <aura:attribute name="opportunity_cfilter" type="String" />
+ <aura:attribute
+ name="update_select_report_data_id"
+ type="String"
+ default=""
+ />
+ <!-- 鎵归噺娣诲姞鏃ユ姤 start-->
+ <aura:attribute name="reports_date" type="List" />
+ <aura:attribute
+ name="TableContent"
+ type="String"
+ description=" Show the Result class"
+ />
+ <aura:attribute
+ name="TableContent2"
+ type="String"
+ description=" Show the Result class"
+ />
+ <aura:attribute
+ name="TargetFileName"
+ type="String"
+ description="Name of the file"
+ />
+ <aura:attribute name="tableheaders" type="Object[]" />
+ <aura:attribute name="fileContentData" type="String" />
+ <aura:attribute name="filename" type="String" />
+ <aura:attribute name="NumOfRecords" type="Integer" default="1000" />
+ <aura:attribute name="showMain" type="Boolean" default="true" />
+ <aura:attribute name="IsEventDefault" type="Boolean" default="true" />
+ <!-- start DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
+ <aura:attribute name="errorData" type="Object" />
+ <aura:attribute name="errorColumns" type="List" />
+ <!-- show Error information -->
+ <aura:attribute name="showErrorInfo" type="Boolean" default="false" />
+ <!-- end DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
- <aura:attribute name="PIConfig" type="Map" />
+ <aura:attribute name="PIConfig" type="Map" />
- <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" />
- <ltng:require scripts="{! $Resource.jquery183minjs }" />
+ <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" />
+ <ltng:require scripts="{! $Resource.jquery183minjs }" />
- <!-- 鎵归噺娣诲姞鏃ユ姤 end-->
- <!--銉兗銉変腑...-->
- <aura:renderIf isTrue="{!v.login}">
- <div class="slds-spinner_container height100vh">
- <div
- class="slds-spinner--brand slds-spinner slds-spinner--medium"
- role="alert"
- >
- <span class="slds-assistive-text">Loading</span>
- <div class="slds-spinner__dot-a"></div>
- <div class="slds-spinner__dot-b"></div>
- </div>
- </div>
- </aura:renderIf>
- <div aura:id="report" id="report" class="contents_wrapper">
- <div class="slds-grid slds-wrap slds-grid--pull-padded">
- <div style="width: 200px"></div>
- <div
- class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"
- >
- 鍛�
- </div>
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12"
- >
- <ui:inputSelect
- aura:id="select_date"
- class="slds-select"
- change="{!c.select_date_change}"
- />
- </div>
- <!-- 浠g悊搴楁媴褰撹�� -->
- <div
- class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"
- style="display: none"
- >
- {!v.fieldsmap.Person_In_Charge2__c}
- </div>
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12"
- style="display: none"
- >
- <ui:inputSelect
- aura:id="select_agency_person"
- class="slds-select agency_person_select"
- change="{!c.select_agency_change}"
- />
- </div>
- <div style="width: 100px"></div>
- <div
- class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
- style="display: contents"
- >
- <ui:button aura:id="new_button" label="鏂板缓" press="{!c.new_report}" />
- </div>
- <div
- style="width: 350px"
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
- >
- <ui:button
- aura:id="copy_button"
- label="澶嶅埗"
- press="{!c.copy_button}"
- disabled="true"
- />
- <ui:button
- aura:id="delete_button"
- label="鍒犻櫎"
- press="{!c.delete_button}"
- disabled="true"
- />
- <ui:button aura:id="import" label="瀵煎叆" press="{!c.import}" />
- <ui:button
- aura:id="export"
- label="瀵煎嚭"
- press="{!c.export_condition}"
- />
- <ui:button
- aura:id="returnbutton"
- label="杩斿洖"
- press="{!c.return_main_page}"
- />
- </div>
- </div>
- </div>
- <div aura:id="report_list" class="report_list_area">
- <div
- class="slds-table--edit_container slds-is-relative"
- style="padding-left: 50px"
- >
- <table
- class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus"
- role="grid"
- style="width: 66.75rem"
- >
- <thead>
- <tr class="slds-line-height--reset">
- <th
- class="table_header slds-text-title--caps"
- style="width: 250px"
- ></th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"
- >{!v.fieldsmap.Person_In_Charge2__c}</span
- >
- <!-- {!v.fieldsmap.Person_In_Charge2__c} 鎷呭綋-->
- </th>
- <th class="table_header slds-text-title--caps" style="width: 250px">
- <span class="slds-truncate" title="Name">鍖婚櫌</span>
- </th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"
- >{!v.fieldsmap.Department_Cateogy__c}</span
- >
- <!-- {!v.fieldsmap.Department_Cateogy__c} 绉戝-->
- </th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">鎷滆浜�</span>
- <!-- {!v.fieldsmap.doctor2__c} 鎷滆浜� -->
- </th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"
- >{!v.fieldsmap.DealerPersonnel__c}</span
- >
- <!-- {!v.fieldsmap.visitor_title__c} 鑱屼綅-->
- </th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"
- >{!v.fieldsmap.WorkMark__c}</span
- >
- <!-- {!v.fieldsmap.visitor_title__c} 鑱屼綅-->
- </th>
- </tr>
- </thead>
- <tbody>
- <aura:iteration items="{!v.reports}" var="item" indexVar="index">
- <tr class="slds-hint-parent">
- <td role="gridcell" class="slds-cell-edit">
- <ui:inputRadio
- class="report_radio"
- name="report_radio"
- label="{!item.Name}"
- change="{!c.change_report_radio}"
- />
- <lightning:buttonIcon
- class="edit_button"
- iconName="utility:edit"
- size="small"
- alternativeText="edit"
- value="{!index}"
- onclick="{!c.edit_button}"
- />
- </td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span
- class="slds-truncate"
- title="{!item.Person_In_Charge2__r.Name}"
- >{!item.Person_In_Charge2__r.Name}</span
- >
- </span>
- </td>
- <th scope="row" tabindex="0" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- {!item.Agency_Hospital__r.Name}
- </span>
- </th>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span
- class="slds-truncate"
- title="{!item.Department_Cateogy_text__c}"
- >{!item.Department_Cateogy_text__c}</span
- >
- </span>
- </td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.doctor2__r.Name}">
- <span class="encrypt">{!item.doctor2__r.Name}</span>
- <span class="decrypt">{!item.doctor2__r.awsdata.name}</span>
- </span>
- </span>
- </td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span
- class="slds-truncate"
- title="{!item.DealerPersonnel__r.Name}"
- >{!item.DealerPersonnel__r.Name}</span
- >
- </span>
- </td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.WorkMark__c}">
- <lightning:input
- type="checkbox"
- checked="{!item.WorkMark__c}"
- disabled="true"
- />
- </span>
- </span>
- </td>
- </tr>
- </aura:iteration>
- </tbody>
- </table>
- </div>
- <aura:renderIf isTrue="{!v.report_count > 0}">
- <aura:set attribute="else">
- <div class="no_data_area">{!v.list_message}</div>
- </aura:set>
+ <!-- 鎵归噺娣诲姞鏃ユ姤 end-->
+ <!--銉兗銉変腑...-->
+ <aura:renderIf isTrue="{!v.login}">
+ <aura:renderIf isTrue="{!!v.loginEdit}">
+ <!-- <div class="slds-spinner_container">
+ <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand">
+ 聽 聽 <span class="slds-assistive-text">Loading</span>
+ 聽 聽 <div class="slds-spinner__dot-a"></div>
+ 聽 聽 <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div> -->
+ <div
+ class="slds-spinner_container"
+ id="spinner"
+ style="position: fixed; top: 123px"
+ >
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
+ </aura:renderIf>
</aura:renderIf>
- </div>
- <!-- 鎵归噺娣诲姞鏃ユ姤 start-->
- <div
- aura:id="modal_import"
- role="dialog"
- tabindex="-1"
- class="disp_none slds-modal slds-fade-in-open slds-modal--large"
- aria-labelledby="headerTarget"
- >
- <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01">
- <!-- <ui:inputText aura:id="articleURL" /> -->
- <div class="demo-only" style="height: 8rem">
- <div class="slds-notify_container slds-is-relative">
- <div
- class="slds-notify slds-notify_toast slds-theme_success"
- role="alert"
- >
- <div class="slds-m-left_xx-large">
- <div
- class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
- >
- <lightning:icon
- alternativeText="Success"
- iconName="utility:success"
- size="small"
- class="buttonColor slds-m-right_small"
+ <div aura:id="report" id="report">
+ <div class="slds-grid slds-wrap slds-grid--pull-padded">
+ <div style="width: 150px"></div>
+ <div
+ class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12 fontSize"
+ >
+ 鍛�
+ </div>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 fontSize"
+ >
+ <ui:inputSelect
+ aura:id="select_date"
+ class="slds-select"
+ change="{!c.select_date_change}"
/>
- <h2 class="slds-text-heading_small">{!v.successMessage}</h2>
- </div>
</div>
- </div>
- </div>
- </div>
- </div>
- <div
- class="slds-modal slds-fade-in-open slds-hide"
- aura:id="errorDiv01"
- style="z-index: 10001"
- >
- <!-- <ui:inputText aura:id="articleURL" /> -->
- <div class="demo-only" style="height: 8rem">
- <div class="slds-notify_container slds-is-relative">
- <div
- class="slds-notify slds-notify_toast slds-theme_error"
- role="status"
- >
- <div class="slds-m-left_xx-large">
- <div
- class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
- >
- <lightning:icon
- alternativeText="error"
- iconName="utility:error"
- size="small"
- class="buttonColor slds-m-right_small"
+ <!-- 浠g悊搴楁媴褰撹�� -->
+ <div
+ class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"
+ style="display: none"
+ >
+ {!v.fieldsmap.Person_In_Charge2__c}
+ </div>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12"
+ style="display: none"
+ >
+ <ui:inputSelect
+ aura:id="select_agency_person"
+ class="slds-select agency_person_select"
+ change="{!c.select_agency_change}"
/>
- <h2 class="slds-text-heading_small">{!v.errorMessage}</h2>
- </div>
</div>
- </div>
- </div>
- </div>
- </div>
- <div class="slds-modal__container">
- <div class="slds-modal__header">
- <h4 id="headerTarget" class="slds-float--left"></h4>
- <h2 id="headerTarget" class="slds-text-heading--medium">
- 鏃ユ姤鎵归噺瀵煎叆
- </h2>
- <ui:button
- aura:id="close_button"
- label="鍏抽棴"
- class="close_button slds-button slds-button--neutral slds-order--1"
- press="{!c.close_import}"
- />
- </div>
- <div
- class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium"
- >
- <aura:if isTrue="{!v.showMain}">
- <div>
- <lightning:input
- type="file"
- class="file"
- uara:id="file"
- onchange="{!c.CreateRecord}"
- />
- </div>
- <aura:set attribute="else">
- <ui:outputRichText
- class="uiOutputRichText slds-m--around-large"
- value="{!v.TableContent}"
- />
- <div class="slds-p-around--large slds-align--absolute-center">
- <lightning:button
- label="淇濆瓨"
- variant="brand"
- onclick="{!c.processFileContent}"
- />
- <lightning:button
- label="鍙栨秷"
- variant="brand"
- onclick="{!c.cancel}"
- />
- </div>
- <aura:if isTrue="{!v.showErrorInfo}">
- <div class="slds-p-around--large slds-align--absolute-center">
- <lightning:button
- label="瀵煎嚭閿欒淇℃伅"
- variant="brand"
- onclick="{!c.exportErrorInfo}"
+ <div style="width: 100px"></div>
+ <div
+ class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
+ style="display: contents"
+ >
+ <ui:button
+ aura:id="new_button"
+ label="鏂板缓"
+ press="{!c.new_report}"
+ class="buttonFontSize"
/>
- </div>
- <div class="slds-p-around--large slds-align--absolute-center">
- <div style="height: 300px">
- <lightning:datatable
- keyField="id"
- data="{! v.errorData }"
- columns="{! v.errorColumns }"
- hideCheckboxColumn="true"
- />
- </div>
- </div>
- </aura:if>
- </aura:set>
- </aura:if>
- </div>
+ </div>
+ <div
+ style="width: 400px"
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--4-of-12 slds-large-size--4-of-12"
+ >
+ <ui:button
+ aura:id="copy_button"
+ label="澶嶅埗"
+ press="{!c.copy_button}"
+ disabled="true"
+ class="buttonFontSize"
+ />
+ <ui:button
+ aura:id="delete_button"
+ label="鍒犻櫎"
+ press="{!c.delete_button}"
+ disabled="true"
+ class="buttonFontSize"
+ />
+ <ui:button
+ aura:id="import"
+ label="瀵煎叆"
+ press="{!c.import}"
+ class="buttonFontSize"
+ />
+ <ui:button
+ aura:id="export"
+ label="瀵煎嚭"
+ press="{!c.export_condition}"
+ class="buttonFontSize"
+ />
+ <!-- <ui:button aura:id="returnbutton" label="杩斿洖" press="{!c.return_main_page}" /> -->
+ </div>
+ </div>
</div>
- </div>
- <div
- aura:id="modal_importbg"
- class="disp_none slds-backdrop slds-backdrop--open"
- ></div>
- <!-- 鎵归噺娣诲姞鏃ユ姤 end-->
-
- <!-- 鎵归噺瀵煎嚭鏃ユ姤 start-->
- <div
- aura:id="modal_export"
- role="dialog"
- tabindex="-1"
- class="disp_none slds-modal slds-fade-in-open slds-modal--large"
- >
- <div class="slds-modal__container">
- <div class="slds-modal__header">
- <h4 id="headerTarget" class="slds-float--left"></h4>
- <h2 id="headerTarget" class="slds-text-heading--medium">
- 鏃ユ姤鎵归噺瀵煎嚭
- </h2>
- <ui:button
- aura:id="close_button"
- label="鍏抽棴"
- class="close_button slds-button slds-button--neutral slds-order--1"
- press="{!c.close_export}"
- />
- </div>
- <div
- class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium"
- >
- <aura:if isTrue="{!v.showMain}">
- <div class="slds-grid slds-wrap slds-grid--pull-padded">
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
- ></div>
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
- >
- 娲诲姩鏃ュ紑濮嬫棩鏈�
- <lightning:input
- type="Date"
- class="slds-input slds-input_bare"
- aura:id="input-report-date1"
- />
- </div>
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
- >
- 娲诲姩鏃ョ粨鏉熸棩鏈�
- <lightning:input
- type="Date"
- class="slds-input slds-input_bare"
- aura:id="input-report-date2"
- />
- </div>
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
- ></div>
- <div class="slds-p-around--large slds-align--absolute-center">
- <lightning:button
- label="纭"
- variant="brand"
- onclick="{!c.select_repores_date}"
- />
- <lightning:button
- label="鍙栨秷"
- variant="brand"
- onclick="{!c.close_export}"
- />
- </div>
- </div>
- <aura:set attribute="else">
- <ui:outputRichText
- class="uiOutputRichText slds-m--around-large"
- value="{!v.TableContent2}"
- />
- <div class="slds-p-around--large slds-align--absolute-center">
- <lightning:button
- label="纭"
- variant="brand"
- onclick="{!c.exportDate}"
- />
- <lightning:button
- label="鍙栨秷"
- variant="brand"
- onclick="{!c.close_export}"
- />
- </div>
- </aura:set>
- </aura:if>
- </div>
- </div>
- </div>
- <div
- aura:id="modal_exportbg"
- class="disp_none slds-backdrop slds-backdrop--open"
- ></div>
- <!-- 鎵归噺瀵煎嚭鏃ユ姤 end-->
- <div
- aura:id="modal_window"
- role="dialog"
- tabindex="-1"
- class="disp_none slds-modal slds-fade-in-open slds-modal--large"
- aria-labelledby="headerTarget"
- >
- <div class="slds-modal__container">
- <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv">
- <!-- <ui:inputText aura:id="articleURL" /> -->
- <div class="demo-only" style="height: 8rem">
- <div class="slds-notify_container slds-is-relative">
- <div
- class="slds-notify slds-notify_toast slds-theme_success"
- role="alert"
- >
- <div class="slds-m-left_xx-large">
- <div
- class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
- >
- <lightning:icon
- alternativeText="Success"
- iconName="utility:success"
- size="small"
- class="buttonColor slds-m-right_small"
- />
- <h2 class="slds-text-heading_small">{!v.successMessage}</h2>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div
- class="slds-modal slds-fade-in-open slds-hide"
- aura:id="errorDiv"
- style="z-index: 10001"
- >
- <!-- <ui:inputText aura:id="articleURL" /> -->
- <div class="demo-only" style="height: 8rem">
- <div class="slds-notify_container slds-is-relative">
- <div
- class="slds-notify slds-notify_toast slds-theme_error"
- role="status"
- >
- <div class="slds-m-left_xx-large">
- <div
- class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
- >
- <lightning:icon
- alternativeText="error"
- iconName="utility:error"
- size="small"
- class="buttonColor slds-m-right_small"
- />
- <h2 class="slds-text-heading_small">{!v.errorMessage}</h2>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="slds-modal__header">
- <h2 id="headerTarget" class="slds-text-heading--medium">
- 鏃ユ姤({!v.selected_date} {!v.selected_agency_person})
- </h2>
- <ui:button
- aura:id="close_button"
- label="鍏抽棴"
- class="close_button slds-button slds-button--neutral slds-order--1"
- press="{!c.toggle_report}"
- />
- </div>
- <div class="slds-modal__content slds-grow slds-p-around--medium">
- <div class="slds-box slds-theme--shade">
- <div class="slds-grid slds-wrap slds-grid--pull-padded">
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- 娲诲姩鏃�
- <lightning:input
- type="date"
- value="{!v.data.Report_Date__c}"
- aura:id="input-report-date"
- variant="label-hidden"
- />
- </div>
- <!-- 鍖婚櫌 -->
- <div
- aura:id="hospital_list"
- class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- data-select="single"
- >
- <!-- label="鍖婚櫌" -->
- 鍖婚櫌
- <lightning:input
- aura:id="hospital_input_text"
- class="field"
- value="{!v.hospital}"
- updateOn="keyup"
- variant="label-hidden"
- />
- <div class="slds-lookup__menu" id="lookup-66">
- <ul class="slds-lookup__list" role="listbox">
- <aura:iteration var="hospital" items="{!v.hospitalList}">
- <li
- role="presentation"
- onclick="{!c.selectHos}"
- data-accName="{!hospital.Hospital_Name_readonly__c}"
- data-accId="{!hospital.Hospital__c}"
- >
- <span
- class="slds-lookup__item-action slds-media"
- id="lookup-option-498"
- role="option"
- >
- <div class="slds-media__body">
- <div class="slds-lookup__result-text">
- {!hospital.Hospital_Name_readonly__c}
- </div>
- </div>
- </span>
- </li>
- </aura:iteration>
- </ul>
- </div>
- </div>
- <!-- 绉戝鍒嗙被 -->
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- {!v.fieldsmap.Department_Cateogy__c}
- <!-- <ui:inputText aura:id="select_department" class="slds-select"
- change="{!c.select_department}"/> -->
- <lightning:input
- type="text"
- onchange="{!c.select_department}"
- aura:id="select_department"
- variant="label-hidden"
- />
- </div>
- <!-- 缁忛攢鍟嗕汉鍛� change="{!c.select_DealerPersonnel}" -->
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- style="width: 145px"
- >
- {!v.fieldsmap.DealerPersonnel__c}
- <ui:inputSelect
- aura:id="select_DealerPersonnel"
- class="slds-select"
- />
- </div>
- <!-- 娲诲姩鍖哄垎 -->
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- {!v.fieldsmap.WorkRecord__c}
- <ui:inputSelect
- aura:id="select_purpose_type"
- class="slds-select"
- change="{!c.select_purpose_type}"
- />
- </div>
- <!-- 鎷滆浜� {!v.fieldsmap.doctor2__c}-->
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- style="width: 145px"
- >
- 鎷滆浜�
- <ui:inputSelect
- aura:id="select_doctor"
- class="slds-select"
- change="{!c.doctor_change}"
- />
- </div>
- <!-- <p hidden="hidden"> -->
-
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12"
- >
- <br />
- <ui:button
- label="鏂板缓"
- class="slds-button"
- press="{!c.createCon}"
- disabled="true"
- aura:id="new_con"
- />
- </div>
-
- <!-- </p> -->
- <hr />
- <!-- 浜у搧鍒嗙被(绗笁鍒嗙被) change="{!c.select_ProductClassification}" -->
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- 浜у搧鍒嗙被(绗笁鍒嗙被)
- <ui:inputSelect
- aura:id="select_ProductClassification"
- class="slds-select"
- change="{!c.selectProductClassification}"
- />
- </div>
- <!-- 浣跨敤浜у搧1(浜у搧鍨嬪彿) UseProduct1__c -->
- <div
- aura:id="UseProduct1_List"
- class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- data-select="single"
- >
- <!-- label="浣跨敤浜у搧1(浜у搧鍨嬪彿)" -->
- 浣跨敤浜у搧1(浜у搧鍨嬪彿)
- <lightning:input
- aura:id="UseProduct1_TEXT"
- class="field"
- value="{!v.UseProduct1}"
- updateOn="keyup"
- variant="label-hidden"
- />
- <div class="slds-lookup__menu" id="lookup-11">
- <ul
- class="slds-lookup__list"
- role="listbox"
- style="max-height: 230px"
- >
- <aura:iteration
- var="UseProduct1"
- items="{!v.UseProduct1List}"
- >
- <li
- role="presentation"
- onclick="{!c.seletUseProduct1Change}"
- data-accid="{!UseProduct1.Id}"
- data-accName="{!UseProduct1.Asset_Model_No__c}"
- >
- <span
- class="slds-lookup__item-action slds-media"
- id="lookup-option-498"
- role="option"
- >
- <div class="slds-media__body">
- <div class="slds-lookup__result-text">
- {!UseProduct1.Asset_Model_No__c}
- </div>
- </div>
- </span>
- </li>
- </aura:iteration>
- </ul>
- </div>
- </div>
- <!-- 浣跨敤浜у搧2 UseProduct2__c -->
- <div
- aura:id="UseProduct2_List"
- class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- data-select="single"
- >
- <!-- label="浣跨敤浜у搧2" -->
- 浣跨敤浜у搧2
- <lightning:input
- aura:id="UseProduct2_TEXT"
- class="field"
- value="{!v.UseProduct2}"
- updateOn="keyup"
- variant="label-hidden"
- />
- <div class="slds-lookup__menu" id="lookup-22">
- <ul
- class="slds-lookup__list"
- role="listbox"
- style="max-height: 230px"
- >
- <aura:iteration
- var="UseProduct2"
- items="{!v.UseProduct2List}"
- >
- <li
- role="presentation"
- onclick="{!c.seletUseProduct2Change}"
- data-accid="{!UseProduct2.Id}"
- data-accName="{!UseProduct2.Asset_Model_No__c}"
- >
- <span
- class="slds-lookup__item-action slds-media"
- id="lookup-option-498"
- role="option"
- >
- <div class="slds-media__body">
- <div class="slds-lookup__result-text">
- {!UseProduct2.Asset_Model_No__c}
- </div>
- </div>
- </span>
- </li>
- </aura:iteration>
- </ul>
- </div>
- </div>
- <!-- 浣跨敤浜у搧3 UseProduct3__c -->
- <div
- aura:id="UseProduct3_List"
- class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- data-select="single"
- >
- <!-- label="浣跨敤浜у搧3" -->
- 浣跨敤浜у搧3
- <lightning:input
- aura:id="UseProduct3_TEXT"
- class="field"
- value="{!v.UseProduct3}"
- updateOn="keyup"
- variant="label-hidden"
- />
- <div class="slds-lookup__menu" id="lookup-33">
- <ul
- class="slds-lookup__list"
- role="listbox"
- style="max-height: 230px"
- >
- <aura:iteration
- var="UseProduct3"
- items="{!v.UseProduct3List}"
- >
- <li
- role="presentation"
- onclick="{!c.seletUseProduct3Change}"
- data-accid="{!UseProduct3.Id}"
- data-accName="{!UseProduct3.Asset_Model_No__c}"
- >
- <span
- class="slds-lookup__item-action slds-media"
- id="lookup-option-498"
- role="option"
- >
- <div class="slds-media__body">
- <div class="slds-lookup__result-text">
- {!UseProduct3.Asset_Model_No__c}
- </div>
- </div>
- </span>
- </li>
- </aura:iteration>
- </ul>
- </div>
- </div>
- <!-- 鏁堟灉/杩涘害 EffectProgress__c-->
- <div
- aura:id="product_category_select1"
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- {!v.fieldsmap.EffectProgress__c}
- <ui:inputSelect
- aura:id="select_EffectProgress"
- class="slds-select"
- />
- </div>
- <hr />
- <!-- 浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺 ConsumptionOfConsumables__c-->
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- {!v.fieldsmap.ConsumptionOfConsumables__c}
- <!-- <ui:inputText aura:id="select_ConsumptionOfConsumables" class="slds-select"
- change="{!c.select_ConsumptionOfConsumables}" /> -->
- <lightning:input
- type="text"
- onchange="{!c.select_ConsumptionOfConsumables}"
- aura:id="select_ConsumptionOfConsumables"
- variant="label-hidden"
- />
- </div>
- <!-- 鏈+鍒嗙被 WarlockClassification__c -->
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- {!v.fieldsmap.WarlockClassification__c}
- <ui:inputSelect
- aura:id="select_OtherBrandConsumables"
- class="slds-select"
- />
- </div>
- <!-- 宸查噰鐢ㄥ叾浠栧搧鐗� ProductCcategory__c -->
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- {!v.fieldsmap.ProductCcategory__c}
- <ui:inputSelect
- aura:id="select_ProductCcategory"
- class="slds-select"
- change="{!c.selectpurposetype}"
- />
- </div>
- <!-- 鍏朵粬鍝佺墝浜у搧绫诲埆 -->
- <div
- aura:id="result"
- class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- {!v.fieldsmap.productCategories__c}
- <ui:inputSelect
- aura:id="select_productCategories"
- class="slds-select"
- />
- </div>
- <!-- 浜у搧鐢ㄩ噺 warlocksNumber__c -->
- <div
- class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
- >
- {!v.fieldsmap.warlocksNumber__c}
- <!-- <ui:inputText aura:id="select_warlocksNumber" class="slds-select"
- change="{!c.select_warlocksNumber}" /> -->
- <lightning:input
- type="text"
- onchange="{!c.select_warlocksNumber}"
- aura:id="select_warlocksNumber"
- variant="label-hidden"
- />
- </div>
- <!-- 鏀彺闇�姹� WorkMark__c-->
- <div style="padding-left: 12px">
- {!v.fieldsmap.WorkMark__c}
- <lightning:input type="checkbox" aura:id="select_WorkMark" />
- </div>
- <div
- aura:id="input-opportunity-stage"
- class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
- >
- {!v.fieldsmap.StageName__c}
- <ui:inputSelect aura:id="select_stageName" class="slds-select" />
- </div>
- <div
- aura:id="input-opportunity-amount1"
- class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
- >
- {!v.fieldsmap.Amount__c}
- <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> 鍖婚櫌閲囪喘棰勭畻(涓嶅惈绋�,鍏�)-->
- <lightning:inputField value="{!v.oppdata.Amount__c}" class="" />
- </div>
- <div
- aura:id="input-opportunity-amount2"
- class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
- >
- {!v.fieldsmap.OCMSale_Price__c}
- <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> 璁㈣揣閲戦(涓嶅惈绋�,鍏�) -->
- <lightning:inputField
- value="{!v.oppdata.OCMSale_Price__c}"
- class=""
- />
- </div>
- <div
- aura:id="input-opportunity-date"
- class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
- >
- {!v.fieldsmap.Close_Forecasted_Date__c}
- <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> 棰勬祴涓嶰CSM绛剧害鏃� -->
- <lightning:inputField
- value="{!v.oppdata.Close_Forecasted_Date__c}"
- class=""
- />
- </div>
- <hr />
- </div>
- </div>
- <div class="save_button_area">
- <ui:button
- aura:id="save_button"
- label="淇濆瓨骞舵柊寤�"
- class="save_button slds-button slds-button--brand slds-order--3"
- press="{!c.save_report}"
- />
- </div>
- <aura:renderIf isTrue="{!v.reports_now_count > 0}">
- <div class="mt40 slds-box slds-theme--shade">
- <div class="slds-table--edit_container slds-is-relative">
- <table
+ <div aura:id="report_list" class="report_list_area">
+ <div
+ class="slds-table--edit_container slds-is-relative"
+ style="padding-left: 50px"
+ >
+ <table
class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus"
role="grid"
- >
+ style="width: 66.75rem"
+ >
<thead>
- <tr class="slds-line-height--reset">
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"></span>
- </th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">鍖婚櫌</span>
- </th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"
- >{!v.fieldsmap.Department_Cateogy__c}</span
- >
- </th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"
- >{!v.fieldsmap.doctor2__c}</span
- >
- <!-- 瀹㈡埛浜哄憳 -->
- </th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"
- >{!v.fieldsmap.visitor_title__c}</span
- >
- </th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"
- >{!v.fieldsmap.WorkRecord__c}</span
- >
- </th>
- </tr>
+ <tr class="slds-line-height--reset">
+ <th
+ class="table_header slds-text-title--caps fontSize"
+ style="width: 250px"
+ >
+ <span class="slds-truncate" title="Name"
+ >鏃ユ姤缂栧彿</span
+ >
+ </th>
+ <th class="table_header slds-text-title--caps fontSize">
+ <span class="slds-truncate" title="Name"
+ >{!v.fieldsmap.Person_In_Charge2__c}</span
+ >
+ <!-- {!v.fieldsmap.Person_In_Charge2__c} 鎷呭綋-->
+ </th>
+ <th
+ class="table_header slds-text-title--caps fontSize"
+ style="width: 250px"
+ >
+ <span class="slds-truncate" title="Name">鍖婚櫌</span>
+ </th>
+ <th class="table_header slds-text-title--caps fontSize">
+ <span class="slds-truncate" title="Name"
+ >{!v.fieldsmap.Department_Cateogy__c}</span
+ >
+ <!-- {!v.fieldsmap.Department_Cateogy__c} 绉戝-->
+ </th>
+ <th class="table_header slds-text-title--caps fontSize">
+ <span class="slds-truncate" title="Name"
+ >鎷滆浜�</span
+ >
+ <!-- {!v.fieldsmap.doctor2__c} 鎷滆浜� -->
+ </th>
+ <th class="table_header slds-text-title--caps fontSize">
+ <span class="slds-truncate" title="Name"
+ >{!v.fieldsmap.DealerPersonnel__c}</span
+ >
+ <!-- {!v.fieldsmap.visitor_title__c} 鑱屼綅-->
+ </th>
+ <th class="table_header slds-text-title--caps fontSize">
+ <span class="slds-truncate" title="Name"
+ >{!v.fieldsmap.WorkMark__c}</span
+ >
+ <!-- {!v.fieldsmap.visitor_title__c} 鑱屼綅-->
+ </th>
+ </tr>
</thead>
<tbody>
- <aura:iteration
- items="{!v.reports_now}"
- var="item"
- indexVar="index"
- >
- <tr aura:id="modal_data_list_tr" class="slds-hint-parent">
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span
- class="slds-truncate"
- title="{!item.Department_Cateogy_text__c}"
- >{!item.Name}</span
- >
- </span>
- </td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span
- class="slds-truncate"
- title="{!item.Agency_Hospital__r.Name}"
- >{!item.Agency_Hospital__r.Name}</span
- >
- </span>
- </td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span
- class="slds-truncate"
- title="{!item.Department_Cateogy_text__c}"
- >{!item.Department_Cateogy_text__c}</span
- >
- </span>
- </td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span
- class="slds-truncate"
- title="{!item.doctor2__r.Name}"
- >{!item.doctor2__r.Name}</span
- >
- </span>
- </td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span
- class="slds-truncate"
- title="{!item.visitor_title__c}"
- >{!item.visitor_title__c}</span
- >
- </span>
- </td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span
- class="slds-truncate"
- title="{!item.WorkRecord__c}"
- >{!item.WorkRecord__c}</span
- >
- </span>
- </td>
- </tr>
- </aura:iteration>
+ <aura:iteration
+ items="{!v.reports}"
+ var="item"
+ indexVar="index"
+ >
+ <tr class="slds-hint-parent">
+ <td role="gridcell" class="slds-cell-edit fontSize">
+ <ui:inputRadio
+ class="report_radio"
+ name="report_radio"
+ label="{!item.Name}"
+ change="{!c.change_report_radio}"
+ />
+ <lightning:buttonIcon
+ class="edit_button"
+ iconName="utility:edit"
+ size="small"
+ alternativeText="edit"
+ value="{!index}"
+ onclick="{!c.edit_button}"
+ />
+ </td>
+ <td role="gridcell" class="slds-cell-edit fontSize">
+ <span class="slds-grid slds-grid--align-spread">
+ <span
+ class="slds-truncate"
+ title="{!item.Person_In_Charge2__r.Name}"
+ >{!item.Person_In_Charge2__r.Name}</span
+ >
+ </span>
+ </td>
+ <td
+ scope="row"
+ tabindex="0"
+ class="slds-cell-edit fontSize"
+ >
+ <div
+ class="slds-grid slds-grid--align-spread"
+ style="word-wrap: break-word"
+ >
+ {!item.Agency_Hospital__r.Name}
+ </div>
+ </td>
+ <td role="gridcell" class="slds-cell-edit fontSize">
+ <span class="slds-grid slds-grid--align-spread">
+ <span
+ class="slds-truncate"
+ title="{!item.Department_Cateogy_text__c}"
+ >{!item.Department_Cateogy_text__c}</span
+ >
+ </span>
+ </td>
+ <td role="gridcell" class="slds-cell-edit fontSize">
+ <span class="slds-grid slds-grid--align-spread">
+ <span
+ class="slds-truncate"
+ title="{!item.doctor2__r.Name}"
+ >
+ <span class="encrypt"
+ >{!item.doctor2__r.Name}</span
+ >
+ <span class="decrypt"
+ >{!item.doctor2__r.awsdata.name}</span
+ >
+ </span>
+ </span>
+ </td>
+ <td role="gridcell" class="slds-cell-edit fontSize">
+ <span class="slds-grid slds-grid--align-spread">
+ <span
+ class="slds-truncate"
+ title="{!item.DealerPersonnel__r.Name}"
+ >{!item.DealerPersonnel__r.Name}</span
+ >
+ </span>
+ </td>
+ <td role="gridcell" class="slds-cell-edit fontSize">
+ <span class="slds-grid slds-grid--align-spread">
+ <span
+ class="slds-truncate"
+ title="{!item.WorkMark__c}"
+ >
+ <lightning:input
+ type="checkbox"
+ checked="{!item.WorkMark__c}"
+ disabled="true"
+ />
+ </span>
+ </span>
+ </td>
+ </tr>
+ </aura:iteration>
</tbody>
- </table>
- </div>
- </div>
+ </table>
+ </div>
+ <aura:renderIf isTrue="{!v.report_count > 0}">
+ <aura:set attribute="else">
+ <div class="no_data_area">{!v.list_message}</div>
+ </aura:set>
</aura:renderIf>
- </div>
</div>
- </div>
-
- <div
- aura:id="modal_bg"
- class="disp_none slds-backdrop slds-backdrop--open"
- ></div>
-
- <div
- aura:id="modal_confirm"
- role="dialog"
- tabindex="-2"
- aria-labelledby="header43"
- class="disp_none slds-modal slds-fade-in-open"
- >
- <div class="slds-modal__container">
- <div class="slds-modal__header">
- <h2 id="header43" class="slds-text-heading--medium">
- {!v.modal_confirm_title}
- </h2>
- </div>
- <div class="slds-modal__content slds-p-around--medium">
- <p>{!v.modal_confirm_text}</p>
- </div>
- <div class="slds-modal__footer">
- <ui:button
- label="鏄�"
- class="slds-button slds-button--brand"
- press="{!c.yes_button}"
- />
- <ui:button
- label="鍚�"
- class="slds-button slds-button--neutral"
- press="{!c.no_button}"
- />
- </div>
- </div>
- </div>
- <div
- aura:id="modal_confirm_bg"
- class="disp_none slds-backdrop slds-backdrop--open"
- ></div>
-
- <div
- aura:id="modal_newAC"
- role="dialog"
- tabindex="-3"
- aria-labelledby="headertest"
- class="disp_none slds-modal slds-fade-in-open"
- >
- <div class="slds-modal__container">
- <div class="slds-modal__header">
- <h2 id="headertest" class="slds-text-heading--medium">鏂板缓.鎷滆浜�</h2>
- </div>
- <div class="slds-modal__content slds-p-around--medium">
- <lightning:recordEditForm
- aura:id="recordEditForm"
- objectApiName="Agency_Contact__c"
- onsuccess="{!c.handleSuccess}"
- onload="{!c.showRequiredFields}"
- onsubmit="{!c.handleSubmit}"
+ <!-- 鎵归噺娣诲姞鏃ユ姤 start-->
+ <div
+ aura:id="modal_import"
+ role="dialog"
+ tabindex="-1"
+ class="disp_none slds-modal slds-fade-in-open slds-modal--large"
+ aria-labelledby="headerTarget"
+ >
+ <aura:renderIf isTrue="{!v.modal_import_spinner}">
+ <lightning:spinner alternativeText="Loading" size="medium" />
+ </aura:renderIf>
+ <div
+ class="slds-modal slds-fade-in-open slds-hide"
+ aura:id="successDiv01"
>
- <lightning:messages aura:id="OppMessage" />
- <!-- onload="{!c.showRequiredFields}" -->
- <aura:renderIf isTrue="{!v.truthy}">
- <lightning:inputField
- fieldName="Name"
- aura:id="newOpportunityField"
- />
- <lightning:inputField
- fieldName="Type__c"
- aura:id="newOpportunityField"
- />
- <lightning:inputField
- fieldName="Doctor_Division1__c"
- aura:id="newOpportunityField"
- />
- </aura:renderIf>
- <br />
- <br />
- <br />
- <br />
- <br />
- <div class="save_button_area">
- <lightning:button
- class="slds-m-top_small"
- type="button"
- label="鍙栨秷"
- onclick="{!c.createCancel}"
- />
- <lightning:button
- class="slds-m-top_small"
- type="button"
- label="淇濆瓨"
- onclick="{!c.handleSubmit}"
- />
- </div>
- </lightning:recordEditForm>
- </div>
+ <!-- <ui:inputText aura:id="articleURL" /> -->
+ <div class="demo-only" style="height: 8rem">
+ <div class="slds-notify_container slds-is-relative">
+ <div
+ class="slds-notify slds-notify_toast slds-theme_success"
+ role="alert"
+ >
+ <div class="slds-m-left_xx-large">
+ <div
+ class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
+ >
+ <lightning:icon
+ alternativeText="Success"
+ iconName="utility:success"
+ size="small"
+ class="buttonColor slds-m-right_small"
+ />
+ <h2 class="slds-text-heading_small">
+ {!v.successMessage}
+ </h2>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv01" style="z-index: 10001">
+ <div class="demo-only" style="height: 8rem;">
+ <div class="slds-notify_container slds-is-relative">
+ <div class="slds-notify slds-notify_toast slds-theme_error" role="status">
+ <div class=" slds-m-left_xx-large">
+ <div
+ class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large">
+ <lightning:icon alternativeText="error" iconName="utility:error" size="small"
+ class="buttonColor slds-m-right_small" />
+ <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2>
+ <lightning:icon alternativeText="Close" iconName="utility:close" size="small"
+ onclick="{!c.closeErrorDiv}" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div> -->
+ <div class="slds-modal__container">
+ <div class="slds-modal__header">
+ <h4 id="headerTarget" class="slds-float--left"></h4>
+ <h2 id="headerTarget" class="slds-text-heading--medium">
+ 鏃ユ姤鎵归噺瀵煎叆
+ </h2>
+ <ui:button
+ aura:id="close_button"
+ label="鍏抽棴"
+ class="close_button slds-button slds-button--neutral slds-order--1 buttonFontSize"
+ press="{!c.close_import}"
+ />
+ </div>
+ <div
+ class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium fontSize"
+ >
+ <aura:if isTrue="{!v.showMain}">
+ <div>
+ <lightning:input
+ type="file"
+ class="file"
+ uara:id="file"
+ onchange="{!c.CreateRecord}"
+ />
+ </div>
+ <aura:set attribute="else">
+ <ui:outputRichText
+ class="uiOutputRichText slds-m--around-large fontSize"
+ value="{!v.TableContent}"
+ />
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="淇濆瓨"
+ variant="brand"
+ onclick="{!c.processFileContent}"
+ class="buttonFontSize"
+ />
+ <lightning:button
+ label="鍙栨秷"
+ variant="brand"
+ onclick="{!c.cancel}"
+ class="buttonFontSize"
+ />
+ </div>
+ <aura:if isTrue="{!v.showErrorInfo}">
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="瀵煎嚭閿欒淇℃伅"
+ variant="brand"
+ onclick="{!c.exportErrorInfo}"
+ />
+ </div>
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <div style="height: 300px; overflow-x: scroll">
+ <lightning:datatable
+ keyField="id"
+ data="{! v.errorData }"
+ columns="{! v.errorColumns }"
+ hideCheckboxColumn="true"
+ />
+ </div>
+ </div>
+ </aura:if>
+ </aura:set>
+ </aura:if>
+ </div>
+ </div>
</div>
- </div>
+ <div
+ aura:id="modal_importbg"
+ class="disp_none slds-backdrop slds-backdrop--open"
+ ></div>
+ <!-- 鎵归噺娣诲姞鏃ユ姤 end-->
+
+ <!-- 鎵归噺瀵煎嚭鏃ユ姤 start-->
+ <div
+ aura:id="modal_export"
+ role="dialog"
+ tabindex="-1"
+ class="disp_none slds-modal slds-fade-in-open slds-modal--large"
+ >
+ <div class="slds-modal__container">
+ <div class="slds-modal__header">
+ <h4 id="headerTarget" class="slds-float--left"></h4>
+ <h2 id="headerTarget" class="slds-text-heading--medium">
+ 鏃ユ姤鎵归噺瀵煎嚭
+ </h2>
+ <ui:button
+ aura:id="close_button"
+ label="鍏抽棴"
+ class="close_button slds-button slds-button--neutral slds-order--1"
+ press="{!c.close_export}"
+ />
+ </div>
+ <div
+ class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium"
+ >
+ <aura:if isTrue="{!v.showMain}">
+ <div class="slds-grid slds-wrap slds-grid--pull-padded">
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
+ ></div>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
+ >
+ 娲诲姩鏃ュ紑濮嬫棩鏈�
+ <lightning:input
+ type="Date"
+ class="slds-input slds-input_bare"
+ aura:id="input-report-date1"
+ />
+ </div>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
+ >
+ 娲诲姩鏃ョ粨鏉熸棩鏈�
+ <lightning:input
+ type="Date"
+ class="slds-input slds-input_bare"
+ aura:id="input-report-date2"
+ />
+ </div>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
+ ></div>
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="纭"
+ variant="brand"
+ onclick="{!c.select_repores_date}"
+ />
+ <lightning:button
+ label="鍙栨秷"
+ variant="brand"
+ onclick="{!c.close_export}"
+ />
+ </div>
+ </div>
+ <aura:set attribute="else">
+ <ui:outputRichText
+ class="uiOutputRichText slds-m--around-large"
+ value="{!v.TableContent2}"
+ />
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="纭"
+ variant="brand"
+ onclick="{!c.exportDate}"
+ />
+ <lightning:button
+ label="鍙栨秷"
+ variant="brand"
+ onclick="{!c.close_export}"
+ />
+ </div>
+ </aura:set>
+ </aura:if>
+ </div>
+ </div>
+ </div>
+ <div
+ aura:id="modal_exportbg"
+ class="disp_none slds-backdrop slds-backdrop--open"
+ ></div>
+ <!-- 鎵归噺瀵煎嚭鏃ユ姤 end-->
+ <div
+ aura:id="modal_window"
+ role="dialog"
+ tabindex="-1"
+ class="disp_none slds-modal slds-fade-in-open slds-modal--large"
+ aria-labelledby="headerTarget"
+ >
+ <div class="slds-modal__container">
+ <div
+ class="slds-modal slds-fade-in-open slds-hide"
+ aura:id="successDiv"
+ >
+ <!-- <ui:inputText aura:id="articleURL" /> -->
+ <div class="demo-only" style="height: 8rem">
+ <div class="slds-notify_container slds-is-relative">
+ <div
+ class="slds-notify slds-notify_toast slds-theme_success"
+ role="alert"
+ >
+ <div class="slds-m-left_xx-large">
+ <div
+ class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
+ >
+ <lightning:icon
+ alternativeText="Success"
+ iconName="utility:success"
+ size="small"
+ class="buttonColor slds-m-right_small"
+ />
+ <h2 class="slds-text-heading_small">
+ {!v.successMessage}
+ </h2>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div
+ class="slds-modal slds-fade-in-open slds-hide"
+ aura:id="errorDiv"
+ style="z-index: 10001"
+ >
+ <!-- <ui:inputText aura:id="articleURL" /> -->
+ <div class="demo-only" style="height: 8rem">
+ <div class="slds-notify_container slds-is-relative">
+ <div
+ class="slds-notify slds-notify_toast slds-theme_error"
+ role="status"
+ >
+ <div class="slds-m-left_xx-large">
+ <div
+ class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
+ >
+ <lightning:icon
+ alternativeText="error"
+ iconName="utility:error"
+ size="small"
+ class="buttonColor slds-m-right_small"
+ />
+ <h2 class="slds-text-heading_small">
+ {!v.errorMessage}
+ </h2>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div
+ class="slds-modal__content slds-grow slds-p-around--medium"
+ style="position: relative"
+ >
+ <aura:renderIf isTrue="{!v.loginEdit}">
+ <lightning:spinner
+ alternativeText="Loading"
+ size="medium"
+ style="width: 100%; height: 100%"
+ />
+ </aura:renderIf>
+ <div class="slds-modal__header">
+ <h2 id="headerTarget" class="slds-text-heading--medium">
+ 鏃ユ姤({!v.selected_date} {!v.selected_agency_person})
+ </h2>
+ <ui:button
+ aura:id="close_button"
+ label="鍏抽棴"
+ class="close_button slds-button slds-button--neutral slds-order--1"
+ press="{!c.toggle_report}"
+ />
+ </div>
+ <div class="slds-box slds-theme--shade">
+ <div class="slds-grid slds-wrap slds-grid--pull-padded">
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7"
+ >
+ 娲诲姩鏃�
+ <lightning:input
+ type="date"
+ value="{!v.data.Report_Date__c}"
+ aura:id="input-report-date"
+ variant="label-hidden"
+ />
+ </div>
+ <!-- 鍖婚櫌 -->
+ <div
+ aura:id="hospital_list"
+ class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7"
+ data-select="single"
+ >
+ <!-- label="鍖婚櫌" -->
+ 鍖婚櫌
+ <lightning:input
+ aura:id="hospital_input_text"
+ class="field"
+ value="{!v.hospital}"
+ updateOn="keyup"
+ variant="label-hidden"
+ />
+ <div class="slds-lookup__menu" id="lookup-66">
+ <ul class="slds-lookup__list" role="listbox">
+ <aura:iteration
+ var="hospital"
+ items="{!v.hospitalList}"
+ >
+ <li
+ role="presentation"
+ onclick="{!c.selectHos}"
+ data-accName="{!hospital.Hospital_Name_readonly__c}"
+ data-accId="{!hospital.Hospital__c}"
+ >
+ <span
+ class="slds-lookup__item-action slds-media"
+ id="lookup-option-498"
+ role="option"
+ >
+ <div class="slds-media__body">
+ <div
+ class="slds-lookup__result-text"
+ >
+ {!hospital.Hospital_Name_readonly__c}
+ </div>
+ </div>
+ </span>
+ </li>
+ </aura:iteration>
+ </ul>
+ </div>
+ </div>
+ <!-- 绉戝鍒嗙被 -->
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7"
+ >
+ {!v.fieldsmap.Department_Cateogy__c}
+ <!-- <ui:inputText aura:id="select_department" class="slds-select"
+ change="{!c.select_department}"/> -->
+ <lightning:input
+ type="text"
+ onchange="{!c.select_department}"
+ aura:id="select_department"
+ variant="label-hidden"
+ />
+ </div>
+ <!-- 缁忛攢鍟嗕汉鍛� change="{!c.select_DealerPersonnel}" -->
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7"
+ style="width: 145px"
+ >
+ {!v.fieldsmap.DealerPersonnel__c}
+ <ui:inputSelect
+ aura:id="select_DealerPersonnel"
+ class="slds-select"
+ />
+ </div>
+ <!-- 娲诲姩鍖哄垎 -->
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7"
+ >
+ {!v.fieldsmap.WorkRecord__c}
+ <ui:inputSelect
+ aura:id="select_purpose_type"
+ class="slds-select"
+ change="{!c.select_purpose_type}"
+ />
+ </div>
+ <!-- 鎷滆浜� {!v.fieldsmap.doctor2__c}-->
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7"
+ style="width: 145px"
+ >
+ 鎷滆浜�
+ <ui:inputSelect
+ aura:id="select_doctor"
+ class="slds-select"
+ change="{!c.doctor_change}"
+ />
+ </div>
+ <!-- <p hidden="hidden"> -->
+
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7"
+ >
+ <br />
+ <ui:button
+ label="鏂板缓"
+ class="slds-button"
+ press="{!c.createCon}"
+ disabled="true"
+ aura:id="new_con"
+ />
+ </div>
+
+ <!-- </p> -->
+ <hr />
+ <!-- 浜у搧鍒嗙被(绗笁鍒嗙被) change="{!c.select_ProductClassification}" -->
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5"
+ >
+ 浜у搧鍒嗙被(绗笁鍒嗙被)
+ <ui:inputSelect
+ aura:id="select_ProductClassification"
+ class="slds-select"
+ change="{!c.selectProductClassification}"
+ />
+ </div>
+ <!-- 浣跨敤浜у搧1(浜у搧鍨嬪彿) UseProduct1__c -->
+ <div
+ aura:id="UseProduct1_List"
+ class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5"
+ data-select="single"
+ >
+ <!-- label="浣跨敤浜у搧1(浜у搧鍨嬪彿)" -->
+ 浣跨敤浜у搧1(浜у搧鍨嬪彿)
+ <lightning:input
+ aura:id="UseProduct1_TEXT"
+ class="field"
+ value="{!v.UseProduct1}"
+ updateOn="keyup"
+ variant="label-hidden"
+ />
+ <div class="slds-lookup__menu" id="lookup-11">
+ <ul
+ class="slds-lookup__list"
+ role="listbox"
+ style="max-height: 230px"
+ >
+ <aura:iteration
+ var="UseProduct1"
+ items="{!v.UseProduct1List}"
+ >
+ <li
+ role="presentation"
+ onclick="{!c.seletUseProduct1Change}"
+ data-accid="{!UseProduct1.Id}"
+ data-accName="{!UseProduct1.Asset_Model_No__c}"
+ >
+ <span
+ class="slds-lookup__item-action slds-media"
+ id="lookup-option-498"
+ role="option"
+ >
+ <div class="slds-media__body">
+ <div
+ class="slds-lookup__result-text"
+ >
+ {!UseProduct1.Asset_Model_No__c}
+ </div>
+ </div>
+ </span>
+ </li>
+ </aura:iteration>
+ </ul>
+ </div>
+ </div>
+ <!-- 浣跨敤浜у搧2 UseProduct2__c -->
+ <div
+ aura:id="UseProduct2_List"
+ class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5"
+ data-select="single"
+ >
+ <!-- label="浣跨敤浜у搧2" -->
+ 浣跨敤浜у搧2
+ <lightning:input
+ aura:id="UseProduct2_TEXT"
+ class="field"
+ value="{!v.UseProduct2}"
+ updateOn="keyup"
+ variant="label-hidden"
+ />
+ <div class="slds-lookup__menu" id="lookup-22">
+ <ul
+ class="slds-lookup__list"
+ role="listbox"
+ style="max-height: 230px"
+ >
+ <aura:iteration
+ var="UseProduct2"
+ items="{!v.UseProduct2List}"
+ >
+ <li
+ role="presentation"
+ onclick="{!c.seletUseProduct2Change}"
+ data-accid="{!UseProduct2.Id}"
+ data-accName="{!UseProduct2.Asset_Model_No__c}"
+ >
+ <span
+ class="slds-lookup__item-action slds-media"
+ id="lookup-option-498"
+ role="option"
+ >
+ <div class="slds-media__body">
+ <div
+ class="slds-lookup__result-text"
+ >
+ {!UseProduct2.Asset_Model_No__c}
+ </div>
+ </div>
+ </span>
+ </li>
+ </aura:iteration>
+ </ul>
+ </div>
+ </div>
+ <!-- 浣跨敤浜у搧3 UseProduct3__c -->
+ <div
+ aura:id="UseProduct3_List"
+ class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5"
+ data-select="single"
+ >
+ <!-- label="浣跨敤浜у搧3" -->
+ 浣跨敤浜у搧3
+ <lightning:input
+ aura:id="UseProduct3_TEXT"
+ class="field"
+ value="{!v.UseProduct3}"
+ updateOn="keyup"
+ variant="label-hidden"
+ />
+ <div class="slds-lookup__menu" id="lookup-33">
+ <ul
+ class="slds-lookup__list"
+ role="listbox"
+ style="max-height: 230px"
+ >
+ <aura:iteration
+ var="UseProduct3"
+ items="{!v.UseProduct3List}"
+ >
+ <li
+ role="presentation"
+ onclick="{!c.seletUseProduct3Change}"
+ data-accid="{!UseProduct3.Id}"
+ data-accName="{!UseProduct3.Asset_Model_No__c}"
+ >
+ <span
+ class="slds-lookup__item-action slds-media"
+ id="lookup-option-498"
+ role="option"
+ >
+ <div class="slds-media__body">
+ <div
+ class="slds-lookup__result-text"
+ >
+ {!UseProduct3.Asset_Model_No__c}
+ </div>
+ </div>
+ </span>
+ </li>
+ </aura:iteration>
+ </ul>
+ </div>
+ </div>
+ <!-- 鏁堟灉/杩涘害 EffectProgress__c-->
+ <div
+ aura:id="product_category_select1"
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5"
+ >
+ {!v.fieldsmap.EffectProgress__c}
+ <ui:inputSelect
+ aura:id="select_EffectProgress"
+ class="slds-select"
+ />
+ </div>
+ <hr />
+ <!-- 浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺 ConsumptionOfConsumables__c-->
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5"
+ >
+ {!v.fieldsmap.ConsumptionOfConsumables__c}
+ <!-- <ui:inputText aura:id="select_ConsumptionOfConsumables" class="slds-select"
+ change="{!c.select_ConsumptionOfConsumables}" /> -->
+ <lightning:input
+ type="text"
+ onchange="{!c.select_ConsumptionOfConsumables}"
+ aura:id="select_ConsumptionOfConsumables"
+ variant="label-hidden"
+ />
+ </div>
+ <!-- 鏈+鍒嗙被 WarlockClassification__c -->
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
+ >
+ {!v.fieldsmap.WarlockClassification__c}
+ <ui:inputSelect
+ aura:id="select_OtherBrandConsumables"
+ class="slds-select"
+ />
+ </div>
+ <!-- 宸查噰鐢ㄥ叾浠栧搧鐗� ProductCcategory__c -->
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
+ >
+ {!v.fieldsmap.ProductCcategory__c}
+ <ui:inputSelect
+ aura:id="select_ProductCcategory"
+ class="slds-select"
+ change="{!c.selectpurposetype}"
+ />
+ </div>
+ <!-- 鍏朵粬鍝佺墝浜у搧绫诲埆 -->
+ <div
+ aura:id="result"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
+ >
+ {!v.fieldsmap.productCategories__c}
+ <ui:inputSelect
+ aura:id="select_productCategories"
+ class="slds-select"
+ />
+ </div>
+ <!-- 浜у搧鐢ㄩ噺 warlocksNumber__c -->
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
+ >
+ {!v.fieldsmap.warlocksNumber__c}
+ <!-- <ui:inputText aura:id="select_warlocksNumber" class="slds-select"
+ change="{!c.select_warlocksNumber}" /> -->
+ <lightning:input
+ type="text"
+ onchange="{!c.select_warlocksNumber}"
+ aura:id="select_warlocksNumber"
+ variant="label-hidden"
+ />
+ </div>
+ <!-- 鏀彺闇�姹� WorkMark__c-->
+ <div style="padding-left: 12px">
+ {!v.fieldsmap.WorkMark__c}
+ <lightning:input
+ type="checkbox"
+ aura:id="select_WorkMark"
+ />
+ </div>
+ <div
+ aura:id="input-opportunity-stage"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
+ >
+ {!v.fieldsmap.StageName__c}
+ <ui:inputSelect
+ aura:id="select_stageName"
+ class="slds-select"
+ />
+ </div>
+ <div
+ aura:id="input-opportunity-amount1"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
+ >
+ {!v.fieldsmap.Amount__c}
+ <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> 鍖婚櫌閲囪喘棰勭畻(涓嶅惈绋�,鍏�)-->
+ <lightning:inputField
+ value="{!v.oppdata.Amount__c}"
+ class=""
+ />
+ </div>
+ <div
+ aura:id="input-opportunity-amount2"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
+ >
+ {!v.fieldsmap.OCMSale_Price__c}
+ <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> 璁㈣揣閲戦(涓嶅惈绋�,鍏�) -->
+ <lightning:inputField
+ value="{!v.oppdata.OCMSale_Price__c}"
+ class=""
+ />
+ </div>
+ <div
+ aura:id="input-opportunity-date"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
+ >
+ {!v.fieldsmap.Close_Forecasted_Date__c}
+ <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> 棰勬祴涓嶰CSM绛剧害鏃� -->
+ <lightning:inputField
+ value="{!v.oppdata.Close_Forecasted_Date__c}"
+ class=""
+ />
+ </div>
+ <hr />
+ </div>
+ </div>
+ <div class="save_button_area">
+ <ui:button
+ aura:id="save_button"
+ label="淇濆瓨骞舵柊寤�"
+ class="save_button slds-button slds-button--brand slds-order--3"
+ press="{!c.save_report}"
+ />
+ </div>
+ <aura:renderIf isTrue="{!v.reports_now_count > 0}">
+ <div class="mt40 slds-box slds-theme--shade">
+ <div
+ class="slds-table--edit_container slds-is-relative"
+ >
+ <table
+ class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus"
+ role="grid"
+ >
+ <thead>
+ <tr class="slds-line-height--reset">
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ ></span>
+ </th>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >鍖婚櫌</span
+ >
+ </th>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >{!v.fieldsmap.Department_Cateogy__c}</span
+ >
+ </th>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >{!v.fieldsmap.doctor2__c}</span
+ >
+ <!-- 瀹㈡埛浜哄憳 -->
+ </th>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >{!v.fieldsmap.visitor_title__c}</span
+ >
+ </th>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >{!v.fieldsmap.WorkRecord__c}</span
+ >
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <aura:iteration
+ items="{!v.reports_now}"
+ var="item"
+ indexVar="index"
+ >
+ <tr
+ aura:id="modal_data_list_tr"
+ class="slds-hint-parent"
+ >
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.Department_Cateogy_text__c}"
+ >{!item.Name}</span
+ >
+ </span>
+ </td>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.Agency_Hospital__r.Name}"
+ >{!item.Agency_Hospital__r.Name}</span
+ >
+ </span>
+ </td>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.Department_Cateogy_text__c}"
+ >{!item.Department_Cateogy_text__c}</span
+ >
+ </span>
+ </td>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.doctor2__r.Name}"
+ >{!item.doctor2__r.Name}</span
+ >
+ </span>
+ </td>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.visitor_title__c}"
+ >{!item.visitor_title__c}</span
+ >
+ </span>
+ </td>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.WorkRecord__c}"
+ >{!item.WorkRecord__c}</span
+ >
+ </span>
+ </td>
+ </tr>
+ </aura:iteration>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </aura:renderIf>
+ </div>
+ </div>
+ </div>
+
+ <div
+ aura:id="modal_bg"
+ class="disp_none slds-backdrop slds-backdrop--open"
+ ></div>
+
+ <div
+ aura:id="modal_confirm"
+ role="dialog"
+ tabindex="-2"
+ aria-labelledby="header43"
+ class="disp_none slds-modal slds-fade-in-open"
+ >
+ <div class="slds-modal__container">
+ <div class="slds-modal__header">
+ <h2 id="header43" class="slds-text-heading--medium">
+ {!v.modal_confirm_title}
+ </h2>
+ </div>
+ <div class="slds-modal__content slds-p-around--medium">
+ <p>{!v.modal_confirm_text}</p>
+ </div>
+ <div class="slds-modal__footer">
+ <ui:button
+ label="鏄�"
+ class="slds-button slds-button--brand"
+ press="{!c.yes_button}"
+ />
+ <ui:button
+ label="鍚�"
+ class="slds-button slds-button--neutral"
+ press="{!c.no_button}"
+ />
+ </div>
+ </div>
+ </div>
+ <div
+ aura:id="modal_confirm_bg"
+ class="disp_none slds-backdrop slds-backdrop--open"
+ ></div>
+
+ <div
+ aura:id="modal_newAC"
+ role="dialog"
+ tabindex="-3"
+ aria-labelledby="headertest"
+ class="disp_none slds-modal slds-fade-in-open"
+ >
+ <div class="slds-modal__container">
+ <div class="slds-modal__header">
+ <h2 id="headertest" class="slds-text-heading--medium">
+ 鏂板缓.鎷滆浜�
+ </h2>
+ </div>
+ <div class="slds-modal__content slds-p-around--medium">
+ <lightning:recordEditForm
+ aura:id="recordEditForm"
+ objectApiName="Agency_Contact__c"
+ onsuccess="{!c.handleSuccess}"
+ onload="{!c.showRequiredFields}"
+ onsubmit="{!c.handleSubmit}"
+ >
+ <lightning:messages aura:id="OppMessage" />
+ <!-- onload="{!c.showRequiredFields}" -->
+ <aura:renderIf isTrue="{!v.truthy}">
+ <lightning:inputField
+ fieldName="Name"
+ aura:id="newOpportunityField"
+ />
+ <lightning:inputField
+ fieldName="Type__c"
+ aura:id="newOpportunityField"
+ />
+ <lightning:inputField
+ fieldName="Doctor_Division1__c"
+ aura:id="newOpportunityField"
+ />
+ </aura:renderIf>
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <div class="save_button_area">
+ <lightning:button
+ class="slds-m-top_small"
+ type="button"
+ label="鍙栨秷"
+ onclick="{!c.createCancel}"
+ />
+ <lightning:button
+ class="slds-m-top_small"
+ type="button"
+ label="淇濆瓨"
+ onclick="{!c.handleSubmit}"
+ />
+ </div>
+ </lightning:recordEditForm>
+ </div>
+ </div>
+ </div>
</aura:component>
diff --git a/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.css b/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.css
index 2cf535d..920fa09 100644
--- a/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.css
+++ b/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.css
@@ -1,141 +1,202 @@
+@import 'c/lexCssUtility';
+
.THIS .bcolor {
color: #333;
}
+
.THIS.height100vh {
height: 100vh;
}
+
.THIS.contents_wrapper {
padding-top: 50px;
}
+
.THIS .mt5 {
margin-top: 5px;
}
+
.THIS .mt40 {
margin-top: 40px;
}
+
.THIS .edit_button {
float: right;
margin: -1.5em 0.5em 0 0;
border: 0;
}
+
.THIS .no_data_area {
text-align: center;
- margin: .5em 0;
+ margin: 0.5em 0;
}
+
.THIS.report_list_area {
margin: 40px 0 20px 100px;
height: 60vh;
overflow-y: scroll;
}
+
.THIS .report_radio {
float: left;
}
+
.THIS .table_header {
width: 9.4rem;
height: 2em;
}
+
.THIS.disp_none {
display: none;
}
+
.THIS .disp_none {
display: none;
}
+
.THIS .tr {
text-align: right;
}
+
.THIS .close_button {
float: right;
margin-top: -2em;
}
+
.THIS .close_icn svg {
fill: #fefefe;
}
+
.THIS .slds-progress__marker {
cursor: default;
}
+
.THIS .progress_0 {
width: 0%;
}
+
.THIS .progress_100 {
width: 100%;
}
+
.THIS .new_btn_area {
text-align: center;
margin-top: 22px;
}
+
.THIS .new_btn {
width: 100%;
}
+
.THIS .save_button_area {
margin: 1em 0;
text-align: right;
}
+
.THIS .save_button {
background-color: #ffa500;
border: 1px solid #ff8c00;
}
+
.THIS .report_data_header {
border-bottom: 2px solid #ccc;
}
+
.THIS .report_data_area {
border-bottom: 1px solid #ccc;
}
+
.THIS.fade {
transition: 5s opacity linear;
}
+
.THIS.animation_off {
opacity: 0;
}
+
.THIS.animation_on {
opacity: 1;
}
+
.THIS .fade {
transition: 5s opacity linear;
}
+
.THIS .animation_off {
opacity: 0;
}
+
.THIS .animation_on {
opacity: 1;
}
-.THIS .divbotuser{
- width:fit-content;
+
+.THIS .divbotuser {
+ width: fit-content;
}
-.THIS .toastMessage.forceActionsText{
- white-space : pre-line !important;
+.THIS .toastMessage.forceActionsText {
+ white-space: pre-line !important;
}
-.THIS .slds-file-selector__dropzone .slds-file-selector__text{
+.THIS .slds-file-selector__dropzone .slds-file-selector__text {
display: none;
}
-.THIS .slds-input:focus, .THIS .slds-input:active {
- border-color: rgb(216, 221, 230);
- box-shadow: none;
+.THIS .slds-input:focus,
+.THIS .slds-input:active {
+ border-color: rgb(216, 221, 230);
+ box-shadow: none;
}
-.THIS .customRequired{
- font-weight: 400;
-}
-.THIS .customRequired:before{
- content: "*";
- margin: 0 0.125rem 0 0.125rem;
- color: rgb(194, 57, 52);
- float: left;
-}
-.THIS .none{
- display:none;
+.THIS .customRequired {
+ font-weight: 400;
}
-.THIS tr .decrypt{
+.THIS .customRequired:before {
+ content: '*';
+ margin: 0 0.125rem 0 0.125rem;
+ color: rgb(194, 57, 52);
+ float: left;
+}
+
+.THIS .none {
display: none;
}
-.THIS tr:hover .decrypt{
+.THIS tr .decrypt {
+ display: none;
+}
+
+.THIS tr:hover .decrypt {
display: unset;
}
-.THIS tr:hover .encrypt{
+.THIS tr:hover .encrypt {
display: none;
-}
\ No newline at end of file
+}
+
+.THIS tr:hover .encrypt {
+ display: none;
+}
+
+.THIS .buttonFontSize {
+ font-size: 18px;
+ min-width: 80px;
+ max-width: 110px;
+}
+
+.THIS .fontSize {
+ font-size: 18px;
+}
+
+.THIS thead th {
+ font-size: 18px;
+}
+
+.THIS table {
+ table-layout: fixed;
+}
+.THIS td {
+ white-space: normal;
+ overflow-wrap: break-word;
+}
diff --git a/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportController.js b/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportController.js
index aa2e5ce..4a9d273 100644
--- a/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportController.js
+++ b/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportController.js
@@ -1,389 +1,388 @@
({
- doInit: function (component, event, helper) {
- helper.doinit(component, event, helper);
- component.set("v.errorColumns", [
- {
- label: "閿欒琛�",
- fieldName: "errorRow",
- type: "text",
- hideDefaultActions: true,
- initialWidth: 100
- },
- {
- label: "閿欒淇℃伅",
- fieldName: "errorInfo",
- type: "text",
- hideDefaultActions: true
- }
- ]);
- },
+ doInit: function (component, event, helper) {
+ helper.doinit(component, event, helper);
+ },
- createAopp: function (component, event, helper) {
- var addRecordEvent = $A.get("e.force:createRecord");
- addRecordEvent.setParams({
- entityApiName: "Agency_Opportunity__c",
- recordTypeId: "012100000006KW7"
- });
- addRecordEvent.fire();
- },
+ createAopp: function (component, event, helper) {
+ var addRecordEvent = $A.get('e.force:createRecord');
+ addRecordEvent.setParams({
+ entityApiName: 'Agency_Opportunity__c',
+ recordTypeId: '012100000006KW7'
+ });
+ addRecordEvent.fire();
+ },
- new_report: function (component, event, helper) {
- component.find("save_button").set("v.label", "淇濆瓨骞舵柊寤�");
- helper.new_report(component, event, helper);
- },
+ new_report: function (component, event, helper) {
+ component.find('save_button').set('v.label', '淇濆瓨骞舵柊寤�');
+ helper.new_report(component, event, helper);
+ },
- copy_button: function (component, event, helper) {
- component.find("save_button").set("v.label", "淇濆瓨骞舵柊寤�");
- helper.copy_button(component, event, helper);
- },
- delete_button: function (component, event, helper) {
- helper.delete_button(component, event, helper);
- },
- change_report_radio: function (component, event, helper) {
- helper.change_report_radio(component, event, helper);
- },
+ copy_button: function (component, event, helper) {
+ component.find('save_button').set('v.label', '淇濆瓨骞舵柊寤�');
+ helper.copy_button(component, event, helper);
+ },
+ delete_button: function (component, event, helper) {
+ helper.delete_button(component, event, helper);
+ },
+ change_report_radio: function (component, event, helper) {
+ helper.change_report_radio(component, event, helper);
+ },
- edit_button: function (component, event, helper) {
- component.find("save_button").set("v.label", "淇濆瓨");
- helper.edit_button(component, event, helper);
- },
+ edit_button: function (component, event, helper) {
+ component.find('save_button').set('v.label', '淇濆瓨');
+ helper.edit_button(component, event, helper);
+ },
- createCon: function (component, event, helper) {
- helper.createCon(component, event, helper);
- },
+ createCon: function (component, event, helper) {
+ helper.createCon(component, event, helper);
+ },
- showRequiredFields: function (component, event, helper) {
- $A.util.removeClass(component.find("newOpportunityField"), "none");
- $A.util.removeClass(component.find("newOpportunityField"), "none");
- },
+ showRequiredFields: function (component, event, helper) {
+ $A.util.removeClass(component.find('newOpportunityField'), 'none');
+ $A.util.removeClass(component.find('newOpportunityField'), 'none');
+ },
- handleSuccess: function (component, event, helper) {
- helper.handleSuccess(component, event, helper);
- },
+ handleSuccess: function (component, event, helper) {
+ helper.handleSuccess(component, event, helper);
+ },
- handleSubmit: function (component, event, helper) {
- event.preventDefault(); // stop form submission
- var showValidationError = false;
- var fields = component.find("newOpportunityField");
- var vaildationFailReason = "";
- let agencyReport = Object.create(null);
- fields.forEach(function (field) {
- if (
- field.get("v.fieldName") === "Type__c" &&
- $A.util.isEmpty(field.get("v.value"))
- ) {
- showValidationError = true;
- vaildationFailReason = "鍒嗙被涓嶈兘涓虹┖锛�";
- } else if (
- field.get("v.fieldName") === "Doctor_Division1__c" &&
- $A.util.isEmpty(field.get("v.value"))
- ) {
- showValidationError = true;
- if (vaildationFailReason != "") {
- vaildationFailReason += "鍖荤敓鍖哄垎(鑱屽姟)涓嶈兘涓虹┖锛�";
- } else {
- vaildationFailReason = "鍖荤敓鍖哄垎(鑱屽姟)涓嶈兘涓虹┖锛�";
- }
- }
- //SWAG-CF58C3 fy start
- if (field.get("v.fieldName") === "Name") {
- agencyReport["name"] = field.get("v.value");
- } else if (field.get("v.fieldName") === "Type__c") {
- agencyReport["type"] = field.get("v.value");
- } else if (field.get("v.fieldName") === "Doctor_Division1__c") {
- agencyReport["doctorDivision1"] = field.get("v.value");
- }
- //SWAG-CF58C3 fy end
- });
- if (!showValidationError) {
- //SWAG-CF58C3 fy start
- var agencyHospitalid = component.get("v.hospitalLinkId");
- //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
- debugger;
- let hospitalName = "";
- //璋冪敤鍚庣searchAgencyDataId鏂规硶鏌ヨ鍑哄尰闄笅闈㈡墍鏈夊鎴蜂汉鍛榙ataid
- helper.CallBackAction(
- component,
- "searchAgencyDataId",
- {
- hospitalId: agencyHospitalid
- },
- function (data) {
- if (data.getState() == "SUCCESS") {
- var data = data.getReturnValue();
- if (data.IsSuccess == true) {
- let agencyContactIds = "";
- if (data.Message == "" && data.Data && data.Data.length > 0) {
- hospitalName = data.Data[0].Agency_Hospital__r.Name;
- for (var i = 0; i < data.Data.length; i++) {
- if (data.Data[i].AWS_Data_Id__c)
- agencyContactIds += "," + data.Data[i].AWS_Data_Id__c;
+ handleSubmit: function (component, event, helper) {
+ event.preventDefault(); // stop form submission
+ var showValidationError = false;
+ var fields = component.find('newOpportunityField');
+ var vaildationFailReason = '';
+ let agencyReport = Object.create(null);
+ fields.forEach(function (field) {
+ if (
+ field.get('v.fieldName') === 'Type__c' &&
+ $A.util.isEmpty(field.get('v.value'))
+ ) {
+ showValidationError = true;
+ vaildationFailReason = '鍒嗙被涓嶈兘涓虹┖锛�';
+ } else if (
+ field.get('v.fieldName') === 'Doctor_Division1__c' &&
+ $A.util.isEmpty(field.get('v.value'))
+ ) {
+ showValidationError = true;
+ if (vaildationFailReason != '') {
+ vaildationFailReason += '鍖荤敓鍖哄垎(鑱屽姟)涓嶈兘涓虹┖锛�';
+ } else {
+ vaildationFailReason = '鍖荤敓鍖哄垎(鑱屽姟)涓嶈兘涓虹┖锛�';
}
- agencyContactIds = agencyContactIds.substring(1);
- agencyReport["agencyContactIds"] = agencyContactIds;
- } else {
- agencyReport["agencyContactIds"] = agencyContactIds;
- }
- var arr = new Array();
- arr.push(agencyReport);
- var requestData = JSON.stringify(arr);
- // helper.set_aws_url(component,data,agencyHospitalid);
-
- var token = component.get("v.AWStoken");
- var newUrl = component.get("v.AWSinsert") + "V2";
-
- component.set("v.login", true);
- helper.insert_agencycontact(
- component,
- token,
- newUrl,
- requestData,
- agencyHospitalid,
- helper,
- hospitalName
- );
- } else {
- helper.ShowToast({
- message: data.message,
- type: "error"
- });
}
- } else {
- helper.ShowToast({
- message: "searchAgency澶辫触",
- type: "error"
- });
- }
+ //SWAG-CF58C3 fy start
+ if (field.get('v.fieldName') === 'Name') {
+ agencyReport['name'] = field.get('v.value');
+ } else if (field.get('v.fieldName') === 'Type__c') {
+ agencyReport['type'] = field.get('v.value');
+ } else if (field.get('v.fieldName') === 'Doctor_Division1__c') {
+ agencyReport['doctorDivision1'] = field.get('v.value');
+ }
+ //SWAG-CF58C3 fy end
+ });
+ if (!showValidationError) {
+ //SWAG-CF58C3 fy start
+ var agencyHospitalid = component.get('v.hospitalLinkId');
+ //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
+ debugger;
+ let hospitalName = '';
+ //璋冪敤鍚庣searchAgencyDataId鏂规硶鏌ヨ鍑哄尰闄笅闈㈡墍鏈夊鎴蜂汉鍛榙ataid
+ helper.CallBackAction(
+ component,
+ 'searchAgencyDataId',
+ {
+ hospitalId: agencyHospitalid
+ },
+ function (data) {
+ if (data.getState() == 'SUCCESS') {
+ var data = data.getReturnValue();
+ if (data.IsSuccess == true) {
+ let agencyContactIds = '';
+ if (
+ data.Message == '' &&
+ data.Data &&
+ data.Data.length > 0
+ ) {
+ hospitalName =
+ data.Data[0].Agency_Hospital__r.Name;
+ for (var i = 0; i < data.Data.length; i++) {
+ if (data.Data[i].AWS_Data_Id__c)
+ agencyContactIds +=
+ ',' + data.Data[i].AWS_Data_Id__c;
+ }
+ agencyContactIds =
+ agencyContactIds.substring(1);
+ agencyReport['agencyContactIds'] =
+ agencyContactIds;
+ } else {
+ agencyReport['agencyContactIds'] =
+ agencyContactIds;
+ }
+ var arr = new Array();
+ arr.push(agencyReport);
+ var requestData = JSON.stringify(arr);
+ // helper.set_aws_url(component,data,agencyHospitalid);
+
+ var token = component.get('v.AWStoken');
+ var newUrl = component.get('v.AWSinsert') + 'V2';
+
+ component.set('v.login', true);
+ helper.insert_agencycontact(
+ component,
+ token,
+ newUrl,
+ requestData,
+ agencyHospitalid,
+ helper,
+ hospitalName
+ );
+ } else {
+ helper.ShowToast({
+ message: data.message,
+ type: 'error'
+ });
+ }
+ } else {
+ helper.ShowToast({
+ message: 'searchAgency澶辫触',
+ type: 'error'
+ });
+ }
+ }
+ );
+ //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
+ // var arr = new Array();
+ // arr.push(agencyReport);
+ // var data = JSON.stringify(arr);
+ // var token = component.get('v.AWStoken');
+ // var newUrl = component.get('v.AWSinsert');
+ // component.set('v.login',true);
+ // helper.insert_agencycontact(component,token,newUrl,data,agencyHospitalid,helper);
+ //SWAG-CF58C3 fy end
+ // helper.newlyBuild(component, event, helper);
+ } else {
+ component.find('OppMessage').setError(vaildationFailReason);
}
- );
- //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
- // var arr = new Array();
- // arr.push(agencyReport);
- // var data = JSON.stringify(arr);
- // var token = component.get('v.AWStoken');
- // var newUrl = component.get('v.AWSinsert');
- // component.set('v.login',true);
- // helper.insert_agencycontact(component,token,newUrl,data,agencyHospitalid,helper);
- //SWAG-CF58C3 fy end
- // helper.newlyBuild(component, event, helper);
- } else {
- component.find("OppMessage").setError(vaildationFailReason);
+ },
+
+ createCancel: function (component, event, helper) {
+ helper.createCancel(component, event, helper);
+ },
+
+ yes_button: function (component, event, helper) {
+ component.set('v.confirm_status', 1);
+ helper.close_confirm(
+ component,
+ component.get('v.modal_confirm_title'),
+ component.get('v.modal_confirm_text')
+ );
+ },
+
+ no_button: function (component, event, helper) {
+ component.set('v.confirm_status', 2);
+ helper.close_confirm(
+ component,
+ component.get('v.modal_confirm_title'),
+ component.get('v.modal_confirm_text')
+ );
+ },
+
+ toggle_report: function (component, event, helper) {
+ helper.toggle_report(component, event, helper);
+ },
+
+ save_report: function (component, event, helper) {
+ helper.save_report(component, event, helper);
+ },
+
+ select_date_change: function (component, event, helper) {
+ helper.select_date_change(component, event, helper);
+ },
+
+ select_agency_change: function (component, event, helper) {
+ debugger;
+ helper.select_agency_change(component, event, helper);
+ },
+
+ hosChange: function (component, event, helper) {
+ var hospital_name = event.getParam('value');
+ var hospital_nameld = component.get('v.UseProduct1s');
+ if (hospital_name.match(/(\S+\s)+/)) {
+ if (hospital_nameld != hospital_name) {
+ helper.searchHos(component, event, helper);
+ }
+ } else {
+ if (hospital_name == '') {
+ helper.hideSearchs(component, event, helper);
+ } else {
+ helper.hideSearch(component, event, helper);
+ }
+ }
+ },
+ selectHos: function (component, event, helper) {
+ helper.selectHos(component, event, helper);
+ helper.setOpportunity_cfilter(component);
+ },
+ //浣跨敤浜у搧1
+ UseProduct1Change: function (component, event, helper) {
+ var UseProduct1Name = event.getParam('value');
+ var UseProduct1Nameold = component.get('v.UseProduct1s');
+ debugger;
+ if (UseProduct1Name.match(/(\S+\s)+/)) {
+ if (UseProduct1Name != UseProduct1Nameold) {
+ helper.searchUseProduct1(component, event, helper);
+ }
+ } else {
+ if (UseProduct1Name == '') {
+ helper.hideSearchUseProduct1s(component, event, helper);
+ } else {
+ helper.hideSearchUseProduct1(component, event, helper);
+ }
+ }
+ },
+ seletUseProduct1Change: function (component, event, helper) {
+ helper.seletUseProduct1Change(component, event, helper);
+ },
+ //浣跨敤浜у搧2
+ UseProduct2Change: function (component, event, helper) {
+ var UseProduct2Name = event.getParam('value');
+ var UseProduct2Nameold = component.get('v.UseProduct2s');
+ if (UseProduct2Name.match(/(\S+\s)+/)) {
+ if (UseProduct2Name != UseProduct2Nameold) {
+ helper.searchUseProduct2(component, event, helper);
+ }
+ } else {
+ if (UseProduct2Name == '') {
+ helper.hideSearchUseProduct2s(component, event, helper);
+ } else {
+ helper.hideSearchUseProduct2(component, event, helper);
+ }
+ }
+ },
+ seletUseProduct2Change: function (component, event, helper) {
+ helper.seletUseProduct2Change(component, event, helper);
+ },
+ productcategoryChange2: function (component, event, helper) {
+ helper.productcategoryChange2(component, event, helper);
+ },
+ //浣跨敤浜у搧3
+ UseProduct3Change: function (component, event, helper) {
+ var UseProduct3Name = event.getParam('value');
+ var UseProduct3Nameold = component.get('v.UseProduct3s');
+ if (UseProduct3Name.match(/(\S+\s)+/)) {
+ if (UseProduct3Name != UseProduct3Nameold) {
+ helper.searchUseProduct3(component, event, helper);
+ }
+ } else {
+ if (UseProduct3Name == '') {
+ helper.hideSearchUseProduct3s(component, event, helper);
+ } else {
+ helper.hideSearchUseProduct3(component, event, helper);
+ }
+ }
+ },
+ seletUseProduct3Change: function (component, event, helper) {
+ helper.seletUseProduct3Change(component, event, helper);
+ },
+
+ select_department: function (component, event, helper) {
+ helper.setOpportunity_cfilter(component);
+ },
+ doctor_change: function (component, event, helper) {
+ helper.doctor_change(component, event, helper);
+ },
+ stageNameChange: function (component, event, helper) {
+ helper.stageNameChange(component, event, helper);
+ },
+ onDragOver: function (component, event, helper) {
+ event.preventDefault();
+ },
+
+ onDrop: function (component, event, helper) {
+ event.stopPropagation();
+ event.preventDefault();
+ event.dataTransfer.dropEffect = 'copy';
+ var files = event.dataTransfer.files;
+ helper.readFile(component, helper, files[0]);
+ },
+ CreateRecord: function (component, event, helper) {
+ var files = event.getSource().get('v.files');
+ helper.readFile(component, helper, files[0]);
+ component.set('v.showErrorInfo', false);
+ },
+
+ processFileContent: function (component, event, helper) {
+ helper.saveRecords(component, event, helper);
+ component.set('v.showErrorInfo', false);
+ },
+
+ cancel: function (component, event, helper) {
+ component.set('v.showMain', true);
+ },
+
+ import: function (component, event, helper) {
+ helper.showImport(component);
+ },
+ exportDate: function (component, event, helper) {
+ var stockData = component.get('v.reports_date');
+ console.log('瀵煎嚭鏁版嵁' + stockData);
+ var csv = helper.convertArrayOfObjectsToCSV(component, stockData);
+ if (csv == null) {
+ return;
+ }
+
+ var universalBOM = '\uFEFF';
+ var hiddenElement = document.createElement('a');
+ hiddenElement.href =
+ 'data:text/csv;charset=utf-8,' + encodeURI(universalBOM + csv);
+ hiddenElement.target = '_self'; //
+ hiddenElement.download = 'ExportData.csv'; // CSV file Name* you can change it.[only name not .csv]
+ document.body.appendChild(hiddenElement); // Required for FireFox browser
+ hiddenElement.click(); // using click() js function to download csv file
+ },
+ export_condition: function (component, event, helper) {
+ helper.showExport(component);
+ },
+
+ select_repores_date: function (component, event, helper) {
+ helper.select_repores_date(component, event, helper);
+ },
+ export: function (component, event, helper) {
+ console.log('杩涘叆export');
+ var stockData = component.get('v.reports_date');
+ console.log('鏌ュ嚭鐨勬暟鎹�' + stockData);
+ },
+ close_import: function (component, event, helper) {
+ component.set('v.showMain', true);
+ helper.close_import(component);
+ },
+ close_export: function (component, event, helper) {
+ component.set('v.showMain', true);
+ helper.close_export(component);
+ },
+ select_ConsumptionOfConsumables: function (component, event, helper) {
+ helper.select_ConsumptionOfConsumables(component, event, helper);
+ },
+ select_purpose_type: function (component, event, helper) {
+ helper.selectPurposeType(component, event, helper);
+ },
+ select_warlocksNumber: function (component, event, helper) {
+ helper.select_warlocksNumber(component, event, helper);
+ },
+ selectProductClassification: function (component, event, helper) {
+ helper.selectProductClassification(component, event, helper);
+ },
+ selectpurposetype: function (component, event, helper) {
+ helper.selectpurposetype(component, event, helper);
+ },
+ return_main_page: function (component, event, helper) {
+ window.open('/customer/', '_self');
+ },
+ exportErrorInfo: function (component, event, helper) {
+ helper.exportErrorInfoHelper(component);
+ },
+ closeErrorDiv: function (component, event, helper) {
+ var errorDiv01 = component.find('errorDiv01');
+ $A.util.addClass(errorDiv01, 'slds-hide');
}
- },
-
- createCancel: function (component, event, helper) {
- helper.createCancel(component, event, helper);
- },
-
- yes_button: function (component, event, helper) {
- component.set("v.confirm_status", 1);
- helper.close_confirm(
- component,
- component.get("v.modal_confirm_title"),
- component.get("v.modal_confirm_text")
- );
- },
-
- no_button: function (component, event, helper) {
- component.set("v.confirm_status", 2);
- helper.close_confirm(
- component,
- component.get("v.modal_confirm_title"),
- component.get("v.modal_confirm_text")
- );
- },
-
- toggle_report: function (component, event, helper) {
- helper.toggle_report(component, event, helper);
- },
-
- save_report: function (component, event, helper) {
- helper.save_report(component, event, helper);
- },
-
- select_date_change: function (component, event, helper) {
- helper.select_date_change(component, event, helper);
- },
-
- select_agency_change: function (component, event, helper) {
- debugger;
- helper.select_agency_change(component, event, helper);
- },
-
- hosChange: function (component, event, helper) {
- var hospital_name = event.getParam("value");
- var hospital_nameld = component.get("v.UseProduct1s");
- if (hospital_name.match(/(\S+\s)+/)) {
- if (hospital_nameld != hospital_name) {
- helper.searchHos(component, event, helper);
- }
- } else {
- if (hospital_name == "") {
- helper.hideSearchs(component, event, helper);
- } else {
- helper.hideSearch(component, event, helper);
- }
- }
- },
- selectHos: function (component, event, helper) {
- helper.selectHos(component, event, helper);
- helper.setOpportunity_cfilter(component);
- },
- //浣跨敤浜у搧1
- UseProduct1Change: function (component, event, helper) {
- var UseProduct1Name = event.getParam("value");
- var UseProduct1Nameold = component.get("v.UseProduct1s");
- debugger;
- if (UseProduct1Name.match(/(\S+\s)+/)) {
- if (UseProduct1Name != UseProduct1Nameold) {
- helper.searchUseProduct1(component, event, helper);
- }
- } else {
- if (UseProduct1Name == "") {
- helper.hideSearchUseProduct1s(component, event, helper);
- } else {
- helper.hideSearchUseProduct1(component, event, helper);
- }
- }
- },
- seletUseProduct1Change: function (component, event, helper) {
- helper.seletUseProduct1Change(component, event, helper);
- },
- //浣跨敤浜у搧2
- UseProduct2Change: function (component, event, helper) {
- var UseProduct2Name = event.getParam("value");
- var UseProduct2Nameold = component.get("v.UseProduct2s");
- if (UseProduct2Name.match(/(\S+\s)+/)) {
- if (UseProduct2Name != UseProduct2Nameold) {
- helper.searchUseProduct2(component, event, helper);
- }
- } else {
- if (UseProduct2Name == "") {
- helper.hideSearchUseProduct2s(component, event, helper);
- } else {
- helper.hideSearchUseProduct2(component, event, helper);
- }
- }
- },
- seletUseProduct2Change: function (component, event, helper) {
- helper.seletUseProduct2Change(component, event, helper);
- },
- productcategoryChange2: function (component, event, helper) {
- helper.productcategoryChange2(component, event, helper);
- },
- //浣跨敤浜у搧3
- UseProduct3Change: function (component, event, helper) {
- var UseProduct3Name = event.getParam("value");
- var UseProduct3Nameold = component.get("v.UseProduct3s");
- if (UseProduct3Name.match(/(\S+\s)+/)) {
- if (UseProduct3Name != UseProduct3Nameold) {
- helper.searchUseProduct3(component, event, helper);
- }
- } else {
- if (UseProduct3Name == "") {
- helper.hideSearchUseProduct3s(component, event, helper);
- } else {
- helper.hideSearchUseProduct3(component, event, helper);
- }
- }
- },
- seletUseProduct3Change: function (component, event, helper) {
- helper.seletUseProduct3Change(component, event, helper);
- },
-
- select_department: function (component, event, helper) {
- helper.setOpportunity_cfilter(component);
- },
- doctor_change: function (component, event, helper) {
- helper.doctor_change(component, event, helper);
- },
- stageNameChange: function (component, event, helper) {
- helper.stageNameChange(component, event, helper);
- },
- onDragOver: function (component, event, helper) {
- event.preventDefault();
- },
-
- onDrop: function (component, event, helper) {
- event.stopPropagation();
- event.preventDefault();
- event.dataTransfer.dropEffect = "copy";
- var files = event.dataTransfer.files;
- helper.readFile(component, helper, files[0]);
- },
- CreateRecord: function (component, event, helper) {
- var files = event.getSource().get("v.files");
- helper.readFile(component, helper, files[0]);
- },
-
- processFileContent: function (component, event, helper) {
- helper.saveRecords(component, event, helper);
- component.set("v.showErrorInfo", false);
- },
-
- cancel: function (component, event, helper) {
- component.set("v.showMain", true);
- },
-
- import: function (component, event, helper) {
- helper.showImport(component);
- },
- exportDate: function (component, event, helper) {
- var stockData = component.get("v.reports_date");
- console.log("瀵煎嚭鏁版嵁" + stockData);
- var csv = helper.convertArrayOfObjectsToCSV(component, stockData);
- if (csv == null) {
- return;
- }
-
- var universalBOM = "\uFEFF";
- var hiddenElement = document.createElement("a");
- hiddenElement.href =
- "data:text/csv;charset=utf-8," + encodeURI(universalBOM + csv);
- hiddenElement.target = "_self"; //
- hiddenElement.download = "ExportData.csv"; // CSV file Name* you can change it.[only name not .csv]
- document.body.appendChild(hiddenElement); // Required for FireFox browser
- hiddenElement.click(); // using click() js function to download csv file
- },
- export_condition: function (component, event, helper) {
- helper.showExport(component);
- },
-
- select_repores_date: function (component, event, helper) {
- helper.select_repores_date(component, event, helper);
- },
- export: function (component, event, helper) {
- console.log("杩涘叆export");
- var stockData = component.get("v.reports_date");
- console.log("鏌ュ嚭鐨勬暟鎹�" + stockData);
- },
- close_import: function (component, event, helper) {
- component.set("v.showMain", true);
- helper.close_import(component);
- },
- close_export: function (component, event, helper) {
- component.set("v.showMain", true);
- helper.close_export(component);
- },
- select_ConsumptionOfConsumables: function (component, event, helper) {
- helper.select_ConsumptionOfConsumables(component, event, helper);
- },
- select_purpose_type: function (component, event, helper) {
- helper.selectPurposeType(component, event, helper);
- },
- select_warlocksNumber: function (component, event, helper) {
- helper.select_warlocksNumber(component, event, helper);
- },
- selectProductClassification: function (component, event, helper) {
- helper.selectProductClassification(component, event, helper);
- },
- selectpurposetype: function (component, event, helper) {
- helper.selectpurposetype(component, event, helper);
- },
- return_main_page: function (component, event, helper) {
- window.open("/customer/", "_self");
- },
- exportErrorInfo: function (component, event, helper) {
- helper.exportErrorInfoHelper(component);
- }
});
diff --git a/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportHelper.js b/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportHelper.js
index aebf55e..81439c5 100644
--- a/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportHelper.js
+++ b/force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportHelper.js
@@ -1,3303 +1,4576 @@
({
- doinit: function (component, event, helper) {
- document.title = "杩芥函鏃ユ姤";
- debugger;
- this.report_date_list(component, event, helper, 5);
- component.set("v.login", true);
- var action = component.get("c.getalldata");
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = response.getReturnValue();
- component.set("v.alldata", res.reports);
- component.set("v.fieldsmap", res.fieldsMap);
- component.set("v.allselectlist", res.allselectlist);
- component.set("v.doclist", res.doclist);
- //fy
- debugger;
- var xx = res.UserProType;
- component.set("v.UserProType", res.UserProType);
- var gg = component.get("v.UserProType");
- //fy
- component
- .find("select_agency_person")
- .set(
- "v.options",
- this.conv_selected(res.allselectlist.AgencyPerson__c)
- );
- component
- .find("select_DealerPersonnel")
- .set(
- "v.options",
- this.conv_selected(res.allselectlist.DealerPersonnel__c)
- );
- component
- .find("select_purpose_type")
- .set(
- "v.options",
- this.conv_selected(res.allselectlist.WorkRecord__c)
- );
- component
- .find("select_ProductClassification")
- .set(
- "v.options",
- this.conv_selected(res.allselectlist.ProductClassification__c)
- );
- component
- .find("select_stageName")
- .set("v.options", this.conv_selected(res.allselectlist.StageName__c));
- component.set(
- "v.selected_agency_person",
- res.allselectlist.AgencyPerson__c[0].label
- );
- component.set("v.dialog_type", "鏂板缓");
- this.get_reports(
- component,
- event,
- helper,
- component.find("select_date").get("v.value"),
- component.find("select_agency_person").get("v.value")
- );
+ doinit: function (component, event, helper) {
+ document.title = '杩芥函鏃ユ姤';
- component.set("v.PIConfig", res.PIConfig); // 20220222 PI鏀归�� by Bright
- component.set("v.login", false);
- } else {
- component.set("v.errorMessage", "doinit failed.");
- this.showErrorToast(component);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- },
- //鍏朵粬鍝佺墝浜у搧绫诲埆 涓嬫媺妗嗚祴鍊�
- selectProductCcategory: function (component) {
- var select_ProductClassification = component
- .find("select_ProductClassification")
- .get("v.value");
- if (select_ProductClassification != "") {
- var action = component.get("c.selectProductCcategory");
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = response.getReturnValue();
- component
- .find("select_ProductCcategory")
- .set("v.options", JSON.parse(JSON.stringify(res)));
- }
- });
- $A.enqueueAction(action);
- } else {
- component.find("select_ProductCcategory").set("v.options", []);
- }
- },
- //鏍规嵁鍛ㄥ拰鎷呭綋鏌ヨ鏁版嵁缁欏垵濮嬮〉闈㈣祴鏁版嵁
- get_reports: function (component, event, helper, date_str, person_str) {
- debugger;
- if (!date_str) {
- return false;
- }
-
- if (person_str) {
- var person_str2 = person_str.split(";");
- if (person_str2.length > 1) {
- person_str = person_str2[0];
- }
- }
- date_str = this.get_date_string(date_str);
- var action = component.get("c.getReports");
- action.setParams({
- date_str: date_str,
- person_str: person_str
- });
- component.set("v.login", true);
- action.setCallback(this, function (response) {
- debugger;
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = response.getReturnValue();
- component.set("v.reports", res.reports);
- component.set("v.report_count", res.reports.length);
- // 鏇存柊淇濆瓨寰屻伄select_data鐢�
- var report_id = component.get("v.update_select_report_data_id");
- if (report_id != "") {
- for (var i = 0; i < res.reports.length; i++) {
- if (res.reports[i]["Id"] == report_id) {
- component.set("v.select_report_data", res.reports[i]);
- break;
- }
- }
- component.set("v.update_select_report_data_id", "");
- }
- if (res.reports.length > 0) {
- component.set("v.list_message", "");
- var flag2 = res.reports.length;
- //fy 20220414 start
- var report1 = [];
- var report2 = [];
- res.reports.forEach((item) => {
- if (
- (item.WorkRecord__c == "绉戝浼�" &&
- item.doctor3__c != undefined) ||
- ((item.doctor3__c == undefined ||
- item.doctor3__c == "" ||
- item.doctor3__c == "") &&
- (item.doctor2__r == undefined ||
- item.doctor2__r == "" ||
- item.doctor2__r == ""))
- ) {
- report1.push(item);
- } else {
- report2.push(item);
- }
- });
- res.reports = report2;
- //fy 20220414 end
- // PI 鏀归�� By Bright 20220328
- if (true) {
- let doctor_awsids = res.reports.map(function (d) {
- return d.doctor2__r.AWS_Data_Id__c;
- });
- let PIConfig = component.get("v.PIConfig");
- let staticResourceAgencyContact = JSON.parse(
- PIConfig.staticResourceAgencyContact
- );
- if (doctor_awsids.length > 0) {
- AWSService.search(
- staticResourceAgencyContact.searchUrl,
- {
- dataIds: doctor_awsids
- },
- function (data) {
- if (data && data.object && data.object.length) {
- let m = {};
- for (let di in data.object) {
- if (data.object[di] && data.object[di].dataId) {
- m[data.object[di].dataId] = data.object[di];
- }
- }
- debugger;
- for (let ri in res.reports) {
- if (
- res.reports[ri] &&
- res.reports[ri].doctor2__r &&
- res.reports[ri].doctor2__r.AWS_Data_Id__c &&
- m.hasOwnProperty(
- res.reports[ri].doctor2__r.AWS_Data_Id__c
- )
- ) {
- res.reports[ri].doctor2__r.awsdata =
- m[res.reports[ri].doctor2__r.AWS_Data_Id__c];
- }
- }
- component.set("v.reports", res.reports);
- component.set("v.report_count", res.reports.length);
- }
- //fy 20220414 start
- var reports3 = component.get("v.reports");
- if (reports3.length < flag2) {
- res.reports = [...report1, ...reports3];
- component.set("v.reports", res.reports);
- component.set("v.report_count", res.reports.length);
- }
- //fy 20220414 end
- component.set("v.login", false);
- },
- staticResourceAgencyContact.token
- );
- } else {
- component.set("v.login", false);
- }
- }
- } else {
- component.set("v.list_message", "no_data");
- component.set("v.login", false);
- }
- } else {
- component.set("v.errorMessage", "get_reports failed.");
- this.showErrorToast(component);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- },
- //澶嶅埗鎸夐挳鍙樼伆鑹�
- select_date_change: function (component, event, helper) {
- this.get_reports(
- component,
- event,
- helper,
- component.find("select_date").get("v.value"),
- component.find("select_agency_person").get("v.value")
- );
- component.set("v.select_report_data_radio", "");
- component.find("copy_button").set("v.disabled", true);
- component.find("delete_button").set("v.disabled", true);
- },
-
- select_agency_change: function (component, event, helper) {
- var select_value = component.find("select_agency_person").get("v.value");
- var new_label = this.get_agency_person_name(component, select_value);
- component.set("v.selected_agency_person", new_label);
- this.get_reports(
- component,
- event,
- helper,
- component.find("select_date").get("v.value"),
- select_value
- );
- component.set("v.select_report_data_radio", "");
- component.find("copy_button").set("v.disabled", true);
- component.find("delete_button").set("v.disabled", true);
- },
-
- get_agency_person_name: function (component, agency_person_value) {
- var allselectlist = component.get("v.allselectlist.AgencyPerson__c");
- var new_label = "";
- for (var i = 0; i < allselectlist.length; i++) {
- if (agency_person_value == allselectlist[i].value) {
- new_label = allselectlist[i].label;
- break;
- }
- }
- return new_label;
- },
- //澶嶅埗鍜岀紪杈戝洖鏄剧殑浣嶇疆
- toggle_report: function (component) {
- debugger;
- var modal_window = component.find("modal_window");
- var modal_bg = component.find("modal_bg");
- if ($A.util.hasClass(modal_window, "disp_none")) {
- // OPEN
- $A.util.removeClass(modal_window, "disp_none");
- $A.util.removeClass(modal_bg, "disp_none");
- //澶嶅埗 鍜岀紪杈� 鍥炴樉闂鍦ㄨ繖閲岄潰
- if (
- component.get("v.mode") == "edit" ||
- component.get("v.mode") == "copy"
- ) {
- var select_data = "";
- if (component.get("v.mode") == "edit") {
- select_data = component.get("v.select_report_data");
- } else if (component.get("v.mode") == "copy") {
- select_data = component.get("v.select_report_data_radio");
- }
- var reports = component.get("v.reports");
- var Agency_Hospital_text = "";
- var Agency_Hospital_parent_id = "";
- // 鍖婚櫌鍚�
- if (select_data["Agency_Hospital__c"] != "") {
- for (var i = 0; i < reports.length; i++) {
- if (
- reports[i]["Agency_Hospital__c"] ==
- select_data["Agency_Hospital__c"]
- ) {
- Agency_Hospital_text = reports[i]["Agency_Hospital__r"]["Name"];
- Agency_Hospital_parent_id =
- reports[i]["Agency_Hospital__r"]["Hospital__c"];
- }
- }
- component.set("v.hospital", Agency_Hospital_text);
- component.set("v.hospitalId", Agency_Hospital_parent_id);
- component.set("v.hospitalLinkId", select_data["Agency_Hospital__c"]);
- component.find("new_con").set("v.disabled", false);
- }
- //浣跨敤浜у搧1(浜у搧鍨嬪彿)
- var UseProduct1Text = "";
- var UseProduct1Id = "";
- if (
- select_data["UseProduct1__c"] != "" &&
- select_data["UseProduct1__c"] != undefined
- ) {
- for (var i = 0; i < reports.length; i++) {
- if (reports[i]["UseProduct1__c"] == select_data["UseProduct1__c"]) {
- UseProduct1Text =
- reports[i]["UseProduct1__r"]["Asset_Model_No__c"];
- UseProduct1Id = reports[i]["UseProduct1__c"];
- }
- }
- component.set("v.UseProduct1", UseProduct1Text);
- component.set("v.UseProduct1Id", select_data["UseProduct1__c"]);
- }
- //浣跨敤浜у搧2
- var UseProduct2Text = "";
- var UseProduct2Id = "";
- if (
- select_data["UseProduct2__c"] != "" &&
- select_data["UseProduct2__c"] != undefined
- ) {
- for (var i = 0; i < reports.length; i++) {
- if (reports[i]["UseProduct2__c"] == select_data["UseProduct2__c"]) {
- UseProduct2Text =
- reports[i]["UseProduct2__r"]["Asset_Model_No__c"];
- UseProduct2Id = reports[i]["UseProduct2__c"];
- }
- }
- component.set("v.UseProduct2", UseProduct2Text);
- component.set("v.UseProduct2Id", select_data["UseProduct2__c"]);
- }
- //浣跨敤浜у搧3
- var UseProduct3Text = "";
- var UseProduct3Id = "";
- if (
- select_data["UseProduct3__c"] != "" &&
- select_data["UseProduct3__c"] != undefined
- ) {
- for (var i = 0; i < reports.length; i++) {
- if (reports[i]["UseProduct3__c"] == select_data["UseProduct3__c"]) {
- UseProduct3Text =
- reports[i]["UseProduct3__r"]["Asset_Model_No__c"];
- UseProduct3Id = reports[i]["UseProduct3__c"];
- }
- }
- component.set("v.UseProduct3", UseProduct3Text);
- component.set("v.UseProduct3Id", select_data["UseProduct3__c"]);
- }
- //娲诲姩鏃�
- var reportDate;
- if (select_data["Report_Date__c"] != "") {
- for (var i = 0; i < reports.length; i++) {
- if (reports[i]["Report_Date__c"] == select_data["Report_Date__c"]) {
- reportDate = reports[i]["Report_Date__c"];
- }
- }
- component.set("v.data.Report_Date__c", reportDate);
- }
- // 绉戝
- // if (select_data['Department_Cateogy__c'] != '') {
- // component.find('select_department').set('v.value',select_data['Department_Cateogy__c']);
- // }
- //fy Department_Cateogy_text__c
- if (select_data["Department_Cateogy_text__c"] != "") {
- component
- .find("select_department")
- .set("v.value", select_data["Department_Cateogy_text__c"]);
- }
- //缁忛攢鍟嗕汉鍛�
- if (select_data["DealerPersonnel__c"] != "") {
- this.set_selected(
- component,
- "select_DealerPersonnel",
- select_data["DealerPersonnel__c"]
- );
- }
- // 娲诲姩鍖哄垎
- if (select_data["WorkRecord__c"] != "") {
- this.set_selected(
- component,
- "select_purpose_type",
- select_data["WorkRecord__c"]
- );
- this.selectPurposeType(component);
- }
- // 鎷滆浜�
- if (select_data["WorkRecord__c"] == "绉戝浼�") {
- component.set(
- "v.default_select_doctor_id2",
- select_data["doctor3__c"]
- );
- var a = component.get("v.default_select_doctor_id2");
- this.set_doctor_list(component);
- } else {
- component.set(
- "v.default_select_doctor_id",
- select_data["doctor2__c"]
- );
- this.set_doctor_list(component);
- }
- //浜у搧鍒嗙被(绗笁鍒嗙被)
- if (select_data["ProductClassification__c"] != null) {
- this.set_selected(
- component,
- "select_ProductClassification",
- select_data["ProductClassification__c"]
- );
- this.selectProductClassification(component);
- }
- // 浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺
- if (select_data["ConsumptionOfConsumables__c"] != "") {
- component
- .find("select_ConsumptionOfConsumables")
- .set("v.value", select_data["ConsumptionOfConsumables__c"]);
- }
- // 浜у搧鐢ㄩ噺
- if (select_data["warlocksNumber__c"] != "") {
- component
- .find("select_warlocksNumber")
- .set("v.value", select_data["warlocksNumber__c"]);
- }
- // 鏀彺闇�姹�
- if (select_data["WorkMark__c"] != false) {
- component
- .find("select_WorkMark")
- .set("v.checked", select_data["WorkMark__c"]);
- }
- debugger;
-
- var report_id = component.get("v.edit_copy_select_report_id");
- if (report_id != "") {
- var select_EffectProgress1 = "";
- var WarlockClassification = "";
- var ProductCcategory = "";
- var productCategories = "";
- var i = 0;
- for (i = 0; i < reports.length; i++) {
- if (report_id == reports[i]["Id"]) {
- select_EffectProgress1 = reports[i]["EffectProgress__c"];
- WarlockClassification = reports[i]["WarlockClassification__c"];
- ProductCcategory = reports[i]["ProductCcategory__c"];
- productCategories = reports[i]["productCategories__c"];
- break;
- }
- }
- //鏁堟灉/杩涘害
- if (select_EffectProgress1 != null && select_EffectProgress1 != "") {
- component
- .find("select_EffectProgress")
- .set("v.value", select_EffectProgress1);
- }
- //鏈+鍒嗙被
- if (WarlockClassification != null && WarlockClassification != "") {
- component
- .find("select_OtherBrandConsumables")
- .set("v.value", WarlockClassification);
- }
- //宸查噰鐢ㄥ叾浠栧搧鐗�
- if (ProductCcategory != null && ProductCcategory != "") {
- component
- .find("select_ProductCcategory")
- .set("v.value", ProductCcategory);
- this.selectpurposetype(component);
- }
- //鍏朵粬鍝佺墝浜у搧绫诲埆
- if (productCategories != null && productCategories != "") {
- component
- .find("select_productCategories")
- .set("v.value", productCategories);
- }
- component.set("v.edit_copy_select_report_id", "");
- }
- }
- } else {
- var select_report_data = component.get("v.select_report_data");
- var Report_Date__c = component.get("v.data.Report_Date__c");
- var Agency_Hospital__c = component.get("v.hospitalLinkId");
- var UseProduct1__c = component.get("v.UseProduct1Id");
- var UseProduct2__c = component.get("v.UseProduct2Id");
- var UseProduct3__c = component.get("v.UseProduct3Id");
- var Department_Cateogy__c = component
- .find("select_department")
- .get("v.value");
- var ConsumptionOfConsumables__c = component
- .find("select_ConsumptionOfConsumables")
- .get("v.value");
- var DealerPersonnel__c = component
- .find("select_DealerPersonnel")
- .get("v.value");
- var doctor2__c = component.find("select_doctor").get("v.value");
- var WorkRecord__c = component.find("select_purpose_type").get("v.value");
- var EffectProgress__c = component
- .find("select_EffectProgress")
- .get("v.value");
- var WarlockClassification__c = component
- .find("select_OtherBrandConsumables")
- .get("v.value");
- var ProductCcategory__c = component
- .find("select_ProductCcategory")
- .get("v.value");
- var productCategories__c = component
- .find("select_productCategories")
- .get("v.value");
- var warlocksNumber__c = component
- .find("select_warlocksNumber")
- .get("v.value");
- var WorkMark__c = component.find("select_WorkMark").get("v.checked");
- if (component.get("v.mode") == "new") {
- var confirm_title = "璀﹀憡!";
- var confirm_text = "鏀惧純鏂板缓鏃ユ姤锛�";
- if (
- !Report_Date__c &&
- !Agency_Hospital__c &&
- !UseProduct1__c &&
- !UseProduct2__c &&
- !UseProduct3__c &&
- !Department_Cateogy__c &&
- !ConsumptionOfConsumables__c &&
- !DealerPersonnel__c &&
- !doctor2__c &&
- !EffectProgress__c &&
- !WarlockClassification__c &&
- !ProductCcategory__c &&
- !productCategories__c &&
- !warlocksNumber__c &&
- !WorkMark__c &&
- !WorkRecord__c
- ) {
- this.allclear(component);
- $A.util.addClass(modal_window, "disp_none");
- $A.util.addClass(modal_bg, "disp_none");
- this.close_confirm(component, confirm_title, confirm_text);
- } else {
- this.close_confirm(component, confirm_title, confirm_text);
- }
- } else if (component.get("v.mode") == "copy") {
- var confirm_title = "璀﹀憡!";
- var confirm_text = "鏀惧純鏂板缓鏃ユ姤锛�";
- if (
- select_report_data["Report_Date__c"] == Report_Date__c &&
- select_report_data["Agency_Hospital__c"] == Agency_Hospital__c &&
- select_report_data["UseProduct1__c"] == UseProduct1__c &&
- select_report_data["UseProduct2__c"] == UseProduct2__c &&
- select_report_data["UseProduct3__c"] == UseProduct3__c &&
- select_report_data["Department_Cateogy__c"] ==
- Department_Cateogy__c &&
- select_report_data["ConsumptionOfConsumables__c"] ==
- ConsumptionOfConsumables__c &&
- select_report_data["DealerPersonnel__c"] == DealerPersonnel__c &&
- select_report_data["doctor2__c"] == doctor2__c &&
- select_report_data["EffectProgress__c"] == EffectProgress__c &&
- select_report_data["WarlockClassification__c"] ==
- WarlockClassification__c &&
- select_report_data["ProductCcategory__c"] == ProductCcategory__c &&
- select_report_data["productCategories__c"] == productCategories__c &&
- select_report_data["warlocksNumber__c"] == warlocksNumber__c &&
- select_report_data["WorkMark__c"] == WorkMark__c &&
- select_report_data["WorkRecord__c"] == WorkRecord__c
- ) {
- this.allclear(component);
- $A.util.addClass(modal_window, "disp_none");
- $A.util.addClass(modal_bg, "disp_none");
- } else {
- this.close_confirm(component, confirm_title, confirm_text);
- }
- } else if (component.get("v.mode") == "edit") {
- var confirm_title = "璀﹀憡!";
- var confirm_text = "鏀惧純缂栬緫鏃ユ姤锛�";
- if (
- select_report_data["Report_Date__c"] == Report_Date__c &&
- select_report_data["Agency_Hospital__c"] == Agency_Hospital__c &&
- select_report_data["UseProduct1__c"] == UseProduct1__c &&
- select_report_data["UseProduct2__c"] == UseProduct2__c &&
- select_report_data["UseProduct3__c"] == UseProduct3__c &&
- select_report_data["Department_Cateogy__c"] ==
- Department_Cateogy__c &&
- select_report_data["ConsumptionOfConsumables__c"] ==
- ConsumptionOfConsumables__c &&
- select_report_data["DealerPersonnel__c"] == DealerPersonnel__c &&
- select_report_data["doctor2__c"] == doctor2__c &&
- select_report_data["EffectProgress__c"] == EffectProgress__c &&
- select_report_data["WarlockClassification__c"] ==
- WarlockClassification__c &&
- select_report_data["ProductCcategory__c"] == ProductCcategory__c &&
- select_report_data["productCategories__c"] == productCategories__c &&
- select_report_data["warlocksNumber__c"] == warlocksNumber__c &&
- select_report_data["WorkMark__c"] == WorkMark__c &&
- select_report_data["WorkRecord__c"] == WorkRecord__c
- ) {
- this.allclear(component);
- $A.util.addClass(modal_window, "disp_none");
- $A.util.addClass(modal_bg, "disp_none");
- } else {
- this.close_confirm(component, confirm_title, confirm_text);
- }
- }
- }
- },
- //鍏抽棴椤甸潰鏄� 灏忕殑鎻愮ず妗嗘槸鍚︽斁寮冩柊寤烘棩鎶�
- close_confirm: function (component, title, text) {
- var confirm_status = component.get("v.confirm_status");
- component.set("v.modal_confirm_title", title);
- component.set("v.modal_confirm_text", text);
- var modal_window = component.find("modal_window");
- var modal_bg = component.find("modal_bg");
- var modal_confirm = component.find("modal_confirm");
- var modal_confirm_bg = component.find("modal_confirm_bg");
- debugger;
- if (confirm_status == 0) {
- $A.util.addClass(modal_window, "disp_none");
- $A.util.addClass(modal_bg, "disp_none");
- $A.util.removeClass(modal_confirm, "disp_none");
- $A.util.removeClass(modal_confirm_bg, "disp_none");
- } else if (confirm_status == 1) {
- // 鏄�
- $A.util.addClass(modal_confirm, "disp_none");
- $A.util.addClass(modal_confirm_bg, "disp_none");
- component.set("v.mode", "");
- this.allclear(component);
- component.set("v.reports_now", "");
- component.set("v.reports_now_count", 0);
- component.set("v.confirm_status", 0);
- } else if (confirm_status == 2) {
- // 鍚�
- $A.util.removeClass(modal_window, "disp_none");
- $A.util.removeClass(modal_bg, "disp_none");
- $A.util.addClass(modal_confirm, "disp_none");
- $A.util.addClass(modal_confirm_bg, "disp_none");
- component.set("v.confirm_status", 0);
- }
- },
- //鏂板缓鎸夐挳
- new_report: function (component, event, helper) {
- component.set("v.mode", "new");
- component.set("v.dialog_type", "鏂板缓");
- // 鍛�
- var select_date = component.find("select_date").get("v.value");
- // 鎷呭綋
- var select_agency = component.find("select_agency_person").get("v.value");
- var cm = 0;
- if (select_agency.indexOf(";") != -1) {
- select_agency = select_agency.split(";")[0];
- }
- component.set("v.selected_date", select_date);
- // 鎷呭綋
- var name = component.get("v.selected_agency_person");
- var ret = this.create_report_header(
- component,
- event,
- helper,
- name,
- select_agency,
- select_date
- );
- component.set("v.default_select_doctor_id2", "");
-
- // SWAG-CF58C3 fy start
- this.set_aws_url(component, "Agency_Contact__c");
- // SWAG-CF58C3 fy end
- },
- // 澶嶅埗鎸夐挳
- copy_button: function (component, event, helper) {
- debugger;
- this.allclear(component);
- component.set("v.mode", "copy");
- component.set("v.dialog_type", "鏂板缓");
- var select_report_data = component.get("v.select_report_data_radio");
- component.set("v.loadOpp", true);
- // 閫�
- var now = new Date();
- var start_day = new Date(
- now.getFullYear(),
- now.getMonth(),
- now.getDate() - now.getDay() + 1
- );
- var select_date =
- start_day.getFullYear() +
- "/" +
- (start_day.getMonth() + 1) +
- "/" +
- start_day.getDate();
- this.set_selected(component, "select_date", select_date);
- component.set("v.selected_date", select_date);
- // 鎷呭綋
- var select_agency = select_report_data["Person_In_Charge2__c"];
- var new_label = this.get_agency_person_name(component, select_agency);
- component.set("v.selected_agency_person", new_label);
- this.set_selected(component, "select_agency_person", select_agency);
- var name = component.get("v.selected_agency_person");
- component.set("v.edit_copy_select_report_id", select_report_data["Id"]);
- component.set("v.select_report_data", select_report_data);
-
- var ret = this.create_report_header(
- component,
- event,
- helper,
- name,
- select_agency,
- select_date
- );
- // SWAG-CF58C3 fy start
- this.set_aws_url(component, "Agency_Contact__c");
- // SWAG-CF58C3 fy end
- },
- //鍒犻櫎鎸夐挳
- delete_button: function (component, event, helper) {
- debugger;
- var select_report_data = component.get("v.select_report_data_radio");
- if (confirm("鏄惁鍒犻櫎璇ユ暟鎹紵")) {
- debugger;
- component.set("v.login", true);
- var action = component.get("c.deleteAgencyReport");
- action.setParams({
- agencyReport_id: select_report_data.Id
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var result = response.getReturnValue();
- if (result == "success") {
- this.select_agency_change(component, event, helper);
- }
- component.set("v.login", false);
- } else {
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- }
- },
- //澶嶅埗鎸夐挳鍙敤
- change_report_radio: function (component, event, helper) {
- debugger;
- var reports = component.get("v.reports");
- for (var i = 0; i < reports.length; i++) {
- if (reports[i].Name == event.getSource().get("v.label")) {
- component.set("v.select_report_data_radio", reports[i]);
- component.find("copy_button").set("v.disabled", false);
- component.find("delete_button").set("v.disabled", false);
- break;
- }
- }
- },
- //缂栬緫鎸夐挳
- edit_button: function (component, event, helper) {
- this.allclear(component);
- debugger;
- component.set("v.loadOpp", true);
- var index = event.getSource().get("v.value");
- component.set("v.select_report_data", component.get("v.reports")[index]);
- component.set("v.mode", "edit");
- component.set("v.dialog_type", "缂栬緫");
- var select_date = component.get("v.reports")[index].Submit_date__c;
- var select_agency = component.get("v.reports")[index].Person_In_Charge2__c;
- var text_tmp = select_date.split("-");
- var select_date_text =
- text_tmp[0] + "/" + Number(text_tmp[1]) + "/" + Number(text_tmp[2]);
- component.set("v.selected_date", select_date_text);
- var name = component.get("v.reports")[index].Person_In_Charge2__r.Name;
- this.set_selected(component, "select_agency_person", select_agency);
- var new_label = this.get_agency_person_name(component, select_agency);
- component.set("v.selected_agency_person", new_label);
- component.set(
- "v.edit_copy_select_report_id",
- component.get("v.reports")[index].Id
- );
- var ret = this.create_report_header(
- component,
- event,
- helper,
- name,
- select_agency,
- select_date
- );
- // SWAG-CF58C3 fy start
- this.set_aws_url(component, "Agency_Contact__c");
- // SWAG-CF58C3 fy end
- },
- //淇濆瓨
- save_report: function (component, event, helper) {
- var UserProType = component.get("v.UserProType");
- component.find("save_button").set("v.disabled", true);
- var etEng = component.get("v.etEng");
- var Report_Date__c = component.get("v.data.Report_Date__c");
- var Person_In_Charge2__c = "";
- var Submit_date__c = "";
- if (component.get("v.mode") == "edit") {
- // 鍛� Submit_date__c
- Submit_date__c = component.get("v.select_report_data").Submit_date__c;
- // 鎷呭綋 Person_In_Charge2__c
- Person_In_Charge2__c = component.get(
- "v.select_report_data"
- ).Person_In_Charge2__c;
- } else {
- // 鍛� Submit_date__c
- Submit_date__c = this.get_date_string(
- component.find("select_date").get("v.value")
- );
- // 鎷呭綋 Person_In_Charge2__c
- Person_In_Charge2__c = component
- .find("select_agency_person")
- .get("v.value");
- }
- debugger;
- // Agency_Report_Header__c
- var Agency_Report_Header__c = component.get("v.agency_report_header_id");
- // 鍖婚櫌
- var Agency_Hospital__c = component.get("v.hospitalLinkId");
- // 浜у搧鍒嗙被(绗笁鍒嗙被)
- var ProductClassification__c = component
- .find("select_ProductClassification")
- .get("v.value");
- // 浣跨敤浜у搧1(浜у搧鍨嬪彿) UseProduct1__c
- var UseProduct1__c = component.get("v.UseProduct1Id");
- // 浣跨敤浜у搧2 UseProduct2__c
- var UseProduct2__c = component.get("v.UseProduct2Id");
- // 浣跨敤浜у搧3 UseProduct3__c
- var UseProduct3__c = component.get("v.UseProduct3Id");
- // 绉戝 Department_Cateogy__c
- var Department_Cateogy__c = component
- .find("select_department")
- .get("v.value");
- // 缁忛攢鍟嗕汉鍛� DealerPersonnel__c
- var DealerPersonnel__c = component
- .find("select_DealerPersonnel")
- .get("v.value");
- // 鎷滆浜� doctor2__c
- var doctor2__c = component.find("select_doctor").get("v.value");
- // 娲诲姩鍖哄垎浼� WorkRecord__c
- var WorkRecord__c = component.find("select_purpose_type").get("v.value");
- // 鏁堟灉/杩涘害 EffectProgress__c
- var EffectProgress__c = component
- .find("select_EffectProgress")
- .get("v.value");
- // alert(EffectProgress__c);
- // 绉戝鍚屾潵鑰楁潗鏈堜娇鐢ㄩ噺 ConsumptionOfConsumables__c
- var ConsumptionOfConsumables__c = component
- .find("select_ConsumptionOfConsumables")
- .get("v.value");
- // 鏈+鍒嗙被 WarlockClassification__c
- var WarlockClassification__c = component
- .find("select_OtherBrandConsumables")
- .get("v.value");
- // 宸查噰鐢ㄥ叾浠栧搧鐗� ProductCcategory__c
- var ProductCcategory__c = component
- .find("select_ProductCcategory")
- .get("v.value");
- // 鍏朵粬鍝佺墝浜у搧绫诲埆 productCategories__c
- var productCategories__c = component
- .find("select_productCategories")
- .get("v.value");
- // 浜у搧鐢ㄩ噺 warlocksNumber__c
- var warlocksNumber__c = component
- .find("select_warlocksNumber")
- .get("v.value");
- // 鏀彺闇�姹� WorkMark__c
- var WorkMark__c = component.find("select_WorkMark").get("v.checked");
- var StageName__c = component.find("select_stageName").get("v.value");
- var Amount__c =
- component.get("v.oppdata.Amount__c") != null
- ? component.get("v.oppdata.Amount__c").toString()
- : "";
- var OCMSale_Price__c =
- component.get("v.oppdata.OCMSale_Price__c") != null
- ? component.get("v.oppdata.OCMSale_Price__c").toString()
- : "";
- var Close_Forecasted_Date__c = component.get(
- "v.oppdata.Close_Forecasted_Date__c"
- );
- var StageName__c_o = component.get("v.StageName__c_o");
- var Amount__c_o = component.get("v.Amount__c_o");
- var OCMSale_Price__c_o = component.get("v.OCMSale_Price__c_o");
- var Close_Forecasted_Date__c_o = component.get(
- "v.Close_Forecasted_Date__c_o"
- );
- if (StageName__c_o == undefined) StageName__c_o = "";
- if (Amount__c_o == undefined) Amount__c_o = "";
- if (OCMSale_Price__c_o == undefined) OCMSale_Price__c_o = "";
- if (Close_Forecasted_Date__c_o == undefined)
- Close_Forecasted_Date__c_o = "";
- if (
- StageName__c == StageName__c_o &&
- OCMSale_Price__c_o == OCMSale_Price__c &&
- Amount__c == Amount__c_o &&
- Close_Forecasted_Date__c == Close_Forecasted_Date__c_o
- ) {
- StageName__c = "";
- Amount__c = "";
- OCMSale_Price__c = "";
- Close_Forecasted_Date__c = "";
- }
- // 銉愩儶銉囥兗銈枫儳銉�
- var error = [];
- //fy start
- // if(WorkRecord__c != 'SIS'&&WorkRecord__c != '绉戝浼�'){
- if (WorkRecord__c == "涓村簥淇℃伅(浣跨敤閲�)鏀堕泦") {
- if (
- warlocksNumber__c == "" ||
- warlocksNumber__c == "" ||
- warlocksNumber__c == undefined
- ) {
- error.push("浜у搧鐢ㄩ噺 涓嶈兘涓虹┖");
- }
- }
- //fy end
- if (WorkRecord__c == "涓村簥淇℃伅(浣跨敤閲�)鏀堕泦" && UserProType == "ENG") {
- if (
- productCategories__c == "" ||
- productCategories__c == "" ||
- productCategories__c == undefined
- ) {
- error.push("鍏朵粬鍝佺墝浜у搧绫诲埆 涓嶅瓨鍦�");
- }
- }
- if (WorkRecord__c == "涓村簥淇℃伅(浣跨敤閲�)鏀堕泦") {
- if (
- ProductCcategory__c == "" ||
- ProductCcategory__c == "" ||
- ProductCcategory__c == undefined
- ) {
- error.push("宸查噰鐢ㄥ叾浠栧搧鐗� 涓嶅瓨鍦�");
- }
- }
- if (WorkRecord__c == "涓村簥淇℃伅(浣跨敤閲�)鏀堕泦") {
- if (
- WarlockClassification__c == "" ||
- WarlockClassification__c == "" ||
- WarlockClassification__c == undefined
- ) {
- error.push("浜у搧1瀵瑰簲OLY浜у搧绾� 涓嶅瓨鍦�");
- }
- }
- if (WorkRecord__c == "涓村簥淇℃伅(浣跨敤閲�)鏀堕泦") {
- if (
- ConsumptionOfConsumables__c == "" ||
- ConsumptionOfConsumables__c == "" ||
- ConsumptionOfConsumables__c == undefined
- ) {
- error.push("浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺 涓嶈兘涓虹┖");
- }
- }
- if (
- WorkRecord__c != "涓村簥淇℃伅(浣跨敤閲�)鏀堕泦" &&
- WorkRecord__c != "甯傚満鎺ㄥ箍绫绘椿鍔�"
- ) {
- if (
- EffectProgress__c == "" ||
- EffectProgress__c == "" ||
- EffectProgress__c == undefined
- ) {
- error.push("鏁堟灉/杩涘害 涓嶅瓨鍦�");
- }
- }
- // if(WorkRecord__c != '涓村簥淇℃伅(浣跨敤閲�)鏀堕泦'&&WorkRecord__c != 'QIS澶勭悊'){
- if (WorkRecord__c != "涓村簥淇℃伅(浣跨敤閲�)鏀堕泦") {
- if (
- UseProduct1__c == "" ||
- UseProduct1__c == "" ||
- UseProduct1__c == undefined
- ) {
- error.push("浣跨敤浜у搧1(浜у搧鍨嬪彿) 涓嶅瓨鍦�");
- }
- }
- if (
- ProductClassification__c == "" ||
- ProductClassification__c == "" ||
- ProductClassification__c == undefined
- ) {
- error.push("浜у搧鍒嗙被(绗笁鍒嗙被) 涓嶅瓨鍦�");
- }
- if (
- WorkRecord__c == "SIS" ||
- WorkRecord__c == "绉戝浼�" ||
- WorkRecord__c == "闄㈠唴鍏ラ櫌鐢宠" ||
- WorkRecord__c == "鏀惰垂椤圭洰鐢宠"
- ) {
- if (doctor2__c == "" || doctor2__c == "" || doctor2__c == undefined) {
- error.push("鎷滆浜� 涓嶅瓨鍦�");
- }
- }
- if (
- WorkRecord__c == "" ||
- WorkRecord__c == "" ||
- WorkRecord__c == undefined
- ) {
- error.push("娲诲姩鍖哄垎 涓嶅瓨鍦�");
- }
- if (
- DealerPersonnel__c == "" ||
- DealerPersonnel__c == "" ||
- DealerPersonnel__c == undefined
- ) {
- error.push("缁忛攢鍟嗕汉鍛� 涓嶅瓨鍦�");
- }
- if (
- Department_Cateogy__c == "" ||
- Department_Cateogy__c == "" ||
- Department_Cateogy__c == undefined
- ) {
- error.push("绉戝 涓嶅瓨鍦�");
- }
- if (
- Agency_Hospital__c == "" ||
- Agency_Hospital__c == "" ||
- Agency_Hospital__c == undefined
- ) {
- error.push("鍖婚櫌 涓嶅瓨鍦�");
- }
-
- if (
- Report_Date__c == "" ||
- Report_Date__c == "" ||
- Report_Date__c == undefined
- ) {
- error.push("娲诲姩鏃� 涓嶅瓨鍦�");
- }
- if (
- Submit_date__c == "" ||
- Submit_date__c == "" ||
- Submit_date__c == undefined
- ) {
- error.push("鍛� 涓嶅瓨鍦�");
- }
- var rDate = new Date(Report_Date__c);
- var sDate = new Date(Submit_date__c);
- sDate.setDate(sDate.getDate() - 1);
- if (rDate < sDate) {
- error.push("娲诲姩鏃ュ繀椤绘槸鏈懆锛�");
- }
- sDate.setDate(sDate.getDate() + 7);
- if (rDate >= sDate) {
- error.push("娲诲姩鏃ュ繀椤绘槸鏈懆锛�");
- }
- if (
- Person_In_Charge2__c == "" ||
- Person_In_Charge2__c == "" ||
- Person_In_Charge2__c == undefined
- ) {
- error.push("鎷呭綋 涓嶅瓨鍦�");
- }
- if (
- Agency_Report_Header__c == "" ||
- Agency_Report_Header__c == "" ||
- Agency_Report_Header__c == undefined
- ) {
- this.error("Report Header Id 涓嶅瓨鍦�");
- }
-
- // if (!UseProduct2__c) { error.push("浣跨敤浜у搧2 涓嶅瓨鍦�"); }
- // if (!UseProduct3__c) { error.push("浣跨敤浜у搧3 涓嶅瓨鍦�"); }
-
- // if (!productCategories__c) { error.push("鍏朵粬鍝佺墝浜у搧绫诲埆 涓嶅瓨鍦�"); }
-
- for (var i = 0; i < error.length; i++) {
- component.set("v.errorMessage", error[i]);
- this.showErrorToast(component);
- }
- if (error.length > 0) {
- component.find("save_button").set("v.disabled", false);
- return false;
- }
- // 淇濆瓨鍑︾悊
- component.set("v.login", true);
- if (component.get("v.mode") == "edit") {
- var Agency_Report__c = component.get("v.select_report_data").Id;
- var action = component.get("c.editAgencyReport");
- action.setParams({
- Agency_Report_Id: Agency_Report__c,
- Department_Cateogy: Department_Cateogy__c,
- ConsumptionOfConsumables: ConsumptionOfConsumables__c,
- WorkRecord: WorkRecord__c,
- EffectProgress: EffectProgress__c,
- WarlockClassification: WarlockClassification__c,
- ProductCcategory: ProductCcategory__c,
- productCategories: productCategories__c,
- warlocksNumber: warlocksNumber__c,
- WorkMark: WorkMark__c,
- ProductClassification: ProductClassification__c,
- DealerPersonnel: DealerPersonnel__c,
- Agency_Report_Header: Agency_Report_Header__c,
- Agency_Hospital: Agency_Hospital__c,
- UseProduct1: UseProduct1__c,
- UseProduct2: UseProduct2__c,
- UseProduct3: UseProduct3__c,
- Person_In_Charge2: Person_In_Charge2__c,
- doctor: doctor2__c,
- Submit_date: Submit_date__c,
- StageName: StageName__c,
- oppAmount: Amount__c,
- oppOCMPrice: OCMSale_Price__c,
- Close_Forecasted_Date: Close_Forecasted_Date__c,
- Report_Date: Report_Date__c
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- component.set("v.successMessage", "缂栬緫淇濆瓨鎴愬姛");
- this.showSuccessToast(component);
- var report_id = response.getReturnValue();
- component.set("v.create_agency_report_id", report_id);
- var select_agency_list =
- component.get("v.allselectlist").AgencyPerson__c;
- for (var i = 0; i < select_agency_list.length; i++) {
- if (
- select_agency_list[i].value ==
- component.get("v.select_report_data").Person_In_Charge2__c
- ) {
- select_agency_list[i].selected = true;
- } else {
- select_agency_list[i].selected = false;
- }
- }
- component
- .find("select_agency_person")
- .set("v.options", select_agency_list);
- component.set("v.update_select_report_data_id", report_id);
- this.get_reports(
- component,
- event,
- helper,
- component.get("v.select_report_data").Submit_date__c,
- component.get("v.select_report_data").Person_In_Charge2__c
- );
- component.find("save_button").set("v.disabled", false);
- component.set("v.login", false);
- } else {
- component.set("v.errorMessage", "save_report failed.");
- this.showErrorToast(component);
- component.find("save_button").set("v.disabled", false);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- } else {
- /* Save (New & Copy) */
- var action = component.get("c.saveAgencyReport");
- action.setParams({
- Department_Cateogy: Department_Cateogy__c,
- ConsumptionOfConsumables: ConsumptionOfConsumables__c,
- WorkMark: WorkMark__c,
- warlocksNumber: warlocksNumber__c,
- DealerPersonnel: DealerPersonnel__c,
- ProductCcategory: ProductCcategory__c,
- productCategories: productCategories__c,
- WarlockClassification: WarlockClassification__c,
- ProductClassification: ProductClassification__c,
- WorkRecord: WorkRecord__c,
- EffectProgress: EffectProgress__c,
- Agency_Report_Header: Agency_Report_Header__c,
- Agency_Hospital: Agency_Hospital__c,
- Person_In_Charge2: Person_In_Charge2__c,
- doctor: doctor2__c,
- Submit_date: Submit_date__c,
- UseProduct1: UseProduct1__c,
- UseProduct2: UseProduct2__c,
- UseProduct3: UseProduct3__c,
- StageName: StageName__c,
- oppAmount: Amount__c,
- oppOCMPrice: OCMSale_Price__c,
- Close_Forecasted_Date: Close_Forecasted_Date__c,
- Report_Date: Report_Date__c
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- component.set("v.successMessage", "淇濆瓨鎴愬姛");
- this.showSuccessToast(component);
- var report_id = response.getReturnValue();
- component.set("v.create_agency_report_id", report_id);
- this.get_reports(
- component,
- event,
- helper,
- component.find("select_date").get("v.value"),
- component.find("select_agency_person").get("v.value")
- );
- // 銉€兗銉�銉偊銈c兂銉夈偊鍐呫伄涓�瑕х敤
- var action2 = component.get("c.getReportsById");
- action2.setParams({
- report_id: report_id
- });
- action2.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = response.getReturnValue();
- var reports_now = component.get("v.reports_now");
- var reports_now_count = 0;
- if (reports_now.length > 0 && reports_now != "") {
- reports_now_count = reports_now.length;
- }
- // Save&New鏅傘伄銈︺偅銉炽儔銈﹀唴銉囥兗銈夸竴瑕�
- if (res.length > 0) {
- reports_now[reports_now_count] = res[0];
- reports_now.sort(function (a, b) {
- if (a.Name > b.Name) return -1;
- if (a.Name < b.Name) return 1;
- return 0;
- });
- component.set("v.reports_now", reports_now);
- component.set("v.reports_now_count", reports_now.length);
- var data_list = component.find("modal_data_list_tr");
- }
- } else {
- component.set("v.errorMessage", "get_reports_now failed.");
- this.showErrorToast(component);
- component.find("save_button").set("v.disabled", false);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action2);
- this.allclear(component);
- component.find("select_WorkMark").set("v.value", false);
- component.find("save_button").set("v.disabled", false);
- component.set("v.login", false);
- this.doinit(component, event, helper);
- } else {
- var error = response.getError();
- component.set("v.errorMessage", "淇濆瓨鏃ユ姤澶辫触");
- this.showErrorToast(component);
- component.find("save_button").set("v.disabled", false);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- }
- },
-
- allclear: function (component) {
- var clear = [{ label: "", value: "", selected: true }];
- component.set("v.hospital", "");
- component.set("v.hospitalId", "");
- component.set("v.hospitalLinkId", "");
- component.set("v.UseProduct1", "");
- component.set("v.UseProduct1Id", "");
- component.set("v.UseProduct2", "");
- component.set("v.UseProduct2Id", "");
- component.set("v.UseProduct3", "");
- component.set("v.UseProduct3Id", "");
- component.find("select_ProductClassification").set("v.value", "");
- component.find("select_warlocksNumber").set("v.value", null);
- component.find("select_department").set("v.value", "");
- component.find("select_ConsumptionOfConsumables").set("v.value", null);
- component.find("select_WorkMark").set("v.checked", false);
- component.find("new_con").set("v.disabled", true);
- component.find("select_doctor").set("v.options", clear);
- component
- .find("select_DealerPersonnel")
- .set(
- "v.options",
- this.conv_selected(component.get("v.allselectlist.DealerPersonnel__c"))
- );
- component
- .find("select_purpose_type")
- .set(
- "v.options",
- this.conv_selected(component.get("v.allselectlist.WorkRecord__c"))
- );
- // component.find('select_ProductCcategory').set('v.options', this.conv_selected(component.get('v.allselectlist.ProductCcategory__c')));
- component.find("select_EffectProgress").set("v.value", "");
- component.find("select_OtherBrandConsumables").set("v.value", "");
- component.find("select_ProductCcategory").set("v.value", "");
- component.find("select_productCategories").set("v.value", "");
- // ToDo闇�瑕佹祴璇曟墜鏈轰笂鑳借繍琛屼笉
- component.set("v.data.Report_Date__c", "");
- component.set("v.oppdata.Close_Forecasted_Date__c", "");
- component.set("v.oppdata.Amount__c", "");
- component.set("v.oppdata.OCMSale_Price__c", "");
- component.set("v.oppdata.StageName__c", "");
- component.set("v.Close_Forecasted_Date__c_o", "");
- component.set("v.Amount__c_o", "");
- component.set("v.OCMSale_Price__c_o", "");
- component.set("v.StageName__c_o", "");
- $A.util.addClass(component.find("input-opportunity-stage"), "disp_none");
- $A.util.addClass(component.find("input-opportunity-amount1"), "disp_none");
- $A.util.addClass(component.find("input-opportunity-amount2"), "disp_none");
- $A.util.addClass(component.find("input-opportunity-date"), "disp_none");
- this.selectPurposeType(component);
- this.selectProductClassification(component);
- this.selectpurposetype(component);
- },
-
- report_date_list: function (component, event, helper, count) {
- var ret_obj = [];
- var now = new Date();
- for (var i = 0; i < count; i++) {
- var start_day = new Date(
- now.getFullYear(),
- now.getMonth(),
- now.getDate() - now.getDay() + 1 - i * 7
- );
- var end_day = new Date(
- now.getFullYear(),
- now.getMonth(),
- now.getDate() + (7 - now.getDay()) - i * 7
- );
- var start_day_show = new Date(
- now.getFullYear(),
- now.getMonth(),
- now.getDate() - now.getDay() - i * 7
- );
- var end_day_show = new Date(
- now.getFullYear(),
- now.getMonth(),
- now.getDate() + (6 - now.getDay()) - i * 7
- );
- var date_text =
- start_day.getFullYear() +
- "/" +
- (start_day.getMonth() + 1) +
- "/" +
- start_day.getDate() +
- "~" +
- end_day.getFullYear() +
- "/" +
- (end_day.getMonth() + 1) +
- "/" +
- end_day.getDate();
- if (i == 0) {
- ret_obj.push({
- selected: true,
- value:
- start_day.getFullYear() +
- "/" +
- (start_day.getMonth() + 1) +
- "/" +
- start_day.getDate(),
- label:
- start_day_show.getFullYear() +
- "/" +
- (start_day_show.getMonth() + 1) +
- "/" +
- start_day_show.getDate() +
- "~" +
- end_day_show.getFullYear() +
- "/" +
- (end_day_show.getMonth() + 1) +
- "/" +
- end_day_show.getDate()
- });
- } else {
- ret_obj.push({
- selected: false,
- value:
- start_day.getFullYear() +
- "/" +
- (start_day.getMonth() + 1) +
- "/" +
- start_day.getDate(),
- label:
- start_day_show.getFullYear() +
- "/" +
- (start_day_show.getMonth() + 1) +
- "/" +
- start_day_show.getDate() +
- "~" +
- end_day_show.getFullYear() +
- "/" +
- (end_day_show.getMonth() + 1) +
- "/" +
- end_day_show.getDate()
- });
- }
- }
- component.find("select_date").set("v.options", ret_obj);
- component.set("v.report_date_list", ret_obj);
- },
- create_report_header: function (
- component,
- event,
- helper,
- name,
- s_agency,
- s_date
- ) {
- s_date = this.get_date_string(s_date);
- if (s_date == false) {
- component.set("v.errorMessage", "get_date_string failed.");
- this.showErrorToast(component);
- return false;
- }
- var head_key = this.create_header_input_key(s_agency, s_date);
- component.set("v.agency_report_header", head_key);
- if (head_key == false) {
- component.set("v.errorMessage", "create_header_input_key failed.");
- this.showErrorToast(component);
- return false;
- }
- var key2 = s_date.replace(/-/g, "");
- var action = component.get("c.createReportHeader");
- action.setParams({
- name: name,
- s_date: s_date,
- s_agency: s_agency,
- head_key: head_key
- });
- component.set("v.login", true);
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = response.getReturnValue();
- component.set("v.agency_report_header_id", res);
- component.set("v.login", false);
- this.toggle_report(component, event, helper);
- } else {
- component.set("v.errorMessage", "createReportHeader callback failed.");
- this.showErrorToast(component);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- },
- create_header_input_key: function (agency_id, s_date) {
- if (typeof s_date != "string") {
- s_date = this.get_date_string(s_date);
- if (s_date == false) {
- component.set(
- "v.errorMessage",
- "get_date_string in create_header_input_key."
- );
- this.showErrorToast(component);
- return false;
- }
- }
- if (!agency_id || !s_date) {
- return false;
- }
- s_date = s_date.replace(/-/g, "");
- var headkey = agency_id + ":" + s_date;
- return headkey;
- },
-
- /* typeof is not cool
- * @ret : String, Boolean, Date, Error, Array, Function, Null, Undefined, etc
- */
- object_type: function (obj) {
- var obj_type = Object.prototype.toString.call(obj).slice(8, -1);
- return obj_type;
- },
- // create yyyy-mm-dd string
- get_date_string: function (val) {
- if (typeof val == "string") {
- if (val.match(/^\d{4}\/\d{1,2}\/\d{1,2}$/)) {
- val = val.replace(/[\/]/g, "-");
- var tmp = val.split("-");
- if (tmp[1].length == 1) {
- tmp[1] = "0" + tmp[1];
- }
- if (tmp[2].length == 1) {
- tmp[2] = "0" + tmp[2];
- }
- val = tmp[0] + "-" + tmp[1] + "-" + tmp[2];
- } else if (val.match(/^\d{4}-\d{1,2}-\d{1,2}$/)) {
- //ok
- } else {
- return false;
- }
- } else if (this.object_type(val) == "Date") {
- var mm = val.getMonth() + 1;
- if (String(mm).length == 1) {
- mm = "0" + mm;
- }
- var dd = "";
- if (String(val.getDate()).length == 1) {
- dd = "0" + val.getDate();
- } else {
- dd = val.getDate();
- }
- val = val.getFullYear() + "-" + mm + "-" + dd;
- } else {
- return false;
- }
- return val;
- },
- // Controller 鏍规嵁椤甸潰鍖婚櫌鏌ヨ绗﹀悎鐨勫尰闄�
- searchHos: function (component, event, helper) {
- var hospital_name = event.getParam("value");
- var action = component.get("c.getHospitalList");
- action.setParams({
- hospital_name: hospital_name
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state === "SUCCESS") {
- var hospital_list = component.find("hospital_list");
- var hosList = response.getReturnValue();
- if (hosList.length > 0) {
- $A.util.addClass(hospital_list, "slds-is-open");
- } else {
- $A.util.removeClass(hospital_list, "slds-is-open");
- }
- component.set("v.hospitalList", response.getReturnValue());
- } else {
- $A.util.removeClass(hospital_list, "slds-is-open");
- }
- });
- $A.enqueueAction(action);
- },
- hideSearch: function (component, event, helper) {
- var hospital_list = component.find("hospital_list");
- $A.util.removeClass(hospital_list, "slds-is-open");
- },
- hideSearchs: function (component, event, helper) {
- var hospital_list = component.find("hospital_list");
- $A.util.removeClass(hospital_list, "slds-is-open");
- component.set("v.hospital", "");
- component.set("v.hospitals", "");
- component.set("v.hospitalLinkId", "");
- component.set("v.data.Agency_Hospital__c", "");
- component.set("v.hospitalId", "");
- },
- selectHos: function (component, event, helper) {
- debugger;
- var hospital_list = component.find("hospital_list");
- $A.util.removeClass(hospital_list, "slds-is-open");
- var accname = event.currentTarget.dataset.accname;
- var accid = event.currentTarget.dataset.accid;
- var hospital_data = component.get("v.hospitalList");
- var select_purpose_type = component
- .find("select_purpose_type")
- .get("v.value");
- for (var i = 0; i < hospital_data.length; i++) {
- if (hospital_data[i].Hospital__c == accid) {
- component.set("v.hospitalLinkId", hospital_data[i].Id);
- component.set("v.data.Agency_Hospital__c", hospital_data[i].Id);
- if (select_purpose_type != "绉戝浼�" && hospital_data[i].Hospital__c) {
- component.find("new_con").set("v.disabled", false);
- } else {
- component.find("new_con").set("v.disabled", true);
- }
- }
- }
- component.set("v.hospitals", accname);
- component.set("v.hospital", accname);
- component.set("v.hospitalId", accid);
- debugger;
- component.set("v.setdoctorlisthos", true);
- this.set_doctor_list(component, event, helper);
- },
-
- //妯$硦鏌ヨ浣跨敤浜у搧1(浜у搧鍨嬪彿)
- searchUseProduct1: function (component, event, helper) {
- var UseProduct1Name = event.getParam("value");
- var select_ProductClassification = component
- .find("select_ProductClassification")
- .get("v.value");
- var action = component.get("c.getUseProduct1");
- action.setParams({
- UseProduct1Name: UseProduct1Name,
- select_ProductClassification: select_ProductClassification
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state === "SUCCESS") {
- var UseProduct1_List = component.find("UseProduct1_List");
- var UseProduct1ListValue = response.getReturnValue();
- if (UseProduct1ListValue.length > 0) {
- $A.util.addClass(UseProduct1_List, "slds-is-open");
- } else {
- $A.util.removeClass(UseProduct1_List, "slds-is-open");
- }
- component.set("v.UseProduct1List", UseProduct1ListValue);
- } else {
- $A.util.removeClass(UseProduct1_List, "slds-is-open");
- }
- });
- $A.enqueueAction(action);
- },
- hideSearchUseProduct1: function (component, event, helper) {
- var UseProduct1_List = component.find("UseProduct1_List");
- $A.util.removeClass(UseProduct1_List, "slds-is-open");
- },
- hideSearchUseProduct1s: function (component, event, helper) {
- var UseProduct1_List = component.find("UseProduct1_List");
- $A.util.removeClass(UseProduct1_List, "slds-is-open");
- component.set("v.UseProduct1", "");
- component.set("v.UseProduct1s", "");
- component.set("v.UseProduct1Id", "");
- component.set("v.data.UseProduct1__c", "");
- },
- seletUseProduct1Change: function (component, event, helper) {
- debugger;
- var UseProduct1_List = component.find("UseProduct1_List");
- $A.util.removeClass(UseProduct1_List, "slds-is-open");
- var accname = event.currentTarget.dataset.accname;
- var accid = event.currentTarget.dataset.accid;
- var UseProduct1ListDate = component.get("v.UseProduct1List");
- for (var i = 0; i < UseProduct1ListDate.length; i++) {
- if (UseProduct1ListDate[i].Id == accid) {
- component.set("v.UseProduct1Id", UseProduct1ListDate[i].Id);
- component.set("v.data.UseProduct1__c", UseProduct1ListDate[i].Id);
- }
- }
- var UseProduct2_TEXT = component.find("UseProduct2_TEXT").get("v.value");
- var UseProduct3_TEXT = component.find("UseProduct3_TEXT").get("v.value");
- if (UseProduct2_TEXT != accname && UseProduct3_TEXT != accname) {
- component.set("v.UseProduct1s", accname);
- component.set("v.UseProduct1", accname);
- } else {
- component.set("v.errorMessage", "涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝�");
- this.showErrorToast(component);
- }
- },
- //妯$硦鏌ヨ浣跨敤浜у搧2
- searchUseProduct2: function (component, event, helper) {
- var UseProduct2Name = event.getParam("value");
- var select_ProductClassification = component
- .find("select_ProductClassification")
- .get("v.value");
- var action = component.get("c.getUseProduct1");
- action.setParams({
- UseProduct1Name: UseProduct2Name,
- select_ProductClassification: select_ProductClassification
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state === "SUCCESS") {
- var UseProduct2_List = component.find("UseProduct2_List");
- var UseProduct2List = response.getReturnValue();
- if (UseProduct2List.length > 0) {
- $A.util.addClass(UseProduct2_List, "slds-is-open");
- } else {
- $A.util.removeClass(UseProduct2_List, "slds-is-open");
- }
- component.set("v.UseProduct2List", response.getReturnValue());
- } else {
- $A.util.removeClass(UseProduct2_List, "slds-is-open");
- }
- });
- $A.enqueueAction(action);
- },
- hideSearchUseProduct2: function (component, event, helper) {
- var UseProduct2_List = component.find("UseProduct2_List");
- $A.util.removeClass(UseProduct2_List, "slds-is-open");
- },
- hideSearchUseProduct2s: function (component, event, helper) {
- var UseProduct2_List = component.find("UseProduct2_List");
- $A.util.removeClass(UseProduct2_List, "slds-is-open");
- component.set("v.UseProduct2", "");
- component.set("v.UseProduct2s", "");
- component.set("v.UseProduct2Id", "");
- component.set("v.data.UseProduct2__c", "");
- },
- seletUseProduct2Change: function (component, event, helper) {
- var UseProduct2_List = component.find("UseProduct2_List");
- $A.util.removeClass(UseProduct2_List, "slds-is-open");
- var accname = event.currentTarget.dataset.accname;
- var accid = event.currentTarget.dataset.accid;
- var UseProduct2ListDate = component.get("v.UseProduct2List");
- for (var i = 0; i < UseProduct2ListDate.length; i++) {
- if (UseProduct2ListDate[i].Id == accid) {
- component.set("v.UseProduct2Id", UseProduct2ListDate[i].Id);
- component.set("v.data.UseProduct2__c", UseProduct2ListDate[i].Id);
- }
- }
- var UseProduct1_TEXT = component.find("UseProduct1_TEXT").get("v.value");
- var UseProduct3_TEXT = component.find("UseProduct3_TEXT").get("v.value");
- if (UseProduct1_TEXT != accname && UseProduct3_TEXT != accname) {
- component.set("v.UseProduct2s", accname);
- component.set("v.UseProduct2", accname);
- } else {
- component.set("v.errorMessage", "涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝�");
- this.showErrorToast(component);
- }
- },
- //妯$硦鏌ヨ浣跨敤浜у搧3
- searchUseProduct3: function (component, event, helper) {
- var UseProduct3Name = event.getParam("value");
- var select_ProductClassification = component
- .find("select_ProductClassification")
- .get("v.value");
- var action = component.get("c.getUseProduct1");
- action.setParams({
- UseProduct1Name: UseProduct3Name,
- select_ProductClassification: select_ProductClassification
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state === "SUCCESS") {
- var UseProduct3_List = component.find("UseProduct3_List");
- var UseProduct3List = response.getReturnValue();
- if (UseProduct3List.length > 0) {
- $A.util.addClass(UseProduct3_List, "slds-is-open");
- } else {
- $A.util.removeClass(UseProduct3_List, "slds-is-open");
- }
- component.set("v.UseProduct3List", response.getReturnValue());
- } else {
- $A.util.removeClass(UseProduct3_List, "slds-is-open");
- }
- });
- $A.enqueueAction(action);
- },
- hideSearchUseProduct3: function (component, event, helper) {
- var UseProduct3_List = component.find("UseProduct3_List");
- $A.util.removeClass(UseProduct3_List, "slds-is-open");
- },
- hideSearchUseProduct3s: function (component, event, helper) {
- var UseProduct3_List = component.find("UseProduct3_List");
- $A.util.removeClass(UseProduct3_List, "slds-is-open");
- component.set("v.UseProduct3", "");
- component.set("v.UseProduct3s", "");
- component.set("v.UseProduct3Id", "");
- component.set("v.data.UseProduct3__c", "");
- },
- seletUseProduct3Change: function (component, event, helper) {
- var UseProduct3_List = component.find("UseProduct3_List");
- $A.util.removeClass(UseProduct3_List, "slds-is-open");
- var accname = event.currentTarget.dataset.accname;
- var accid = event.currentTarget.dataset.accid;
- var UseProduct3ListDate = component.get("v.UseProduct3List");
- for (var i = 0; i < UseProduct3ListDate.length; i++) {
- if (UseProduct3ListDate[i].Id == accid) {
- component.set("v.UseProduct3Id", UseProduct3ListDate[i].Id);
- component.set("v.data.UseProduct3__c", UseProduct3ListDate[i].Id);
- }
- }
- var UseProduct1_TEXT = component.find("UseProduct1_TEXT").get("v.value");
- var UseProduct2_TEXT = component.find("UseProduct2_TEXT").get("v.value");
- if (UseProduct1_TEXT != accname && UseProduct2_TEXT != accname) {
- component.set("v.UseProduct3s", accname);
- component.set("v.UseProduct3", accname);
- } else {
- component.set("v.errorMessage", "涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝�");
- this.showErrorToast(component);
- }
- },
- //hospitalLinkId 缁忛攢鍟嗗尰闄㈢殑ID 鎷滆浜哄鍒剁殑鍦版柟
- doctor_change: function (component, event, helper) {
- debugger;
- var doctorurpose = component.find("select_purpose_type").get("v.value");
- var doctor_value = component.find("select_doctor").get("v.value");
- var doctor_list = component.get("v.doctor_list");
- var flg = false;
- if (doctor_list) {
- for (var i = 0; i < doctor_list.length; i++) {
- if (doctor_list[i].value == doctor_value) {
- if (doctorurpose == "绉戝浼�") {
- // component.set('v.doctor_title', doctor_list[i].Doctor_Division1__c);
- } else {
- component.set("v.doctor_title", doctor_list[i].Doctor_Division1__c);
- }
- flg = true;
- break;
- }
- }
- }
- if (flg == false) {
- component.set("v.doctor_title", "");
- }
- },
- //SWAG-CF58C3 fy start 璋冪敤pi
- set_aws_url: function (component, sobject) {
- var action = component.get("c.getAwsurl");
- action.setParams({
- sobj: sobject
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var awsmap = this.conv_selected(response.getReturnValue());
- component.set("v.AWStoken", awsmap.token);
- component.set("v.AWSinsert", awsmap.newUrl);
- component.set("v.AWSsearch", awsmap.searchUrl);
- component.set("v.AWStransactionURL", awsmap.transactionURL);
- } else {
- component.set("v.errorMessage", "AWS url/token error.");
- this.showErrorToast(component);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- },
-
- insert_agencycontact: function (
- component,
- token,
- newUrl,
- payload,
- agencyHospitalid,
- helper,
- hospitalName
- ) {
- debugger;
- console.log("newUrl = " + newUrl);
- console.log("payload = " + payload);
- console.log("token = " + token);
- fetch(newUrl, {
- method: "POST",
- body: payload,
- headers: {
- "Content-Type": "application/json",
- "pi-token": token
- }
- })
- .then((data) => {
- return data.json();
- })
- .then((result) => {
- console.log("result = " + JSON.stringify(result));
- if (result.status == "0") {
- $A.getCallback(function () {
- helper.to_agencycontact(component, result, agencyHospitalid);
- })();
- } else {
- console.log("AWS status error:" + result);
- component.set("v.login", false);
- if (result.status == "129") {
- component
- .find("OppMessage")
- .setError(
- "璇ュ鎴蜂汉鍛樺悕瀛楀凡瀛樺湪锛屽湪" + hospitalName + "鍖婚櫌锛岃淇敼"
- );
- } else {
- component.find("OppMessage").setError("AWS insert error.");
- }
- }
- })
- .catch((error) => {
- console.log("AWS insert error:" + error);
- component.set("v.login", false);
- component.find("OppMessage").setError("AWS insert error.");
- });
- },
-
- to_agencycontact: function (component, result, agencyHospitalid) {
- var action = component.get("c.saveAgencyContact");
- action.setParams({
- name: result.object[0].name,
- //"nameEncrypt" : result.object[0].nameEncrypt, //zhj 鏂版柟妗堟敼閫� 2023-12-21
- type: result.object[0].type,
- //"typeEncrypt" : result.object[0].typeEncrypt, //zhj 鏂版柟妗堟敼閫� 2023-12-21
- doctorDivision1: result.object[0].doctorDivision1,
- //"doctorDivision1Encrypt" : result.object[0].doctorDivision1Encrypt, //zhj 鏂版柟妗堟敼閫� 2023-12-21
- agencyHospitalid: agencyHospitalid,
- awsid: result.object[0].dataId
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var acMap = this.conv_selected(response.getReturnValue());
- console.log(acMap);
- if (acMap.AgencyContactId != "") {
- //纭浜嬪姟
- var token = component.get("v.AWStoken");
- var confirmUrl = component.get("v.AWStransactionURL");
-
- let data = Object.create(null);
- data["isSuccess"] = 1;
- data["sfRecordId"] = "";
- data["txId"] = result.txId;
-
- this.to_confirm(component, token, confirmUrl, JSON.stringify(data));
- } else if (acMap.errormsg != "") {
- component.set("v.errorMessage", acMap.errormsg);
- this.showErrorToast(component);
- component.set("v.login", false);
- } else {
- component.set("v.errorMessage", "agency contact insert id error.");
- this.showErrorToast(component);
- component.set("v.login", false);
- }
- } else {
- component.set("v.errorMessage", "agency contact insert error.");
- this.showErrorToast(component);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- },
-
- to_confirm: function (component, token, confirmUrl, payload, event) {
- fetch(confirmUrl, {
- method: "POST",
- body: payload,
- headers: {
- "Content-Type": "application/json",
- "pi-token": token
- }
- })
- .then((data) => {
- return data.json();
- })
- .then((result) => {
- if (
- result.status == "0" &&
- result.hasOwnProperty("success") &&
- result.success
- ) {
- // component.set('v.truthy', false);
- // var modal_newAC = component.find('modal_newAC')
- // $A.util.addClass(modal_newAC, 'disp_none');
- // this.success('.瀹㈡埛浜哄憳宸插垱寤恒��');
- // this.set_doctor_list(component);
-
- component.set("v.truthy", false);
- var modal_newAC = component.find("modal_newAC");
- $A.util.addClass(modal_newAC, "disp_none");
- component.set("v.successMessage", ".鎷滆浜哄凡鍒涘缓銆�");
- this.showSuccessToast(component);
- this.set_doctor_list(component);
- } else {
- component.set("v.errorMessage", "AWS confirm error.");
- this.showErrorToast(component);
- component.set("v.login", false);
- }
- })
- .catch((error) => {
- component.set("v.errorMessage", "AWS confirm error.");
- this.showErrorToast(component);
- component.set("v.login", false);
- });
- },
- //SWAG-CF58C3 fy end 璋冪敤pi
-
- set_doctor_list: function (component) {
- console.log("set_doctor_list");
- var doctor_value = component.find("select_purpose_type").get("v.value");
- var hospital_id = component.get("v.hospitalLinkId");
- console.log("hospital_id = " + hospital_id);
- if (hospital_id) {
- if (doctor_value == "绉戝浼�") {
- component.set("v.login", true);
- this.set_doctor_list2(component);
- } else {
- component.set("v.login", true);
- var action = component.get("c.getDoctorList");
- action.setParams({
- hospital_id: hospital_id
- });
+ this.report_date_list(component, event, helper, 5);
+ component.set('v.login', true);
+ var action = component.get('c.getalldata');
action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- debugger;
- var res = this.conv_selected(response.getReturnValue());
- //fy
- var setdoctorlisthos = component.get("v.setdoctorlisthos");
- if (setdoctorlisthos) {
- component.set("v.default_select_doctor_id", "");
- component.set("v.setdoctorlisthos", false);
- }
- //fy
- var default_doctor = component.get("v.default_select_doctor_id");
- if (default_doctor != "" && res.length > 0) {
- var doctor_title = "";
- let awsids = [];
- for (var i = 0; i < res.length; i++) {
- if (res[i].value == default_doctor) {
- res[i].selected = true;
- doctor_title = res[i].Doctor_Division1__c;
- } else {
- res[i].selected = false;
- }
- if (res[i].AWS_Data_Id__c) {
- awsids.push(res[i].AWS_Data_Id__c);
- }
- }
- component.find("select_doctor").set("v.options", res);
- component.set("v.doctor_title", doctor_title);
- console.log("awsids = " + JSON.stringify(awsids));
- if (awsids.length > 0) {
- let PIConfig = component.get("v.PIConfig");
- let staticResourceAgencyContact = JSON.parse(
- PIConfig.staticResourceAgencyContact
- );
- AWSService.search(
- staticResourceAgencyContact.searchUrl,
- {
- dataIds: awsids
- },
- function (data) {
- console.log("data = " + JSON.stringify(data));
- if (data && data.object && data.object.length) {
- let m = {};
- for (let di in data.object) {
- if (data.object[di] && data.object[di].dataId) {
- m[data.object[di].dataId] = data.object[di];
- }
- }
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component.set('v.alldata', res.reports);
+ component.set('v.fieldsmap', res.fieldsMap);
+ component.set('v.allselectlist', res.allselectlist);
+ component.set('v.doclist', res.doclist);
+ //fy
- for (let ri in res) {
- if (
- res[ri] &&
- res[ri].AWS_Data_Id__c &&
- m.hasOwnProperty(res[ri].AWS_Data_Id__c)
- ) {
- res[ri].label = m[res[ri].AWS_Data_Id__c].name;
- }
- }
- component.find("select_doctor").set("v.options", res);
- }
-
- component.set("v.login", false);
- },
- staticResourceAgencyContact.token
+ var xx = res.UserProType;
+ component.set('v.UserProType', res.UserProType);
+ var gg = component.get('v.UserProType');
+ //fy
+ component
+ .find('select_agency_person')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.AgencyPerson__c)
+ );
+ component
+ .find('select_DealerPersonnel')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.DealerPersonnel__c)
+ );
+ component
+ .find('select_purpose_type')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.WorkRecord__c)
+ );
+ component
+ .find('select_ProductClassification')
+ .set(
+ 'v.options',
+ this.conv_selected(
+ res.allselectlist.ProductClassification__c
+ )
+ );
+ component
+ .find('select_stageName')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.StageName__c)
+ );
+ component.set(
+ 'v.selected_agency_person',
+ res.allselectlist.AgencyPerson__c[0].label
);
- }
+ component.set('v.dialog_type', '鏂板缓');
+ this.get_reports(
+ component,
+ event,
+ helper,
+ component.find('select_date').get('v.value'),
+ component.find('select_agency_person').get('v.value')
+ );
+
+ component.set('v.PIConfig', res.PIConfig); // 20220222 PI鏀归�� by Bright
+ component.set('v.login', false);
} else {
- let awsids = [];
- for (var i = 0; i < res.length; i++) {
- if (res[i].AWS_Data_Id__c) {
- awsids.push(res[i].AWS_Data_Id__c);
- }
- }
- component.find("select_doctor").set("v.options", res);
- if (awsids.length > 0) {
- let PIConfig = component.get("v.PIConfig");
- let staticResourceAgencyContact = JSON.parse(
- PIConfig.staticResourceAgencyContact
- );
- AWSService.search(
- staticResourceAgencyContact.searchUrl,
- {
- dataIds: awsids
- },
- function (data) {
- if (data && data.object && data.object.length) {
- let m = {};
- for (let di in data.object) {
- if (data.object[di] && data.object[di].dataId) {
- m[data.object[di].dataId] = data.object[di];
- }
- }
-
- for (let ri in res) {
- if (
- res[ri] &&
- res[ri].AWS_Data_Id__c &&
- m.hasOwnProperty(res[ri].AWS_Data_Id__c)
- ) {
- res[ri].label = m[res[ri].AWS_Data_Id__c].name;
- }
- }
- component.find("select_doctor").set("v.options", res);
- }
-
- component.set("v.login", false);
- },
- staticResourceAgencyContact.token
- );
- }
- // component.find('select_doctor').set('v.options', res);
- if (res.length > 0) {
- component.set("v.doctor_title", res[0].Doctor_Division1__c);
- }
+ //component.set('v.errorMessage', 'doinit failed.');
+ this.error('doinit failed.');
+ //this.showErrorToast(component);
+ component.set('v.login', false);
}
- // component.set('v.default_select_doctor_id', '');
- debugger;
- component.set("v.doctor_list", res);
- component.set("v.login", false);
- } else {
- component.set("v.errorMessage", "set_doctor_list failed.");
- this.showErrorToast(component);
- component.set("v.login", false);
- }
});
$A.enqueueAction(action);
- }
- } else {
- if (doctor_value == "绉戝浼�") {
- this.set_doctor_list2(component);
- } else {
- component.find("select_doctor").set("v.options", "");
- }
- }
- }, //fy 20220414
- set_doctor_list2: function (component) {
- var action1 = component.get("c.selectdoctor3c");
- action1.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = response.getReturnValue();
- debugger;
- for (var i = 0; i < res.length; i++) {
- if (res[i].selected == "true") {
- res[i].selected = true;
- } else {
- res[i].selected = false;
- }
- }
- debugger;
- component.find("select_doctor").set("v.options", res);
- var doctor3value = component.get("v.default_select_doctor_id2");
- this.set_selected(component, "select_doctor", doctor3value);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action1);
- },
- productcategoryChange1: function (component, event, helper) {
- var product_category_id = component.find("select_Product1").get("v.value");
- var pcId1 = component.find("select_Product2").get("v.value");
- var pcId2 = component.find("select_Product3").get("v.value");
- var p1bool = pcId1 != "" && pcId1 != null && pcId1 != undefined;
- var p2bool = pcId2 != "" && pcId2 != null && pcId2 != undefined;
- var p0bool =
- product_category_id != "" &&
- product_category_id != null &&
- product_category_id != undefined;
- if (
- (p1bool && p0bool && product_category_id == pcId1) ||
- (p2bool && p0bool && product_category_id == pcId2)
- ) {
- component.set("v.errorMessage", "涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�");
- this.showErrorToast(component);
- component.find("select_Product1").set("v.value", "");
- }
- },
- productcategoryChange2: function (component, event, helper) {
- var product_category_id = component.find("UseProduct2_TEXT").get("v.value");
- var pcId1 = component.find("UseProduct1_TEXT").get("v.value");
- var pcId2 = component.find("UseProduct3_TEXT").get("v.value");
- var p1bool = pcId1 != "" && pcId1 != null;
- var p2bool = pcId2 != "" && pcId2 != null;
- var p0bool = product_category_id != "" && product_category_id != null;
- if (
- (p1bool && p0bool && product_category_id == pcId1) ||
- (p2bool && p0bool && product_category_id == pcId2)
- ) {
- component.set("v.errorMessage", "涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�");
- this.showErrorToast(component);
- component.set("v.UseProduct2_TEXT", "");
- }
- },
- productcategoryChange3: function (component, event, helper) {
- var product_category_id = component.find("select_Product3").get("v.value");
- var pcId1 = component.find("select_Product1").get("v.value");
- var pcId2 = component.find("select_Product2").get("v.value");
- var p1bool = pcId1 != "" && pcId1 != null && pcId1 != undefined;
- var p2bool = pcId2 != "" && pcId2 != null && pcId2 != undefined;
- var p0bool =
- product_category_id != "" &&
- product_category_id != null &&
- product_category_id != undefined;
- if (
- (p1bool && p0bool && product_category_id == pcId1) ||
- (p2bool && p0bool && product_category_id == pcId2)
- ) {
- component.set("v.errorMessage", "涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�");
- this.showErrorToast(component);
- component.find("select_Product3").set("v.value", "");
- }
- },
- conv_selected: function (obj) {
- for (var i = 0; i < obj.length; i++) {
- if (obj[i].selected) {
- if (obj[i].selected == "true") {
- obj[i].selected = true;
- } else {
- obj[i].selected = false;
- }
- }
- }
- return obj;
- },
- set_selected: function (component, aura_id_name, value) {
- debugger;
- var select_tmp = component.find(aura_id_name).get("v.options");
- if (select_tmp) {
- for (var i = 0; i < select_tmp.length; i++) {
- if (select_tmp[i].value == value) {
- select_tmp[i].selected = true;
- } else {
- select_tmp[i].selected = false;
- }
- }
- component.find(aura_id_name).set("v.options", select_tmp);
- return true;
- } else {
- return false;
- }
- },
- //寮瑰嚭 鎴愬姛鎻愮ず
- showSuccessToast: function (component) {
- debugger;
- $A.util.removeClass(component.find("successDiv"), "slds-hide");
- window.setTimeout(
- $A.getCallback(function () {
- $A.util.addClass(component.find("successDiv"), "slds-hide");
- }),
- 3000
- );
- },
- //寮瑰嚭 鎴愬姛鎻愮ず
- showSuccessToast01: function (component) {
- debugger;
- $A.util.removeClass(component.find("successDiv01"), "slds-hide");
- window.setTimeout(
- $A.getCallback(function () {
- $A.util.addClass(component.find("successDiv01"), "slds-hide");
- }),
- 3000
- );
- },
- //寮瑰嚭 閿欒鎻愮ず
- showErrorToast: function (component) {
- debugger;
- $A.util.removeClass(component.find("errorDiv"), "slds-hide");
- window.setTimeout(
- $A.getCallback(function () {
- $A.util.addClass(component.find("errorDiv"), "slds-hide");
- }),
- 3000
- );
- },
- //寮瑰嚭 閿欒鎻愮ず
- showErrorToast01: function (component) {
- debugger;
- $A.util.removeClass(component.find("errorDiv01"), "slds-hide");
- window.setTimeout(
- $A.getCallback(function () {
- $A.util.addClass(component.find("errorDiv01"), "slds-hide");
- }),
- 6000
- );
- },
- error: function (message) {
- var toastEvent = $A.get("e.force:showToast");
- toastEvent.setParams({
- title: "閿欒!",
- message: message,
- type: "error",
- duration: "sticky"
- });
- toastEvent.fire();
- },
- createCon: function (component, event, helper) {
- var modal_newAC = component.find("modal_newAC");
- $A.util.removeClass(modal_newAC, "disp_none");
- component.set("v.truthy", true);
- },
- hideCmp: function (component, event, helper) {
- var div1 = component.find("report");
- var div2 = component.find("report_list");
- $A.util.addClass(div1, "disp_none");
- $A.util.addClass(div2, "disp_none");
- },
- handleSuccess: function (component, event, helper) {
- var insertId = event.getParams().response.Id;
- var displayValue = event.getParams().response.fields.Name.value;
- event.setParams({});
- component.set("v.truthy", false);
- var modal_newAC = component.find("modal_newAC");
- $A.util.addClass(modal_newAC, "disp_none");
- component.set("v.successMessage", ".鎷滆浜哄凡鍒涘缓銆�");
- this.showSuccessToast(component);
- this.set_doctor_list(component, event, helper);
- },
- createCancel: function (component, event, helper) {
- component.set("v.truthy", false);
- var modal_newAC = component.find("modal_newAC");
- $A.util.addClass(modal_newAC, "disp_none");
- component.find("OppMessage").setError("");
- },
- //绉戝璧嬪��
- setOpportunity_cfilter: function (component) {
- var hosId = component.get("v.hospitalId");
- var Department_Cateogy__c = component
- .find("select_department")
- .get("v.value");
- var opportunity_cfilter = "";
- if (hosId != "" && hosId != null) {
- opportunity_cfilter =
- " Agency_Hospital__r.Hospital__c=" + "'" + hosId + "'";
- }
- if (Department_Cateogy__c != "" && Department_Cateogy__c != null) {
- if (opportunity_cfilter != "" && opportunity_cfilter != null) {
- opportunity_cfilter += " AND ";
- }
- // fy Department_Cateogy_text__c
- opportunity_cfilter +=
- "Department_Cateogy__c=" + "'" + Department_Cateogy__c + "'";
- // opportunity_cfilter += 'Department_Cateogy_text__c=' + '\'' + Department_Cateogy__c + '\'';
- }
- component.set("v.opportunity_cfilter", opportunity_cfilter);
- },
- readFile: function (component, helper, file) {
- if (!file) return;
- if (!file.name.match(/\.(csv||CSV)$/)) {
- return alert("only support csv files");
- } else {
- reader = new FileReader();
- reader.onerror = function errorHandler(evt) {
- switch (evt.target.error.code) {
- case evt.target.error.NOT_FOUND_ERR:
- alert("File Not Found!");
- break;
- case evt.target.error.NOT_READABLE_ERR:
- alert("File is not readable");
- break;
- case evt.target.error.ABORT_ERR:
- break; // noop
- default:
- alert("An error occurred reading this file.");
- }
- };
- reader.onabort = function (e) {
- alert("File read cancelled");
- };
- reader.onloadstart = function (e) {
- var output =
- '<ui type="disc"><li><strong>' +
- file.name +
- "</strong> (" +
- file.type +
- ")- " +
- file.size +
- "bytes, last modified: " +
- file.lastModifiedDate.toLocaleDateString() +
- "</li></ui>";
- component.set("v.filename", file.name);
- component.set("v.TargetFileName", output);
- };
- reader.onload = function (e) {
- debugger;
- var data = e.target.result;
+ },
+ doinitSave: function (component, event, helper) {
+ document.title = '杩芥函鏃ユ姤';
+ component.set('v.loginEdit', true);
+ this.report_date_list(component, event, helper, 5);
+ var action = component.get('c.getalldata');
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component.set('v.alldata', res.reports);
+ component.set('v.fieldsmap', res.fieldsMap);
+ component.set('v.allselectlist', res.allselectlist);
+ component.set('v.doclist', res.doclist);
+ //fy
- component.set("v.fileContentData", data);
- console.log("file data" + JSON.stringify(data));
- var allTextLines = data.split(/\r\n|\n/);
- console.log("qqqqqqqqqqqqqqqqqqq" + allTextLines);
- var dataRows = allTextLines.length - 1;
- var headers = allTextLines[0].split(",");
- var numOfRows = component.get("v.NumOfRecords");
- if (dataRows > numOfRows + 1 || dataRows == 1 || dataRows == 0) {
- alert("File Rows between 1 to " + numOfRows + " .");
- component.set("v.showMain", true);
- } else {
- var lines = [];
- var filecontentdata;
- var content =
- '<table class="table slds-table slds-table--bordered slds-table--cell-buffer">';
- content += '<thead><tr class="slds-text-title--caps">';
- content += '<th scope="col">' + "琛屽彿" + "</th>";
- for (i = 0; i < headers.length; i++) {
- content += '<th scope="col">' + headers[i] + "</th>";
- }
- content += "</tr></thead>";
- for (var i = 1; i < allTextLines.length; i++) {
- filecontentdata = allTextLines[i].split(",");
- if (filecontentdata[0] != "") {
- content += "<tr>";
- content += "<td>" + i + "</td>";
- for (var j = 0; j < filecontentdata.length; j++) {
- content += "<td>" + filecontentdata[j] + "</td>";
- }
- content += "</tr>";
- }
- }
- content += "</table>";
- console.log(content);
- component.set("v.TableContent", content);
- component.set("v.showMain", false);
- }
- };
- reader.readAsText(file, "gb2312");
- }
- var reader = new FileReader();
- reader.onloadend = function () {};
- reader.readAsDataURL(file);
- },
- // fy 璋冪敤pi鏀归�犵殑 鑾峰彇url 鍜� token鐨勬柟娉�
- search_contact_url: function (component, sobject, callback) {
- var action = component.get("c.getAwsurl");
- action.setParams({
- sobj: sobject
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var result = response.getReturnValue();
- if (callback) callback(result);
- } else {
- component.set("v.errorMessage", "AWS url/token error.");
- this.showErrorToast01(component);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- },
- // fy 璋冪敤pi鏀归�犵殑 鑾峰彇.瀹㈡埛浜哄憳鐨勬柟娉�
- search_core: function (token, searchUrl, payload, callback, component) {
- console.log("searchUrl = " + searchUrl);
- fetch(searchUrl, {
- method: "POST",
- body: payload,
- headers: {
- "Content-Type": "application/json",
- "pi-token": token
- }
- })
- .then((data) => {
- return data.json();
- })
- .then((result) => {
- component.set("v.login", false);
- if (callback) callback(result);
- })
- .catch((error) => {
- console.log("AWS search error = " + JSON.stringify(error));
- component.set("v.errorMessage", "AWS search error.");
- this.showErrorToast01(component);
- component.set("v.login", false);
- });
- },
- saveRecords: function (component, event, helper) {
- component.set("v.login", true);
- //fy 瀵煎叆 202200506 start
- var action1 = component.get("c.processDataAWSId");
- action1.setParams({
- fileData: component.get("v.fileContentData")
- });
- action1.setCallback(this, function (response) {
- var state = response.getState();
- if (state === "SUCCESS") {
- debugger;
- var ress = response.getReturnValue();
- if (ress) {
- var valur = ress.split("error1");
- if (valur.length <= 1) {
- var res = JSON.parse(response.getReturnValue());
- debugger;
- var dataArr = new Array();
- var dataMap = new Map();
- res.forEach((item) => {
- if (item.AWS_Data_Id__c) {
- dataArr.push(item.AWS_Data_Id__c);
- //dataMap.set(item.AWS_Data_Id__c,item.Name_Encrypted__c); //zhj 鏂版柟妗堟敼閫� 2022-12-21
- dataMap.set(item.AWS_Data_Id__c, item.AWS_Data_Id__c);
- }
- });
- debugger;
- let obj = Object.create(null);
- obj["dataIds"] = dataArr;
- var payload = JSON.stringify(obj);
- this.search_contact_url(
- component,
- "Agency_Contact__c",
- (result) => {
- var token = result.token;
- var searchUrl = result.searchUrl;
- console.log("token = " + token);
- console.log("searchUrl = " + searchUrl);
- console.log("payload = " + payload);
- this.search_core(
- token,
- searchUrl,
- payload,
- (result) => {
- console.log("result = " + JSON.stringify(result));
- if (result.status == "0") {
- if (result.object != null && result.object.length != 0) {
- component.set("v.login", true);
- this.saveRecordsEditFile(
- component,
- dataMap,
- result.object,
- helper
- );
- } else {
- component.set("v.errorMessage", "AWS search status ");
- this.showErrorToast01(component);
- component.set("v.login", false);
- }
- } else {
- component.set(
- "v.errorMessage",
- "AWS search status : " + result.status
- );
- this.showErrorToast01(component);
- component.set("v.login", false);
- }
- },
- component
+ var xx = res.UserProType;
+ component.set('v.UserProType', res.UserProType);
+ var gg = component.get('v.UserProType');
+ //fy
+ component
+ .find('select_agency_person')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.AgencyPerson__c)
+ );
+ component
+ .find('select_DealerPersonnel')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.DealerPersonnel__c)
+ );
+ component
+ .find('select_purpose_type')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.WorkRecord__c)
+ );
+ component
+ .find('select_ProductClassification')
+ .set(
+ 'v.options',
+ this.conv_selected(
+ res.allselectlist.ProductClassification__c
+ )
+ );
+ component
+ .find('select_stageName')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.StageName__c)
+ );
+ component.set(
+ 'v.selected_agency_person',
+ res.allselectlist.AgencyPerson__c[0].label
);
- }
- );
- } else {
- component.set(
- "v.errorMessage",
- valur[1] + "\n" + "璇蜂慨鏀瑰悗閲嶆柊涓婁紶"
- );
- this.showErrorToast01(component);
- component.set("v.login", false);
- }
- }
- }
- });
- $A.enqueueAction(action1);
- // var action = component.get("c.processData");
- // var fieldsList = ['Name', 'Phone', 'AccountNumber']; //Please write your code dynamic fields
- // var filedata =component.get("v.fileContentData");
- // action.setParams({
- // fileData: filedata,
- // sobjectName: 'Account', //Any object
- // fields: fieldsList
- // });
- // action.setCallback(this, function (response) {
- // var state = response.getState();
- // if (state === "SUCCESS") {
- // var res = response.getReturnValue();
- // var res1 = '';
- // if (res != 'success') {
- // var ress = res.split('=');
- // console.log(ress);
- // for (var i = 0; i < ress.length; i++) {
- // res1 += ress[i].substr(7) + '\n';
- // }
- // console.log("==" + res1);
- // component.set('v.errorMessage', res1 + "璇蜂慨鏀瑰悗閲嶆柊涓婁紶");
- // this.showErrorToast01(component);
- // component.set('v.login', false);
- // } else {
- // component.set('v.successMessage', '瀵煎叆鎴愬姛');
- // this.showSuccessToast01(component);
- // component.set("v.showMain", true);
- // component.set('v.login', false);
- // this.doinit(component, event, helper);
- // }
- // }
- // else if (state === "INCOMPLETE") {
- // component.set('v.login', false);
- // }
- // else if (state === "ERROR") {
- // var errors = response.getError();
- // if (errors) {
- // if (errors[0] && errors[0].message) {
- // console.log("Error message: " +
- // errors[0].message);
- // component.set('v.login', false);
- // }
- // } else {
- // console.log("Unknown error");
- // component.set('v.login', false);
- // }
- // }
- // });
- // $A.enqueueAction(action);
- },
- saveRecordsEditFile: function (component, dataMap, searchData, helper) {
- var searchDataMap = new Map();
- for (var i = 0; i < searchData.length; i++) {
- var sd = searchData[i];
- searchDataMap.set(sd.name.replace(" ", ""), sd.dataId);
- }
- console.log("searchDataMap=" + searchDataMap);
- var error = "";
- var fileData = component.get("v.fileContentData");
- fileData = this.ToCDB(fileData); //鍏ㄨ杞崐瑙�
- var files = fileData.split("\n");
+ component.set('v.dialog_type', '鏂板缓');
+ this.get_reports(
+ component,
+ event,
+ helper,
+ component.find('select_date').get('v.value'),
+ component.find('select_agency_person').get('v.value')
+ );
- var fileStr = files[0];
- fileStr += "\n";
-
- for (var i = 1; i < files.length - 1; i++) {
- if (files[i]) {
- var filelist = files[i].split(",");
- var fileName = filelist[5];
- var WorkRecord = filelist[4];
- if (
- WorkRecord == "SIS" ||
- WorkRecord == "闄㈠唴鍏ラ櫌鐢宠" ||
- WorkRecord == "鏀惰垂椤圭洰鐢宠" ||
- WorkRecord == "绉戝浼�"
- ) {
- if (fileName) {
- if (WorkRecord != "绉戝浼�") {
- if (searchDataMap.get(fileName.replace(" ", ""))) {
- var nameDataId = searchDataMap.get(fileName.replace(" ", ""));
- if (dataMap.get(nameDataId)) {
- filelist[5] = dataMap.get(nameDataId); //zhj 鏂版柟妗堟敼閫� filelist[5]涓嶅啀瀛樼殑nameEncrpt 2022-12-21
- } else {
- error += "error1 绗�" + i + "琛屾暟鎹嫓璁夸汉SF涓嶅瓨鍦�";
- }
- } else {
- error += "error1 绗�" + i + "琛屾暟鎹嫓璁夸汉AWS涓嶅瓨鍦�";
- }
+ component.set('v.PIConfig', res.PIConfig); // 20220222 PI鏀归�� by Bright
+ component.set('v.loginEdit', false);
} else {
- if (filelist[5] != "鍖荤敓" && filelist[5] != "鍖荤敓+鎶ゅ+") {
- //&&filelist[5]!='鍖荤敓锛嬫姢澹�'
- error += "error1 绗�" + i + "琛屾暟鎹嫓璁夸汉涓嶅瓨鍦�";
- }
+ //component.set('v.errorMessage', 'doinit failed.');
+ this.error('doinit failed.');
+ //this.showErrorToast(component);
+ component.set('v.loginEdit', false);
}
- } else {
- error += "error1 绗�" + i + "琛屾暟鎹嫓璁夸汉涓嶈兘涓虹┖";
- }
+ });
+ $A.enqueueAction(action);
+ },
+ //鍏朵粬鍝佺墝浜у搧绫诲埆 涓嬫媺妗嗚祴鍊�
+ selectProductCcategory: function (component) {
+ var select_ProductClassification = component
+ .find('select_ProductClassification')
+ .get('v.value');
+ if (select_ProductClassification != '') {
+ var action = component.get('c.selectProductCcategory');
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component
+ .find('select_ProductCcategory')
+ .set('v.options', JSON.parse(JSON.stringify(res)));
+ }
+ });
+ $A.enqueueAction(action);
} else {
- if (fileName) {
- if (WorkRecord != "绉戝浼�") {
- if (searchDataMap.get(fileName.replace(" ", ""))) {
- var nameDataId = searchDataMap.get(fileName.replace(" ", ""));
- if (dataMap.get(nameDataId)) {
- filelist[5] = dataMap.get(nameDataId);
+ component.find('select_ProductCcategory').set('v.options', []);
+ }
+ },
+ //鏍规嵁鍛ㄥ拰鎷呭綋鏌ヨ鏁版嵁缁欏垵濮嬮〉闈㈣祴鏁版嵁
+ get_reports: function (component, event, helper, date_str, person_str) {
+ if (!date_str) {
+ return false;
+ }
+
+ if (person_str) {
+ var person_str2 = person_str.split(';');
+ if (person_str2.length > 1) {
+ person_str = person_str2[0];
+ }
+ }
+ date_str = this.get_date_string(date_str);
+ var action = component.get('c.getReports');
+ action.setParams({
+ date_str: date_str,
+ person_str: person_str
+ });
+ component.set('v.loginEdit', true);
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component.set('v.reports', res.reports);
+ component.set('v.report_count', res.reports.length);
+ // 鏇存柊淇濆瓨寰屻伄select_data鐢�
+ var report_id = component.get('v.update_select_report_data_id');
+ if (report_id != '') {
+ for (var i = 0; i < res.reports.length; i++) {
+ if (res.reports[i]['Id'] == report_id) {
+ component.set(
+ 'v.select_report_data',
+ res.reports[i]
+ );
+ break;
+ }
+ }
+ component.set('v.update_select_report_data_id', '');
+ }
+ if (res.reports.length > 0) {
+ component.set('v.list_message', '');
+ var flag2 = res.reports.length;
+ //fy 20220414 start
+ var report1 = [];
+ var report2 = [];
+ res.reports.forEach((item) => {
+ if (
+ (item.WorkRecord__c == '绉戝浼�' &&
+ item.doctor3__c != undefined) ||
+ ((item.doctor3__c == undefined ||
+ item.doctor3__c == '' ||
+ item.doctor3__c == '') &&
+ (item.doctor2__r == undefined ||
+ item.doctor2__r == '' ||
+ item.doctor2__r == ''))
+ ) {
+ report1.push(item);
+ } else {
+ report2.push(item);
+ }
+ });
+ res.reports = report2;
+ //fy 20220414 end
+ // PI 鏀归�� By Bright 20220328
+ if (true) {
+ let doctor_awsids = res.reports.map(function (d) {
+ return d.doctor2__r.AWS_Data_Id__c;
+ });
+ let PIConfig = component.get('v.PIConfig');
+ let staticResourceAgencyContact = JSON.parse(
+ PIConfig.staticResourceAgencyContact
+ );
+ if (doctor_awsids.length > 0) {
+ AWSService.search(
+ staticResourceAgencyContact.searchUrl,
+ {
+ dataIds: doctor_awsids
+ },
+ function (data) {
+ if (
+ data &&
+ data.object &&
+ data.object.length
+ ) {
+ let m = {};
+ for (let di in data.object) {
+ if (
+ data.object[di] &&
+ data.object[di].dataId
+ ) {
+ m[data.object[di].dataId] =
+ data.object[di];
+ }
+ }
+
+ for (let ri in res.reports) {
+ if (
+ res.reports[ri] &&
+ res.reports[ri].doctor2__r &&
+ res.reports[ri].doctor2__r
+ .AWS_Data_Id__c &&
+ m.hasOwnProperty(
+ res.reports[ri].doctor2__r
+ .AWS_Data_Id__c
+ )
+ ) {
+ res.reports[
+ ri
+ ].doctor2__r.awsdata =
+ m[
+ res.reports[
+ ri
+ ].doctor2__r.AWS_Data_Id__c
+ ];
+ }
+ }
+ component.set('v.reports', res.reports);
+ component.set(
+ 'v.report_count',
+ res.reports.length
+ );
+ }
+ //fy 20220414 start
+ var reports3 = component.get('v.reports');
+ if (reports3.length < flag2) {
+ res.reports = [...report1, ...reports3];
+ component.set('v.reports', res.reports);
+ component.set(
+ 'v.report_count',
+ res.reports.length
+ );
+ }
+ //fy 20220414 end
+ component.set('v.loginEdit', false);
+ },
+ staticResourceAgencyContact.token
+ );
+ } else {
+ component.set('v.loginEdit', false);
+ }
+ }
} else {
- error += "error1 绗�" + i + "琛屾暟鎹嫓璁夸汉SF涓嶅瓨鍦�";
+ component.set('v.list_message', 'no_data');
+ component.set('v.loginEdit', false);
}
- } else {
- error += "error1 绗�" + i + "琛屾暟鎹嫓璁夸汉AWS涓嶅瓨鍦�";
- }
} else {
- if (filelist[5] != "鍖荤敓" && filelist[5] != "鍖荤敓+鎶ゅ+") {
- //&&filelist[5]!='鍖荤敓锛嬫姢澹�'
- error += "error1 绗�" + i + "琛屾暟鎹嫓璁夸汉涓嶅瓨鍦�";
- }
+ //component.set('v.errorMessage', 'get_reports failed.');
+ this.error('get_reports failed.');
+ //this.showErrorToast(component);
+ component.set('v.loginEdit', false);
}
- }
- }
- fileStr += filelist.toString();
- fileStr += "\n";
- }
- }
-
- if (error != "") {
- console.log("zhj error = " + error);
- let errorArray = error.split("error1");
- let errorDatas = [];
- console.log("errorArray = " + JSON.stringify(errorArray));
- for (var i in errorArray) {
- if (errorArray[i] != "") {
- let errorData = {};
- errorData.errorRow = errorArray[i].trim().substring(1, 2);
- errorData.errorInfo = errorArray[i].trim().substring(5);
- errorDatas.push(errorData);
- }
- }
- console.log("errorDatas =" + JSON.stringify(errorDatas));
- component.set("v.errorData", errorDatas);
- component.set("v.showErrorInfo", true);
-
- console.log("error = " + error);
- component.set("v.errorMessage", error);
- this.showErrorToast01(component);
- console.log("error=" + error);
- component.set("v.login", false);
- return;
- }
-
- console.log("fileStr=" + fileStr);
- $A.getCallback(function () {
- debugger;
- helper.ImportMethod(component, fileStr, helper);
- })();
- },
- ImportMethod: function (component, fileStr, helper) {
- var action = component.get("c.processData");
- var fieldsList = ["Name", "Phone", "AccountNumber"]; //Please write your code dynamic fields
- // var filedata =component.get("v.fileContentData");
- action.setParams({
- fileData: fileStr,
- sobjectName: "Account", //Any object
- fields: fieldsList
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state === "SUCCESS") {
- var res = response.getReturnValue();
- var res1 = "";
- if (res != "success") {
- var ress = res.split("=");
- console.log(ress);
-
- let errorDatas = [];
- for (var i = 0; i < ress.length; i++) {
- res1 += ress[i].substr(7) + "\n";
- if (ress[i] != "") {
- let errorData = {};
- errorData.errorRow = ress[i].substr(7).substring(1, 2);
- errorData.errorInfo = ress[i].substr(7).substring(5);
- errorDatas.push(errorData);
- }
- }
- component.set("v.errorData", errorDatas);
- component.set("v.showErrorInfo", true);
-
- console.log("==" + res1);
- component.set("v.errorMessage", res1 + "璇蜂慨鏀瑰悗閲嶆柊涓婁紶");
- this.showErrorToast01(component);
- component.set("v.login", false);
- } else {
- component.set("v.successMessage", "瀵煎叆鎴愬姛");
- this.showSuccessToast01(component);
- component.set("v.showMain", true);
- component.set("v.login", false);
- this.doinit(component, event, helper);
- }
- } else if (state === "INCOMPLETE") {
- component.set("v.login", false);
- } else if (state === "ERROR") {
- var errors = response.getError();
- if (errors) {
- if (errors[0] && errors[0].message) {
- console.log("Error message: " + errors[0].message);
- component.set("v.login", false);
- }
- } else {
- console.log("Unknown error");
- component.set("v.login", false);
- }
- }
- });
- $A.enqueueAction(action);
- }, //鍏ㄨ杞崐瑙�
- ToCDB: function (str) {
- var tmp = "";
- for (var i = 0; i < str.length; i++) {
- if (str.charCodeAt(i) > 65248 && str.charCodeAt(i) < 65375) {
- tmp += String.fromCharCode(str.charCodeAt(i) - 65248);
- } else {
- tmp += String.fromCharCode(str.charCodeAt(i));
- }
- }
- return tmp;
- },
- //瀵煎嚭鐨凜SV鏂囦欢
- convertArrayOfObjectsToCSV: function (component, objectRecords) {
- var csvStringResult, counter, keys, columnDivider, lineDivider, thkeys;
- if (objectRecords == null || !objectRecords.length) {
- return null;
- }
- columnDivider = ",";
- lineDivider = "\n";
- keys = [
- "Report_Date__c",
- "Agency_Hospital__c",
- "Department_Cateogy_text__c",
- "DealerPersonnel__c",
- "WorkRecord__c",
- "doctor2__c",
- "ProductClassification__c",
- "UseProduct1__c",
- "UseProduct2__c",
- "UseProduct3__c",
- "EffectProgress__c",
- "ConsumptionOfConsumables__c",
- "WarlockClassification__c",
- "ProductCcategory__c",
- "productCategories__c",
- "warlocksNumber__c",
- "WorkMark__c"
- ];
- thkeys = [
- "娲诲姩鏃�",
- "鍖婚櫌",
- "绉戝",
- "缁忛攢鍟嗕汉鍛�",
- "娲诲姩鍖哄垎",
- "鎷滆浜�",
- "浜у搧鍒嗙被(绗笁鍒嗙被)",
- "浣跨敤浜у搧1(浜у搧鍨嬪彿)",
- "浣跨敤浜у搧2",
- "浣跨敤浜у搧3",
- "鏁堟灉/杩涘害",
- "浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺",
- "浜у搧1瀵瑰簲鏈紡鍒嗙被",
- "宸查噰鐢ㄥ叾浠栧搧鐗�",
- "鍏朵粬鍝佺墝浜у搧绫诲埆",
- "浜у搧鐢ㄩ噺",
- "鏀彺闇�姹�"
- ];
- csvStringResult = "";
- csvStringResult += thkeys.join(columnDivider);
- csvStringResult += lineDivider;
- console.log("杩涘叆瀵煎嚭helper");
- for (var i = 0; i < objectRecords.length; i++) {
- counter = 0;
- for (var sTempkey in keys) {
- var skey = keys[sTempkey];
- if (counter > 0) {
- csvStringResult += columnDivider;
- }
- if (typeof objectRecords[i][skey] === "undefined") {
- csvStringResult += "" + "" + "";
- continue;
- }
- if (skey == "Person_In_Charge2__c") {
- csvStringResult += objectRecords[i].Person_In_Charge2__r.Name;
- } else if (skey == "Agency_Hospital__c") {
- csvStringResult += objectRecords[i].Agency_Hospital__r.Name;
- } else if (skey == "DealerPersonnel__c") {
- csvStringResult += objectRecords[i].DealerPersonnel__r.Name;
- } else if (skey == "doctor2__c") {
- csvStringResult += objectRecords[i].doctor2__r.Name;
- } else if (skey == "UseProduct1__c") {
- csvStringResult += objectRecords[i].UseProduct1__r.Asset_Model_No__c;
- } else if (skey == "UseProduct2__c") {
- csvStringResult += objectRecords[i].UseProduct2__r.Asset_Model_No__c;
- } else if (skey == "UseProduct3__c") {
- csvStringResult += objectRecords[i].UseProduct3__r.Asset_Model_No__c;
- } else {
- csvStringResult += objectRecords[i][skey];
- }
- counter++;
- }
- console.log("瀵煎嚭寰幆缁撴潫");
- csvStringResult += lineDivider;
- }
- return csvStringResult;
- },
- // 瀵煎嚭椤甸潰鏄剧ず鐨勬ā鏉�
- showExportDate: function (component, objectRecords) {
- console.log("杩涘叆showexceportdate" + objectRecords);
- var keys = [
- "Report_Date__c",
- "Agency_Hospital__c",
- "Department_Cateogy_text__c",
- "DealerPersonnel__c",
- "WorkRecord__c",
- "doctor2__c",
- "ProductClassification__c",
- "UseProduct1__c",
- "UseProduct2__c",
- "UseProduct3__c",
- "EffectProgress__c",
- "ConsumptionOfConsumables__c",
- "WarlockClassification__c",
- "ProductCcategory__c",
- "productCategories__c",
- "warlocksNumber__c",
- "WorkMark__c"
- ];
- var headers = [
- "娲诲姩鏃�",
- "鍖婚櫌",
- "绉戝",
- "缁忛攢鍟嗕汉鍛�",
- "娲诲姩鍖哄垎",
- "鎷滆浜�",
- "浜у搧鍒嗙被(绗笁鍒嗙被)",
- "浣跨敤浜у搧1(浜у搧鍨嬪彿)",
- "浣跨敤浜у搧2",
- "浣跨敤浜у搧3",
- "鏁堟灉/杩涘害",
- "浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺",
- "浜у搧1瀵瑰簲鏈紡鍒嗙被",
- "宸查噰鐢ㄥ叾浠栧搧鐗�",
- "鍏朵粬鍝佺墝浜у搧绫诲埆",
- "浜у搧鐢ㄩ噺",
- "鏀彺闇�姹�"
- ];
- var content =
- '<table class="table slds-table slds-table--bordered slds-table--cell-buffer">';
- content += '<thead><tr class="slds-text-title--caps">';
- for (i = 0; i < headers.length; i++) {
- content += '<th scope="col">' + headers[i] + "</th>";
- }
- content += "</tr></thead>";
- for (var i = 0; i < objectRecords.length; i++) {
- console.log("for" + content);
- content += "<tr>";
- for (var sTempkey in keys) {
- console.log("for1" + sTempkey);
- var skey = keys[sTempkey];
- if (typeof objectRecords[i][skey] === "undefined") {
- content += "<td>" + "" + "</td>";
- continue;
- }
- console.log("for2" + objectRecords[i].Person_In_Charge2__r.Name);
- if (skey == "Person_In_Charge2__c") {
- content +=
- "<td>" + objectRecords[i].Person_In_Charge2__r.Name + "</td>";
- } else if (skey == "Agency_Hospital__c") {
- content +=
- "<td>" + objectRecords[i].Agency_Hospital__r.Name + "</td>";
- } else if (skey == "DealerPersonnel__c") {
- content +=
- "<td>" + objectRecords[i].DealerPersonnel__r.Name + "</td>";
- } else if (skey == "doctor2__c") {
- content += "<td>" + objectRecords[i].doctor2__r.Name + "</td>";
- } else if (skey == "UseProduct1__c") {
- content +=
- "<td>" +
- objectRecords[i].UseProduct1__r.Asset_Model_No__c +
- "</td>";
- } else if (skey == "UseProduct2__c") {
- content +=
- "<td>" +
- objectRecords[i].UseProduct2__r.Asset_Model_No__c +
- "</td>";
- } else if (skey == "UseProduct3__c") {
- content +=
- "<td>" +
- objectRecords[i].UseProduct3__r.Asset_Model_No__c +
- "</td>";
- } else {
- content += "<td>" + objectRecords[i][skey] + "</td>";
- }
- }
- content += "</tr>";
- }
- content += "</table>";
- console.log("helper寰幆缁撴潫" + content);
- component.set("v.TableContent2", content);
- component.set("v.showMain", false);
- },
-
- select_repores_date: function (component, event, helper) {
- component.set("v.login", true);
- var reportsdate1 = component.find("input-report-date1").get("v.value");
- var reportsdate2 = component.find("input-report-date2").get("v.value");
- console.log(
- "杈撳叆鐨勫紑濮嬫棩鏈�" + reportsdate1 + "杈撳叆鐨勭粨鏉熸棩鏈�" + reportsdate2
- );
- var action = component.get("c.getReportsByDate");
- console.log("杈撳叆鐨勫紑濮嬫棩鏈�1");
- action.setParams({
- date1: reportsdate1,
- date2: reportsdate2
- });
- console.log("杈撳叆鐨勫紑濮嬫棩鏈�2");
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state === "SUCCESS") {
- var res = response.getReturnValue();
- console.log("杈撳叆鐨勫紑濮嬫棩鏈�3" + res);
- component.set("v.login", false);
-
- // PI 鏀归�� By Bright 20220328
- if (true) {
- let awsids = [];
- for (let ri in res) {
- if (
- res[ri] &&
- res[ri].doctor2__r &&
- res[ri].doctor2__r.AWS_Data_Id__c
- ) {
- awsids.push(res[ri].doctor2__r.AWS_Data_Id__c);
- }
- }
- if (awsids.length > 0) {
- let PIConfig = component.get("v.PIConfig");
- let staticResourceAgencyContact = JSON.parse(
- PIConfig.staticResourceAgencyContact
- );
- AWSService.search(
- staticResourceAgencyContact.searchUrl,
- {
- dataIds: awsids
- },
- function (data) {
- if (data && data.object && data.object.length) {
- let m = {};
- for (let di in data.object) {
- if (data.object[di] && data.object[di].dataId) {
- m[data.object[di].dataId] = data.object[di];
- }
- }
-
- for (let ri in res) {
- if (
- res[ri] &&
- res[ri].doctor2__r &&
- res[ri].doctor2__r.AWS_Data_Id__c &&
- m.hasOwnProperty(res[ri].doctor2__r.AWS_Data_Id__c)
- ) {
- res[ri].doctor2__r.Name =
- m[res[ri].doctor2__r.AWS_Data_Id__c].name;
- }
- }
- }
- helper.showExportDate(component, res);
-
- component.set("v.login", false);
- },
- staticResourceAgencyContact.token
- );
- } else {
- helper.showExportDate(component, res);
- }
- }
-
- component.set("v.reports_date", res);
- } else {
- alert("瀵煎嚭澶辫触,璇锋鏌ユ椿鍔ㄦ棩");
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- },
-
- showImport: function (component) {
- var modalimport = component.find("modal_import");
- var modalimportbg = component.find("modal_importbg");
- $A.util.removeClass(modalimport, "disp_none");
- $A.util.removeClass(modalimportbg, "disp_none");
- },
-
- showExport: function (component) {
- var modalimport = component.find("modal_export");
- var modalimportbg = component.find("modal_exportbg");
- $A.util.removeClass(modalimport, "disp_none");
- $A.util.removeClass(modalimportbg, "disp_none");
- },
-
- close_import: function (component) {
- var modalimport = component.find("modal_import");
- var modalimportbg = component.find("modal_importbg");
- $A.util.addClass(modalimport, "disp_none");
- $A.util.addClass(modalimportbg, "disp_none");
- },
-
- close_export: function (component) {
- var modalimport = component.find("modal_export");
- var modalimportbg = component.find("modal_exportbg");
- $A.util.addClass(modalimport, "disp_none");
- $A.util.addClass(modalimportbg, "disp_none");
- },
- //椤甸潰涓殑鏂板缓鑱屼綅鎸夐挳
- newlyBuild: function (component, event, helper) {
- var hospital_id = component.get("v.hospitalLinkId");
- event.preventDefault(); // stop form submission
- var fields = component.find("newOpportunityField");
- var nameer = "";
- var type = "";
- var doctorDivision1 = "";
- fields.forEach(function (field) {
- if (field.get("v.fieldName") === "Name") {
- nameer = field.get("v.value");
- }
- if (field.get("v.fieldName") === "Type__c") {
- type = field.get("v.value");
- }
- if (field.get("v.fieldName") === "Doctor_Division1__c") {
- doctorDivision1 = field.get("v.value");
- }
- });
- if (hospital_id) {
- component.set("v.login", true);
- var action = component.get("c.newlyBuild");
- action.setParams({
- hospital_id: hospital_id,
- nameer: nameer,
- type: type,
- doctorDivision1: doctorDivision1
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = this.conv_selected(response.getReturnValue());
- var default_doctor = component.get("v.default_select_doctor_id");
- if (default_doctor != "" && res.length > 0) {
- var doctor_title = "";
- for (var i = 0; i < res.length; i++) {
- if (res[i].value == default_doctor) {
- res[i].selected = true;
- doctor_title = res[i].Doctor_Division1__c;
- } else {
- res[i].selected = false;
- }
- }
- component.find("select_doctor").set("v.options", res);
- component.set("v.doctor_title", doctor_title);
- } else {
- component.find("select_doctor").set("v.options", res);
- if (res.length > 0) {
- component.set("v.doctor_title", res[0].Doctor_Division1__c);
- }
- }
- component.set("v.default_select_doctor_id", "");
- component.set("v.doctor_list", res);
- component.set("v.login", false);
- } else {
- component.set("v.errorMessage", "newlyBuild failed.");
- this.showErrorToast(component);
- component.set("v.login", false);
- }
- });
- $A.enqueueAction(action);
- }
- },
- //绉戝鍚岀被鑰楁潗楠岃瘉蹇呴』杈撳叆鏁板瓧
- select_ConsumptionOfConsumables: function (component, event, helper) {
- var sc = event.getSource().get("v.value");
- if (sc != null) {
- if (sc.length <= 14) {
- if (sc.replace(/\D/gi, "")) {
- component.set("v.select_ConsumptionOfConsumables", sc);
- } else {
- component.set(
- "v.errorMessage",
- "浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺蹇呴』杈撳叆鏁板瓧!"
- );
- this.showErrorToast(component);
- }
- } else {
- component.set(
- "v.errorMessage",
- "浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺鏈�澶氳緭鍏�14浣嶆暟瀛�!"
+ });
+ $A.enqueueAction(action);
+ },
+ //澶嶅埗鎸夐挳鍙樼伆鑹�
+ select_date_change: function (component, event, helper) {
+ this.get_reports(
+ component,
+ event,
+ helper,
+ component.find('select_date').get('v.value'),
+ component.find('select_agency_person').get('v.value')
);
- this.showErrorToast(component);
- }
- }
- },
- //浜у搧鐢ㄩ噺楠岃瘉蹇呴』杈撳叆鏁板瓧
- select_warlocksNumber: function (component, event, helper) {
- var sc = event.getSource().get("v.value");
- if (sc != null) {
- if (sc.length <= 14) {
- if (sc.replace(/\D/gi, "")) {
- component.set("v.select_warlocksNumber", sc);
+ component.set('v.select_report_data_radio', '');
+ component.find('copy_button').set('v.disabled', true);
+ component.find('delete_button').set('v.disabled', true);
+ },
+
+ select_agency_change: function (component, event, helper) {
+ var select_value = component
+ .find('select_agency_person')
+ .get('v.value');
+ var new_label = this.get_agency_person_name(component, select_value);
+ component.set('v.selected_agency_person', new_label);
+ this.get_reports(
+ component,
+ event,
+ helper,
+ component.find('select_date').get('v.value'),
+ select_value
+ );
+ component.set('v.select_report_data_radio', '');
+ component.find('copy_button').set('v.disabled', true);
+ component.find('delete_button').set('v.disabled', true);
+ },
+
+ get_agency_person_name: function (component, agency_person_value) {
+ var allselectlist = component.get('v.allselectlist.AgencyPerson__c');
+ var new_label = '';
+ for (var i = 0; i < allselectlist.length; i++) {
+ if (agency_person_value == allselectlist[i].value) {
+ new_label = allselectlist[i].label;
+ break;
+ }
+ }
+ return new_label;
+ },
+ //澶嶅埗鍜岀紪杈戝洖鏄剧殑浣嶇疆
+ toggle_report: function (component) {
+ var modal_window = component.find('modal_window');
+ var modal_bg = component.find('modal_bg');
+ if ($A.util.hasClass(modal_window, 'disp_none')) {
+ // OPEN
+ $A.util.removeClass(modal_window, 'disp_none');
+ $A.util.removeClass(modal_bg, 'disp_none');
+ //澶嶅埗 鍜岀紪杈� 鍥炴樉闂鍦ㄨ繖閲岄潰
+ if (
+ component.get('v.mode') == 'edit' ||
+ component.get('v.mode') == 'copy'
+ ) {
+ var select_data = '';
+ if (component.get('v.mode') == 'edit') {
+ select_data = component.get('v.select_report_data');
+ } else if (component.get('v.mode') == 'copy') {
+ select_data = component.get('v.select_report_data_radio');
+ }
+ var reports = component.get('v.reports');
+ var Agency_Hospital_text = '';
+ var Agency_Hospital_parent_id = '';
+ // 鍖婚櫌鍚�
+ if (select_data['Agency_Hospital__c'] != '') {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['Agency_Hospital__c'] ==
+ select_data['Agency_Hospital__c']
+ ) {
+ Agency_Hospital_text =
+ reports[i]['Agency_Hospital__r']['Name'];
+ Agency_Hospital_parent_id =
+ reports[i]['Agency_Hospital__r']['Hospital__c'];
+ }
+ }
+ component.set('v.hospital', Agency_Hospital_text);
+ component.set('v.hospitalId', Agency_Hospital_parent_id);
+ component.set(
+ 'v.hospitalLinkId',
+ select_data['Agency_Hospital__c']
+ );
+ component.find('new_con').set('v.disabled', false);
+ }
+ //浣跨敤浜у搧1(浜у搧鍨嬪彿)
+ var UseProduct1Text = '';
+ var UseProduct1Id = '';
+ if (
+ select_data['UseProduct1__c'] != '' &&
+ select_data['UseProduct1__c'] != undefined
+ ) {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['UseProduct1__c'] ==
+ select_data['UseProduct1__c']
+ ) {
+ UseProduct1Text =
+ reports[i]['UseProduct1__r'][
+ 'Asset_Model_No__c'
+ ];
+ UseProduct1Id = reports[i]['UseProduct1__c'];
+ }
+ }
+ component.set('v.UseProduct1', UseProduct1Text);
+ component.set(
+ 'v.UseProduct1Id',
+ select_data['UseProduct1__c']
+ );
+ }
+ //浣跨敤浜у搧2
+ var UseProduct2Text = '';
+ var UseProduct2Id = '';
+ if (
+ select_data['UseProduct2__c'] != '' &&
+ select_data['UseProduct2__c'] != undefined
+ ) {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['UseProduct2__c'] ==
+ select_data['UseProduct2__c']
+ ) {
+ UseProduct2Text =
+ reports[i]['UseProduct2__r'][
+ 'Asset_Model_No__c'
+ ];
+ UseProduct2Id = reports[i]['UseProduct2__c'];
+ }
+ }
+ component.set('v.UseProduct2', UseProduct2Text);
+ component.set(
+ 'v.UseProduct2Id',
+ select_data['UseProduct2__c']
+ );
+ }
+ //浣跨敤浜у搧3
+ var UseProduct3Text = '';
+ var UseProduct3Id = '';
+ if (
+ select_data['UseProduct3__c'] != '' &&
+ select_data['UseProduct3__c'] != undefined
+ ) {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['UseProduct3__c'] ==
+ select_data['UseProduct3__c']
+ ) {
+ UseProduct3Text =
+ reports[i]['UseProduct3__r'][
+ 'Asset_Model_No__c'
+ ];
+ UseProduct3Id = reports[i]['UseProduct3__c'];
+ }
+ }
+ component.set('v.UseProduct3', UseProduct3Text);
+ component.set(
+ 'v.UseProduct3Id',
+ select_data['UseProduct3__c']
+ );
+ }
+ //娲诲姩鏃�
+ var reportDate;
+ if (select_data['Report_Date__c'] != '') {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['Report_Date__c'] ==
+ select_data['Report_Date__c']
+ ) {
+ reportDate = reports[i]['Report_Date__c'];
+ }
+ }
+ component.set('v.data.Report_Date__c', reportDate);
+ }
+ // 绉戝
+ // if (select_data['Department_Cateogy__c'] != '') {
+ // component.find('select_department').set('v.value',select_data['Department_Cateogy__c']);
+ // }
+ //fy Department_Cateogy_text__c
+ if (select_data['Department_Cateogy_text__c'] != '') {
+ component
+ .find('select_department')
+ .set(
+ 'v.value',
+ select_data['Department_Cateogy_text__c']
+ );
+ }
+ //缁忛攢鍟嗕汉鍛�
+ if (select_data['DealerPersonnel__c'] != '') {
+ this.set_selected(
+ component,
+ 'select_DealerPersonnel',
+ select_data['DealerPersonnel__c']
+ );
+ }
+ // 娲诲姩鍖哄垎
+ if (select_data['WorkRecord__c'] != '') {
+ this.set_selected(
+ component,
+ 'select_purpose_type',
+ select_data['WorkRecord__c']
+ );
+ this.selectPurposeType(component);
+ }
+ // 鎷滆浜�
+ if (select_data['WorkRecord__c'] == '绉戝浼�') {
+ component.set(
+ 'v.default_select_doctor_id2',
+ select_data['doctor3__c']
+ );
+ var a = component.get('v.default_select_doctor_id2');
+ this.set_doctor_list(component);
+ } else {
+ component.set(
+ 'v.default_select_doctor_id',
+ select_data['doctor2__c']
+ );
+ this.set_doctor_list(component);
+ }
+ //浜у搧鍒嗙被(绗笁鍒嗙被)
+ if (select_data['ProductClassification__c'] != null) {
+ this.set_selected(
+ component,
+ 'select_ProductClassification',
+ select_data['ProductClassification__c']
+ );
+ this.selectProductClassification(component);
+ }
+ // 浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺
+ if (select_data['ConsumptionOfConsumables__c'] != '') {
+ component
+ .find('select_ConsumptionOfConsumables')
+ .set(
+ 'v.value',
+ select_data['ConsumptionOfConsumables__c']
+ );
+ }
+ // 浜у搧鐢ㄩ噺
+ if (select_data['warlocksNumber__c'] != '') {
+ component
+ .find('select_warlocksNumber')
+ .set('v.value', select_data['warlocksNumber__c']);
+ }
+ // 鏀彺闇�姹�
+ if (select_data['WorkMark__c'] != false) {
+ component
+ .find('select_WorkMark')
+ .set('v.checked', select_data['WorkMark__c']);
+ }
+ var report_id = component.get('v.edit_copy_select_report_id');
+ if (report_id != '') {
+ var select_EffectProgress1 = '';
+ var WarlockClassification = '';
+ var ProductCcategory = '';
+ var productCategories = '';
+ var i = 0;
+ for (i = 0; i < reports.length; i++) {
+ if (report_id == reports[i]['Id']) {
+ select_EffectProgress1 =
+ reports[i]['EffectProgress__c'];
+ WarlockClassification =
+ reports[i]['WarlockClassification__c'];
+ ProductCcategory =
+ reports[i]['ProductCcategory__c'];
+ productCategories =
+ reports[i]['productCategories__c'];
+ break;
+ }
+ }
+ //鏁堟灉/杩涘害
+ if (
+ select_EffectProgress1 != null &&
+ select_EffectProgress1 != ''
+ ) {
+ component
+ .find('select_EffectProgress')
+ .set('v.value', select_EffectProgress1);
+ }
+ //鏈+鍒嗙被
+ if (
+ WarlockClassification != null &&
+ WarlockClassification != ''
+ ) {
+ component
+ .find('select_OtherBrandConsumables')
+ .set('v.value', WarlockClassification);
+ }
+ //宸查噰鐢ㄥ叾浠栧搧鐗�
+ if (ProductCcategory != null && ProductCcategory != '') {
+ component
+ .find('select_ProductCcategory')
+ .set('v.value', ProductCcategory);
+ this.selectpurposetype(component);
+ }
+ //鍏朵粬鍝佺墝浜у搧绫诲埆
+ if (productCategories != null && productCategories != '') {
+ component
+ .find('select_productCategories')
+ .set('v.value', productCategories);
+ }
+ component.set('v.edit_copy_select_report_id', '');
+ }
+ }
} else {
- component.set("v.errorMessage", "浜у搧鐢ㄩ噺蹇呴』杈撳叆鏁板瓧!");
- this.showErrorToast(component);
+ var select_report_data = component.get('v.select_report_data');
+ var Report_Date__c = component.get('v.data.Report_Date__c');
+ var Agency_Hospital__c = component.get('v.hospitalLinkId');
+ var UseProduct1__c = component.get('v.UseProduct1Id');
+ var UseProduct2__c = component.get('v.UseProduct2Id');
+ var UseProduct3__c = component.get('v.UseProduct3Id');
+ var Department_Cateogy__c = component
+ .find('select_department')
+ .get('v.value');
+ var ConsumptionOfConsumables__c = component
+ .find('select_ConsumptionOfConsumables')
+ .get('v.value');
+ var DealerPersonnel__c = component
+ .find('select_DealerPersonnel')
+ .get('v.value');
+ var doctor2__c = component.find('select_doctor').get('v.value');
+ var WorkRecord__c = component
+ .find('select_purpose_type')
+ .get('v.value');
+ var EffectProgress__c = component
+ .find('select_EffectProgress')
+ .get('v.value');
+ var WarlockClassification__c = component
+ .find('select_OtherBrandConsumables')
+ .get('v.value');
+ var ProductCcategory__c = component
+ .find('select_ProductCcategory')
+ .get('v.value');
+ var productCategories__c = component
+ .find('select_productCategories')
+ .get('v.value');
+ var warlocksNumber__c = component
+ .find('select_warlocksNumber')
+ .get('v.value');
+ var WorkMark__c = component
+ .find('select_WorkMark')
+ .get('v.checked');
+ if (component.get('v.mode') == 'new') {
+ var confirm_title = '璀﹀憡!';
+ var confirm_text = '鏀惧純鏂板缓鏃ユ姤锛�';
+ if (
+ !Report_Date__c &&
+ !Agency_Hospital__c &&
+ !UseProduct1__c &&
+ !UseProduct2__c &&
+ !UseProduct3__c &&
+ !Department_Cateogy__c &&
+ !ConsumptionOfConsumables__c &&
+ !DealerPersonnel__c &&
+ !doctor2__c &&
+ !EffectProgress__c &&
+ !WarlockClassification__c &&
+ !ProductCcategory__c &&
+ !productCategories__c &&
+ !warlocksNumber__c &&
+ !WorkMark__c &&
+ !WorkRecord__c
+ ) {
+ this.allclear(component);
+ $A.util.addClass(modal_window, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
+ this.close_confirm(component, confirm_title, confirm_text);
+ } else {
+ this.close_confirm(component, confirm_title, confirm_text);
+ }
+ } else if (component.get('v.mode') == 'copy') {
+ var confirm_title = '璀﹀憡!';
+ var confirm_text = '鏀惧純鏂板缓鏃ユ姤锛�';
+ if (
+ select_report_data['Report_Date__c'] == Report_Date__c &&
+ select_report_data['Agency_Hospital__c'] ==
+ Agency_Hospital__c &&
+ select_report_data['UseProduct1__c'] == UseProduct1__c &&
+ select_report_data['UseProduct2__c'] == UseProduct2__c &&
+ select_report_data['UseProduct3__c'] == UseProduct3__c &&
+ select_report_data['Department_Cateogy__c'] ==
+ Department_Cateogy__c &&
+ select_report_data['ConsumptionOfConsumables__c'] ==
+ ConsumptionOfConsumables__c &&
+ select_report_data['DealerPersonnel__c'] ==
+ DealerPersonnel__c &&
+ select_report_data['doctor2__c'] == doctor2__c &&
+ select_report_data['EffectProgress__c'] ==
+ EffectProgress__c &&
+ select_report_data['WarlockClassification__c'] ==
+ WarlockClassification__c &&
+ select_report_data['ProductCcategory__c'] ==
+ ProductCcategory__c &&
+ select_report_data['productCategories__c'] ==
+ productCategories__c &&
+ select_report_data['warlocksNumber__c'] ==
+ warlocksNumber__c &&
+ select_report_data['WorkMark__c'] == WorkMark__c &&
+ select_report_data['WorkRecord__c'] == WorkRecord__c
+ ) {
+ this.allclear(component);
+ $A.util.addClass(modal_window, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
+ } else {
+ this.close_confirm(component, confirm_title, confirm_text);
+ }
+ } else if (component.get('v.mode') == 'edit') {
+ var confirm_title = '璀﹀憡!';
+ var confirm_text = '鏀惧純缂栬緫鏃ユ姤锛�';
+ if (
+ select_report_data['Report_Date__c'] == Report_Date__c &&
+ select_report_data['Agency_Hospital__c'] ==
+ Agency_Hospital__c &&
+ select_report_data['UseProduct1__c'] == UseProduct1__c &&
+ select_report_data['UseProduct2__c'] == UseProduct2__c &&
+ select_report_data['UseProduct3__c'] == UseProduct3__c &&
+ select_report_data['Department_Cateogy__c'] ==
+ Department_Cateogy__c &&
+ select_report_data['ConsumptionOfConsumables__c'] ==
+ ConsumptionOfConsumables__c &&
+ select_report_data['DealerPersonnel__c'] ==
+ DealerPersonnel__c &&
+ select_report_data['doctor2__c'] == doctor2__c &&
+ select_report_data['EffectProgress__c'] ==
+ EffectProgress__c &&
+ select_report_data['WarlockClassification__c'] ==
+ WarlockClassification__c &&
+ select_report_data['ProductCcategory__c'] ==
+ ProductCcategory__c &&
+ select_report_data['productCategories__c'] ==
+ productCategories__c &&
+ select_report_data['warlocksNumber__c'] ==
+ warlocksNumber__c &&
+ select_report_data['WorkMark__c'] == WorkMark__c &&
+ select_report_data['WorkRecord__c'] == WorkRecord__c
+ ) {
+ this.allclear(component);
+ $A.util.addClass(modal_window, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
+ } else {
+ this.close_confirm(component, confirm_title, confirm_text);
+ }
+ }
}
- } else {
- component.set("v.errorMessage", "浜у搧鐢ㄩ噺鏈�澶氳緭鍏�14浣嶆暟瀛�!");
- this.showErrorToast(component);
- }
- }
- },
- //宸ヤ綔浼氳褰�
- selectPurposeType: function (component, event, helper) {
- debugger;
- var doctor_value = component.find("select_purpose_type").get("v.value");
- // alert(doctor_value);
- if (doctor_value != "绉戝浼�") {
- component.find("new_con").set("v.disabled", false);
- } else {
- component.find("new_con").set("v.disabled", true);
- }
- if (doctor_value != "") {
- this.set_doctor_list(component);
- var action = component.get("c.selectPurposeTypes");
- action.setParams({
- doctor_value: doctor_value
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = response.getReturnValue();
- component
- .find("select_EffectProgress")
- .set("v.options", JSON.parse(JSON.stringify(res)));
+ },
+ toggle_report_edit: function (component) {
+ var modal_window = component.find('modal_window');
+ var modal_bg = component.find('modal_bg');
+ if ($A.util.hasClass(modal_window, 'disp_none')) {
+ // OPEN
+ $A.util.removeClass(modal_window, 'disp_none');
+ $A.util.removeClass(modal_bg, 'disp_none');
+ component.set('v.loginEdit', true);
+ //澶嶅埗 鍜岀紪杈� 鍥炴樉闂鍦ㄨ繖閲岄潰
+ if (
+ component.get('v.mode') == 'edit' ||
+ component.get('v.mode') == 'copy'
+ ) {
+ var select_data = '';
+ if (component.get('v.mode') == 'edit') {
+ select_data = component.get('v.select_report_data');
+ } else if (component.get('v.mode') == 'copy') {
+ select_data = component.get('v.select_report_data_radio');
+ }
+ var reports = component.get('v.reports');
+ var Agency_Hospital_text = '';
+ var Agency_Hospital_parent_id = '';
+ // 鍖婚櫌鍚�
+ if (select_data['Agency_Hospital__c'] != '') {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['Agency_Hospital__c'] ==
+ select_data['Agency_Hospital__c']
+ ) {
+ Agency_Hospital_text =
+ reports[i]['Agency_Hospital__r']['Name'];
+ Agency_Hospital_parent_id =
+ reports[i]['Agency_Hospital__r']['Hospital__c'];
+ }
+ }
+ component.set('v.hospital', Agency_Hospital_text);
+ component.set('v.hospitalId', Agency_Hospital_parent_id);
+ component.set(
+ 'v.hospitalLinkId',
+ select_data['Agency_Hospital__c']
+ );
+ component.find('new_con').set('v.disabled', false);
+ }
+ //浣跨敤浜у搧1(浜у搧鍨嬪彿)
+ var UseProduct1Text = '';
+ var UseProduct1Id = '';
+ if (
+ select_data['UseProduct1__c'] != '' &&
+ select_data['UseProduct1__c'] != undefined
+ ) {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['UseProduct1__c'] ==
+ select_data['UseProduct1__c']
+ ) {
+ UseProduct1Text =
+ reports[i]['UseProduct1__r'][
+ 'Asset_Model_No__c'
+ ];
+ UseProduct1Id = reports[i]['UseProduct1__c'];
+ }
+ }
+ component.set('v.UseProduct1', UseProduct1Text);
+ component.set(
+ 'v.UseProduct1Id',
+ select_data['UseProduct1__c']
+ );
+ }
+ //浣跨敤浜у搧2
+ var UseProduct2Text = '';
+ var UseProduct2Id = '';
+ if (
+ select_data['UseProduct2__c'] != '' &&
+ select_data['UseProduct2__c'] != undefined
+ ) {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['UseProduct2__c'] ==
+ select_data['UseProduct2__c']
+ ) {
+ UseProduct2Text =
+ reports[i]['UseProduct2__r'][
+ 'Asset_Model_No__c'
+ ];
+ UseProduct2Id = reports[i]['UseProduct2__c'];
+ }
+ }
+ component.set('v.UseProduct2', UseProduct2Text);
+ component.set(
+ 'v.UseProduct2Id',
+ select_data['UseProduct2__c']
+ );
+ }
+ //浣跨敤浜у搧3
+ var UseProduct3Text = '';
+ var UseProduct3Id = '';
+ if (
+ select_data['UseProduct3__c'] != '' &&
+ select_data['UseProduct3__c'] != undefined
+ ) {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['UseProduct3__c'] ==
+ select_data['UseProduct3__c']
+ ) {
+ UseProduct3Text =
+ reports[i]['UseProduct3__r'][
+ 'Asset_Model_No__c'
+ ];
+ UseProduct3Id = reports[i]['UseProduct3__c'];
+ }
+ }
+ component.set('v.UseProduct3', UseProduct3Text);
+ component.set(
+ 'v.UseProduct3Id',
+ select_data['UseProduct3__c']
+ );
+ }
+ //娲诲姩鏃�
+ var reportDate;
+ if (select_data['Report_Date__c'] != '') {
+ for (var i = 0; i < reports.length; i++) {
+ if (
+ reports[i]['Report_Date__c'] ==
+ select_data['Report_Date__c']
+ ) {
+ reportDate = reports[i]['Report_Date__c'];
+ }
+ }
+ component.set('v.data.Report_Date__c', reportDate);
+ }
+ // 绉戝
+ // if (select_data['Department_Cateogy__c'] != '') {
+ // component.find('select_department').set('v.value',select_data['Department_Cateogy__c']);
+ // }
+ //fy Department_Cateogy_text__c
+ if (select_data['Department_Cateogy_text__c'] != '') {
+ component
+ .find('select_department')
+ .set(
+ 'v.value',
+ select_data['Department_Cateogy_text__c']
+ );
+ }
+ //缁忛攢鍟嗕汉鍛�
+ if (select_data['DealerPersonnel__c'] != '') {
+ this.set_selected(
+ component,
+ 'select_DealerPersonnel',
+ select_data['DealerPersonnel__c']
+ );
+ }
+ // 娲诲姩鍖哄垎
+ if (select_data['WorkRecord__c'] != '') {
+ this.set_selected(
+ component,
+ 'select_purpose_type',
+ select_data['WorkRecord__c']
+ );
+ this.selectPurposeType(component);
+ }
+ // 鎷滆浜�
+ if (select_data['WorkRecord__c'] == '绉戝浼�') {
+ component.set(
+ 'v.default_select_doctor_id2',
+ select_data['doctor3__c']
+ );
+ var a = component.get('v.default_select_doctor_id2');
+ this.set_doctor_list_edit(component);
+ } else {
+ component.set(
+ 'v.default_select_doctor_id',
+ select_data['doctor2__c']
+ );
+ this.set_doctor_list_edit(component);
+ }
+ //浜у搧鍒嗙被(绗笁鍒嗙被)
+ if (select_data['ProductClassification__c'] != null) {
+ this.set_selected(
+ component,
+ 'select_ProductClassification',
+ select_data['ProductClassification__c']
+ );
+ this.selectProductClassification(component);
+ }
+ // 浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺
+ if (select_data['ConsumptionOfConsumables__c'] != '') {
+ component
+ .find('select_ConsumptionOfConsumables')
+ .set(
+ 'v.value',
+ select_data['ConsumptionOfConsumables__c']
+ );
+ }
+ // 浜у搧鐢ㄩ噺
+ if (select_data['warlocksNumber__c'] != '') {
+ component
+ .find('select_warlocksNumber')
+ .set('v.value', select_data['warlocksNumber__c']);
+ }
+ // 鏀彺闇�姹�
+ if (select_data['WorkMark__c'] != false) {
+ component
+ .find('select_WorkMark')
+ .set('v.checked', select_data['WorkMark__c']);
+ }
+ var report_id = component.get('v.edit_copy_select_report_id');
+ if (report_id != '') {
+ var select_EffectProgress1 = '';
+ var WarlockClassification = '';
+ var ProductCcategory = '';
+ var productCategories = '';
+ var i = 0;
+ for (i = 0; i < reports.length; i++) {
+ if (report_id == reports[i]['Id']) {
+ select_EffectProgress1 =
+ reports[i]['EffectProgress__c'];
+ WarlockClassification =
+ reports[i]['WarlockClassification__c'];
+ ProductCcategory =
+ reports[i]['ProductCcategory__c'];
+ productCategories =
+ reports[i]['productCategories__c'];
+ break;
+ }
+ }
+ //鏁堟灉/杩涘害
+ if (
+ select_EffectProgress1 != null &&
+ select_EffectProgress1 != ''
+ ) {
+ component
+ .find('select_EffectProgress')
+ .set('v.value', select_EffectProgress1);
+ }
+ //鏈+鍒嗙被
+ if (
+ WarlockClassification != null &&
+ WarlockClassification != ''
+ ) {
+ component
+ .find('select_OtherBrandConsumables')
+ .set('v.value', WarlockClassification);
+ }
+ //宸查噰鐢ㄥ叾浠栧搧鐗�
+ if (ProductCcategory != null && ProductCcategory != '') {
+ component
+ .find('select_ProductCcategory')
+ .set('v.value', ProductCcategory);
+ this.selectpurposetype(component);
+ }
+ //鍏朵粬鍝佺墝浜у搧绫诲埆
+ if (productCategories != null && productCategories != '') {
+ component
+ .find('select_productCategories')
+ .set('v.value', productCategories);
+ }
+ component.set('v.edit_copy_select_report_id', '');
+ }
+ }
+ } else {
+ var select_report_data = component.get('v.select_report_data');
+ var Report_Date__c = component.get('v.data.Report_Date__c');
+ var Agency_Hospital__c = component.get('v.hospitalLinkId');
+ var UseProduct1__c = component.get('v.UseProduct1Id');
+ var UseProduct2__c = component.get('v.UseProduct2Id');
+ var UseProduct3__c = component.get('v.UseProduct3Id');
+ var Department_Cateogy__c = component
+ .find('select_department')
+ .get('v.value');
+ var ConsumptionOfConsumables__c = component
+ .find('select_ConsumptionOfConsumables')
+ .get('v.value');
+ var DealerPersonnel__c = component
+ .find('select_DealerPersonnel')
+ .get('v.value');
+ var doctor2__c = component.find('select_doctor').get('v.value');
+ var WorkRecord__c = component
+ .find('select_purpose_type')
+ .get('v.value');
+ var EffectProgress__c = component
+ .find('select_EffectProgress')
+ .get('v.value');
+ var WarlockClassification__c = component
+ .find('select_OtherBrandConsumables')
+ .get('v.value');
+ var ProductCcategory__c = component
+ .find('select_ProductCcategory')
+ .get('v.value');
+ var productCategories__c = component
+ .find('select_productCategories')
+ .get('v.value');
+ var warlocksNumber__c = component
+ .find('select_warlocksNumber')
+ .get('v.value');
+ var WorkMark__c = component
+ .find('select_WorkMark')
+ .get('v.checked');
+ if (component.get('v.mode') == 'new') {
+ var confirm_title = '璀﹀憡!';
+ var confirm_text = '鏀惧純鏂板缓鏃ユ姤锛�';
+ if (
+ !Report_Date__c &&
+ !Agency_Hospital__c &&
+ !UseProduct1__c &&
+ !UseProduct2__c &&
+ !UseProduct3__c &&
+ !Department_Cateogy__c &&
+ !ConsumptionOfConsumables__c &&
+ !DealerPersonnel__c &&
+ !doctor2__c &&
+ !EffectProgress__c &&
+ !WarlockClassification__c &&
+ !ProductCcategory__c &&
+ !productCategories__c &&
+ !warlocksNumber__c &&
+ !WorkMark__c &&
+ !WorkRecord__c
+ ) {
+ this.allclear(component);
+ $A.util.addClass(modal_window, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
+ this.close_confirm(component, confirm_title, confirm_text);
+ } else {
+ this.close_confirm(component, confirm_title, confirm_text);
+ }
+ } else if (component.get('v.mode') == 'copy') {
+ var confirm_title = '璀﹀憡!';
+ var confirm_text = '鏀惧純鏂板缓鏃ユ姤锛�';
+ if (
+ select_report_data['Report_Date__c'] == Report_Date__c &&
+ select_report_data['Agency_Hospital__c'] ==
+ Agency_Hospital__c &&
+ select_report_data['UseProduct1__c'] == UseProduct1__c &&
+ select_report_data['UseProduct2__c'] == UseProduct2__c &&
+ select_report_data['UseProduct3__c'] == UseProduct3__c &&
+ select_report_data['Department_Cateogy__c'] ==
+ Department_Cateogy__c &&
+ select_report_data['ConsumptionOfConsumables__c'] ==
+ ConsumptionOfConsumables__c &&
+ select_report_data['DealerPersonnel__c'] ==
+ DealerPersonnel__c &&
+ select_report_data['doctor2__c'] == doctor2__c &&
+ select_report_data['EffectProgress__c'] ==
+ EffectProgress__c &&
+ select_report_data['WarlockClassification__c'] ==
+ WarlockClassification__c &&
+ select_report_data['ProductCcategory__c'] ==
+ ProductCcategory__c &&
+ select_report_data['productCategories__c'] ==
+ productCategories__c &&
+ select_report_data['warlocksNumber__c'] ==
+ warlocksNumber__c &&
+ select_report_data['WorkMark__c'] == WorkMark__c &&
+ select_report_data['WorkRecord__c'] == WorkRecord__c
+ ) {
+ this.allclear(component);
+ $A.util.addClass(modal_window, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
+ } else {
+ this.close_confirm(component, confirm_title, confirm_text);
+ }
+ } else if (component.get('v.mode') == 'edit') {
+ var confirm_title = '璀﹀憡!';
+ var confirm_text = '鏀惧純缂栬緫鏃ユ姤锛�';
+ if (
+ select_report_data['Report_Date__c'] == Report_Date__c &&
+ select_report_data['Agency_Hospital__c'] ==
+ Agency_Hospital__c &&
+ select_report_data['UseProduct1__c'] == UseProduct1__c &&
+ select_report_data['UseProduct2__c'] == UseProduct2__c &&
+ select_report_data['UseProduct3__c'] == UseProduct3__c &&
+ select_report_data['Department_Cateogy__c'] ==
+ Department_Cateogy__c &&
+ select_report_data['ConsumptionOfConsumables__c'] ==
+ ConsumptionOfConsumables__c &&
+ select_report_data['DealerPersonnel__c'] ==
+ DealerPersonnel__c &&
+ select_report_data['doctor2__c'] == doctor2__c &&
+ select_report_data['EffectProgress__c'] ==
+ EffectProgress__c &&
+ select_report_data['WarlockClassification__c'] ==
+ WarlockClassification__c &&
+ select_report_data['ProductCcategory__c'] ==
+ ProductCcategory__c &&
+ select_report_data['productCategories__c'] ==
+ productCategories__c &&
+ select_report_data['warlocksNumber__c'] ==
+ warlocksNumber__c &&
+ select_report_data['WorkMark__c'] == WorkMark__c &&
+ select_report_data['WorkRecord__c'] == WorkRecord__c
+ ) {
+ this.allclear(component);
+ $A.util.addClass(modal_window, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
+ } else {
+ this.close_confirm(component, confirm_title, confirm_text);
+ }
+ }
}
- });
- $A.enqueueAction(action);
- } else {
- component.find("select_EffectProgress").set("v.options", []);
- }
- },
+ //component.set('v.loginEdit',false);
+ },
+ //鍏抽棴椤甸潰鏄� 灏忕殑鎻愮ず妗嗘槸鍚︽斁寮冩柊寤烘棩鎶�
+ close_confirm: function (component, title, text) {
+ var confirm_status = component.get('v.confirm_status');
+ component.set('v.modal_confirm_title', title);
+ component.set('v.modal_confirm_text', text);
+ var modal_window = component.find('modal_window');
+ var modal_bg = component.find('modal_bg');
+ var modal_confirm = component.find('modal_confirm');
+ var modal_confirm_bg = component.find('modal_confirm_bg');
- selectProductClassification: function (component, event, helper) {
- debugger;
- var select_ProductClassification = component
- .find("select_ProductClassification")
- .get("v.value");
- if (select_ProductClassification != "") {
- var action = component.get("c.selectProductClassificationc");
- action.setParams({
- select_ProductClassification: select_ProductClassification
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = response.getReturnValue();
- component
- .find("select_OtherBrandConsumables")
- .set("v.options", JSON.parse(JSON.stringify(res)));
+ if (confirm_status == 0) {
+ $A.util.addClass(modal_window, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
+ $A.util.removeClass(modal_confirm, 'disp_none');
+ $A.util.removeClass(modal_confirm_bg, 'disp_none');
+ } else if (confirm_status == 1) {
+ // 鏄�
+ $A.util.addClass(modal_confirm, 'disp_none');
+ $A.util.addClass(modal_confirm_bg, 'disp_none');
+ component.set('v.mode', '');
+ this.allclear(component);
+ component.set('v.reports_now', '');
+ component.set('v.reports_now_count', 0);
+ component.set('v.confirm_status', 0);
+ } else if (confirm_status == 2) {
+ // 鍚�
+ $A.util.removeClass(modal_window, 'disp_none');
+ $A.util.removeClass(modal_bg, 'disp_none');
+ $A.util.addClass(modal_confirm, 'disp_none');
+ $A.util.addClass(modal_confirm_bg, 'disp_none');
+ component.set('v.confirm_status', 0);
}
- });
- $A.enqueueAction(action);
- } else {
- component.find("select_OtherBrandConsumables").set("v.options", []);
- }
- this.selectProductCcategory(component);
- },
- select_ProductCcategory: function (component, event, helper) {
- var select_ProductCcategory = component
- .find("select_ProductCcategory")
- .get("v.value");
- debugger;
- if (select_ProductCcategory != "") {
- var result = component.find("result");
- var UserProType = component.get("v.UserProType");
- //fy
- $A.util.removeClass(result, "disp_none");
- if (UserProType == "ENG") {
- $A.util.removeClass(result, "disp_none");
- } else {
- $A.util.addClass(result, "disp_none");
- }
- var action = component.get("c.selectProductCcategory01");
- action.setParams({
- select_ProductCcategory: select_ProductCcategory
- });
- action.setCallback(this, function (response) {
- var state = response.getState();
- if (state == "SUCCESS") {
- var res = response.getReturnValue();
- component
- .find("select_productCategories")
- .set("v.options", JSON.parse(JSON.stringify(res)));
+ },
+ //鏂板缓鎸夐挳
+ new_report: function (component, event, helper) {
+ component.set('v.mode', 'new');
+ component.set('v.dialog_type', '鏂板缓');
+ // 鍛�
+ var select_date = component.find('select_date').get('v.value');
+ // 鎷呭綋
+ var select_agency = component
+ .find('select_agency_person')
+ .get('v.value');
+ var cm = 0;
+ if (select_agency.indexOf(';') != -1) {
+ select_agency = select_agency.split(';')[0];
}
- });
- $A.enqueueAction(action);
- } else {
- component.find("select_productCategories").set("v.options", []);
- var result = component.find("result");
- $A.util.addClass(result, "disp_none");
- }
- },
- selectpurposetype: function (component, event, helper) {
- var select_ProductCcategory = component
- .find("select_ProductCcategory")
- .get("v.value");
- if (
- select_ProductCcategory == null &&
- select_ProductCcategory == undefined &&
- select_ProductCcategory == ""
- ) {
- var result = component.find("result");
- // $A.util.removeClass(result, 'disp_none');
- if (UserProType == "ENG") {
- $A.util.removeClass(result, "disp_none");
- } else {
- $A.util.addClass(result, "disp_none");
- }
- } else {
- debugger;
- component.find("select_productCategories").set("v.value", "");
- var result = component.find("result");
- $A.util.addClass(result, "disp_none");
- this.select_ProductCcategory(component);
- }
- },
- //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
- CallBackAction: function (component, action_name, para, callback) {
- var action = component.get(
- "c." + action_name.trimStart().replace("c.", "")
- );
- if (para) {
- action.setParams(para);
- }
- if (callback) {
- action.setCallback(this, function (data) {
- callback(data);
- });
- }
+ component.set('v.selected_date', select_date);
+ // 鎷呭綋
+ var name = component.get('v.selected_agency_person');
+ var ret = this.create_report_header(
+ component,
+ event,
+ helper,
+ name,
+ select_agency,
+ select_date
+ );
+ component.set('v.default_select_doctor_id2', '');
- $A.enqueueAction(action);
- },
- //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
+ // SWAG-CF58C3 fy start
+ this.set_aws_url(component, 'Agency_Contact__c');
+ // SWAG-CF58C3 fy end
+ },
+ // 澶嶅埗鎸夐挳
+ copy_button: function (component, event, helper) {
+ this.allclear(component);
+ component.set('v.mode', 'copy');
+ component.set('v.dialog_type', '鏂板缓');
+ var select_report_data = component.get('v.select_report_data_radio');
+ component.set('v.loadOpp', true);
+ // 閫�
+ var now = new Date();
+ var start_day = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() - now.getDay() + 1
+ );
+ var select_date =
+ start_day.getFullYear() +
+ '/' +
+ (start_day.getMonth() + 1) +
+ '/' +
+ start_day.getDate();
+ this.set_selected(component, 'select_date', select_date);
+ component.set('v.selected_date', select_date);
+ // 鎷呭綋
+ var select_agency = select_report_data['Person_In_Charge2__c'];
+ var new_label = this.get_agency_person_name(component, select_agency);
+ component.set('v.selected_agency_person', new_label);
+ this.set_selected(component, 'select_agency_person', select_agency);
+ var name = component.get('v.selected_agency_person');
+ component.set('v.edit_copy_select_report_id', select_report_data['Id']);
+ component.set('v.select_report_data', select_report_data);
- //zhj 瀵煎嚭閿欒淇℃伅 2023-05-16 start
- exportErrorInfoHelper: function (component) {
- var errorData = component.get("v.errorData");
+ var ret = this.create_report_header(
+ component,
+ event,
+ helper,
+ name,
+ select_agency,
+ select_date
+ );
+ // SWAG-CF58C3 fy start
+ this.set_aws_url(component, 'Agency_Contact__c');
+ // SWAG-CF58C3 fy end
+ },
+ //鍒犻櫎鎸夐挳
+ delete_button: function (component, event, helper) {
+ var select_report_data = component.get('v.select_report_data_radio');
+ if (confirm('鏄惁鍒犻櫎璇ユ暟鎹紵')) {
+ component.set('v.login', true);
+ var action = component.get('c.deleteAgencyReport');
+ action.setParams({
+ agencyReport_id: select_report_data.Id
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var result = response.getReturnValue();
+ if (result == 'success') {
+ this.select_agency_change(component, event, helper);
+ }
+ component.set('v.login', false);
+ } else {
+ component.set('v.login', false);
+ }
+ });
+ $A.enqueueAction(action);
+ }
+ },
+ //澶嶅埗鎸夐挳鍙敤
+ change_report_radio: function (component, event, helper) {
+ var reports = component.get('v.reports');
+ for (var i = 0; i < reports.length; i++) {
+ if (reports[i].Name == event.getSource().get('v.label')) {
+ component.set('v.select_report_data_radio', reports[i]);
+ component.find('copy_button').set('v.disabled', false);
+ component.find('delete_button').set('v.disabled', false);
+ break;
+ }
+ }
+ },
+ //缂栬緫鎸夐挳
+ edit_button: function (component, event, helper) {
+ component.set('v.login', true);
+ debugger;
+ //component.set('v.loginEdit', true);
+ this.allclear(component);
+ //component.set('v.loadOpp', true);
+ var index = event.getSource().get('v.value');
+ component.set(
+ 'v.select_report_data',
+ component.get('v.reports')[index]
+ );
+ component.set('v.mode', 'edit');
+ component.set('v.dialog_type', '缂栬緫');
+ var select_date = component.get('v.reports')[index].Submit_date__c;
+ var select_agency =
+ component.get('v.reports')[index].Person_In_Charge2__c;
+ var text_tmp = select_date.split('-');
+ var select_date_text =
+ text_tmp[0] + '/' + Number(text_tmp[1]) + '/' + Number(text_tmp[2]);
+ component.set('v.selected_date', select_date_text);
+ var name = component.get('v.reports')[index].Person_In_Charge2__r.Name;
+ this.set_selected(component, 'select_agency_person', select_agency);
+ var new_label = this.get_agency_person_name(component, select_agency);
+ component.set('v.selected_agency_person', new_label);
+ component.set(
+ 'v.edit_copy_select_report_id',
+ component.get('v.reports')[index].Id
+ );
+ var ret = this.create_report_header_edit(
+ component,
+ event,
+ helper,
+ name,
+ select_agency,
+ select_date
+ );
+ // SWAG-CF58C3 fy start
+ this.set_aws_url(component, 'Agency_Contact__c');
+ //component.set('v.login', false);
+ // SWAG-CF58C3 fy end
+ },
+ //淇濆瓨
+ save_report: function (component, event, helper) {
+ var UserProType = component.get('v.UserProType');
+ component.find('save_button').set('v.disabled', true);
+ var etEng = component.get('v.etEng');
+ var Report_Date__c = component.get('v.data.Report_Date__c');
+ var Person_In_Charge2__c = '';
+ var Submit_date__c = '';
+ if (component.get('v.mode') == 'edit') {
+ // 鍛� Submit_date__c
+ Submit_date__c = component.get(
+ 'v.select_report_data'
+ ).Submit_date__c;
+ // 鎷呭綋 Person_In_Charge2__c
+ Person_In_Charge2__c = component.get(
+ 'v.select_report_data'
+ ).Person_In_Charge2__c;
+ } else {
+ // 鍛� Submit_date__c
+ Submit_date__c = this.get_date_string(
+ component.find('select_date').get('v.value')
+ );
+ // 鎷呭綋 Person_In_Charge2__c
+ Person_In_Charge2__c = component
+ .find('select_agency_person')
+ .get('v.value');
+ }
- var datas = [["閿欒琛�", "閿欒淇℃伅"]];
- for (var i in errorData) {
- let data = [];
- data.push(errorData[i].errorRow);
- data.push(errorData[i].errorInfo);
- datas.push(data);
- }
-
- console.log("datas = " + JSON.stringify(datas));
- var csv = this.convertToCSV(component, datas);
- console.log("csv = " + JSON.stringify(csv));
- this.downloadCSV(component, csv);
- },
-
- convertToCSV: function (component, data) {
- console.log("enter convertToCSV");
- console.log("data = " + data);
- var csv = "";
- for (var i = 0; i < data.length; i++) {
- var row = data[i];
- console.log("row = " + JSON.stringify(row));
- for (var j = 0; j < row.length; j++) {
- var val = "";
- val = row[j] === null ? "" : row[j].toString();
- console.log("val = " + val);
+ // Agency_Report_Header__c
+ var Agency_Report_Header__c = component.get(
+ 'v.agency_report_header_id'
+ );
+ // 鍖婚櫌
+ var Agency_Hospital__c = component.get('v.hospitalLinkId');
+ // 浜у搧鍒嗙被(绗笁鍒嗙被)
+ var ProductClassification__c = component
+ .find('select_ProductClassification')
+ .get('v.value');
+ // 浣跨敤浜у搧1(浜у搧鍨嬪彿) UseProduct1__c
+ var UseProduct1__c = component.get('v.UseProduct1Id');
+ // 浣跨敤浜у搧2 UseProduct2__c
+ var UseProduct2__c = component.get('v.UseProduct2Id');
+ // 浣跨敤浜у搧3 UseProduct3__c
+ var UseProduct3__c = component.get('v.UseProduct3Id');
+ // 绉戝 Department_Cateogy__c
+ var Department_Cateogy__c = component
+ .find('select_department')
+ .get('v.value');
+ // 缁忛攢鍟嗕汉鍛� DealerPersonnel__c
+ var DealerPersonnel__c = component
+ .find('select_DealerPersonnel')
+ .get('v.value');
+ // 鎷滆浜� doctor2__c
+ var doctor2__c = component.find('select_doctor').get('v.value');
+ // 娲诲姩鍖哄垎浼� WorkRecord__c
+ var WorkRecord__c = component
+ .find('select_purpose_type')
+ .get('v.value');
+ // 鏁堟灉/杩涘害 EffectProgress__c
+ var EffectProgress__c = component
+ .find('select_EffectProgress')
+ .get('v.value');
+ // alert(EffectProgress__c);
+ // 绉戝鍚屾潵鑰楁潗鏈堜娇鐢ㄩ噺 ConsumptionOfConsumables__c
+ var ConsumptionOfConsumables__c = component
+ .find('select_ConsumptionOfConsumables')
+ .get('v.value');
+ // 鏈+鍒嗙被 WarlockClassification__c
+ var WarlockClassification__c = component
+ .find('select_OtherBrandConsumables')
+ .get('v.value');
+ // 宸查噰鐢ㄥ叾浠栧搧鐗� ProductCcategory__c
+ var ProductCcategory__c = component
+ .find('select_ProductCcategory')
+ .get('v.value');
+ // 鍏朵粬鍝佺墝浜у搧绫诲埆 productCategories__c
+ var productCategories__c = component
+ .find('select_productCategories')
+ .get('v.value');
+ // 浜у搧鐢ㄩ噺 warlocksNumber__c
+ var warlocksNumber__c = component
+ .find('select_warlocksNumber')
+ .get('v.value');
+ // 鏀彺闇�姹� WorkMark__c
+ var WorkMark__c = component.find('select_WorkMark').get('v.checked');
+ var StageName__c = component.find('select_stageName').get('v.value');
+ var Amount__c =
+ component.get('v.oppdata.Amount__c') != null
+ ? component.get('v.oppdata.Amount__c').toString()
+ : '';
+ var OCMSale_Price__c =
+ component.get('v.oppdata.OCMSale_Price__c') != null
+ ? component.get('v.oppdata.OCMSale_Price__c').toString()
+ : '';
+ var Close_Forecasted_Date__c = component.get(
+ 'v.oppdata.Close_Forecasted_Date__c'
+ );
+ var StageName__c_o = component.get('v.StageName__c_o');
+ var Amount__c_o = component.get('v.Amount__c_o');
+ var OCMSale_Price__c_o = component.get('v.OCMSale_Price__c_o');
+ var Close_Forecasted_Date__c_o = component.get(
+ 'v.Close_Forecasted_Date__c_o'
+ );
+ if (StageName__c_o == undefined) StageName__c_o = '';
+ if (Amount__c_o == undefined) Amount__c_o = '';
+ if (OCMSale_Price__c_o == undefined) OCMSale_Price__c_o = '';
+ if (Close_Forecasted_Date__c_o == undefined)
+ Close_Forecasted_Date__c_o = '';
if (
- val.indexOf(",") !== -1 ||
- val.indexOf('"') !== -1 ||
- val.indexOf("\n") !== -1
+ StageName__c == StageName__c_o &&
+ OCMSale_Price__c_o == OCMSale_Price__c &&
+ Amount__c == Amount__c_o &&
+ Close_Forecasted_Date__c == Close_Forecasted_Date__c_o
) {
- //val = '"' + val.replace(/"/g,'""') + '"';
+ StageName__c = '';
+ Amount__c = '';
+ OCMSale_Price__c = '';
+ Close_Forecasted_Date__c = '';
}
- if (j > 0) {
- csv += ",";
+ // 銉愩儶銉囥兗銈枫儳銉�
+ var error = [];
+ //fy start
+ // if(WorkRecord__c != 'SIS'&&WorkRecord__c != '绉戝浼�'){
+ if (WorkRecord__c == '涓村簥淇℃伅(浣跨敤閲�)鏀堕泦') {
+ if (
+ warlocksNumber__c == '' ||
+ warlocksNumber__c == '' ||
+ warlocksNumber__c == undefined
+ ) {
+ error.push('浜у搧鐢ㄩ噺 涓嶈兘涓虹┖');
+ }
}
- csv += val;
- }
- csv += "\n";
- }
- return csv;
- },
+ //fy end
+ if (WorkRecord__c == '涓村簥淇℃伅(浣跨敤閲�)鏀堕泦' && UserProType == 'ENG') {
+ if (
+ productCategories__c == '' ||
+ productCategories__c == '' ||
+ productCategories__c == undefined
+ ) {
+ error.push('鍏朵粬鍝佺墝浜у搧绫诲埆 涓嶅瓨鍦�');
+ }
+ }
+ if (WorkRecord__c == '涓村簥淇℃伅(浣跨敤閲�)鏀堕泦') {
+ if (
+ ProductCcategory__c == '' ||
+ ProductCcategory__c == '' ||
+ ProductCcategory__c == undefined
+ ) {
+ error.push('宸查噰鐢ㄥ叾浠栧搧鐗� 涓嶅瓨鍦�');
+ }
+ }
+ if (WorkRecord__c == '涓村簥淇℃伅(浣跨敤閲�)鏀堕泦') {
+ if (
+ WarlockClassification__c == '' ||
+ WarlockClassification__c == '' ||
+ WarlockClassification__c == undefined
+ ) {
+ error.push('浜у搧1瀵瑰簲OLY浜у搧绾� 涓嶅瓨鍦�');
+ }
+ }
+ if (WorkRecord__c == '涓村簥淇℃伅(浣跨敤閲�)鏀堕泦') {
+ if (
+ ConsumptionOfConsumables__c == '' ||
+ ConsumptionOfConsumables__c == '' ||
+ ConsumptionOfConsumables__c == undefined
+ ) {
+ error.push('浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺 涓嶈兘涓虹┖');
+ }
+ }
+ if (
+ WorkRecord__c != '涓村簥淇℃伅(浣跨敤閲�)鏀堕泦' &&
+ WorkRecord__c != '甯傚満鎺ㄥ箍绫绘椿鍔�'
+ ) {
+ if (
+ EffectProgress__c == '' ||
+ EffectProgress__c == '' ||
+ EffectProgress__c == undefined
+ ) {
+ error.push('鏁堟灉/杩涘害 涓嶅瓨鍦�');
+ }
+ }
+ // if(WorkRecord__c != '涓村簥淇℃伅(浣跨敤閲�)鏀堕泦'&&WorkRecord__c != 'QIS澶勭悊'){
+ if (WorkRecord__c != '涓村簥淇℃伅(浣跨敤閲�)鏀堕泦') {
+ if (
+ UseProduct1__c == '' ||
+ UseProduct1__c == '' ||
+ UseProduct1__c == undefined
+ ) {
+ error.push('浣跨敤浜у搧1(浜у搧鍨嬪彿) 涓嶅瓨鍦�');
+ }
+ }
+ if (
+ ProductClassification__c == '' ||
+ ProductClassification__c == '' ||
+ ProductClassification__c == undefined
+ ) {
+ error.push('浜у搧鍒嗙被(绗笁鍒嗙被) 涓嶅瓨鍦�');
+ }
+ if (
+ WorkRecord__c == 'SIS' ||
+ WorkRecord__c == '绉戝浼�' ||
+ WorkRecord__c == '闄㈠唴鍏ラ櫌鐢宠' ||
+ WorkRecord__c == '鏀惰垂椤圭洰鐢宠'
+ ) {
+ if (
+ doctor2__c == '' ||
+ doctor2__c == '' ||
+ doctor2__c == undefined
+ ) {
+ error.push('鎷滆浜� 涓嶅瓨鍦�');
+ }
+ }
+ if (
+ WorkRecord__c == '' ||
+ WorkRecord__c == '' ||
+ WorkRecord__c == undefined
+ ) {
+ error.push('娲诲姩鍖哄垎 涓嶅瓨鍦�');
+ }
+ if (
+ DealerPersonnel__c == '' ||
+ DealerPersonnel__c == '' ||
+ DealerPersonnel__c == undefined
+ ) {
+ error.push('缁忛攢鍟嗕汉鍛� 涓嶅瓨鍦�');
+ }
+ if (
+ Department_Cateogy__c == '' ||
+ Department_Cateogy__c == '' ||
+ Department_Cateogy__c == undefined
+ ) {
+ error.push('绉戝 涓嶅瓨鍦�');
+ }
+ if (
+ Agency_Hospital__c == '' ||
+ Agency_Hospital__c == '' ||
+ Agency_Hospital__c == undefined
+ ) {
+ error.push('鍖婚櫌 涓嶅瓨鍦�');
+ }
- downloadCSV: function (component, csv) {
- var link = document.createElement("a");
- link.href = "data:text/csv;charset=utf-8," + encodeURIComponent(csv);
- link.download = "data.csv";
- document.body.appendChild(link);
- link.click();
- document.body.removeChild(link);
- }
- //zhj 瀵煎嚭閿欒淇℃伅 2023-05-16 end
+ if (
+ Report_Date__c == '' ||
+ Report_Date__c == '' ||
+ Report_Date__c == undefined
+ ) {
+ error.push('娲诲姩鏃� 涓嶅瓨鍦�');
+ }
+ if (
+ Submit_date__c == '' ||
+ Submit_date__c == '' ||
+ Submit_date__c == undefined
+ ) {
+ error.push('鍛� 涓嶅瓨鍦�');
+ }
+ var rDate = new Date(Report_Date__c);
+ var sDate = new Date(Submit_date__c);
+ sDate.setDate(sDate.getDate() - 1);
+ if (rDate < sDate) {
+ error.push('娲诲姩鏃ュ繀椤绘槸鏈懆锛�');
+ }
+ sDate.setDate(sDate.getDate() + 7);
+ if (rDate >= sDate) {
+ error.push('娲诲姩鏃ュ繀椤绘槸鏈懆锛�');
+ }
+ if (
+ Person_In_Charge2__c == '' ||
+ Person_In_Charge2__c == '' ||
+ Person_In_Charge2__c == undefined
+ ) {
+ error.push('鎷呭綋 涓嶅瓨鍦�');
+ }
+ if (
+ Agency_Report_Header__c == '' ||
+ Agency_Report_Header__c == '' ||
+ Agency_Report_Header__c == undefined
+ ) {
+ this.error('Report Header Id 涓嶅瓨鍦�');
+ }
+
+ // if (!UseProduct2__c) { error.push("浣跨敤浜у搧2 涓嶅瓨鍦�"); }
+ // if (!UseProduct3__c) { error.push("浣跨敤浜у搧3 涓嶅瓨鍦�"); }
+
+ // if (!productCategories__c) { error.push("鍏朵粬鍝佺墝浜у搧绫诲埆 涓嶅瓨鍦�"); }
+
+ //let errorMsg = '';
+ for (var i = 0; i < error.length; i++) {
+ component.set('v.errorMessage', error[i]);
+ this.showErrorToast(component);
+ //errorMsg += '; ' + error[i]
+ //this.error(error[i]);
+ }
+ // if(errorMsg != '')
+ // this.error(errorMsg.substring(1));
+ if (error.length > 0) {
+ component.find('save_button').set('v.disabled', false);
+ return false;
+ }
+ // 淇濆瓨鍑︾悊
+ component.set('v.loginEdit', true);
+ if (component.get('v.mode') == 'edit') {
+ var Agency_Report__c = component.get('v.select_report_data').Id;
+ var action = component.get('c.editAgencyReport');
+ action.setParams({
+ Agency_Report_Id: Agency_Report__c,
+ Department_Cateogy: Department_Cateogy__c,
+ ConsumptionOfConsumables: ConsumptionOfConsumables__c,
+ WorkRecord: WorkRecord__c,
+ EffectProgress: EffectProgress__c,
+ WarlockClassification: WarlockClassification__c,
+ ProductCcategory: ProductCcategory__c,
+ productCategories: productCategories__c,
+ warlocksNumber: warlocksNumber__c,
+ WorkMark: WorkMark__c,
+ ProductClassification: ProductClassification__c,
+ DealerPersonnel: DealerPersonnel__c,
+ Agency_Report_Header: Agency_Report_Header__c,
+ Agency_Hospital: Agency_Hospital__c,
+ UseProduct1: UseProduct1__c,
+ UseProduct2: UseProduct2__c,
+ UseProduct3: UseProduct3__c,
+ Person_In_Charge2: Person_In_Charge2__c,
+ doctor: doctor2__c,
+ Submit_date: Submit_date__c,
+ StageName: StageName__c,
+ oppAmount: Amount__c,
+ oppOCMPrice: OCMSale_Price__c,
+ Close_Forecasted_Date: Close_Forecasted_Date__c,
+ Report_Date: Report_Date__c
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ debugger;
+ component.set('v.successMessage', '缂栬緫淇濆瓨鎴愬姛');
+ this.showSuccessToast(component);
+ var report_id = response.getReturnValue();
+ component.set('v.create_agency_report_id', report_id);
+ var select_agency_list =
+ component.get('v.allselectlist').AgencyPerson__c;
+ for (var i = 0; i < select_agency_list.length; i++) {
+ if (
+ select_agency_list[i].value ==
+ component.get('v.select_report_data')
+ .Person_In_Charge2__c
+ ) {
+ select_agency_list[i].selected = true;
+ } else {
+ select_agency_list[i].selected = false;
+ }
+ }
+ component
+ .find('select_agency_person')
+ .set('v.options', select_agency_list);
+ component.set('v.update_select_report_data_id', report_id);
+ this.get_reports(
+ component,
+ event,
+ helper,
+ component.get('v.select_report_data').Submit_date__c,
+ component.get('v.select_report_data')
+ .Person_In_Charge2__c
+ );
+ component.find('save_button').set('v.disabled', false);
+ component.set('v.loginEdit', false);
+ } else {
+ //component.set('v.errorMessage', 'save_report failed.');
+ this.error('淇濆瓨鏃ユ姤澶辫触');
+ //this.showErrorToast(component);
+ component.find('save_button').set('v.disabled', false);
+ component.set('v.loginEdit', false);
+ }
+ });
+ $A.enqueueAction(action);
+ } else {
+ /* Save (New & Copy) */
+ var action = component.get('c.saveAgencyReport');
+ action.setParams({
+ Department_Cateogy: Department_Cateogy__c,
+ ConsumptionOfConsumables: ConsumptionOfConsumables__c,
+ WorkMark: WorkMark__c,
+ warlocksNumber: warlocksNumber__c,
+ DealerPersonnel: DealerPersonnel__c,
+ ProductCcategory: ProductCcategory__c,
+ productCategories: productCategories__c,
+ WarlockClassification: WarlockClassification__c,
+ ProductClassification: ProductClassification__c,
+ WorkRecord: WorkRecord__c,
+ EffectProgress: EffectProgress__c,
+ Agency_Report_Header: Agency_Report_Header__c,
+ Agency_Hospital: Agency_Hospital__c,
+ Person_In_Charge2: Person_In_Charge2__c,
+ doctor: doctor2__c,
+ Submit_date: Submit_date__c,
+ UseProduct1: UseProduct1__c,
+ UseProduct2: UseProduct2__c,
+ UseProduct3: UseProduct3__c,
+ StageName: StageName__c,
+ oppAmount: Amount__c,
+ oppOCMPrice: OCMSale_Price__c,
+ Close_Forecasted_Date: Close_Forecasted_Date__c,
+ Report_Date: Report_Date__c
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ component.set('v.successMessage', '淇濆瓨鎴愬姛');
+ this.showSuccessToast(component);
+ var report_id = response.getReturnValue();
+ component.set('v.create_agency_report_id', report_id);
+ this.get_reports(
+ component,
+ event,
+ helper,
+ component.find('select_date').get('v.value'),
+ component.find('select_agency_person').get('v.value')
+ );
+ // 銉€兗銉�銉偊銈c兂銉夈偊鍐呫伄涓�瑕х敤
+ var action2 = component.get('c.getReportsById');
+ action2.setParams({
+ report_id: report_id
+ });
+ action2.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ var reports_now = component.get('v.reports_now');
+ var reports_now_count = 0;
+ if (reports_now.length > 0 && reports_now != '') {
+ reports_now_count = reports_now.length;
+ }
+ // Save&New鏅傘伄銈︺偅銉炽儔銈﹀唴銉囥兗銈夸竴瑕�
+ if (res.length > 0) {
+ reports_now[reports_now_count] = res[0];
+ reports_now.sort(function (a, b) {
+ if (a.Name > b.Name) return -1;
+ if (a.Name < b.Name) return 1;
+ return 0;
+ });
+ component.set('v.reports_now', reports_now);
+ component.set(
+ 'v.reports_now_count',
+ reports_now.length
+ );
+ var data_list =
+ component.find('modal_data_list_tr');
+ }
+ } else {
+ // component.set('v.errorMessage', 'get_reports_now failed.');
+ this.error('get_reports_now failed.');
+ //this.showErrorToast(component);
+ component
+ .find('save_button')
+ .set('v.disabled', false);
+ component.set('v.loginEdit', false);
+ }
+ });
+ $A.enqueueAction(action2);
+ this.allclear(component);
+ component.find('select_WorkMark').set('v.value', false);
+ component.find('save_button').set('v.disabled', false);
+ component.set('v.loginEdit', false);
+ debugger;
+ this.doinitSave(component, event, helper);
+ } else {
+ var error = response.getError();
+ //component.set('v.errorMessage', '淇濆瓨鏃ユ姤澶辫触');
+ this.error('淇濆瓨鏃ユ姤澶辫触');
+ //this.showErrorToast(component);
+ component.find('save_button').set('v.disabled', false);
+ component.set('v.loginEdit', false);
+ }
+ });
+ $A.enqueueAction(action);
+ }
+ },
+
+ allclear: function (component) {
+ var clear = [{ label: '', value: '', selected: true }];
+ component.set('v.hospital', '');
+ component.set('v.hospitalId', '');
+ component.set('v.hospitalLinkId', '');
+ component.set('v.UseProduct1', '');
+ component.set('v.UseProduct1Id', '');
+ component.set('v.UseProduct2', '');
+ component.set('v.UseProduct2Id', '');
+ component.set('v.UseProduct3', '');
+ component.set('v.UseProduct3Id', '');
+ component.find('select_ProductClassification').set('v.value', '');
+ component.find('select_warlocksNumber').set('v.value', null);
+ component.find('select_department').set('v.value', '');
+ component.find('select_ConsumptionOfConsumables').set('v.value', null);
+ component.find('select_WorkMark').set('v.checked', false);
+ component.find('new_con').set('v.disabled', true);
+ component.find('select_doctor').set('v.options', clear);
+ component
+ .find('select_DealerPersonnel')
+ .set(
+ 'v.options',
+ this.conv_selected(
+ component.get('v.allselectlist.DealerPersonnel__c')
+ )
+ );
+ component
+ .find('select_purpose_type')
+ .set(
+ 'v.options',
+ this.conv_selected(
+ component.get('v.allselectlist.WorkRecord__c')
+ )
+ );
+ // component.find('select_ProductCcategory').set('v.options', this.conv_selected(component.get('v.allselectlist.ProductCcategory__c')));
+ component.find('select_EffectProgress').set('v.value', '');
+ component.find('select_OtherBrandConsumables').set('v.value', '');
+ component.find('select_ProductCcategory').set('v.value', '');
+ component.find('select_productCategories').set('v.value', '');
+ // ToDo闇�瑕佹祴璇曟墜鏈轰笂鑳借繍琛屼笉
+ component.set('v.data.Report_Date__c', '');
+ component.set('v.oppdata.Close_Forecasted_Date__c', '');
+ component.set('v.oppdata.Amount__c', '');
+ component.set('v.oppdata.OCMSale_Price__c', '');
+ component.set('v.oppdata.StageName__c', '');
+ component.set('v.Close_Forecasted_Date__c_o', '');
+ component.set('v.Amount__c_o', '');
+ component.set('v.OCMSale_Price__c_o', '');
+ component.set('v.StageName__c_o', '');
+ $A.util.addClass(
+ component.find('input-opportunity-stage'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount1'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount2'),
+ 'disp_none'
+ );
+ $A.util.addClass(component.find('input-opportunity-date'), 'disp_none');
+ this.selectPurposeType(component);
+ this.selectProductClassification(component);
+ this.selectpurposetype(component);
+ },
+
+ report_date_list: function (component, event, helper, count) {
+ var ret_obj = [];
+ var now = new Date();
+ for (var i = 0; i < count; i++) {
+ var start_day = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() - now.getDay() + 1 - i * 7
+ );
+ var end_day = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() + (7 - now.getDay()) - i * 7
+ );
+ var start_day_show = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() - now.getDay() - i * 7
+ );
+ var end_day_show = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() + (6 - now.getDay()) - i * 7
+ );
+ var date_text =
+ start_day.getFullYear() +
+ '/' +
+ (start_day.getMonth() + 1) +
+ '/' +
+ start_day.getDate() +
+ '~' +
+ end_day.getFullYear() +
+ '/' +
+ (end_day.getMonth() + 1) +
+ '/' +
+ end_day.getDate();
+ if (i == 0) {
+ ret_obj.push({
+ selected: true,
+ value:
+ start_day.getFullYear() +
+ '/' +
+ (start_day.getMonth() + 1) +
+ '/' +
+ start_day.getDate(),
+ label:
+ start_day_show.getFullYear() +
+ '/' +
+ (start_day_show.getMonth() + 1) +
+ '/' +
+ start_day_show.getDate() +
+ '~' +
+ end_day_show.getFullYear() +
+ '/' +
+ (end_day_show.getMonth() + 1) +
+ '/' +
+ end_day_show.getDate()
+ });
+ } else {
+ ret_obj.push({
+ selected: false,
+ value:
+ start_day.getFullYear() +
+ '/' +
+ (start_day.getMonth() + 1) +
+ '/' +
+ start_day.getDate(),
+ label:
+ start_day_show.getFullYear() +
+ '/' +
+ (start_day_show.getMonth() + 1) +
+ '/' +
+ start_day_show.getDate() +
+ '~' +
+ end_day_show.getFullYear() +
+ '/' +
+ (end_day_show.getMonth() + 1) +
+ '/' +
+ end_day_show.getDate()
+ });
+ }
+ }
+ component.find('select_date').set('v.options', ret_obj);
+ component.set('v.report_date_list', ret_obj);
+ },
+ create_report_header: function (
+ component,
+ event,
+ helper,
+ name,
+ s_agency,
+ s_date
+ ) {
+ s_date = this.get_date_string(s_date);
+ if (s_date == false) {
+ //component.set('v.errorMessage', 'get_date_string failed.');
+ this.error('get_date_string failed.');
+ //this.showErrorToast(component);
+ return false;
+ }
+ var head_key = this.create_header_input_key(s_agency, s_date);
+ component.set('v.agency_report_header', head_key);
+ if (head_key == false) {
+ //component.set('v.errorMessage', 'create_header_input_key failed.');
+ this.error('create_header_input_key failed.');
+ //this.showErrorToast(component);
+ return false;
+ }
+ var key2 = s_date.replace(/-/g, '');
+ var action = component.get('c.createReportHeader');
+ action.setParams({
+ name: name,
+ s_date: s_date,
+ s_agency: s_agency,
+ head_key: head_key
+ });
+ component.set('v.login', true);
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component.set('v.agency_report_header_id', res);
+ component.set('v.login', false);
+ this.toggle_report(component, event, helper);
+ } else {
+ //component.set('v.errorMessage', 'createReportHeader callback failed.');
+ this.error('createReportHeader callback failed.');
+ //this.showErrorToast(component);
+ component.set('v.login', false);
+ }
+ });
+ $A.enqueueAction(action);
+ },
+ create_report_header_edit: function (
+ component,
+ event,
+ helper,
+ name,
+ s_agency,
+ s_date
+ ) {
+ s_date = this.get_date_string(s_date);
+ if (s_date == false) {
+ //component.set('v.errorMessage', 'get_date_string failed.');
+ this.error('get_date_string failed.');
+ //this.showErrorToast(component);
+ return false;
+ }
+ var head_key = this.create_header_input_key(s_agency, s_date);
+ component.set('v.agency_report_header', head_key);
+ if (head_key == false) {
+ //component.set('v.errorMessage', 'create_header_input_key failed.');
+ this.error('create_header_input_key failed.');
+ //this.showErrorToast(component);
+ return false;
+ }
+ var key2 = s_date.replace(/-/g, '');
+ var action = component.get('c.createReportHeader');
+
+ action.setParams({
+ name: name,
+ s_date: s_date,
+ s_agency: s_agency,
+ head_key: head_key
+ });
+ component.set('v.login', true);
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component.set('v.agency_report_header_id', res);
+ component.set('v.login', false);
+ this.toggle_report_edit(component, event, helper);
+ } else {
+ //component.set('v.errorMessage', 'createReportHeader callback failed.');
+ this.error('createReportHeader callback failed.');
+ //this.showErrorToast(component);
+ component.set('v.login', false);
+ }
+ });
+ $A.enqueueAction(action);
+ },
+ create_header_input_key: function (agency_id, s_date) {
+ if (typeof s_date != 'string') {
+ s_date = this.get_date_string(s_date);
+ if (s_date == false) {
+ //component.set('v.errorMessage', 'get_date_string in create_header_input_key.');
+ this.error('get_date_string in create_header_input_key.');
+ //this.showErrorToast(component);
+ return false;
+ }
+ }
+ if (!agency_id || !s_date) {
+ return false;
+ }
+ s_date = s_date.replace(/-/g, '');
+ var headkey = agency_id + ':' + s_date;
+ return headkey;
+ },
+
+ /* typeof is not cool
+ * @ret : String, Boolean, Date, Error, Array, Function, Null, Undefined, etc
+ */
+ object_type: function (obj) {
+ var obj_type = Object.prototype.toString.call(obj).slice(8, -1);
+ return obj_type;
+ },
+ // create yyyy-mm-dd string
+ get_date_string: function (val) {
+ if (typeof val == 'string') {
+ if (val.match(/^\d{4}\/\d{1,2}\/\d{1,2}$/)) {
+ val = val.replace(/[\/]/g, '-');
+ var tmp = val.split('-');
+ if (tmp[1].length == 1) {
+ tmp[1] = '0' + tmp[1];
+ }
+ if (tmp[2].length == 1) {
+ tmp[2] = '0' + tmp[2];
+ }
+ val = tmp[0] + '-' + tmp[1] + '-' + tmp[2];
+ } else if (val.match(/^\d{4}-\d{1,2}-\d{1,2}$/)) {
+ //ok
+ } else {
+ return false;
+ }
+ } else if (this.object_type(val) == 'Date') {
+ var mm = val.getMonth() + 1;
+ if (String(mm).length == 1) {
+ mm = '0' + mm;
+ }
+ var dd = '';
+ if (String(val.getDate()).length == 1) {
+ dd = '0' + val.getDate();
+ } else {
+ dd = val.getDate();
+ }
+ val = val.getFullYear() + '-' + mm + '-' + dd;
+ } else {
+ return false;
+ }
+ return val;
+ },
+ // Controller 鏍规嵁椤甸潰鍖婚櫌鏌ヨ绗﹀悎鐨勫尰闄�
+ searchHos: function (component, event, helper) {
+ var hospital_name = event.getParam('value');
+ var action = component.get('c.getHospitalList');
+ action.setParams({
+ hospital_name: hospital_name
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var hospital_list = component.find('hospital_list');
+ var hosList = response.getReturnValue();
+ if (hosList.length > 0) {
+ $A.util.addClass(hospital_list, 'slds-is-open');
+ } else {
+ $A.util.removeClass(hospital_list, 'slds-is-open');
+ }
+ component.set('v.hospitalList', response.getReturnValue());
+ } else {
+ $A.util.removeClass(hospital_list, 'slds-is-open');
+ }
+ });
+ $A.enqueueAction(action);
+ },
+ hideSearch: function (component, event, helper) {
+ var hospital_list = component.find('hospital_list');
+ $A.util.removeClass(hospital_list, 'slds-is-open');
+ },
+ hideSearchs: function (component, event, helper) {
+ var hospital_list = component.find('hospital_list');
+ $A.util.removeClass(hospital_list, 'slds-is-open');
+ component.set('v.hospital', '');
+ component.set('v.hospitals', '');
+ component.set('v.hospitalLinkId', '');
+ component.set('v.data.Agency_Hospital__c', '');
+ component.set('v.hospitalId', '');
+ },
+ selectHos: function (component, event, helper) {
+ var hospital_list = component.find('hospital_list');
+ $A.util.removeClass(hospital_list, 'slds-is-open');
+ var accname = event.currentTarget.dataset.accname;
+ var accid = event.currentTarget.dataset.accid;
+ var hospital_data = component.get('v.hospitalList');
+ var select_purpose_type = component
+ .find('select_purpose_type')
+ .get('v.value');
+ for (var i = 0; i < hospital_data.length; i++) {
+ if (hospital_data[i].Hospital__c == accid) {
+ component.set('v.hospitalLinkId', hospital_data[i].Id);
+ component.set('v.data.Agency_Hospital__c', hospital_data[i].Id);
+ if (
+ select_purpose_type != '绉戝浼�' &&
+ hospital_data[i].Hospital__c
+ ) {
+ component.find('new_con').set('v.disabled', false);
+ } else {
+ component.find('new_con').set('v.disabled', true);
+ }
+ }
+ }
+ component.set('v.hospitals', accname);
+ component.set('v.hospital', accname);
+ component.set('v.hospitalId', accid);
+
+ component.set('v.setdoctorlisthos', true);
+ this.set_doctor_list_edit(component, event, helper);
+ },
+
+ //妯$硦鏌ヨ浣跨敤浜у搧1(浜у搧鍨嬪彿)
+ searchUseProduct1: function (component, event, helper) {
+ var UseProduct1Name = event.getParam('value');
+ var select_ProductClassification = component
+ .find('select_ProductClassification')
+ .get('v.value');
+ var action = component.get('c.getUseProduct1');
+ action.setParams({
+ UseProduct1Name: UseProduct1Name,
+ select_ProductClassification: select_ProductClassification
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var UseProduct1_List = component.find('UseProduct1_List');
+ var UseProduct1ListValue = response.getReturnValue();
+ if (UseProduct1ListValue.length > 0) {
+ $A.util.addClass(UseProduct1_List, 'slds-is-open');
+ } else {
+ $A.util.removeClass(UseProduct1_List, 'slds-is-open');
+ }
+ component.set('v.UseProduct1List', UseProduct1ListValue);
+ } else {
+ $A.util.removeClass(UseProduct1_List, 'slds-is-open');
+ }
+ });
+ $A.enqueueAction(action);
+ },
+ hideSearchUseProduct1: function (component, event, helper) {
+ var UseProduct1_List = component.find('UseProduct1_List');
+ $A.util.removeClass(UseProduct1_List, 'slds-is-open');
+ },
+ hideSearchUseProduct1s: function (component, event, helper) {
+ var UseProduct1_List = component.find('UseProduct1_List');
+ $A.util.removeClass(UseProduct1_List, 'slds-is-open');
+ component.set('v.UseProduct1', '');
+ component.set('v.UseProduct1s', '');
+ component.set('v.UseProduct1Id', '');
+ component.set('v.data.UseProduct1__c', '');
+ },
+ seletUseProduct1Change: function (component, event, helper) {
+ var UseProduct1_List = component.find('UseProduct1_List');
+ $A.util.removeClass(UseProduct1_List, 'slds-is-open');
+ var accname = event.currentTarget.dataset.accname;
+ var accid = event.currentTarget.dataset.accid;
+ var UseProduct1ListDate = component.get('v.UseProduct1List');
+ for (var i = 0; i < UseProduct1ListDate.length; i++) {
+ if (UseProduct1ListDate[i].Id == accid) {
+ component.set('v.UseProduct1Id', UseProduct1ListDate[i].Id);
+ component.set(
+ 'v.data.UseProduct1__c',
+ UseProduct1ListDate[i].Id
+ );
+ }
+ }
+ var UseProduct2_TEXT = component
+ .find('UseProduct2_TEXT')
+ .get('v.value');
+ var UseProduct3_TEXT = component
+ .find('UseProduct3_TEXT')
+ .get('v.value');
+ if (UseProduct2_TEXT != accname && UseProduct3_TEXT != accname) {
+ component.set('v.UseProduct1s', accname);
+ component.set('v.UseProduct1', accname);
+ } else {
+ //component.set('v.errorMessage', '涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝�');
+ this.error('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝�');
+ //this.showErrorToast(component);
+ }
+ },
+ //妯$硦鏌ヨ浣跨敤浜у搧2
+ searchUseProduct2: function (component, event, helper) {
+ var UseProduct2Name = event.getParam('value');
+ var select_ProductClassification = component
+ .find('select_ProductClassification')
+ .get('v.value');
+ var action = component.get('c.getUseProduct1');
+ action.setParams({
+ UseProduct1Name: UseProduct2Name,
+ select_ProductClassification: select_ProductClassification
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var UseProduct2_List = component.find('UseProduct2_List');
+ var UseProduct2List = response.getReturnValue();
+ if (UseProduct2List.length > 0) {
+ $A.util.addClass(UseProduct2_List, 'slds-is-open');
+ } else {
+ $A.util.removeClass(UseProduct2_List, 'slds-is-open');
+ }
+ component.set('v.UseProduct2List', response.getReturnValue());
+ } else {
+ $A.util.removeClass(UseProduct2_List, 'slds-is-open');
+ }
+ });
+ $A.enqueueAction(action);
+ },
+ hideSearchUseProduct2: function (component, event, helper) {
+ var UseProduct2_List = component.find('UseProduct2_List');
+ $A.util.removeClass(UseProduct2_List, 'slds-is-open');
+ },
+ hideSearchUseProduct2s: function (component, event, helper) {
+ var UseProduct2_List = component.find('UseProduct2_List');
+ $A.util.removeClass(UseProduct2_List, 'slds-is-open');
+ component.set('v.UseProduct2', '');
+ component.set('v.UseProduct2s', '');
+ component.set('v.UseProduct2Id', '');
+ component.set('v.data.UseProduct2__c', '');
+ },
+ seletUseProduct2Change: function (component, event, helper) {
+ var UseProduct2_List = component.find('UseProduct2_List');
+ $A.util.removeClass(UseProduct2_List, 'slds-is-open');
+ var accname = event.currentTarget.dataset.accname;
+ var accid = event.currentTarget.dataset.accid;
+ var UseProduct2ListDate = component.get('v.UseProduct2List');
+ for (var i = 0; i < UseProduct2ListDate.length; i++) {
+ if (UseProduct2ListDate[i].Id == accid) {
+ component.set('v.UseProduct2Id', UseProduct2ListDate[i].Id);
+ component.set(
+ 'v.data.UseProduct2__c',
+ UseProduct2ListDate[i].Id
+ );
+ }
+ }
+ var UseProduct1_TEXT = component
+ .find('UseProduct1_TEXT')
+ .get('v.value');
+ var UseProduct3_TEXT = component
+ .find('UseProduct3_TEXT')
+ .get('v.value');
+ if (UseProduct1_TEXT != accname && UseProduct3_TEXT != accname) {
+ component.set('v.UseProduct2s', accname);
+ component.set('v.UseProduct2', accname);
+ } else {
+ //component.set('v.errorMessage', '涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝�');
+ this.error('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝�');
+ //this.showErrorToast(component);
+ }
+ },
+ //妯$硦鏌ヨ浣跨敤浜у搧3
+ searchUseProduct3: function (component, event, helper) {
+ var UseProduct3Name = event.getParam('value');
+ var select_ProductClassification = component
+ .find('select_ProductClassification')
+ .get('v.value');
+ var action = component.get('c.getUseProduct1');
+ action.setParams({
+ UseProduct1Name: UseProduct3Name,
+ select_ProductClassification: select_ProductClassification
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var UseProduct3_List = component.find('UseProduct3_List');
+ var UseProduct3List = response.getReturnValue();
+ if (UseProduct3List.length > 0) {
+ $A.util.addClass(UseProduct3_List, 'slds-is-open');
+ } else {
+ $A.util.removeClass(UseProduct3_List, 'slds-is-open');
+ }
+ component.set('v.UseProduct3List', response.getReturnValue());
+ } else {
+ $A.util.removeClass(UseProduct3_List, 'slds-is-open');
+ }
+ });
+ $A.enqueueAction(action);
+ },
+ hideSearchUseProduct3: function (component, event, helper) {
+ var UseProduct3_List = component.find('UseProduct3_List');
+ $A.util.removeClass(UseProduct3_List, 'slds-is-open');
+ },
+ hideSearchUseProduct3s: function (component, event, helper) {
+ var UseProduct3_List = component.find('UseProduct3_List');
+ $A.util.removeClass(UseProduct3_List, 'slds-is-open');
+ component.set('v.UseProduct3', '');
+ component.set('v.UseProduct3s', '');
+ component.set('v.UseProduct3Id', '');
+ component.set('v.data.UseProduct3__c', '');
+ },
+ seletUseProduct3Change: function (component, event, helper) {
+ var UseProduct3_List = component.find('UseProduct3_List');
+ $A.util.removeClass(UseProduct3_List, 'slds-is-open');
+ var accname = event.currentTarget.dataset.accname;
+ var accid = event.currentTarget.dataset.accid;
+ var UseProduct3ListDate = component.get('v.UseProduct3List');
+ for (var i = 0; i < UseProduct3ListDate.length; i++) {
+ if (UseProduct3ListDate[i].Id == accid) {
+ component.set('v.UseProduct3Id', UseProduct3ListDate[i].Id);
+ component.set(
+ 'v.data.UseProduct3__c',
+ UseProduct3ListDate[i].Id
+ );
+ }
+ }
+ var UseProduct1_TEXT = component
+ .find('UseProduct1_TEXT')
+ .get('v.value');
+ var UseProduct2_TEXT = component
+ .find('UseProduct2_TEXT')
+ .get('v.value');
+ if (UseProduct1_TEXT != accname && UseProduct2_TEXT != accname) {
+ component.set('v.UseProduct3s', accname);
+ component.set('v.UseProduct3', accname);
+ } else {
+ //component.set('v.errorMessage', '涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝�');
+ this.error('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝�');
+ //this.showErrorToast(component);
+ }
+ },
+ //hospitalLinkId 缁忛攢鍟嗗尰闄㈢殑ID 鎷滆浜哄鍒剁殑鍦版柟
+ doctor_change: function (component, event, helper) {
+ var doctorurpose = component.find('select_purpose_type').get('v.value');
+ var doctor_value = component.find('select_doctor').get('v.value');
+ var doctor_list = component.get('v.doctor_list');
+ var flg = false;
+ if (doctor_list) {
+ for (var i = 0; i < doctor_list.length; i++) {
+ if (doctor_list[i].value == doctor_value) {
+ if (doctorurpose == '绉戝浼�') {
+ // component.set('v.doctor_title', doctor_list[i].Doctor_Division1__c);
+ } else {
+ component.set(
+ 'v.doctor_title',
+ doctor_list[i].Doctor_Division1__c
+ );
+ }
+ flg = true;
+ break;
+ }
+ }
+ }
+ if (flg == false) {
+ component.set('v.doctor_title', '');
+ }
+ },
+ //SWAG-CF58C3 fy start 璋冪敤pi
+ set_aws_url: function (component, sobject) {
+ var action = component.get('c.getAwsurl');
+ action.setParams({
+ sobj: sobject
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var awsmap = this.conv_selected(response.getReturnValue());
+ component.set('v.AWStoken', awsmap.token);
+ component.set('v.AWSinsert', awsmap.newUrl);
+ component.set('v.AWSsearch', awsmap.searchUrl);
+ component.set('v.AWStransactionURL', awsmap.transactionURL);
+ } else {
+ // component.set('v.errorMessage', 'AWS url/token error.');
+ this.error('AWS url/token error.');
+ //this.showErrorToast(component);
+ component.set('v.login', false);
+ component.set('v.loginEdit', false);
+ }
+ });
+ $A.enqueueAction(action);
+ },
+
+ insert_agencycontact: function (
+ component,
+ token,
+ newUrl,
+ payload,
+ agencyHospitalid,
+ helper,
+ hospitalName
+ ) {
+ console.log('newUrl = ' + newUrl);
+ console.log('payload = ' + payload);
+ console.log('token = ' + token);
+ fetch(newUrl, {
+ method: 'POST',
+ body: payload,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'pi-token': token
+ }
+ })
+ .then((data) => {
+ return data.json();
+ })
+ .then((result) => {
+ console.log('result = ' + JSON.stringify(result));
+ if (result.status == '0') {
+ $A.getCallback(function () {
+ helper.to_agencycontact(
+ component,
+ result,
+ agencyHospitalid
+ );
+ })();
+ } else {
+ console.log('AWS status error:' + result);
+ component.set('v.login', false);
+ if (result.status == '129') {
+ component
+ .find('OppMessage')
+ .setError(
+ '璇ュ鎴蜂汉鍛樺悕瀛楀凡瀛樺湪锛屽湪' +
+ hospitalName +
+ '鍖婚櫌锛岃淇敼'
+ );
+ } else {
+ component
+ .find('OppMessage')
+ .setError('AWS insert error.');
+ }
+ }
+ })
+ .catch((error) => {
+ console.log('AWS insert error:' + error);
+ component.set('v.login', false);
+ component.find('OppMessage').setError('AWS insert error.');
+ });
+ },
+
+ to_agencycontact: function (component, result, agencyHospitalid) {
+ var action = component.get('c.saveAgencyContact');
+ action.setParams({
+ name: result.object[0].name,
+ //"nameEncrypt" : result.object[0].nameEncrypt, //zhj 鏂版柟妗堟敼閫� 2023-12-21
+ type: result.object[0].type,
+ //"typeEncrypt" : result.object[0].typeEncrypt, //zhj 鏂版柟妗堟敼閫� 2023-12-21
+ doctorDivision1: result.object[0].doctorDivision1,
+ //"doctorDivision1Encrypt" : result.object[0].doctorDivision1Encrypt, //zhj 鏂版柟妗堟敼閫� 2023-12-21
+ agencyHospitalid: agencyHospitalid,
+ awsid: result.object[0].dataId
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var acMap = this.conv_selected(response.getReturnValue());
+ console.log(acMap);
+ if (acMap.AgencyContactId != '') {
+ //纭浜嬪姟
+ var token = component.get('v.AWStoken');
+ var confirmUrl = component.get('v.AWStransactionURL');
+
+ let data = Object.create(null);
+ data['isSuccess'] = 1;
+ data['sfRecordId'] = '';
+ data['txId'] = result.txId;
+
+ this.to_confirm(
+ component,
+ token,
+ confirmUrl,
+ JSON.stringify(data)
+ );
+ } else if (acMap.errormsg != '') {
+ // component.set('v.errorMessage', acMap.errormsg);
+ this.error(acMap.errormsg);
+ //this.showErrorToast(component);
+ component.set('v.login', false);
+ } else {
+ //component.set('v.errorMessage', 'agency contact insert id error.');
+ this.error('agency contact insert id error.');
+ //this.showErrorToast(component);
+ component.set('v.login', false);
+ }
+ } else {
+ //component.set('v.errorMessage', 'agency contact insert error.');
+ this.error('agency contact insert error.');
+ //this.showErrorToast(component);
+ component.set('v.login', false);
+ }
+ });
+ $A.enqueueAction(action);
+ },
+
+ to_confirm: function (component, token, confirmUrl, payload, event) {
+ fetch(confirmUrl, {
+ method: 'POST',
+ body: payload,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'pi-token': token
+ }
+ })
+ .then((data) => {
+ return data.json();
+ })
+ .then((result) => {
+ if (
+ result.status == '0' &&
+ result.hasOwnProperty('success') &&
+ result.success
+ ) {
+ // component.set('v.truthy', false);
+ // var modal_newAC = component.find('modal_newAC')
+ // $A.util.addClass(modal_newAC, 'disp_none');
+ // this.success('.瀹㈡埛浜哄憳宸插垱寤恒��');
+ // this.set_doctor_list(component);
+
+ component.set('v.truthy', false);
+ var modal_newAC = component.find('modal_newAC');
+ $A.util.addClass(modal_newAC, 'disp_none');
+ component.set('v.successMessage', '.鎷滆浜哄凡鍒涘缓銆�');
+ this.showSuccessToast(component);
+ component.set('v.login', false);
+ this.set_doctor_list_edit(component);
+ } else {
+ //component.set('v.errorMessage', 'AWS confirm error.');
+ this.error('AWS confirm error.');
+ //this.showErrorToast(component);
+ component.set('v.login', false);
+ }
+ })
+ .catch((error) => {
+ // component.set('v.errorMessage', 'AWS confirm error.');
+ this.error('AWS confirm error.');
+ //this.showErrorToast(component);
+ component.set('v.login', false);
+ });
+ },
+ //SWAG-CF58C3 fy end 璋冪敤pi
+
+ set_doctor_list: function (component) {
+ console.log('set_doctor_list');
+ var doctor_value = component.find('select_purpose_type').get('v.value');
+ var hospital_id = component.get('v.hospitalLinkId');
+ console.log('hospital_id = ' + hospital_id);
+ if (hospital_id) {
+ if (doctor_value == '绉戝浼�') {
+ component.set('v.loginEdit', true);
+ this.set_doctor_list2(component);
+ } else {
+ component.set('v.loginEdit', true);
+ var action = component.get('c.getDoctorList');
+ action.setParams({
+ hospital_id: hospital_id
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = this.conv_selected(response.getReturnValue());
+ //fy
+ var setdoctorlisthos =
+ component.get('v.setdoctorlisthos');
+ if (setdoctorlisthos) {
+ component.set('v.default_select_doctor_id', '');
+ component.set('v.setdoctorlisthos', false);
+ }
+ //fy
+ var default_doctor = component.get(
+ 'v.default_select_doctor_id'
+ );
+ if (default_doctor != '' && res.length > 0) {
+ var doctor_title = '';
+ let awsids = [];
+ for (var i = 0; i < res.length; i++) {
+ if (res[i].value == default_doctor) {
+ res[i].selected = true;
+ doctor_title = res[i].Doctor_Division1__c;
+ } else {
+ res[i].selected = false;
+ }
+ if (res[i].AWS_Data_Id__c) {
+ awsids.push(res[i].AWS_Data_Id__c);
+ }
+ }
+ component
+ .find('select_doctor')
+ .set('v.options', res);
+ component.set('v.doctor_title', doctor_title);
+ console.log('awsids = ' + JSON.stringify(awsids));
+ if (awsids.length > 0) {
+ let PIConfig = component.get('v.PIConfig');
+ let staticResourceAgencyContact = JSON.parse(
+ PIConfig.staticResourceAgencyContact
+ );
+ AWSService.search(
+ staticResourceAgencyContact.searchUrl,
+ {
+ dataIds: awsids
+ },
+ function (data) {
+ console.log(
+ 'data = ' + JSON.stringify(data)
+ );
+ if (
+ data &&
+ data.object &&
+ data.object.length
+ ) {
+ let m = {};
+ for (let di in data.object) {
+ if (
+ data.object[di] &&
+ data.object[di].dataId
+ ) {
+ m[data.object[di].dataId] =
+ data.object[di];
+ }
+ }
+
+ for (let ri in res) {
+ if (
+ res[ri] &&
+ res[ri].AWS_Data_Id__c &&
+ m.hasOwnProperty(
+ res[ri].AWS_Data_Id__c
+ )
+ ) {
+ res[ri].label =
+ m[
+ res[
+ ri
+ ].AWS_Data_Id__c
+ ].name;
+ }
+ }
+ component
+ .find('select_doctor')
+ .set('v.options', res);
+ }
+
+ component.set('v.loginEdit', false);
+ },
+ staticResourceAgencyContact.token
+ );
+ }
+ } else {
+ let awsids = [];
+ for (var i = 0; i < res.length; i++) {
+ if (res[i].AWS_Data_Id__c) {
+ awsids.push(res[i].AWS_Data_Id__c);
+ }
+ }
+ component
+ .find('select_doctor')
+ .set('v.options', res);
+ if (awsids.length > 0) {
+ let PIConfig = component.get('v.PIConfig');
+ let staticResourceAgencyContact = JSON.parse(
+ PIConfig.staticResourceAgencyContact
+ );
+ AWSService.search(
+ staticResourceAgencyContact.searchUrl,
+ {
+ dataIds: awsids
+ },
+ function (data) {
+ if (
+ data &&
+ data.object &&
+ data.object.length
+ ) {
+ let m = {};
+ for (let di in data.object) {
+ if (
+ data.object[di] &&
+ data.object[di].dataId
+ ) {
+ m[data.object[di].dataId] =
+ data.object[di];
+ }
+ }
+
+ for (let ri in res) {
+ if (
+ res[ri] &&
+ res[ri].AWS_Data_Id__c &&
+ m.hasOwnProperty(
+ res[ri].AWS_Data_Id__c
+ )
+ ) {
+ res[ri].label =
+ m[
+ res[
+ ri
+ ].AWS_Data_Id__c
+ ].name;
+ }
+ }
+ component
+ .find('select_doctor')
+ .set('v.options', res);
+ }
+
+ component.set('v.loginEdit', false);
+ },
+ staticResourceAgencyContact.token
+ );
+ }
+ // component.find('select_doctor').set('v.options', res);
+ if (res.length > 0) {
+ component.set(
+ 'v.doctor_title',
+ res[0].Doctor_Division1__c
+ );
+ }
+ }
+ // component.set('v.default_select_doctor_id', '');
+
+ component.set('v.doctor_list', res);
+ component.set('v.loginEdit', false);
+ } else {
+ // component.set('v.errorMessage', 'set_doctor_list failed.');
+ this.error('set_doctor_list failed.');
+ //this.showErrorToast(component);
+ component.set('v.loginEdit', false);
+ }
+ });
+ $A.enqueueAction(action);
+ }
+ } else {
+ if (doctor_value == '绉戝浼�') {
+ this.set_doctor_list2(component);
+ } else {
+ component.find('select_doctor').set('v.options', '');
+ }
+ }
+ component.set('v.loginEdit', false);
+ }, //fy 20220414
+ set_doctor_list_edit: function (component) {
+ console.log('set_doctor_list');
+ var doctor_value = component.find('select_purpose_type').get('v.value');
+ var hospital_id = component.get('v.hospitalLinkId');
+ console.log('hospital_id = ' + hospital_id);
+ if (hospital_id) {
+ if (doctor_value == '绉戝浼�') {
+ component.set('v.loginEdit', true);
+ this.set_doctor_list2(component);
+ } else {
+ component.set('v.loginEdit', true);
+ var action = component.get('c.getDoctorList');
+ action.setParams({
+ hospital_id: hospital_id
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = this.conv_selected(response.getReturnValue());
+ //fy
+ var setdoctorlisthos =
+ component.get('v.setdoctorlisthos');
+ if (setdoctorlisthos) {
+ component.set('v.default_select_doctor_id', '');
+ component.set('v.setdoctorlisthos', false);
+ }
+ //fy
+ var default_doctor = component.get(
+ 'v.default_select_doctor_id'
+ );
+ if (default_doctor != '' && res.length > 0) {
+ var doctor_title = '';
+ let awsids = [];
+ for (var i = 0; i < res.length; i++) {
+ if (res[i].value == default_doctor) {
+ res[i].selected = true;
+ doctor_title = res[i].Doctor_Division1__c;
+ } else {
+ res[i].selected = false;
+ }
+ if (res[i].AWS_Data_Id__c) {
+ awsids.push(res[i].AWS_Data_Id__c);
+ }
+ }
+ component
+ .find('select_doctor')
+ .set('v.options', res);
+ component.set('v.doctor_title', doctor_title);
+ console.log('awsids = ' + JSON.stringify(awsids));
+ if (awsids.length > 0) {
+ let PIConfig = component.get('v.PIConfig');
+ let staticResourceAgencyContact = JSON.parse(
+ PIConfig.staticResourceAgencyContact
+ );
+ AWSService.search(
+ staticResourceAgencyContact.searchUrl,
+ {
+ dataIds: awsids
+ },
+ function (data) {
+ console.log(
+ 'data = ' + JSON.stringify(data)
+ );
+ if (
+ data &&
+ data.object &&
+ data.object.length
+ ) {
+ let m = {};
+ for (let di in data.object) {
+ if (
+ data.object[di] &&
+ data.object[di].dataId
+ ) {
+ m[data.object[di].dataId] =
+ data.object[di];
+ }
+ }
+
+ for (let ri in res) {
+ if (
+ res[ri] &&
+ res[ri].AWS_Data_Id__c &&
+ m.hasOwnProperty(
+ res[ri].AWS_Data_Id__c
+ )
+ ) {
+ res[ri].label =
+ m[
+ res[
+ ri
+ ].AWS_Data_Id__c
+ ].name;
+ }
+ }
+ component
+ .find('select_doctor')
+ .set('v.options', res);
+ }
+
+ component.set('v.loginEdit', false);
+ },
+ staticResourceAgencyContact.token
+ );
+ }
+ } else {
+ let awsids = [];
+ for (var i = 0; i < res.length; i++) {
+ if (res[i].AWS_Data_Id__c) {
+ awsids.push(res[i].AWS_Data_Id__c);
+ }
+ }
+ component
+ .find('select_doctor')
+ .set('v.options', res);
+ if (awsids.length > 0) {
+ let PIConfig = component.get('v.PIConfig');
+ let staticResourceAgencyContact = JSON.parse(
+ PIConfig.staticResourceAgencyContact
+ );
+ AWSService.search(
+ staticResourceAgencyContact.searchUrl,
+ {
+ dataIds: awsids
+ },
+ function (data) {
+ if (
+ data &&
+ data.object &&
+ data.object.length
+ ) {
+ let m = {};
+ for (let di in data.object) {
+ if (
+ data.object[di] &&
+ data.object[di].dataId
+ ) {
+ m[data.object[di].dataId] =
+ data.object[di];
+ }
+ }
+
+ for (let ri in res) {
+ if (
+ res[ri] &&
+ res[ri].AWS_Data_Id__c &&
+ m.hasOwnProperty(
+ res[ri].AWS_Data_Id__c
+ )
+ ) {
+ res[ri].label =
+ m[
+ res[
+ ri
+ ].AWS_Data_Id__c
+ ].name;
+ }
+ }
+ component
+ .find('select_doctor')
+ .set('v.options', res);
+ }
+
+ component.set('v.loginEdit', false);
+ },
+ staticResourceAgencyContact.token
+ );
+ }
+ // component.find('select_doctor').set('v.options', res);
+ if (res.length > 0) {
+ component.set(
+ 'v.doctor_title',
+ res[0].Doctor_Division1__c
+ );
+ }
+ }
+ // component.set('v.default_select_doctor_id', '');
+
+ component.set('v.doctor_list', res);
+ component.set('v.loginEdit', false);
+ } else {
+ // component.set('v.errorMessage', 'set_doctor_list failed.');
+ this.error('set_doctor_list failed.');
+ //this.showErrorToast(component);
+ component.set('v.loginEdit', false);
+ }
+ });
+ $A.enqueueAction(action);
+ }
+ } else {
+ if (doctor_value == '绉戝浼�') {
+ this.set_doctor_list2(component);
+ } else {
+ component.find('select_doctor').set('v.options', '');
+ }
+ }
+ },
+ set_doctor_list2: function (component) {
+ var action1 = component.get('c.selectdoctor3c');
+ action1.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+
+ for (var i = 0; i < res.length; i++) {
+ if (res[i].selected == 'true') {
+ res[i].selected = true;
+ } else {
+ res[i].selected = false;
+ }
+ }
+
+ component.find('select_doctor').set('v.options', res);
+ var doctor3value = component.get('v.default_select_doctor_id2');
+ this.set_selected(component, 'select_doctor', doctor3value);
+ component.set('v.login', false);
+ component.set('v.loginEdit', false);
+ }
+ });
+ $A.enqueueAction(action1);
+ },
+ productcategoryChange1: function (component, event, helper) {
+ var product_category_id = component
+ .find('select_Product1')
+ .get('v.value');
+ var pcId1 = component.find('select_Product2').get('v.value');
+ var pcId2 = component.find('select_Product3').get('v.value');
+ var p1bool = pcId1 != '' && pcId1 != null && pcId1 != undefined;
+ var p2bool = pcId2 != '' && pcId2 != null && pcId2 != undefined;
+ var p0bool =
+ product_category_id != '' &&
+ product_category_id != null &&
+ product_category_id != undefined;
+ if (
+ (p1bool && p0bool && product_category_id == pcId1) ||
+ (p2bool && p0bool && product_category_id == pcId2)
+ ) {
+ //component.set('v.errorMessage', '涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
+ this.error('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
+ //this.showErrorToast(component);
+ component.find('select_Product1').set('v.value', '');
+ }
+ },
+ productcategoryChange2: function (component, event, helper) {
+ var product_category_id = component
+ .find('UseProduct2_TEXT')
+ .get('v.value');
+ var pcId1 = component.find('UseProduct1_TEXT').get('v.value');
+ var pcId2 = component.find('UseProduct3_TEXT').get('v.value');
+ var p1bool = pcId1 != '' && pcId1 != null;
+ var p2bool = pcId2 != '' && pcId2 != null;
+ var p0bool = product_category_id != '' && product_category_id != null;
+ if (
+ (p1bool && p0bool && product_category_id == pcId1) ||
+ (p2bool && p0bool && product_category_id == pcId2)
+ ) {
+ //component.set('v.errorMessage', '涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
+ this.error('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
+ //this.showErrorToast(component);
+ component.set('v.UseProduct2_TEXT', '');
+ }
+ },
+ productcategoryChange3: function (component, event, helper) {
+ var product_category_id = component
+ .find('select_Product3')
+ .get('v.value');
+ var pcId1 = component.find('select_Product1').get('v.value');
+ var pcId2 = component.find('select_Product2').get('v.value');
+ var p1bool = pcId1 != '' && pcId1 != null && pcId1 != undefined;
+ var p2bool = pcId2 != '' && pcId2 != null && pcId2 != undefined;
+ var p0bool =
+ product_category_id != '' &&
+ product_category_id != null &&
+ product_category_id != undefined;
+ if (
+ (p1bool && p0bool && product_category_id == pcId1) ||
+ (p2bool && p0bool && product_category_id == pcId2)
+ ) {
+ //component.set('v.errorMessage', '涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
+ this.error('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
+ //this.showErrorToast(component);
+ component.find('select_Product3').set('v.value', '');
+ }
+ },
+ conv_selected: function (obj) {
+ for (var i = 0; i < obj.length; i++) {
+ if (obj[i].selected) {
+ if (obj[i].selected == 'true') {
+ obj[i].selected = true;
+ } else {
+ obj[i].selected = false;
+ }
+ }
+ }
+ return obj;
+ },
+ set_selected: function (component, aura_id_name, value) {
+ var select_tmp = component.find(aura_id_name).get('v.options');
+ if (select_tmp) {
+ for (var i = 0; i < select_tmp.length; i++) {
+ if (select_tmp[i].value == value) {
+ select_tmp[i].selected = true;
+ } else {
+ select_tmp[i].selected = false;
+ }
+ }
+ component.find(aura_id_name).set('v.options', select_tmp);
+ return true;
+ } else {
+ return false;
+ }
+ },
+ //寮瑰嚭 鎴愬姛鎻愮ず
+ showSuccessToast: function (component) {
+ $A.util.removeClass(component.find('successDiv'), 'slds-hide');
+ window.setTimeout(
+ $A.getCallback(function () {
+ $A.util.addClass(component.find('successDiv'), 'slds-hide');
+ }),
+ 3000
+ );
+ },
+ //寮瑰嚭 鎴愬姛鎻愮ず
+ showSuccessToast01: function (component) {
+ $A.util.removeClass(component.find('successDiv01'), 'slds-hide');
+ window.setTimeout(
+ $A.getCallback(function () {
+ $A.util.addClass(component.find('successDiv01'), 'slds-hide');
+ }),
+ 3000
+ );
+ },
+ //寮瑰嚭 閿欒鎻愮ず
+ showErrorToast: function (component) {
+ $A.util.removeClass(component.find('errorDiv'), 'slds-hide');
+ window.setTimeout(
+ $A.getCallback(function () {
+ $A.util.addClass(component.find('errorDiv'), 'slds-hide');
+ }),
+ 3000
+ );
+ },
+ //寮瑰嚭 閿欒鎻愮ず
+ showErrorToast01: function (component) {
+ $A.util.removeClass(component.find('errorDiv01'), 'slds-hide');
+ window.setTimeout(
+ $A.getCallback(function () {
+ $A.util.addClass(component.find('errorDiv01'), 'slds-hide');
+ }),
+ 6000
+ );
+ },
+ error: function (message) {
+ var toastEvent = $A.get('e.force:showToast');
+ toastEvent.setParams({
+ title: '閿欒!',
+ message: message,
+ type: 'error',
+ duration: 'sticky'
+ });
+ toastEvent.fire();
+ },
+ createCon: function (component, event, helper) {
+ var modal_newAC = component.find('modal_newAC');
+ $A.util.removeClass(modal_newAC, 'disp_none');
+ component.set('v.truthy', true);
+ },
+ hideCmp: function (component, event, helper) {
+ var div1 = component.find('report');
+ var div2 = component.find('report_list');
+ $A.util.addClass(div1, 'disp_none');
+ $A.util.addClass(div2, 'disp_none');
+ },
+ handleSuccess: function (component, event, helper) {
+ var insertId = event.getParams().response.Id;
+ var displayValue = event.getParams().response.fields.Name.value;
+ event.setParams({});
+ component.set('v.truthy', false);
+ var modal_newAC = component.find('modal_newAC');
+ $A.util.addClass(modal_newAC, 'disp_none');
+ component.set('v.successMessage', '.鎷滆浜哄凡鍒涘缓銆�');
+ this.showSuccessToast(component);
+ this.set_doctor_list_edit(component, event, helper);
+ },
+ createCancel: function (component, event, helper) {
+ component.set('v.truthy', false);
+ var modal_newAC = component.find('modal_newAC');
+ $A.util.addClass(modal_newAC, 'disp_none');
+ component.find('OppMessage').setError('');
+ },
+ //绉戝璧嬪��
+ setOpportunity_cfilter: function (component) {
+ var hosId = component.get('v.hospitalId');
+ var Department_Cateogy__c = component
+ .find('select_department')
+ .get('v.value');
+ var opportunity_cfilter = '';
+ if (hosId != '' && hosId != null) {
+ opportunity_cfilter =
+ ' Agency_Hospital__r.Hospital__c=' + "'" + hosId + "'";
+ }
+ if (Department_Cateogy__c != '' && Department_Cateogy__c != null) {
+ if (opportunity_cfilter != '' && opportunity_cfilter != null) {
+ opportunity_cfilter += ' AND ';
+ }
+ // fy Department_Cateogy_text__c
+ opportunity_cfilter +=
+ 'Department_Cateogy__c=' + "'" + Department_Cateogy__c + "'";
+ // opportunity_cfilter += 'Department_Cateogy_text__c=' + '\'' + Department_Cateogy__c + '\'';
+ }
+ component.set('v.opportunity_cfilter', opportunity_cfilter);
+ },
+ readFile: function (component, helper, file) {
+ if (!file) return;
+ if (!file.name.match(/\.(csv||CSV)$/)) {
+ return alert('only support csv files');
+ } else {
+ reader = new FileReader();
+ reader.onerror = function errorHandler(evt) {
+ switch (evt.target.error.code) {
+ case evt.target.error.NOT_FOUND_ERR:
+ alert('File Not Found!');
+ break;
+ case evt.target.error.NOT_READABLE_ERR:
+ alert('File is not readable');
+ break;
+ case evt.target.error.ABORT_ERR:
+ break; // noop
+ default:
+ alert('An error occurred reading this file.');
+ }
+ };
+ reader.onabort = function (e) {
+ alert('File read cancelled');
+ };
+ reader.onloadstart = function (e) {
+ var output =
+ '<ui type="disc"><li><strong>' +
+ file.name +
+ '</strong> (' +
+ file.type +
+ ')- ' +
+ file.size +
+ 'bytes, last modified: ' +
+ file.lastModifiedDate.toLocaleDateString() +
+ '</li></ui>';
+ component.set('v.filename', file.name);
+ component.set('v.TargetFileName', output);
+ };
+ reader.onload = function (e) {
+ var data = e.target.result;
+
+ component.set('v.fileContentData', data);
+ console.log('file data' + JSON.stringify(data));
+ var allTextLines = data.split(/\r\n|\n/);
+ console.log('qqqqqqqqqqqqqqqqqqq' + allTextLines);
+ var dataRows = allTextLines.length - 1;
+ var headers = allTextLines[0].split(',');
+ var numOfRows = component.get('v.NumOfRecords');
+ if (
+ dataRows > numOfRows + 1 ||
+ dataRows == 1 ||
+ dataRows == 0
+ ) {
+ alert('File Rows between 1 to ' + numOfRows + ' .');
+ component.set('v.showMain', true);
+ } else {
+ var lines = [];
+ var filecontentdata;
+ var content =
+ '<table class="table slds-table slds-table--bordered slds-table--cell-buffer">';
+ content += '<thead><tr class="slds-text-title--caps">';
+ content +=
+ '<th scope="col" style="width:100px">' +
+ '琛屽彿' +
+ '</th>';
+ for (i = 0; i < headers.length; i++) {
+ if (headers[i] == '浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺') {
+ content +=
+ '<th scope="col" style="width:250px">' +
+ headers[i] +
+ '</th>';
+ } else {
+ content +=
+ '<th scope="col" style="width:200px">' +
+ headers[i] +
+ '</th>';
+ }
+ }
+ content += '</tr></thead>';
+ for (var i = 1; i < allTextLines.length; i++) {
+ filecontentdata = allTextLines[i].split(',');
+ if (filecontentdata[0] != '') {
+ content += '<tr>';
+ content += '<td>' + i + '</td>';
+ for (var j = 0; j < filecontentdata.length; j++) {
+ content +=
+ '<td>' + filecontentdata[j] + '</td>';
+ }
+ content += '</tr>';
+ }
+ }
+ content += '</table>';
+ console.log(content);
+ component.set('v.TableContent', content);
+ component.set('v.showMain', false);
+ }
+ };
+ reader.readAsText(file, 'gb2312');
+ }
+ var reader = new FileReader();
+ reader.onloadend = function () {};
+ reader.readAsDataURL(file);
+ },
+ // fy 璋冪敤pi鏀归�犵殑 鑾峰彇url 鍜� token鐨勬柟娉�
+ search_contact_url: function (component, sobject, callback) {
+ var action = component.get('c.getAwsurl');
+ action.setParams({
+ sobj: sobject
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var result = response.getReturnValue();
+ if (callback) callback(result);
+ } else {
+ //component.set('v.errorMessage', 'AWS url/token error.');
+ this.error('AWS url/token error.');
+ //this.showErrorToast01(component);
+ component.set('v.login', false);
+ }
+ });
+ $A.enqueueAction(action);
+ },
+ // fy 璋冪敤pi鏀归�犵殑 鑾峰彇.瀹㈡埛浜哄憳鐨勬柟娉�
+ search_core: function (token, searchUrl, payload, callback, component) {
+ console.log('searchUrl = ' + searchUrl);
+ fetch(searchUrl, {
+ method: 'POST',
+ body: payload,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'pi-token': token
+ }
+ })
+ .then((data) => {
+ return data.json();
+ })
+ .then((result) => {
+ component.set('v.login', false);
+ if (callback) callback(result);
+ })
+ .catch((error) => {
+ console.log('AWS search error = ' + JSON.stringify(error));
+ // component.set('v.errorMessage', 'AWS search error.');
+ this.error('AWS search error.');
+ //this.showErrorToast01(component);
+ component.set('v.login', false);
+ });
+ },
+ saveRecords: function (component, event, helper) {
+ //component.set('v.login', true);
+ component.set('v.modal_import_spinner', true);
+ //fy 瀵煎叆 202200506 start
+ var action1 = component.get('c.processDataAWSId');
+ action1.setParams({
+ fileData: component.get('v.fileContentData')
+ });
+ action1.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var ress = response.getReturnValue();
+ if (ress) {
+ var valur = ress.split('error1');
+ if (valur.length <= 1) {
+ var res = JSON.parse(response.getReturnValue());
+
+ var dataArr = new Array();
+ var dataMap = new Map();
+ res.forEach((item) => {
+ if (item.AWS_Data_Id__c) {
+ dataArr.push(item.AWS_Data_Id__c);
+ //dataMap.set(item.AWS_Data_Id__c,item.Name_Encrypted__c); //zhj 鏂版柟妗堟敼閫� 2022-12-21
+ dataMap.set(
+ item.AWS_Data_Id__c,
+ item.AWS_Data_Id__c
+ );
+ }
+ });
+
+ let obj = Object.create(null);
+ obj['dataIds'] = dataArr;
+ var payload = JSON.stringify(obj);
+ this.search_contact_url(
+ component,
+ 'Agency_Contact__c',
+ (result) => {
+ var token = result.token;
+ var searchUrl = result.searchUrl;
+ console.log('token = ' + token);
+ console.log('searchUrl = ' + searchUrl);
+ console.log('payload = ' + payload);
+ this.search_core(
+ token,
+ searchUrl,
+ payload,
+ (result) => {
+ console.log(
+ 'result = ' + JSON.stringify(result)
+ );
+ if (result.status == '0') {
+ if (
+ result.object != null &&
+ result.object.length != 0
+ ) {
+ //component.set('v.login', true);
+ component.set(
+ 'v.modal_import_spinner',
+ true
+ );
+ this.saveRecordsEditFile(
+ component,
+ dataMap,
+ result.object,
+ helper
+ );
+ } else {
+ //component.set('v.errorMessage', 'AWS 鏌ヨ鏁版嵁涓虹┖ ');
+ this.error('AWS 鏌ヨ鏁版嵁涓虹┖ ');
+ //this.showErrorToast01(component);
+ //component.set('v.login', false);
+ component.set(
+ 'v.modal_import_spinner',
+ false
+ );
+ }
+ } else {
+ //component.set('v.errorMessage', 'AWS search status : ' + result.status);
+ this.error(
+ 'AWS search status : ' +
+ result.status
+ );
+ //this.showErrorToast01(component);
+ //component.set('v.login', false);
+ component.set(
+ 'v.modal_import_spinner',
+ false
+ );
+ }
+ },
+ component
+ );
+ }
+ );
+ } else {
+ //component.set('v.errorMessage', valur[1] + '\n' + "璇蜂慨鏀瑰悗閲嶆柊涓婁紶");
+ this.error(valur[1] + '\n' + '璇蜂慨鏀瑰悗閲嶆柊涓婁紶');
+ //this.showErrorToast01(component);
+ //component.set('v.login', false);
+ component.set('v.modal_import_spinner', false);
+ }
+ }
+ }
+ });
+ $A.enqueueAction(action1);
+ // var action = component.get("c.processData");
+ // var fieldsList = ['Name', 'Phone', 'AccountNumber']; //Please write your code dynamic fields
+ // var filedata =component.get("v.fileContentData");
+ // action.setParams({
+ // fileData: filedata,
+ // sobjectName: 'Account', //Any object
+ // fields: fieldsList
+ // });
+ // action.setCallback(this, function (response) {
+ // var state = response.getState();
+ // if (state === "SUCCESS") {
+ // var res = response.getReturnValue();
+ // var res1 = '';
+ // if (res != 'success') {
+ // var ress = res.split('=');
+ // console.log(ress);
+ // for (var i = 0; i < ress.length; i++) {
+ // res1 += ress[i].substr(7) + '\n';
+ // }
+ // console.log("==" + res1);
+ // component.set('v.errorMessage', res1 + "璇蜂慨鏀瑰悗閲嶆柊涓婁紶");
+ // this.showErrorToast01(component);
+ // component.set('v.login', false);
+ // } else {
+ // component.set('v.successMessage', '瀵煎叆鎴愬姛');
+ // this.showSuccessToast01(component);
+ // component.set("v.showMain", true);
+ // component.set('v.login', false);
+ // this.doinit(component, event, helper);
+ // }
+ // }
+ // else if (state === "INCOMPLETE") {
+ // component.set('v.login', false);
+ // }
+ // else if (state === "ERROR") {
+ // var errors = response.getError();
+ // if (errors) {
+ // if (errors[0] && errors[0].message) {
+ // console.log("Error message: " +
+ // errors[0].message);
+ // component.set('v.login', false);
+ // }
+ // } else {
+ // console.log("Unknown error");
+ // component.set('v.login', false);
+ // }
+ // }
+ // });
+ // $A.enqueueAction(action);
+ },
+ saveRecordsEditFile: function (component, dataMap, searchData, helper) {
+ var searchDataMap = new Map();
+ for (var i = 0; i < searchData.length; i++) {
+ if (searchData[i].name != null) {
+ var sd = searchData[i];
+ searchDataMap.set(sd.name.replace(' ', ''), sd.dataId);
+ }
+ }
+ console.log('searchDataMap=' + searchDataMap);
+ var error = '';
+ var fileData = component.get('v.fileContentData');
+ fileData = this.ToCDB(fileData); //鍏ㄨ杞崐瑙�
+ var files = fileData.split('\n');
+
+ var fileStr = files[0];
+ fileStr += '\n';
+
+ for (var i = 1; i < files.length - 1; i++) {
+ if (files[i]) {
+ var filelist = files[i].split(',');
+ var fileName = filelist[5];
+ var WorkRecord = filelist[4];
+ if (
+ WorkRecord == 'SIS' ||
+ WorkRecord == '闄㈠唴鍏ラ櫌鐢宠' ||
+ WorkRecord == '鏀惰垂椤圭洰鐢宠' ||
+ WorkRecord == '绉戝浼�'
+ ) {
+ if (fileName) {
+ if (WorkRecord != '绉戝浼�') {
+ if (searchDataMap.get(fileName.replace(' ', ''))) {
+ var nameDataId = searchDataMap.get(
+ fileName.replace(' ', '')
+ );
+ if (dataMap.get(nameDataId)) {
+ filelist[5] = dataMap.get(nameDataId); //zhj 鏂版柟妗堟敼閫� filelist[5]涓嶅啀瀛樼殑nameEncrpt 2022-12-21
+ } else {
+ error +=
+ 'error1 绗�' +
+ i +
+ '琛屾暟鎹嫓璁夸汉SF涓嶅瓨鍦�';
+ }
+ } else {
+ error +=
+ 'error1 绗�' + i + '琛屾暟鎹嫓璁夸汉AWS涓嶅瓨鍦�';
+ }
+ } else {
+ if (
+ filelist[5] != '鍖荤敓' &&
+ filelist[5] != '鍖荤敓+鎶ゅ+'
+ ) {
+ //&&filelist[5]!='鍖荤敓锛嬫姢澹�'
+ error += 'error1 绗�' + i + '琛屾暟鎹嫓璁夸汉涓嶅瓨鍦�';
+ }
+ }
+ } else {
+ error += 'error1 绗�' + i + '琛屾暟鎹嫓璁夸汉涓嶈兘涓虹┖';
+ }
+ } else {
+ if (fileName) {
+ if (WorkRecord != '绉戝浼�') {
+ if (searchDataMap.get(fileName.replace(' ', ''))) {
+ var nameDataId = searchDataMap.get(
+ fileName.replace(' ', '')
+ );
+ if (dataMap.get(nameDataId)) {
+ filelist[5] = dataMap.get(nameDataId);
+ } else {
+ error +=
+ 'error1 绗�' +
+ i +
+ '琛屾暟鎹嫓璁夸汉SF涓嶅瓨鍦�';
+ }
+ } else {
+ error +=
+ 'error1 绗�' + i + '琛屾暟鎹嫓璁夸汉AWS涓嶅瓨鍦�';
+ }
+ } else {
+ if (
+ filelist[5] != '鍖荤敓' &&
+ filelist[5] != '鍖荤敓+鎶ゅ+'
+ ) {
+ //&&filelist[5]!='鍖荤敓锛嬫姢澹�'
+ error += 'error1 绗�' + i + '琛屾暟鎹嫓璁夸汉涓嶅瓨鍦�';
+ }
+ }
+ }
+ }
+ fileStr += filelist.toString();
+ fileStr += '\n';
+ }
+ }
+
+ if (error != '') {
+ console.log('zhj error = ' + error);
+ let errorArray = error.split('error1');
+ let errorDatas = [];
+ let errorDataRow = [];
+
+ var fileContentData = component
+ .get('v.fileContentData')
+ .split('\n');
+ console.log('fileContentData = ' + JSON.stringify(fileContentData));
+ console.log('errorArray = ' + JSON.stringify(errorArray));
+ for (var i in errorArray) {
+ // if (errorArray[i] != '') {
+ // let errorData = {}
+ // errorData.errorRow = errorArray[i].trim().substring(1, 2);
+ // errorData.errorInfo = errorArray[i].trim().substring(5);
+ // errorDatas.push(errorData);
+ // }
+ if (errorArray[i] != '') {
+ let errorData = {};
+ let index = errorDataRow.indexOf(
+ errorArray[i].trim().substring(1, 2)
+ );
+ if (index == -1) {
+ errorData.errorRow = errorArray[i]
+ .trim()
+ .substring(1, 2);
+ errorDataRow.push(errorData.errorRow);
+ errorData.errorInfo = errorArray[i].trim().substring(5);
+ if (errorData.errorInfo == '鎷滆浜篈WS涓嶅瓨鍦�') {
+ errorData.errorInfo =
+ '鎷滆浜� ' +
+ fileContentData[errorData.errorRow].split(
+ ','
+ )[5] +
+ '涓嶅瓨鍦�';
+ }
+ errorDatas.push(errorData);
+ } else {
+ if (
+ errorArray[i].trim().substring(5) ==
+ '鎷滆浜篈WS涓嶅瓨鍦�'
+ ) {
+ errorData[index].errorInfo =
+ '; ' +
+ '鎷滆浜� ' +
+ fileContentData[
+ errorDatas[index].errorRow
+ ].split(',')[5] +
+ '涓嶅瓨鍦�';
+ } else {
+ errorDatas[index].errorInfo +=
+ '; ' + errorArray[i].trim().substring(5);
+ }
+ }
+ }
+ }
+
+ var fileContentData = component
+ .get('v.fileContentData')
+ .split('\n');
+ console.log('fileContentData = ' + JSON.stringify(fileContentData));
+ let errorColumns = [
+ {
+ label: '閿欒琛�',
+ fieldName: 'errorRow',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 100
+ },
+ {
+ label: '閿欒淇℃伅',
+ fieldName: 'errorInfo',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 300,
+ wrapText: true
+ }
+ ];
+ for (var i = 0; i < fileContentData[0].split(',').length - 1; i++) {
+ let initialWidth = 180;
+ if (
+ fileContentData[0].split(',')[i] ==
+ '浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺' ||
+ fileContentData[0].split(',')[i] == '浣跨敤浜у搧1(浜у搧鍨嬪彿)'
+ ) {
+ initialWidth = 250;
+ }
+ errorColumns.push({
+ label: fileContentData[0].split(',')[i],
+ fieldName: 'field' + i,
+ type: 'text',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: initialWidth
+ });
+ }
+
+ for (var i = 0; i < errorDatas.length; i++) {
+ let data = fileContentData[errorDatas[i].errorRow];
+ console.log('data = ' + JSON.stringify(data));
+ if (data) {
+ for (var j = 0; j < data.split(',').length; j++) {
+ let label = 'field' + j;
+ errorDatas[i][label] = data.split(',')[j];
+ }
+ }
+ }
+ console.log('errorDatas =' + JSON.stringify(errorDatas));
+ component.set('v.errorColumns', errorColumns);
+ component.set('v.errorData', errorDatas);
+ component.set('v.showErrorInfo', true);
+
+ console.log('error = ' + error);
+ //component.set('v.errorMessage', error);
+ this.error(error);
+ //this.showErrorToast01(component);
+ console.log('error=' + error);
+ //component.set('v.login', false);
+ component.set('v.modal_import_spinner', false);
+ return;
+ }
+
+ console.log('fileStr=' + fileStr);
+ $A.getCallback(function () {
+ helper.ImportMethod(component, fileStr, helper);
+ })();
+ },
+ ImportMethod: function (component, fileStr, helper) {
+ var action = component.get('c.processData');
+ var fieldsList = ['Name', 'Phone', 'AccountNumber']; //Please write your code dynamic fields
+ // var filedata =component.get("v.fileContentData");
+ action.setParams({
+ fileData: fileStr,
+ sobjectName: 'Account', //Any object
+ fields: fieldsList
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var res = response.getReturnValue();
+ var res1 = '';
+ if (res != 'success') {
+ var ress = res.split('=');
+ console.log(ress);
+ let errorDatas = [];
+ let errorDataRow = [];
+ var fileContentData = component
+ .get('v.fileContentData')
+ .split('\n');
+ console.log(
+ 'fileContentData[1].split(,)[5] = ' +
+ fileContentData[1].split(',')[5]
+ );
+
+ for (var i = 0; i < ress.length; i++) {
+ res1 += ress[i].substr(7) + '\n';
+ if (ress[i] != '') {
+ let errorData = {};
+ let index = errorDataRow.indexOf(
+ ress[i].substr(7).substring(1, 2)
+ );
+ if (index == -1) {
+ errorData.errorRow = ress[i]
+ .substr(7)
+ .substring(1, 2);
+ errorDataRow.push(errorData.errorRow);
+ errorData.errorInfo = ress[i]
+ .substr(7)
+ .substring(5);
+ if (errorData.errorInfo == '鎷滆浜轰笉瀛樺湪') {
+ console.log(
+ 'errorData.errorRow = ' +
+ errorData.errorRow
+ );
+ errorData.errorInfo =
+ '鎷滆浜� ' +
+ fileContentData[
+ errorData.errorRow
+ ].split(',')[5] +
+ '涓嶅瓨鍦�';
+ }
+ errorDatas.push(errorData);
+ } else {
+ if (
+ ress[i].substr(7).substring(5) ==
+ '鎷滆浜轰笉瀛樺湪'
+ ) {
+ errorDatas[index].errorInfo +=
+ '; ' +
+ '鎷滆浜� ' +
+ fileContentData[
+ errorDatas[index].errorRow
+ ].split(',')[5] +
+ '涓嶅瓨鍦�';
+ } else {
+ errorDatas[index].errorInfo +=
+ '; ' + ress[i].substr(7).substring(5);
+ }
+ }
+ }
+ }
+ var fileContentData = component
+ .get('v.fileContentData')
+ .split('\n');
+ let errorColumns = [
+ {
+ label: '閿欒琛�',
+ fieldName: 'errorRow',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 100
+ },
+ {
+ label: '閿欒淇℃伅',
+ fieldName: 'errorInfo',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 300,
+ wrapText: true
+ }
+ ];
+ for (
+ var i = 0;
+ i < fileContentData[0].split(',').length - 1;
+ i++
+ ) {
+ let initialWidth = 180;
+ if (
+ fileContentData[0].split(',')[i] ==
+ '浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺' ||
+ fileContentData[0].split(',')[i] ==
+ '浣跨敤浜у搧1(浜у搧鍨嬪彿)'
+ ) {
+ initialWidth = 250;
+ }
+ errorColumns.push({
+ label: fileContentData[0].split(',')[i],
+ fieldName: 'field' + i,
+ type: 'text',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: initialWidth
+ });
+ }
+
+ for (var i = 0; i < errorDatas.length; i++) {
+ let data = fileContentData[errorDatas[i].errorRow];
+ console.log('data = ' + JSON.stringify(data));
+ for (var j = 0; j < data.split(',').length; j++) {
+ let label = 'field' + j;
+ errorDatas[i][label] = data.split(',')[j];
+ }
+ }
+ component.set('v.errorColumns', errorColumns);
+ component.set('v.errorData', errorDatas);
+ component.set('v.showErrorInfo', true);
+
+ console.log('==' + res1);
+ //component.set('v.errorMessage', res1 + "璇蜂慨鏀瑰悗閲嶆柊涓婁紶");
+ this.error(res1 + '璇蜂慨鏀瑰悗閲嶆柊涓婁紶');
+ //this.showErrorToast01(component);
+ //component.set('v.login', false);
+ component.set('v.modal_import_spinner', false);
+ } else {
+ component.set('v.successMessage', '瀵煎叆鎴愬姛');
+ this.showSuccessToast01(component);
+ component.set('v.showMain', true);
+ //component.set('v.login', false);
+ component.set('v.modal_import_spinner', false);
+ this.doinit(component, event, helper);
+ }
+ } else if (state === 'INCOMPLETE') {
+ //component.set('v.login', false);
+ component.set('v.modal_import_spinner', false);
+ } else if (state === 'ERROR') {
+ var errors = response.getError();
+ if (errors) {
+ if (errors[0] && errors[0].message) {
+ console.log('Error message: ' + errors[0].message);
+ //component.set('v.login', false);
+ component.set('v.modal_import_spinner', false);
+ }
+ } else {
+ console.log('Unknown error');
+ //component.set('v.login', false);
+ component.set('v.modal_import_spinner', false);
+ }
+ }
+ });
+ $A.enqueueAction(action);
+ }, //鍏ㄨ杞崐瑙�
+ ToCDB: function (str) {
+ var tmp = '';
+ for (var i = 0; i < str.length; i++) {
+ if (str.charCodeAt(i) > 65248 && str.charCodeAt(i) < 65375) {
+ tmp += String.fromCharCode(str.charCodeAt(i) - 65248);
+ } else {
+ tmp += String.fromCharCode(str.charCodeAt(i));
+ }
+ }
+ return tmp;
+ },
+ //瀵煎嚭鐨凜SV鏂囦欢
+ convertArrayOfObjectsToCSV: function (component, objectRecords) {
+ var csvStringResult, counter, keys, columnDivider, lineDivider, thkeys;
+ if (objectRecords == null || !objectRecords.length) {
+ return null;
+ }
+ columnDivider = ',';
+ lineDivider = '\n';
+ keys = [
+ 'Report_Date__c',
+ 'Agency_Hospital__c',
+ 'Department_Cateogy_text__c',
+ 'DealerPersonnel__c',
+ 'WorkRecord__c',
+ 'doctor2__c',
+ 'ProductClassification__c',
+ 'UseProduct1__c',
+ 'UseProduct2__c',
+ 'UseProduct3__c',
+ 'EffectProgress__c',
+ 'ConsumptionOfConsumables__c',
+ 'WarlockClassification__c',
+ 'ProductCcategory__c',
+ 'productCategories__c',
+ 'warlocksNumber__c',
+ 'WorkMark__c'
+ ];
+ thkeys = [
+ '娲诲姩鏃�',
+ '鍖婚櫌',
+ '绉戝',
+ '缁忛攢鍟嗕汉鍛�',
+ '娲诲姩鍖哄垎',
+ '鎷滆浜�',
+ '浜у搧鍒嗙被(绗笁鍒嗙被)',
+ '浣跨敤浜у搧1(浜у搧鍨嬪彿)',
+ '浣跨敤浜у搧2',
+ '浣跨敤浜у搧3',
+ '鏁堟灉/杩涘害',
+ '浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺',
+ '浜у搧1瀵瑰簲鏈紡鍒嗙被',
+ '宸查噰鐢ㄥ叾浠栧搧鐗�',
+ '鍏朵粬鍝佺墝浜у搧绫诲埆',
+ '浜у搧鐢ㄩ噺',
+ '鏀彺闇�姹�'
+ ];
+ csvStringResult = '';
+ csvStringResult += thkeys.join(columnDivider);
+ csvStringResult += lineDivider;
+ console.log('杩涘叆瀵煎嚭helper');
+ for (var i = 0; i < objectRecords.length; i++) {
+ counter = 0;
+ for (var sTempkey in keys) {
+ var skey = keys[sTempkey];
+ if (counter > 0) {
+ csvStringResult += columnDivider;
+ }
+ if (typeof objectRecords[i][skey] === 'undefined') {
+ csvStringResult += '' + '' + '';
+ continue;
+ }
+ if (skey == 'Person_In_Charge2__c') {
+ csvStringResult +=
+ objectRecords[i].Person_In_Charge2__r.Name;
+ } else if (skey == 'Agency_Hospital__c') {
+ csvStringResult += objectRecords[i].Agency_Hospital__r.Name;
+ } else if (skey == 'DealerPersonnel__c') {
+ csvStringResult += objectRecords[i].DealerPersonnel__r.Name;
+ } else if (skey == 'doctor2__c') {
+ csvStringResult += objectRecords[i].doctor2__r.Name;
+ } else if (skey == 'UseProduct1__c') {
+ csvStringResult +=
+ objectRecords[i].UseProduct1__r.Asset_Model_No__c;
+ } else if (skey == 'UseProduct2__c') {
+ csvStringResult +=
+ objectRecords[i].UseProduct2__r.Asset_Model_No__c;
+ } else if (skey == 'UseProduct3__c') {
+ csvStringResult +=
+ objectRecords[i].UseProduct3__r.Asset_Model_No__c;
+ } else {
+ csvStringResult += objectRecords[i][skey];
+ }
+ counter++;
+ }
+ console.log('瀵煎嚭寰幆缁撴潫');
+ csvStringResult += lineDivider;
+ }
+ return csvStringResult;
+ },
+ // 瀵煎嚭椤甸潰鏄剧ず鐨勬ā鏉�
+ showExportDate: function (component, objectRecords) {
+ console.log('杩涘叆showexceportdate' + objectRecords);
+ var keys = [
+ 'Report_Date__c',
+ 'Agency_Hospital__c',
+ 'Department_Cateogy_text__c',
+ 'DealerPersonnel__c',
+ 'WorkRecord__c',
+ 'doctor2__c',
+ 'ProductClassification__c',
+ 'UseProduct1__c',
+ 'UseProduct2__c',
+ 'UseProduct3__c',
+ 'EffectProgress__c',
+ 'ConsumptionOfConsumables__c',
+ 'WarlockClassification__c',
+ 'ProductCcategory__c',
+ 'productCategories__c',
+ 'warlocksNumber__c',
+ 'WorkMark__c'
+ ];
+ var headers = [
+ '娲诲姩鏃�',
+ '鍖婚櫌',
+ '绉戝',
+ '缁忛攢鍟嗕汉鍛�',
+ '娲诲姩鍖哄垎',
+ '鎷滆浜�',
+ '浜у搧鍒嗙被(绗笁鍒嗙被)',
+ '浣跨敤浜у搧1(浜у搧鍨嬪彿)',
+ '浣跨敤浜у搧2',
+ '浣跨敤浜у搧3',
+ '鏁堟灉/杩涘害',
+ '浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺',
+ '浜у搧1瀵瑰簲鏈紡鍒嗙被',
+ '宸查噰鐢ㄥ叾浠栧搧鐗�',
+ '鍏朵粬鍝佺墝浜у搧绫诲埆',
+ '浜у搧鐢ㄩ噺',
+ '鏀彺闇�姹�'
+ ];
+ var content =
+ '<table class="table slds-table slds-table--bordered slds-table--cell-buffer">';
+ content += '<thead><tr class="slds-text-title--caps">';
+ for (i = 0; i < headers.length; i++) {
+ content += '<th scope="col">' + headers[i] + '</th>';
+ }
+ content += '</tr></thead>';
+ for (var i = 0; i < objectRecords.length; i++) {
+ console.log('for' + content);
+ content += '<tr>';
+ for (var sTempkey in keys) {
+ console.log('for1' + sTempkey);
+ var skey = keys[sTempkey];
+ if (typeof objectRecords[i][skey] === 'undefined') {
+ content += '<td>' + '' + '</td>';
+ continue;
+ }
+ console.log(
+ 'for2' + objectRecords[i].Person_In_Charge2__r.Name
+ );
+ if (skey == 'Person_In_Charge2__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].Person_In_Charge2__r.Name +
+ '</td>';
+ } else if (skey == 'Agency_Hospital__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].Agency_Hospital__r.Name +
+ '</td>';
+ } else if (skey == 'DealerPersonnel__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].DealerPersonnel__r.Name +
+ '</td>';
+ } else if (skey == 'doctor2__c') {
+ content +=
+ '<td>' + objectRecords[i].doctor2__r.Name + '</td>';
+ } else if (skey == 'UseProduct1__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].UseProduct1__r.Asset_Model_No__c +
+ '</td>';
+ } else if (skey == 'UseProduct2__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].UseProduct2__r.Asset_Model_No__c +
+ '</td>';
+ } else if (skey == 'UseProduct3__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].UseProduct3__r.Asset_Model_No__c +
+ '</td>';
+ } else {
+ content += '<td>' + objectRecords[i][skey] + '</td>';
+ }
+ }
+ content += '</tr>';
+ }
+ content += '</table>';
+ console.log('helper寰幆缁撴潫' + content);
+ component.set('v.TableContent2', content);
+ component.set('v.showMain', false);
+ },
+
+ select_repores_date: function (component, event, helper) {
+ component.set('v.login', true);
+ var reportsdate1 = component.find('input-report-date1').get('v.value');
+ var reportsdate2 = component.find('input-report-date2').get('v.value');
+ console.log(
+ '杈撳叆鐨勫紑濮嬫棩鏈�' + reportsdate1 + '杈撳叆鐨勭粨鏉熸棩鏈�' + reportsdate2
+ );
+ var action = component.get('c.getReportsByDate');
+ console.log('杈撳叆鐨勫紑濮嬫棩鏈�1');
+ action.setParams({
+ date1: reportsdate1,
+ date2: reportsdate2
+ });
+ console.log('杈撳叆鐨勫紑濮嬫棩鏈�2');
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var res = response.getReturnValue();
+ console.log('杈撳叆鐨勫紑濮嬫棩鏈�3' + res);
+ component.set('v.login', false);
+
+ // PI 鏀归�� By Bright 20220328
+ if (true) {
+ let awsids = [];
+ for (let ri in res) {
+ if (
+ res[ri] &&
+ res[ri].doctor2__r &&
+ res[ri].doctor2__r.AWS_Data_Id__c
+ ) {
+ awsids.push(res[ri].doctor2__r.AWS_Data_Id__c);
+ }
+ }
+ if (awsids.length > 0) {
+ let PIConfig = component.get('v.PIConfig');
+ let staticResourceAgencyContact = JSON.parse(
+ PIConfig.staticResourceAgencyContact
+ );
+ AWSService.search(
+ staticResourceAgencyContact.searchUrl,
+ {
+ dataIds: awsids
+ },
+ function (data) {
+ if (data && data.object && data.object.length) {
+ let m = {};
+ for (let di in data.object) {
+ if (
+ data.object[di] &&
+ data.object[di].dataId
+ ) {
+ m[data.object[di].dataId] =
+ data.object[di];
+ }
+ }
+
+ for (let ri in res) {
+ if (
+ res[ri] &&
+ res[ri].doctor2__r &&
+ res[ri].doctor2__r.AWS_Data_Id__c &&
+ m.hasOwnProperty(
+ res[ri].doctor2__r
+ .AWS_Data_Id__c
+ )
+ ) {
+ res[ri].doctor2__r.Name =
+ m[
+ res[
+ ri
+ ].doctor2__r.AWS_Data_Id__c
+ ].name;
+ }
+ }
+ }
+ helper.showExportDate(component, res);
+
+ component.set('v.login', false);
+ },
+ staticResourceAgencyContact.token
+ );
+ } else {
+ helper.showExportDate(component, res);
+ }
+ }
+
+ component.set('v.reports_date', res);
+ } else {
+ alert('瀵煎嚭澶辫触,璇锋鏌ユ椿鍔ㄦ棩');
+ component.set('v.login', false);
+ }
+ });
+ $A.enqueueAction(action);
+ },
+
+ showImport: function (component) {
+ var modalimport = component.find('modal_import');
+ var modalimportbg = component.find('modal_importbg');
+ $A.util.removeClass(modalimport, 'disp_none');
+ $A.util.removeClass(modalimportbg, 'disp_none');
+ },
+
+ showExport: function (component) {
+ var modalimport = component.find('modal_export');
+ var modalimportbg = component.find('modal_exportbg');
+ $A.util.removeClass(modalimport, 'disp_none');
+ $A.util.removeClass(modalimportbg, 'disp_none');
+ },
+
+ close_import: function (component) {
+ var modalimport = component.find('modal_import');
+ var modalimportbg = component.find('modal_importbg');
+ $A.util.addClass(modalimport, 'disp_none');
+ $A.util.addClass(modalimportbg, 'disp_none');
+ },
+
+ close_export: function (component) {
+ var modalimport = component.find('modal_export');
+ var modalimportbg = component.find('modal_exportbg');
+ $A.util.addClass(modalimport, 'disp_none');
+ $A.util.addClass(modalimportbg, 'disp_none');
+ },
+ //椤甸潰涓殑鏂板缓鑱屼綅鎸夐挳
+ newlyBuild: function (component, event, helper) {
+ var hospital_id = component.get('v.hospitalLinkId');
+ event.preventDefault(); // stop form submission
+ var fields = component.find('newOpportunityField');
+ var nameer = '';
+ var type = '';
+ var doctorDivision1 = '';
+ fields.forEach(function (field) {
+ if (field.get('v.fieldName') === 'Name') {
+ nameer = field.get('v.value');
+ }
+ if (field.get('v.fieldName') === 'Type__c') {
+ type = field.get('v.value');
+ }
+ if (field.get('v.fieldName') === 'Doctor_Division1__c') {
+ doctorDivision1 = field.get('v.value');
+ }
+ });
+ if (hospital_id) {
+ component.set('v.login', true);
+ var action = component.get('c.newlyBuild');
+ action.setParams({
+ hospital_id: hospital_id,
+ nameer: nameer,
+ type: type,
+ doctorDivision1: doctorDivision1
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = this.conv_selected(response.getReturnValue());
+ var default_doctor = component.get(
+ 'v.default_select_doctor_id'
+ );
+ if (default_doctor != '' && res.length > 0) {
+ var doctor_title = '';
+ for (var i = 0; i < res.length; i++) {
+ if (res[i].value == default_doctor) {
+ res[i].selected = true;
+ doctor_title = res[i].Doctor_Division1__c;
+ } else {
+ res[i].selected = false;
+ }
+ }
+ component.find('select_doctor').set('v.options', res);
+ component.set('v.doctor_title', doctor_title);
+ } else {
+ component.find('select_doctor').set('v.options', res);
+ if (res.length > 0) {
+ component.set(
+ 'v.doctor_title',
+ res[0].Doctor_Division1__c
+ );
+ }
+ }
+ component.set('v.default_select_doctor_id', '');
+ component.set('v.doctor_list', res);
+ component.set('v.login', false);
+ } else {
+ //component.set('v.errorMessage', 'newlyBuild failed.');
+ this.error('newlyBuild failed.');
+ //this.showErrorToast(component);
+ component.set('v.login', false);
+ }
+ });
+ $A.enqueueAction(action);
+ }
+ },
+ //绉戝鍚岀被鑰楁潗楠岃瘉蹇呴』杈撳叆鏁板瓧
+ select_ConsumptionOfConsumables: function (component, event, helper) {
+ var sc = event.getSource().get('v.value');
+ if (sc != null) {
+ if (sc.length <= 14) {
+ if (sc.replace(/\D/gi, '')) {
+ component.set('v.select_ConsumptionOfConsumables', sc);
+ } else {
+ //component.set('v.errorMessage', '浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺蹇呴』杈撳叆鏁板瓧!');
+ this.error('浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺蹇呴』杈撳叆鏁板瓧!');
+ //this.showErrorToast(component);
+ }
+ } else {
+ //component.set('v.errorMessage', '浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺鏈�澶氳緭鍏�14浣嶆暟瀛�!');
+ this.error('浜у搧1鍚岀被鑰楁潗绉戝鏈堜娇鐢ㄩ噺鏈�澶氳緭鍏�14浣嶆暟瀛�!');
+ //this.showErrorToast(component);
+ }
+ }
+ },
+ //浜у搧鐢ㄩ噺楠岃瘉蹇呴』杈撳叆鏁板瓧
+ select_warlocksNumber: function (component, event, helper) {
+ var sc = event.getSource().get('v.value');
+ if (sc != null) {
+ if (sc.length <= 14) {
+ if (sc.replace(/\D/gi, '')) {
+ component.set('v.select_warlocksNumber', sc);
+ } else {
+ //component.set('v.errorMessage', '浜у搧鐢ㄩ噺蹇呴』杈撳叆鏁板瓧!');
+ this.error('浜у搧鐢ㄩ噺蹇呴』杈撳叆鏁板瓧!');
+ //this.showErrorToast(component);
+ }
+ } else {
+ //component.set('v.errorMessage', '浜у搧鐢ㄩ噺鏈�澶氳緭鍏�14浣嶆暟瀛�!');
+ this.error('浜у搧鐢ㄩ噺鏈�澶氳緭鍏�14浣嶆暟瀛�!');
+ //this.showErrorToast(component);
+ }
+ }
+ },
+ //宸ヤ綔浼氳褰�
+ selectPurposeType: function (component, event, helper) {
+ var doctor_value = component.find('select_purpose_type').get('v.value');
+ // alert(doctor_value);
+ if (doctor_value != '绉戝浼�') {
+ component.find('new_con').set('v.disabled', false);
+ } else {
+ component.find('new_con').set('v.disabled', true);
+ }
+ if (doctor_value != '') {
+ this.set_doctor_list_edit(component);
+ var action = component.get('c.selectPurposeTypes');
+ action.setParams({
+ doctor_value: doctor_value
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component
+ .find('select_EffectProgress')
+ .set('v.options', JSON.parse(JSON.stringify(res)));
+ }
+ });
+ $A.enqueueAction(action);
+ } else {
+ component.find('select_EffectProgress').set('v.options', []);
+ }
+ },
+
+ selectProductClassification: function (component, event, helper) {
+ var select_ProductClassification = component
+ .find('select_ProductClassification')
+ .get('v.value');
+ if (select_ProductClassification != '') {
+ var action = component.get('c.selectProductClassificationc');
+ action.setParams({
+ select_ProductClassification: select_ProductClassification
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component
+ .find('select_OtherBrandConsumables')
+ .set('v.options', JSON.parse(JSON.stringify(res)));
+ }
+ });
+ $A.enqueueAction(action);
+ } else {
+ component.find('select_OtherBrandConsumables').set('v.options', []);
+ }
+ this.selectProductCcategory(component);
+ },
+ select_ProductCcategory: function (component, event, helper) {
+ var select_ProductCcategory = component
+ .find('select_ProductCcategory')
+ .get('v.value');
+
+ if (select_ProductCcategory != '') {
+ var result = component.find('result');
+ var UserProType = component.get('v.UserProType');
+ //fy
+ $A.util.removeClass(result, 'disp_none');
+ if (UserProType == 'ENG') {
+ $A.util.removeClass(result, 'disp_none');
+ } else {
+ $A.util.addClass(result, 'disp_none');
+ }
+ var action = component.get('c.selectProductCcategory01');
+ action.setParams({
+ select_ProductCcategory: select_ProductCcategory
+ });
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component
+ .find('select_productCategories')
+ .set('v.options', JSON.parse(JSON.stringify(res)));
+ }
+ });
+ $A.enqueueAction(action);
+ } else {
+ component.find('select_productCategories').set('v.options', []);
+ var result = component.find('result');
+ $A.util.addClass(result, 'disp_none');
+ }
+ },
+ selectpurposetype: function (component, event, helper) {
+ var select_ProductCcategory = component
+ .find('select_ProductCcategory')
+ .get('v.value');
+ if (
+ select_ProductCcategory == null &&
+ select_ProductCcategory == undefined &&
+ select_ProductCcategory == ''
+ ) {
+ var result = component.find('result');
+ // $A.util.removeClass(result, 'disp_none');
+ if (UserProType == 'ENG') {
+ $A.util.removeClass(result, 'disp_none');
+ } else {
+ $A.util.addClass(result, 'disp_none');
+ }
+ } else {
+ component.find('select_productCategories').set('v.value', '');
+ var result = component.find('result');
+ $A.util.addClass(result, 'disp_none');
+ this.select_ProductCcategory(component);
+ }
+ },
+ //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
+ CallBackAction: function (component, action_name, para, callback) {
+ var action = component.get(
+ 'c.' + action_name.trimStart().replace('c.', '')
+ );
+ if (para) {
+ action.setParams(para);
+ }
+ if (callback) {
+ action.setCallback(this, function (data) {
+ callback(data);
+ });
+ }
+
+ $A.enqueueAction(action);
+ },
+ //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
+
+ //zhj 瀵煎嚭閿欒淇℃伅 2023-05-16 start
+ exportErrorInfoHelper: function (component) {
+ var errorData = component.get('v.errorData');
+ var errorColumns = component.get('v.errorColumns');
+
+ var datas = [];
+ let errorColumnsArray = [];
+ for (var i in errorColumns) {
+ errorColumnsArray.push(errorColumns[i].label);
+ }
+ datas.push(errorColumnsArray);
+ //datas.push(errorColumns);
+
+ for (var i in errorData) {
+ let data = [];
+ data.push(errorData[i].errorRow);
+ data.push(errorData[i].errorInfo);
+ for (var j = 0; j < Object.keys(errorData[i]).length - 2; j++) {
+ data.push(errorData[i]['field' + j]);
+ }
+ datas.push(data);
+ }
+
+ console.log('datas = ' + JSON.stringify(datas));
+ var csv = this.convertToCSV(component, datas);
+ console.log('csv = ' + JSON.stringify(csv));
+ this.downloadCSV(component, csv);
+ },
+
+ convertToCSV: function (component, data) {
+ console.log('enter convertToCSV');
+ console.log('data = ' + data);
+ var csv = '';
+ for (var i = 0; i < data.length; i++) {
+ var row = data[i];
+ console.log('row = ' + JSON.stringify(row));
+ for (var j = 0; j < row.length; j++) {
+ var val = '';
+ val = row[j] === null ? '' : row[j].toString();
+ console.log('val = ' + val);
+ if (
+ val.indexOf(',') !== -1 ||
+ val.indexOf('"') !== -1 ||
+ val.indexOf('\n') !== -1
+ ) {
+ //val = '"' + val.replace(/"/g,'""') + '"';
+ }
+ if (j > 0) {
+ csv += ',';
+ }
+ csv += val;
+ }
+ csv += '\n';
+ }
+ return csv;
+ },
+
+ downloadCSV: function (component, csv) {
+ var link = document.createElement('a');
+ var bom = '\uFEFF';
+ link.href =
+ 'data:text/csv;charset=utf-8,' + encodeURIComponent(bom + csv);
+ link.download = 'data.csv';
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ },
+ error: function (message) {
+ // $('toastMessage.forceToastManager').css('white-space', 'pre-wrap');
+ var toastEvent = $A.get('e.force:showToast');
+
+ toastEvent.setParams({
+ title: '閿欒!',
+ message: message,
+ type: 'error'
+ //"duration" : "sticky"
+ });
+ toastEvent.fire();
+ }
+ //zhj 瀵煎嚭閿欒淇℃伅 2023-05-16 end
});
diff --git a/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.auradoc b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.auradoc
new file mode 100644
index 0000000..d0d6eb5
--- /dev/null
+++ b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.auradoc
@@ -0,0 +1,6 @@
+<aura:documentation>
+ <aura:description>Documentation</aura:description>
+ <aura:example name="ExampleName" ref="exampleComponentName" label="Label">
+ Example Description
+ </aura:example>
+</aura:documentation>
\ No newline at end of file
diff --git a/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.cmp b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.cmp
new file mode 100644
index 0000000..fcfc38b
--- /dev/null
+++ b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.cmp
@@ -0,0 +1,25 @@
+<aura:component
+ implements="force:appHostable,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes"
+ access="global"
+>
+ <aura:attribute
+ name="data"
+ type="Agency_Report__c"
+ default="{'sobjectType':'Agency_Report__c','Report_Date__c':null}"
+ />
+
+ reportdata
+ <force:inputField
+ value="{!v.data.Report_Date__c}"
+ aura:id="input-report-date"
+ />
+ <aura:attribute
+ name="contact"
+ type="Contact"
+ default="{ 'sobjectType': 'Contact' }"
+ />
+ <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
+ Firstname
+ <force:inputField aura:id="firstname" value="{!v.contact.FirstName}" />
+ <force:inputField aura:id="lastname" value="{!v.contact.LastName}" />
+</aura:component>
diff --git a/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.cmp-meta.xml b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.cmp-meta.xml
new file mode 100644
index 0000000..171ac69
--- /dev/null
+++ b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.cmp-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>42.0</apiVersion>
+ <description>A Lightning Component Bundle</description>
+</AuraDefinitionBundle>
diff --git a/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.css b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.css
new file mode 100644
index 0000000..f407185
--- /dev/null
+++ b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.css
@@ -0,0 +1,2 @@
+.THIS {
+}
diff --git a/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.design b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.design
new file mode 100644
index 0000000..d247163
--- /dev/null
+++ b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.design
@@ -0,0 +1,3 @@
+<design:component >
+
+</design:component>
\ No newline at end of file
diff --git a/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.svg b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.svg
new file mode 100644
index 0000000..e201ae9
--- /dev/null
+++ b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJun.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <path d="M120,108 C120,114.6 114.6,120 108,120 L12,120 C5.4,120 0,114.6 0,108 L0,12 C0,5.4 5.4,0 12,0 L108,0 C114.6,0 120,5.4 120,12 L120,108 L120,108 Z" id="Shape" fill="#2A739E" />
+ <path d="M77.7383308,20 L61.1640113,20 L44.7300055,63.2000173 L56.0543288,63.2000173 L40,99.623291 L72.7458388,54.5871812 L60.907727,54.5871812 L77.7383308,20 Z" id="Path-1" fill="#FFFFFF" />
+ </g>
+</svg>
\ No newline at end of file
diff --git a/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunController.js b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunController.js
new file mode 100644
index 0000000..ead16af
--- /dev/null
+++ b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunController.js
@@ -0,0 +1,5 @@
+({
+ doInit: function (component, event, helper) {
+ console.log('Test');
+ }
+});
diff --git a/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunHelper.js b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunHelper.js
new file mode 100644
index 0000000..c2a6e9e
--- /dev/null
+++ b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunHelper.js
@@ -0,0 +1,3 @@
+({
+ helperMethod: function () {}
+});
diff --git a/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunRenderer.js b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunRenderer.js
new file mode 100644
index 0000000..605447f
--- /dev/null
+++ b/force-app/main/default/aura/TestForceInputByLiJun/TestForceInputByLiJunRenderer.js
@@ -0,0 +1,3 @@
+({
+ // Your renderer method overrides go here
+});
diff --git a/force-app/main/default/aura/WeeklyReport/WeeklyReport.cmp b/force-app/main/default/aura/WeeklyReport/WeeklyReport.cmp
index 7700999..74c553a 100644
--- a/force-app/main/default/aura/WeeklyReport/WeeklyReport.cmp
+++ b/force-app/main/default/aura/WeeklyReport/WeeklyReport.cmp
@@ -1,52 +1,77 @@
-<aura:component controller="WeeklyReportCmp" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes" access="global" >
+<aura:component
+ controller="WeeklyReportCmp"
+ implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes"
+ access="global"
+>
<ltng:require styles="{!$Resource.multilineToastCSS}" />聽
- <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
- <aura:handler event="c:strike_evt" action="{!c.createAopp}" name="strike_evt_addNewRecord"/>
- <aura:attribute name="data" type="Agency_Report__c" default="{sobjectType:'Agency_Report__c'}"/>
- <aura:attribute name="oppdata" type="Agency_Opportunity__c" default="{sobjectType:'Agency_Opportunity__c'}"/>
- <aura:attribute name="acondata" type="Agency_Contact__c" default="{sobjectType:'Agency_Contact__c'}"/>
+ <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
+ <aura:handler
+ event="c:strike_evt"
+ action="{!c.createAopp}"
+ name="strike_evt_addNewRecord"
+ />
+ <aura:attribute
+ name="data"
+ type="Agency_Report__c"
+ default="{sobjectType:'Agency_Report__c'}"
+ />
+ <aura:attribute
+ name="oppdata"
+ type="Agency_Opportunity__c"
+ default="{sobjectType:'Agency_Opportunity__c'}"
+ />
+ <aura:attribute
+ name="acondata"
+ type="Agency_Contact__c"
+ default="{sobjectType:'Agency_Contact__c'}"
+ />
<!-- <aura:attribute name="oppdata_old" type="Agency_Opportunity__c" default="{sobjectType:'Agency_Opportunity__c'}"/> -->
- <aura:attribute name="Close_Forecasted_Date__c_o" type="Date"/>
- <aura:attribute name="Amount__c_o" type="String"/>
- <aura:attribute name="OCMSale_Price__c_o" type="String"/>
- <aura:attribute name="StageName__c_o" type="String"/>
- <aura:attribute name="fieldsmap" type="Map"/>
- <aura:attribute name="alldata" type="List"/>
- <aura:attribute name="allselectlist" type="Map"/>
- <aura:attribute name="doclist" type="List"/>
- <aura:attribute name="docmap" type="Map"/>
- <aura:attribute name="login" type="Boolean" default="false"/>
- <aura:attribute name="loadOpp" type="Boolean" default="false"/>
- <aura:attribute name="reportPageData" type="Map"/>
- <aura:attribute name="selectbody" type="String"/>
- <aura:attribute name="report_date_list" type="Map"/>
- <aura:attribute name="selected_date" type="String"/>
- <aura:attribute name="selected_agency_person" type="String"/>
- <aura:attribute name="agency_report_header" type="String"/>
- <aura:attribute name="agency_report_header_id" type="String"/>
- <aura:attribute name="result" type="String" default=""/>
- <aura:attribute name="hospital" type="string" default=""/>
- <aura:attribute name="hospitalId" type="string" default=""/>
- <aura:attribute name="hospitalLinkId" type="string" default=""/>
- <aura:handler name="change" value="{!v.hospital}" action="{!c.hosChange}"/>
+ <aura:attribute name="Close_Forecasted_Date__c_o" type="Date" />
+ <aura:attribute name="Amount__c_o" type="String" />
+ <aura:attribute name="OCMSale_Price__c_o" type="String" />
+ <aura:attribute name="StageName__c_o" type="String" />
+ <aura:attribute name="fieldsmap" type="Map" />
+ <aura:attribute name="alldata" type="List" />
+ <aura:attribute name="allselectlist" type="Map" />
+ <aura:attribute name="doclist" type="List" />
+ <aura:attribute name="docmap" type="Map" />
+ <aura:attribute name="login" type="Boolean" default="false" />
+ <aura:attribute name="loginEdit" type="Boolean" default="false" />
+ <aura:attribute name="loadOpp" type="Boolean" default="false" />
+ <aura:attribute name="reportPageData" type="Map" />
+ <aura:attribute name="selectbody" type="String" />
+ <aura:attribute name="report_date_list" type="Map" />
+ <aura:attribute name="selected_date" type="String" />
+ <aura:attribute name="selected_agency_person" type="String" />
+ <aura:attribute name="agency_report_header" type="String" />
+ <aura:attribute name="agency_report_header_id" type="String" />
+ <aura:attribute name="result" type="String" default="" />
+ <aura:attribute name="hospital" type="string" default="" />
+ <aura:attribute name="hospitalId" type="string" default="" />
+ <aura:attribute name="hospitalLinkId" type="string" default="" />
+ <aura:handler name="change" value="{!v.hospital}" action="{!c.hosChange}" />
<aura:attribute name="hospitalList" type="Map" />
- <aura:attribute name="doctor_list" type="Map"/>
- <aura:attribute name="doctor_title" type="String"/>
- <aura:attribute name="opportunity_list" type="Map"/>
- <aura:handler name="change" value="{!v.data.Opportunity__c}" action="{!c.opportunityChange}"/>
- <aura:attribute name="edit_copy_select_report_id" type="String"/>
- <aura:attribute name="create_agency_report_id" type="String"/>
- <aura:attribute name="reports" type="List"/>
- <aura:attribute name="reports_now" type="List"/>
- <aura:attribute name="reports_now_count" type="Integer"/>
- <aura:attribute name="mode" type="String"/>
- <aura:attribute name="select_report_data" type="Map"/>
- <aura:attribute name="select_report_data_radio" type="Map"/>
- <aura:attribute name="default_select_doctor_id" type="String"/>
- <aura:attribute name="default_select_opportunity_id" type="String"/>
- <aura:attribute name="report_count" type="Integer"/>
- <aura:attribute name="dialog_type" type="String"/>
- <aura:attribute name="truthy" type="Boolean" default="false"/>
+ <aura:attribute name="doctor_list" type="Map" />
+ <aura:attribute name="doctor_title" type="String" />
+ <aura:attribute name="opportunity_list" type="Map" />
+ <aura:handler
+ name="change"
+ value="{!v.data.Opportunity__c}"
+ action="{!c.opportunityChange}"
+ />
+ <aura:attribute name="edit_copy_select_report_id" type="String" />
+ <aura:attribute name="create_agency_report_id" type="String" />
+ <aura:attribute name="reports" type="List" />
+ <aura:attribute name="reports_now" type="List" />
+ <aura:attribute name="reports_now_count" type="Integer" />
+ <aura:attribute name="mode" type="String" />
+ <aura:attribute name="select_report_data" type="Map" />
+ <aura:attribute name="select_report_data_radio" type="Map" />
+ <aura:attribute name="default_select_doctor_id" type="String" />
+ <aura:attribute name="default_select_opportunity_id" type="String" />
+ <aura:attribute name="report_count" type="Integer" />
+ <aura:attribute name="dialog_type" type="String" />
+ <aura:attribute name="truthy" type="Boolean" default="false" />
<aura:attribute name="list_message" type="String" default="鎼滅储" />
<aura:attribute name="confirm_status" type="Integer" default="0" />
<aura:attribute name="modal_confirm_title" type="String" />
@@ -56,120 +81,243 @@
<aura:handler name="change" value="{!v.data.Product_Category2__c}" action="{!c.productcategoryChange2}"/>
<aura:handler name="change" value="{!v.data.Product_Category3__c}" action="{!c.productcategoryChange3}"/> -->
<!-- <aura:handler name="change" value="{!v.oppdata.StageName__c}" action="{!c.stageNameChange}"/> -->
- <aura:attribute name="update_select_report_data_id" type="String" default=""/>
+ <aura:attribute
+ name="update_select_report_data_id"
+ type="String"
+ default=""
+ />
<!-- 鎵归噺娣诲姞鍛ㄦ姤 start-->
<aura:attribute name="reports_date" type="List" />
<!-- <aura:attribute name="reports_date1" type="Date" />
<aura:attribute name="reports_date2" type="Date" /> -->
- <aura:attribute name="TableContent" type="String" description=" Show the Result class"/>
- <aura:attribute name="TableContent2" type="String" description=" Show the Result class"/>
- <aura:attribute name="TargetFileName" type="String" description="Name of the file"/>
+ <aura:attribute
+ name="TableContent"
+ type="String"
+ description=" Show the Result class"
+ />
+ <aura:attribute
+ name="TableContent2"
+ type="String"
+ description=" Show the Result class"
+ />
+ <aura:attribute
+ name="TargetFileName"
+ type="String"
+ description="Name of the file"
+ />
<aura:attribute name="tableheaders" type="Object[]" />
- <aura:attribute name="fileContentData" type="String"/>
- <aura:attribute name="filename" type="String"/>
+ <aura:attribute name="fileContentData" type="String" />
+ <aura:attribute name="filename" type="String" />
<!-- It will display 100 records . Change for your requirement-->
- <aura:attribute name="NumOfRecords" type="Integer" default="1000"/>
- <aura:attribute name="showMain" type="Boolean" default="true"/>
+ <aura:attribute name="NumOfRecords" type="Integer" default="1000" />
+ <aura:attribute name="showMain" type="Boolean" default="true" />
<!-- PIPL update Yin Mingjie 21/02/2022 start -->
- <aura:attribute name="AWStoken" type="String"/>
- <aura:attribute name="AWSsearch" type="String"/>
- <aura:attribute name="AWSinsert" type="String"/>
- <aura:attribute name="AWStransactionURL" type="String"/>
- <aura:attribute name="AWSDoctor2Map" type="String"/>
- <aura:attribute name="awsurl" type="Map"/>
- <aura:attribute name="contactawsurl" type="Map"/>
- <aura:attribute name="allselectlistAgencyPerson" type="Map"/>
+ <aura:attribute name="AWStoken" type="String" />
+ <aura:attribute name="AWSsearch" type="String" />
+ <aura:attribute name="AWSinsert" type="String" />
+ <aura:attribute name="AWStransactionURL" type="String" />
+ <aura:attribute name="AWSDoctor2Map" type="String" />
+ <aura:attribute name="awsurl" type="Map" />
+ <aura:attribute name="contactawsurl" type="Map" />
+ <aura:attribute name="allselectlistAgencyPerson" type="Map" />
<!-- PIPL update Yin Mingjie 21/02/2022 end -->
+
+ <!-- start DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
+ <aura:attribute name="errorData" type="Object" />
+ <aura:attribute name="errorColumns" type="List" />
+ <!-- show Error information -->
+ <aura:attribute name="showErrorInfo" type="Boolean" default="false" />
+ <!-- end DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
+
<!-- 鎵归噺娣诲姞鍛ㄦ姤 end-->
<ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" />
<ltng:require scripts="{! $Resource.jquery183minjs }" />
-
+
<!--銉兗銉変腑...-->
<aura:renderIf isTrue="{!v.login}">
- <div class="slds-spinner_container height100vh">
- <div class="slds-spinner--brand slds-spinner slds-spinner--medium" role="alert">
- <span id="aa" class="slds-assistive-text">Loading</span>
- <div class="slds-spinner__dot-a"></div>
- <div class="slds-spinner__dot-b"></div>
+ <aura:renderIf isTrue="{!!v.loginEdit}">
+ <!-- add by Deloitte-Link 2023-6-19 -->
+ <div class="weeklyReportSpinner">
+ <div class="slds-spinner_container">
+ <div
+ class="slds-spinner--brand slds-spinner slds-spinner--medium"
+ role="alert"
+ >
+ <span id="aa" class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</div>
- </div>
+ </aura:renderIf>
</aura:renderIf>
-
+
<div aura:id="report" id="report" class="contents_wrapper">
<div class="slds-grid slds-wrap slds-grid--pull-padded">
- <div class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12">
+ <div
+ class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"
+ >
鍛�
</div>
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12">
- <ui:inputSelect aura:id="select_date" class="slds-select" change="{!c.select_date_change}"/>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12"
+ >
+ <ui:inputSelect
+ aura:id="select_date"
+ class="slds-select"
+ change="{!c.select_date_change}"
+ />
</div>
-
+
<!-- 浠g悊搴楁媴褰撹�� -->
- <div class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12">
+ <div
+ class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"
+ >
{!v.fieldsmap.Person_In_Charge2__c}
</div>
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12">
- <ui:inputSelect aura:id="select_agency_person" class="slds-select agency_person_select" change="{!c.select_agency_change}"/>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12"
+ >
+ <ui:inputSelect
+ aura:id="select_agency_person"
+ class="slds-select agency_person_select"
+ change="{!c.select_agency_change}"
+ />
</div>
- <div class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
- <ui:button aura:id="new_button" label="鏂板缓" press="{!c.new_report}" disabled="true"/>
+ <div
+ class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"
+ >
+ <ui:button
+ aura:id="new_button"
+ label="鏂板缓"
+ press="{!c.new_report}"
+ disabled="true"
+ />
</div>
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
- <ui:button aura:id="copy_button" label="澶嶅埗" press="{!c.copy_button}" disabled="true"/>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12"
+ >
+ <ui:button
+ aura:id="copy_button"
+ label="澶嶅埗"
+ press="{!c.copy_button}"
+ disabled="true"
+ />
<!-- <ui:button aura:id="import" label="瀵煎叆" press="{!c.import}" /> -->
<ui:button aura:id="import" label="瀵煎叆" press="{!c.import}" />
-
+
<!-- <input type="file" class="file" aura:id="file" onchange="{!c.CreateRecord}" style="position:absolute;filter:alpha(opacity=0);" size="1" hidden="true" /> -->
<!-- <ui:button aura:id="import" label="瀵煎嚭" press="{!c.export}"/> -->
- <ui:button aura:id="export" label="瀵煎嚭" press="{!c.export_condition}"/>
+ <ui:button
+ aura:id="export"
+ label="瀵煎嚭"
+ press="{!c.export_condition}"
+ />
</div>
-
</div>
</div>
-
+
<div aura:id="report_list" class="report_list_area">
<div class="slds-table--edit_container slds-is-relative">
- <table class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus" role="grid" style="width:66.75rem;">
+ <table
+ class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus"
+ role="grid"
+ style="width: 66.75rem"
+ >
<thead>
<tr class="slds-line-height--reset">
- <th class="table_header slds-text-title--caps">
-
+ <th
+ class="table_header slds-text-title--caps"
+ style="width: 250px; font-size: 13px"
+ >
+ <span class="slds-truncate" title="Name"
+ >鍛ㄦ姤缂栧彿</span
+ >
</th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">{!v.fieldsmap.Person_In_Charge2__c}</span>
+ <th
+ class="table_header slds-text-title--caps"
+ style="width: 100px; font-size: 13px"
+ >
+ <span class="slds-truncate" title="Name"
+ >{!v.fieldsmap.Person_In_Charge2__c}</span
+ >
</th>
- <th class="table_header slds-text-title--caps">
+ <th
+ class="table_header slds-text-title--caps"
+ style="width: 250px; font-size: 13px"
+ >
<span class="slds-truncate" title="Name">鍖婚櫌</span>
</th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">{!v.fieldsmap.Department_Cateogy__c}</span>
+ <th
+ class="table_header slds-text-title--caps"
+ style="width: 100px; font-size: 13px"
+ >
+ <span class="slds-truncate" title="Name"
+ >{!v.fieldsmap.Department_Cateogy__c}</span
+ >
</th>
- <th class="table_header slds-text-title--caps">
+ <th
+ class="table_header slds-text-title--caps"
+ style="width: 100px; font-size: 13px"
+ >
<!-- PIPL update Yin Mingjie 21/02/2022 start
<span class="slds-truncate" title="Name">{!v.fieldsmap.doctor2__r}</span>
PIPL update Yin Mingjie 21/02/2022 end-->
- <span class="slds-truncate" title="Name">{!v.fieldsmap.Agency_Contact__c}</span>
-
+ <span
+ class="slds-truncate"
+ title="Name"
+ style="width: 100px; font-size: 13px"
+ >{!v.fieldsmap.Agency_Contact__c}</span
+ >
</th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">{!v.fieldsmap.visitor_title__c}</span>
+ <th
+ class="table_header slds-text-title--caps"
+ style="width: 100px; font-size: 13px"
+ >
+ <span class="slds-truncate" title="Name"
+ >{!v.fieldsmap.visitor_title__c}</span
+ >
</th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">{!v.fieldsmap.Purpose_Type__c}</span>
+ <th
+ class="table_header slds-text-title--caps"
+ style="width: 100px; font-size: 13px"
+ >
+ <span class="slds-truncate" title="Name"
+ >{!v.fieldsmap.Purpose_Type__c}</span
+ >
</th>
</tr>
</thead>
<tbody>
- <aura:iteration items="{!v.reports}" var="item" indexVar="index">
+ <aura:iteration
+ items="{!v.reports}"
+ var="item"
+ indexVar="index"
+ >
<tr class="slds-hint-parent">
<td role="gridcell" class="slds-cell-edit">
- <ui:inputRadio class="report_radio" name="report_radio" label="{!item.Name}" change="{!c.change_report_radio}"/>
- <lightning:buttonIcon class="edit_button" iconName="utility:edit" size="small" alternativeText="edit" value="{!index}" onclick="{!c.edit_button}"/>
+ <ui:inputRadio
+ class="report_radio"
+ name="report_radio"
+ label="{!item.Name}"
+ change="{!c.change_report_radio}"
+ />
+ <lightning:buttonIcon
+ class="edit_button"
+ iconName="utility:edit"
+ size="small"
+ alternativeText="edit"
+ value="{!index}"
+ onclick="{!c.edit_button}"
+ />
</td>
<td role="gridcell" class="slds-cell-edit">
<span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.Person_In_Charge2__r.Name}">
+ <span
+ class="slds-truncate"
+ title="{!item.Person_In_Charge2__r.Name}"
+ >
{!item.Person_In_Charge2__r.Name}
<!-- <span class="decrypt">{!item.Person_In_Charge2__r.awsdata.lastName}</span> -->
</span>
@@ -182,28 +330,50 @@
</th>
<td role="gridcell" class="slds-cell-edit">
<span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.Department_Cateogy__c}">{!item.Department_Cateogy__c}</span>
+ <span
+ class="slds-truncate"
+ title="{!item.Department_Cateogy__c}"
+ >{!item.Department_Cateogy__c}</span
+ >
</span>
</td>
<td role="gridcell" class="slds-cell-edit">
<span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.doctor2__r.Name}">
- <span class="encrypt">{!item.doctor2__r.Name}</span>
- <span class="decrypt">{!item.doctor2__r.awsdata.name}</span>
+ <span
+ class="slds-truncate"
+ title="{!item.doctor2__r.Name}"
+ >
+ <span class="encrypt"
+ >{!item.doctor2__r.Name}</span
+ >
+ <span class="decrypt"
+ >{!item.doctor2__r.awsdata.name}</span
+ >
</span>
</span>
</td>
<td role="gridcell" class="slds-cell-edit">
<span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.visitor_title__c}">
- <span class="encrypt">{!item.visitor_title__c}</span>
- <span class="decrypt">{!item.doctor2__r.awsdata.doctorDivision1}</span>
+ <span
+ class="slds-truncate"
+ title="{!item.visitor_title__c}"
+ >
+ <span class="encrypt"
+ >{!item.visitor_title__c}</span
+ >
+ <span class="decrypt"
+ >{!item.doctor2__r.awsdata.doctorDivision1}</span
+ >
</span>
</span>
</td>
<td role="gridcell" class="slds-cell-edit">
<span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.Purpose_Type__c}">{!item.Purpose_Type__c}</span>
+ <span
+ class="slds-truncate"
+ title="{!item.Purpose_Type__c}"
+ >{!item.Purpose_Type__c}</span
+ >
</span>
</td>
</tr>
@@ -213,77 +383,176 @@
</div>
<aura:renderIf isTrue="{!v.report_count > 0}">
<aura:set attribute="else">
- <div class="no_data_area">
- {!v.list_message}
- </div>
+ <div class="no_data_area">{!v.list_message}</div>
</aura:set>
</aura:renderIf>
</div>
-<!-- <ui:button aura:id="test_button" label="test" class="fade animation_on" press="{!c.test}"/>-->
+ <!-- <ui:button aura:id="test_button" label="test" class="fade animation_on" press="{!c.test}"/>-->
<!-- 鎵归噺娣诲姞鍛ㄦ姤 start-->
- <div aura:id="modal_import" role="dialog" tabindex="-1" class="disp_none slds-modal slds-fade-in-open slds-modal--large" aria-labelledby="headerTarget">
- <div class="slds-modal__container ">
- <div class="slds-modal__header ">
+ <div
+ aura:id="modal_import"
+ role="dialog"
+ tabindex="-1"
+ class="disp_none slds-modal slds-fade-in-open slds-modal--large"
+ aria-labelledby="headerTarget"
+ >
+ <div class="slds-modal__container">
+ <aura:renderIf isTrue="{!v.loginEdit}">
+ <lightning:spinner
+ alternativeText="Loading"
+ size="medium"
+ style="width: 100%; height: 80%; top: 50px"
+ />
+ </aura:renderIf>
+ <div class="slds-modal__header">
<h4 id="headerTarget" class="slds-float--left"></h4>
- <h2 id="headerTarget" class="slds-text-heading--medium">鍛ㄦ姤鎵归噺瀵煎叆</h2>
- <ui:button aura:id="close_button" label="鍏抽棴" class="close_button slds-button slds-button--neutral slds-order--1" press="{!c.close_import}"/>
+ <h2 id="headerTarget" class="slds-text-heading--medium">
+ 鍛ㄦ姤鎵归噺瀵煎叆
+ </h2>
+ <ui:button
+ aura:id="close_button"
+ label="鍏抽棴"
+ class="close_button slds-button slds-button--neutral slds-order--1"
+ press="{!c.close_import}"
+ />
</div>
- <div class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium " >
+ <div
+ class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium"
+ >
<aura:if isTrue="{!v.showMain}">
<div>
<!-- <input type="file" class="file" aura:id="file" onchange="{!c.CreateRecord}" value="瀵煎叆" /> -->
- <lightning:input type="file" class="file" uara:id="file" onchange="{!c.CreateRecord}" />
+ <lightning:input
+ type="file"
+ class="file"
+ uara:id="file"
+ onchange="{!c.CreateRecord}"
+ />
<!-- <ui:button label="Create Accounts" press="{!c.CreateRecord}"/> -->
</div>
<aura:set attribute="else">
<!-- <ui:outputRichText class="uiOutputRichText slds-m-around-large" value="{!v.TargetFileName}"/> -->
- <ui:outputRichText class="uiOutputRichText slds-m--around-large" value="{!v.TableContent}"/>
- <div class="slds-p-around--large slds-align--absolute-center">
- <lightning:button label="淇濆瓨" variant="brand" onclick="{!c.processFileContent}"
- />
- <lightning:button label="鍙栨秷" variant="brand"
- onclick="{!c.cancel}" />
+ <ui:outputRichText
+ class="uiOutputRichText slds-m--around-large"
+ value="{!v.TableContent}"
+ />
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="淇濆瓨"
+ variant="brand"
+ onclick="{!c.processFileContent}"
+ />
+ <lightning:button
+ label="鍙栨秷"
+ variant="brand"
+ onclick="{!c.cancel}"
+ />
</div>
-
+ <!-- start DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
+ <aura:if isTrue="{!v.showErrorInfo}">
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="瀵煎嚭閿欒淇℃伅"
+ variant="brand"
+ onclick="{!c.exportErrorInfo}"
+ />
+ </div>
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <div style="height: 300px; overflow-x: scroll">
+ <lightning:datatable
+ keyField="id"
+ data="{! v.errorData }"
+ columns="{! v.errorColumns }"
+ hideCheckboxColumn="true"
+ />
+ </div>
+ </div>
+ </aura:if>
+ <!-- start DTT-zhj 澧炲姞閿欒淇℃伅table 2023-05-16-->
</aura:set>
</aura:if>
</div>
</div>
</div>
- <div aura:id="modal_importbg" class="disp_none slds-backdrop slds-backdrop--open"></div>
+ <div
+ aura:id="modal_importbg"
+ class="disp_none slds-backdrop slds-backdrop--open"
+ ></div>
<!-- 鎵归噺娣诲姞鍛ㄦ姤 end-->
<!-- 鎵归噺瀵煎嚭鍛ㄦ姤 start-->
- <div aura:id="modal_export" role="dialog" tabindex="-1" class="disp_none slds-modal slds-fade-in-open slds-modal--large" >
+ <div
+ aura:id="modal_export"
+ role="dialog"
+ tabindex="-1"
+ class="disp_none slds-modal slds-fade-in-open slds-modal--large"
+ >
<div class="slds-modal__container">
<div class="slds-modal__header">
<h4 id="headerTarget" class="slds-float--left"></h4>
- <h2 id="headerTarget" class="slds-text-heading--medium">鍛ㄦ姤鎵归噺瀵煎嚭</h2>
- <ui:button aura:id="close_button" label="鍏抽棴" class="close_button slds-button slds-button--neutral slds-order--1" press="{!c.close_export}"/>
+ <h2 id="headerTarget" class="slds-text-heading--medium">
+ 鍛ㄦ姤鎵归噺瀵煎嚭
+ </h2>
+ <ui:button
+ aura:id="close_button"
+ label="鍏抽棴"
+ class="close_button slds-button slds-button--neutral slds-order--1"
+ press="{!c.close_export}"
+ />
</div>
- <div class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium">
+ <div
+ class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium"
+ >
<aura:if isTrue="{!v.showMain}">
- <div class="slds-grid slds-wrap slds-grid--pull-padded" >
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4">
- </div>
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4">
+ <div class="slds-grid slds-wrap slds-grid--pull-padded">
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
+ ></div>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
+ >
娲诲姩鏃ュ紑濮嬫棩鏈�
-
- <lightning:input type="Date" class="slds-input slds-input_bare " aura:id="input-report-date1" />
- </div>
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4">
- 娲诲姩鏃ョ粨鏉熸棩鏈�
- <lightning:input type="Date" class="slds-input slds-input_bare " aura:id="input-report-date2" />
- </div>
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4">
- </div>
- <div class="slds-p-around--large slds-align--absolute-center">
- <lightning:button label="纭" variant="brand" onclick="{!c.select_repores_date}"
- />
- <lightning:button label="鍙栨秷" variant="brand"
- onclick="{!c.close_export}" />
+ <lightning:input
+ type="Date"
+ class="slds-input slds-input_bare"
+ aura:id="input-report-date1"
+ />
+ </div>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
+ >
+ 娲诲姩鏃ョ粨鏉熸棩鏈�
+ <lightning:input
+ type="Date"
+ class="slds-input slds-input_bare"
+ aura:id="input-report-date2"
+ />
+ </div>
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
+ ></div>
+
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="纭"
+ variant="brand"
+ onclick="{!c.select_repores_date}"
+ />
+ <lightning:button
+ label="鍙栨秷"
+ variant="brand"
+ onclick="{!c.close_export}"
+ />
</div>
</div>
<!-- <div>
@@ -296,47 +565,116 @@
onclick="{!c.close_export}" />
</div> -->
<aura:set attribute="else">
- <ui:outputRichText class="uiOutputRichText slds-m--around-large" value="{!v.TableContent2}"/>
- <div class="slds-p-around--large slds-align--absolute-center">
- <lightning:button label="纭" variant="brand" onclick="{!c.exportDate}"
- />
- <lightning:button label="鍙栨秷" variant="brand"
- onclick="{!c.close_export}" />
+ <ui:outputRichText
+ class="uiOutputRichText slds-m--around-large"
+ value="{!v.TableContent2}"
+ />
+ <div
+ class="slds-p-around--large slds-align--absolute-center"
+ >
+ <lightning:button
+ label="纭"
+ variant="brand"
+ onclick="{!c.exportDate}"
+ />
+ <lightning:button
+ label="鍙栨秷"
+ variant="brand"
+ onclick="{!c.close_export}"
+ />
</div>
-
</aura:set>
</aura:if>
</div>
</div>
</div>
- <div aura:id="modal_exportbg" class="disp_none slds-backdrop slds-backdrop--open"></div>
+ <div
+ aura:id="modal_exportbg"
+ class="disp_none slds-backdrop slds-backdrop--open"
+ ></div>
<!-- 鎵归噺瀵煎嚭鍛ㄦ姤 end-->
- <div aura:id="modal_window" role="dialog" tabindex="-1" class="disp_none slds-modal slds-fade-in-open slds-modal--large" aria-labelledby="headerTarget">
+ <div
+ aura:id="modal_window"
+ role="dialog"
+ tabindex="-1"
+ class="disp_none slds-modal slds-fade-in-open slds-modal--large"
+ aria-labelledby="headerTarget"
+ >
<div class="slds-modal__container">
+ <aura:renderIf isTrue="{!v.loginEdit}">
+ <lightning:spinner
+ alternativeText="Loading"
+ size="medium"
+ style="width: 100%; height: 80%; top: 50px"
+ />
+ </aura:renderIf>
<div class="slds-modal__header">
- <h4 id="headerTarget" class="slds-float--left">{!v.dialog_type}</h4>
- <h2 id="headerTarget" class="slds-text-heading--medium">鍛ㄦ姤({!v.selected_date} {!v.selected_agency_person})</h2>
- <ui:button aura:id="close_button" label="鍏抽棴" class="close_button slds-button slds-button--neutral slds-order--1" press="{!c.toggle_report}"/>
+ <h4 id="headerTarget" class="slds-float--left"></h4>
+ <h2 id="headerTarget" class="slds-text-heading--medium">
+ 鍛ㄦ姤({!v.selected_date} {!v.selected_agency_person})
+ </h2>
+ <ui:button
+ aura:id="close_button"
+ label="鍏抽棴"
+ class="close_button slds-button slds-button--neutral slds-order--1"
+ press="{!c.toggle_report}"
+ />
</div>
<div class="slds-modal__content slds-grow slds-p-around--medium">
<div class="slds-box slds-theme--shade">
- <div class="slds-grid slds-wrap slds-grid--pull-padded" >
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
+ <div class="slds-grid slds-wrap slds-grid--pull-padded">
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6 marginTop"
+ >
娲诲姩鏃�
<!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> -->
- <force:inputField value="{!v.data.Report_Date__c}" aura:id="input-report-date"/>
+ <!-- <force:inputField value="{!v.data.Report_Date__c}" aura:id="input-report-date"/> -->
+ <lightning:input
+ type="date"
+ value="{!v.data.Report_Date__c}"
+ aura:id="input-report-date"
+ variant="label-hidden"
+ />
</div>
<!-- 鍖婚櫌 -->
- <div aura:id="hospital_list" class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5" data-select="single">
- <ui:inputText aura:id="hospital_input_text" label="鍖婚櫌" class="field" value="{!v.hospital}" updateOn="keyup"/>
+ <div
+ aura:id="hospital_list"
+ class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5 marginTop"
+ data-select="single"
+ >
+ <!-- <ui:inputText aura:id="hospital_input_text" label="鍖婚櫌" class="field" value="{!v.hospital}" updateOn="keyup"/> -->
+ 鍖婚櫌
+ <lightning:input
+ aura:id="hospital_input_text"
+ class="field"
+ value="{!v.hospital}"
+ variant="label-hidden"
+ updateOn="keyup"
+ />
<div class="slds-lookup__menu" id="lookup-66">
<ul class="slds-lookup__list" role="listbox">
- <aura:iteration var="hospital" items="{!v.hospitalList}">
- <li role="presentation" onclick="{!c.selectHos}" data-accName="{!hospital.Hospital_Name_readonly__c}" data-accId="{!hospital.Hospital__c}">
- <span class="slds-lookup__item-action slds-media" id="lookup-option-498" role="option">
+ <aura:iteration
+ var="hospital"
+ items="{!v.hospitalList}"
+ >
+ <li
+ role="presentation"
+ onclick="{!c.selectHos}"
+ data-accName="{!hospital.Hospital_Name_readonly__c}"
+ data-accId="{!hospital.Hospital__c}"
+ >
+ <span
+ class="slds-lookup__item-action slds-media"
+ id="lookup-option-498"
+ role="option"
+ >
<div class="slds-media__body">
- <div class="slds-lookup__result-text">{!hospital.Hospital_Name_readonly__c}</div>
+ <div
+ class="slds-lookup__result-text"
+ >
+ {!hospital.Hospital_Name_readonly__c}
+ </div>
</div>
</span>
</li>
@@ -344,176 +682,379 @@
</ul>
</div>
</div>
-
+
<!-- 绉戝鍒嗙被 -->
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8">
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8 marginTop"
+ >
{!v.fieldsmap.Department_Cateogy__c}
- <ui:inputSelect aura:id="select_department" class="slds-select" change="{!c.select_department}"/>
+ <ui:inputSelect
+ aura:id="select_department"
+ class="slds-select"
+ change="{!c.select_department}"
+ />
</div>
-
+
<!-- 鍏堢敓 -->
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8">
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8 marginTop"
+ >
{!v.fieldsmap.doctor2__c}
- <ui:inputSelect aura:id="select_doctor" class="slds-select" change="{!c.doctor_change}"/>
+ <ui:inputSelect
+ aura:id="select_doctor"
+ class="slds-select"
+ change="{!c.doctor_change}"
+ />
</div>
-
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12">
- <br/>
- <ui:button label="鏂板缓" class="slds-button" press="{!c.createCon}" disabled="true" aura:id="new_con"/>
+
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12 marginTop"
+ >
+ <br />
+ <ui:button
+ label="鏂板缓"
+ class="slds-button"
+ press="{!c.createCon}"
+ disabled="true"
+ aura:id="new_con"
+ />
</div>
-
+
<!-- 鑱屼綅 -->
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8">
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8 marginTop"
+ >
{!v.fieldsmap.visitor_title__c}
<div>{!v.doctor_title}</div>
- </div>
+ </div>
<!-- 娲诲姩鍖哄垎 -->
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6 marginTop"
+ >
{!v.fieldsmap.Purpose_Type__c}
- <ui:inputSelect aura:id="select_purpose_type" class="slds-select" change="{!c.select_purpose_type}"/>
+ <ui:inputSelect
+ aura:id="select_purpose_type"
+ class="slds-select"
+ change="{!c.select_purpose_type}"
+ />
</div>
<!-- 璇环 -->
- <div aura:id="input-opportunity-opp" class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--4-of-12 slds-large-size--4-of-12">
+ <div
+ aura:id="input-opportunity-opp"
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--4-of-12 slds-large-size--4-of-12 marginTop"
+ >
{!v.fieldsmap.Opportunity__c}
<!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> -->
<!-- <force:inputField value="{!v.data.Opportunity__c}" aura:id="input-opportunity"/> -->
- <c:strike_lookup label=""
- object="Agency_Opportunity__c"
- searchField="Name"
- placeholder="鎼滅储缁忛攢鍟嗚浠�..."
- iconName="standard:opportunity"
- subtitleField="Department_Cateogy__c,Agency_Opportunity_No__c,Change_To_Opportunity__r.Name"
- order="StageName__c"
- limit="5"
- loadingMessage="Loading..."
- errorMessage="Invalid input"
- allowNewRecords = "true"
- overrideNewEvent = "true"
- showRecentRecords ="true"
- value="{!v.data.Opportunity__c}"
- filter="{!v.opportunity_cfilter}"
- subTitleFormat="{0}+{1}+{2}"/>
+ <c:strike_lookup
+ label=""
+ object="Agency_Opportunity__c"
+ searchField="Name"
+ placeholder="鎼滅储缁忛攢鍟嗚浠�..."
+ iconName="standard:opportunity"
+ subtitleField="Department_Cateogy__c,Agency_Opportunity_No__c,Change_To_Opportunity__r.Name"
+ order="StageName__c"
+ limit="5"
+ loadingMessage="Loading..."
+ errorMessage="Invalid input"
+ allowNewRecords="true"
+ overrideNewEvent="true"
+ showRecentRecords="true"
+ value="{!v.data.Opportunity__c}"
+ filter="{!v.opportunity_cfilter}"
+ subTitleFormat="{0}+{1}+{2}"
+ />
</div>
- <div aura:id="input-opportunity-blank" class="lds-p-horizontal--small slds-size--1-of-1 slds-medium-size--8-of-12 slds-large-size--8-of-12">
- </div>
- <div aura:id="input-opportunity-stage" class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
+ <div
+ aura:id="input-opportunity-blank"
+ class="lds-p-horizontal--small slds-size--1-of-1 slds-medium-size--8-of-12 slds-large-size--8-of-12 marginTop"
+ ></div>
+ <div
+ aura:id="input-opportunity-stage"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12 marginTop"
+ >
{!v.fieldsmap.StageName__c}
<!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> -->
- <ui:inputSelect aura:id="select_stageName" class="slds-select"/>
+ <ui:inputSelect
+ aura:id="select_stageName"
+ class="slds-select"
+ />
<!-- <force:inputField value="{!v.oppdata.StageName__c}" aura:id="input-oppstage" /> -->
</div>
- <div aura:id="input-opportunity-amount1" class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
+ <div
+ aura:id="input-opportunity-amount1"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12 marginTop"
+ >
{!v.fieldsmap.Amount__c}
<!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> -->
- <force:inputField value="{!v.oppdata.Amount__c}" class=""/>
+ <force:inputField
+ value="{!v.oppdata.Amount__c}"
+ class=""
+ />
</div>
- <div aura:id="input-opportunity-amount2" class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
+ <div
+ aura:id="input-opportunity-amount2"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12 marginTop"
+ >
{!v.fieldsmap.OCMSale_Price__c}
<!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> -->
- <force:inputField value="{!v.oppdata.OCMSale_Price__c}" class=""/>
+ <force:inputField
+ value="{!v.oppdata.OCMSale_Price__c}"
+ class=""
+ />
</div>
- <div aura:id="input-opportunity-date" class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
+ <div
+ aura:id="input-opportunity-date"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12 marginTop"
+ >
{!v.fieldsmap.Close_Forecasted_Date__c}
<!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> -->
- <force:inputField value="{!v.oppdata.Close_Forecasted_Date__c}" class=""/>
+ <force:inputField
+ value="{!v.oppdata.Close_Forecasted_Date__c}"
+ class=""
+ />
</div>
<!-- 瑁藉搧鍒嗛 -->
- <div aura:id="product_category_select1" class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12">
+ <div
+ aura:id="product_category_select1"
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 marginTop"
+ >
{!v.fieldsmap.Product_Category1__c}
<!-- <force:inputField value="{!v.data.Product_Category1__c}" aura:id="input-product-category1"/> -->
- <ui:inputSelect aura:id="select_Product1" class="slds-select" change="{!c.productcategoryChange1}"/>
+ <ui:inputSelect
+ aura:id="select_Product1"
+ class="slds-select"
+ change="{!c.productcategoryChange1}"
+ />
</div>
- <div aura:id="product_category_select2" class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12">
+ <div
+ aura:id="product_category_select2"
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 marginTop"
+ >
{!v.fieldsmap.Product_Category2__c}
<!-- <force:inputField value="{!v.data.Product_Category2__c}" aura:id="input-product-category2"/> -->
- <ui:inputSelect aura:id="select_Product2" class="slds-select" change="{!c.productcategoryChange2}"/>
+ <ui:inputSelect
+ aura:id="select_Product2"
+ class="slds-select"
+ change="{!c.productcategoryChange2}"
+ />
</div>
- <div aura:id="product_category_select3" class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12">
+ <div
+ aura:id="product_category_select3"
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 marginTop"
+ >
{!v.fieldsmap.Product_Category3__c}
<!-- <force:inputField value="{!v.data.Product_Category3__c}" aura:id="input-product-category3"/> -->
- <ui:inputSelect aura:id="select_Product3" class="slds-select" change="{!c.productcategoryChange3}"/>
+ <ui:inputSelect
+ aura:id="select_Product3"
+ class="slds-select"
+ change="{!c.productcategoryChange3}"
+ />
</div>
<!--SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start-->
<!-- 鏀彺闇�姹� change="{!c.SupportNeeds__c}"-->
- <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
+ <div
+ class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6 marginTop"
+ >
{!v.fieldsmap.SupportNeeds__c}
- <ui:inputSelect aura:id="SupportNeeds__c" class="slds-select" />
+ <ui:inputSelect
+ aura:id="SupportNeeds__c"
+ class="slds-select"
+ />
</div>
<!--SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end-->
- <div aura:id="result" class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12">
+ <div
+ aura:id="result"
+ class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 marginTop"
+ >
{!v.fieldsmap.Result__c}
- <ui:inputSelect aura:id="select_result" class="slds-select"/>
+ <ui:inputSelect
+ aura:id="select_result"
+ class="slds-select"
+ />
<!-- <ui:inputText label="缁撴灉" class="bcolor" value="{!v.result}"/> -->
</div>
</div>
</div>
<div class="save_button_area">
- <ui:button aura:id="save_button" label="淇濆瓨骞舵柊寤�" class="save_button slds-button slds-button--brand slds-order--3" press="{!c.save_report}"/>
+ <ui:button
+ aura:id="save_button"
+ label="淇濆瓨骞舵柊寤�"
+ class="save_button slds-button slds-button--brand slds-order--3"
+ press="{!c.save_report}"
+ />
</div>
-
+
<aura:renderIf isTrue="{!v.reports_now_count > 0}">
<div class="mt40 slds-box slds-theme--shade">
- <div class="slds-table--edit_container slds-is-relative">
- <table class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus" role="grid">
+ <div
+ class="slds-table--edit_container slds-is-relative"
+ >
+ <table
+ class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus"
+ role="grid"
+ >
<thead>
<tr class="slds-line-height--reset">
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name"></span>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ ></span>
</th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">鍖婚櫌</span>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >鍖婚櫌</span
+ >
</th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">{!v.fieldsmap.Department_Cateogy__c}</span>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >{!v.fieldsmap.Department_Cateogy__c}</span
+ >
</th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">{!v.fieldsmap.doctor2__c}</span>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >{!v.fieldsmap.doctor2__c}</span
+ >
</th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">{!v.fieldsmap.visitor_title__c}</span>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >{!v.fieldsmap.visitor_title__c}</span
+ >
</th>
- <th class="table_header slds-text-title--caps">
- <span class="slds-truncate" title="Name">{!v.fieldsmap.Purpose_Type__c}</span>
+ <th
+ class="table_header slds-text-title--caps"
+ >
+ <span
+ class="slds-truncate"
+ title="Name"
+ >{!v.fieldsmap.Purpose_Type__c}</span
+ >
</th>
</tr>
</thead>
<tbody>
- <aura:iteration items="{!v.reports_now}" var="item" indexVar="index">
- <tr aura:id="modal_data_list_tr" class="slds-hint-parent">
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.Department_Cateogy__c}">{!item.Name}</span>
+ <aura:iteration
+ items="{!v.reports_now}"
+ var="item"
+ indexVar="index"
+ >
+ <tr
+ aura:id="modal_data_list_tr"
+ class="slds-hint-parent"
+ >
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.Department_Cateogy__c}"
+ >{!item.Name}</span
+ >
</span>
</td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.Agency_Hospital__r.Name}">{!item.Agency_Hospital__r.Name}</span>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.Agency_Hospital__r.Name}"
+ >{!item.Agency_Hospital__r.Name}</span
+ >
</span>
</td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.Department_Cateogy__c}">{!item.Department_Cateogy__c}</span>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.Department_Cateogy__c}"
+ >{!item.Department_Cateogy__c}</span
+ >
</span>
</td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.doctor2__r.Name}">
- <span class="encrypt">{!item.doctor2__r.Name}</span>
- <span class="decrypt">{!item.doctor2NameOrigin}</span>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.doctor2__r.Name}"
+ >
+ <span class="encrypt"
+ >{!item.doctor2__r.Name}</span
+ >
+ <span class="decrypt"
+ >{!item.doctor2NameOrigin}</span
+ >
</span>
</span>
</td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.visitor_title__c}">
- <span class="encrypt">{!item.visitor_title__c}</span>
- <span class="decrypt">{!item.visitorTitleOrigin}</span>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.visitor_title__c}"
+ >
+ <span class="encrypt"
+ >{!item.visitor_title__c}</span
+ >
+ <span class="decrypt"
+ >{!item.visitorTitleOrigin}</span
+ >
</span>
</span>
</td>
- <td role="gridcell" class="slds-cell-edit">
- <span class="slds-grid slds-grid--align-spread">
- <span class="slds-truncate" title="{!item.Purpose_Type__c}">{!item.Purpose_Type__c}</span>
+ <td
+ role="gridcell"
+ class="slds-cell-edit"
+ >
+ <span
+ class="slds-grid slds-grid--align-spread"
+ >
+ <span
+ class="slds-truncate"
+ title="{!item.Purpose_Type__c}"
+ >{!item.Purpose_Type__c}</span
+ >
</span>
</td>
</tr>
@@ -526,53 +1067,112 @@
</div>
</div>
</div>
- <div aura:id="modal_bg" class="disp_none slds-backdrop slds-backdrop--open"></div>
-
- <div aura:id="modal_confirm" role="dialog" tabindex="-2" aria-labelledby="header43" class="disp_none slds-modal slds-fade-in-open">
+ <div
+ aura:id="modal_bg"
+ class="disp_none slds-backdrop slds-backdrop--open"
+ ></div>
+
+ <div
+ aura:id="modal_confirm"
+ role="dialog"
+ tabindex="-2"
+ aria-labelledby="header43"
+ class="disp_none slds-modal slds-fade-in-open"
+ >
<div class="slds-modal__container">
<div class="slds-modal__header">
- <h2 id="header43" class="slds-text-heading--medium">{!v.modal_confirm_title}</h2>
+ <h2 id="header43" class="slds-text-heading--medium">
+ {!v.modal_confirm_title}
+ </h2>
</div>
<div class="slds-modal__content slds-p-around--medium">
<p>{!v.modal_confirm_text}</p>
</div>
<div class="slds-modal__footer">
- <ui:button label="鏄�" class="slds-button slds-button--brand" press="{!c.yes_button}"/>
- <ui:button label="鍚�" class="slds-button slds-button--neutral" press="{!c.no_button}" />
+ <ui:button
+ label="鏄�"
+ class="slds-button slds-button--brand"
+ press="{!c.yes_button}"
+ />
+ <ui:button
+ label="鍚�"
+ class="slds-button slds-button--neutral"
+ press="{!c.no_button}"
+ />
</div>
</div>
</div>
- <div aura:id="modal_confirm_bg" class="disp_none slds-backdrop slds-backdrop--open"></div>
+ <div
+ aura:id="modal_confirm_bg"
+ class="disp_none slds-backdrop slds-backdrop--open"
+ ></div>
- <div aura:id="modal_newAC" role="dialog" tabindex="-3" aria-labelledby="headertest" class="disp_none slds-modal slds-fade-in-open">
+ <div
+ aura:id="modal_newAC"
+ role="dialog"
+ tabindex="-3"
+ aria-labelledby="headertest"
+ class="disp_none slds-modal slds-fade-in-open"
+ >
<div class="slds-modal__container">
+ <aura:renderIf isTrue="{!v.loginEdit}">
+ <lightning:spinner
+ alternativeText="Loading"
+ size="medium"
+ style="width: 100%; height: 80%; top: 50px"
+ />
+ </aura:renderIf>
<div class="slds-modal__header">
- <h2 id="headertest" class="slds-text-heading--medium">鏂板缓.瀹㈡埛浜哄憳</h2>
+ <h2 id="headertest" class="slds-text-heading--medium">
+ 鏂板缓.瀹㈡埛浜哄憳
+ </h2>
</div>
<div class="slds-modal__content slds-p-around--medium">
- <lightning:recordEditForm aura:id="recordEditForm" objectApiName="Agency_Contact__c" onsuccess="{!c.handleSuccess}" onload="{!c.showRequiredFields}" onsubmit="{!c.handleSubmit}">
- <lightning:messages aura:id="OppMessage" />
+ <lightning:recordEditForm
+ aura:id="recordEditForm"
+ objectApiName="Agency_Contact__c"
+ onsuccess="{!c.handleSuccess}"
+ onload="{!c.showRequiredFields}"
+ onsubmit="{!c.handleSubmit}"
+ >
+ <lightning:messages aura:id="OppMessage" />
<!-- onload="{!c.showRequiredFields}" -->
<aura:renderIf isTrue="{!v.truthy}">
- <lightning:inputField fieldName="Name" aura:id="newOpportunityField" />
- <lightning:inputField fieldName="Type__c" aura:id="newOpportunityField" />
- <lightning:inputField fieldName="Doctor_Division1__c" aura:id="newOpportunityField" />
+ <lightning:inputField
+ fieldName="Name"
+ aura:id="newOpportunityField"
+ />
+ <lightning:inputField
+ fieldName="Type__c"
+ aura:id="newOpportunityField"
+ />
+ <lightning:inputField
+ fieldName="Doctor_Division1__c"
+ aura:id="newOpportunityField"
+ />
<!-- <lightning:inputField class="customRequired none" aura:id="Input_type__c" fieldName="Type__c"/>
<lightning:inputField class="customRequired none" aura:id="Input_Doctor_Division1__c" fieldName="Doctor_Division1__c"/> -->
</aura:renderIf>
- <br/>
- <br/>
- <br/>
- <br/>
- <br/>
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
<div class="save_button_area">
- <lightning:button class="slds-m-top_small" type="button" label="鍙栨秷" onclick="{!c.createCancel}"/>
- <lightning:button class="slds-m-top_small" type="submit" label="淇濆瓨" />
+ <lightning:button
+ class="slds-m-top_small"
+ type="button"
+ label="鍙栨秷"
+ onclick="{!c.createCancel}"
+ />
+ <lightning:button
+ class="slds-m-top_small"
+ type="submit"
+ label="鏂板缓"
+ />
</div>
- </lightning:recordEditForm>
+ </lightning:recordEditForm>
</div>
</div>
</div>
-
-
-</aura:component>
\ No newline at end of file
+</aura:component>
diff --git a/force-app/main/default/aura/WeeklyReport/WeeklyReport.css b/force-app/main/default/aura/WeeklyReport/WeeklyReport.css
index 2cf535d..7e0b372 100644
--- a/force-app/main/default/aura/WeeklyReport/WeeklyReport.css
+++ b/force-app/main/default/aura/WeeklyReport/WeeklyReport.css
@@ -4,9 +4,10 @@
.THIS.height100vh {
height: 100vh;
}
-.THIS.contents_wrapper {
+/* .THIS.contents_wrapper {
padding-top: 50px;
-}
+ width: 105%;
+} */
.THIS .mt5 {
margin-top: 5px;
}
@@ -20,10 +21,10 @@
}
.THIS .no_data_area {
text-align: center;
- margin: .5em 0;
+ margin: 0.5em 0;
}
.THIS.report_list_area {
- margin: 40px 0 20px 100px;
+ margin: 40px 0 20px 0px;
height: 60vh;
overflow-y: scroll;
}
@@ -98,44 +99,72 @@
.THIS .animation_on {
opacity: 1;
}
-.THIS .divbotuser{
- width:fit-content;
+.THIS .divbotuser {
+ width: fit-content;
}
-.THIS .toastMessage.forceActionsText{
- white-space : pre-line !important;
+.THIS .toastMessage.forceActionsText {
+ white-space: pre-line !important;
}
-.THIS .slds-file-selector__dropzone .slds-file-selector__text{
+.THIS .slds-file-selector__dropzone .slds-file-selector__text {
display: none;
}
-.THIS .slds-input:focus, .THIS .slds-input:active {
- border-color: rgb(216, 221, 230);
- box-shadow: none;
+.THIS .slds-input:focus,
+.THIS .slds-input:active {
+ border-color: rgb(216, 221, 230);
+ box-shadow: none;
}
-.THIS .customRequired{
- font-weight: 400;
-}
-.THIS .customRequired:before{
- content: "*";
- margin: 0 0.125rem 0 0.125rem;
- color: rgb(194, 57, 52);
- float: left;
-}
-.THIS .none{
- display:none;
+.THIS .customRequired {
+ font-weight: 400;
}
-
-.THIS tr .decrypt{
+.THIS .customRequired:before {
+ content: '*';
+ margin: 0 0.125rem 0 0.125rem;
+ color: rgb(194, 57, 52);
+ float: left;
+}
+.THIS .none {
display: none;
}
-.THIS tr:hover .decrypt{
+.THIS tr .decrypt {
+ display: none;
+}
+
+.THIS tr:hover .decrypt {
display: unset;
}
-.THIS tr:hover .encrypt{
+.THIS tr:hover .encrypt {
display: none;
-}
\ No newline at end of file
+}
+
+/* add by Deloitte-Link 2023-6-19 start*/
+.THIS .weeklyReportSpinner {
+ top: 100px;
+}
+
+.THIS .weeklyReportSpinnerEdit {
+ top: 50px;
+}
+
+.THIS .slds-spinner_container {
+ position: absolute;
+ top: 100px;
+}
+
+.THIS .slds-spinner_containerEdit {
+ position: absolute;
+ top: 50px;
+}
+
+.THIS .marginTop {
+ margin-top: 10px;
+}
+.THIS .custom-input .uiInput {
+ height: 2rem;
+}
+/* add by Deloitte-Link 2023-6-19 end*/
diff --git a/force-app/main/default/aura/WeeklyReport/WeeklyReportController.js b/force-app/main/default/aura/WeeklyReport/WeeklyReportController.js
index 1b97f08..5e2cad0 100644
--- a/force-app/main/default/aura/WeeklyReport/WeeklyReportController.js
+++ b/force-app/main/default/aura/WeeklyReport/WeeklyReportController.js
@@ -1,55 +1,58 @@
({
- doInit : function(component, event, helper) {
- console.log('zhj 鏂版柟妗�');
- if (window.location.href.endsWith("weekly-report")) {
+ doInit: function (component, event, helper) {
+ console.log('zhj 鏂版柟妗坵eeklyReport');
+ if (window.location.href.endsWith('weekly-report')) {
helper.doinit(component, event, helper);
} else {
helper.hideCmp(component, event, helper);
}
+ component.set('v.showErrorInfo', false);
},
- createAopp : function(component, event, helper) {
+ createAopp: function (component, event, helper) {
var addRecordEvent = $A.get('e.force:createRecord');
addRecordEvent.setParams({
entityApiName: 'Agency_Opportunity__c',
recordTypeId: '012100000006KW7'
});
addRecordEvent.fire();
+ component.set('v.showErrorInfo', false);
},
-
- new_report : function(component, event, helper) {
+
+ new_report: function (component, event, helper) {
component.find('save_button').set('v.label', '淇濆瓨骞舵柊寤�');
+ component.set('v.data.Report_Date__c', '');
helper.new_report(component, event, helper);
},
-
- copy_button : function(component, event, helper) {
+
+ copy_button: function (component, event, helper) {
component.find('save_button').set('v.label', '淇濆瓨骞舵柊寤�');
helper.copy_button(component, event, helper);
},
-
- change_report_radio : function(component, event, helper) {
+
+ change_report_radio: function (component, event, helper) {
helper.change_report_radio(component, event, helper);
},
-
- edit_button : function(component, event, helper) {
+
+ edit_button: function (component, event, helper) {
component.find('save_button').set('v.label', '淇濆瓨');
helper.edit_button(component, event, helper);
},
-
- createCon : function(component, event, helper) {
- helper.createCon(component, event, helper);
+
+ createCon: function (component, event, helper) {
+ helper.createCon(component, event, helper);
},
- showRequiredFields: function(component, event, helper){
- $A.util.removeClass(component.find("newOpportunityField"), "none");
- $A.util.removeClass(component.find("newOpportunityField"), "none");
+ showRequiredFields: function (component, event, helper) {
+ $A.util.removeClass(component.find('newOpportunityField'), 'none');
+ $A.util.removeClass(component.find('newOpportunityField'), 'none');
},
-
- handleSuccess : function(component, event, helper) {
+
+ handleSuccess: function (component, event, helper) {
helper.handleSuccess(component, event, helper);
},
-
- handleSubmit : function(component, event, helper) {
+
+ handleSubmit: function (component, event, helper) {
/*
var params = event.getParams();
params.fields["Agency_Hospital__c"] = component.get('v.hospitalLinkId');
@@ -60,39 +63,44 @@
// vivek 娣诲姞楠岃瘉 start
// helper.handleFormSubmit(component);
var showValidationError = false;
- var fields = component.find("newOpportunityField");
+ var fields = component.find('newOpportunityField');
var vaildationFailReason = '';
// var vaildationFailReason2 = '';
// var currentDate = new Date().toJSON().slice(0,10);
-
+
// PIPL update Yin Mingjie 21/02/2022 start
let agencyReport = Object.create(null);
// PIPL update Yin Mingjie 21/02/2022 end
fields.forEach(function (field) {
- if(field.get("v.fieldName") === 'Type__c' && $A.util.isEmpty(field.get("v.value"))){
+ if (
+ field.get('v.fieldName') === 'Type__c' &&
+ $A.util.isEmpty(field.get('v.value'))
+ ) {
showValidationError = true;
- vaildationFailReason = "鍒嗙被涓嶈兘涓虹┖锛�";
- }else if(field.get("v.fieldName") === 'Doctor_Division1__c' && $A.util.isEmpty(field.get("v.value"))){
+ vaildationFailReason = '鍒嗙被涓嶈兘涓虹┖锛�';
+ } else if (
+ field.get('v.fieldName') === 'Doctor_Division1__c' &&
+ $A.util.isEmpty(field.get('v.value'))
+ ) {
showValidationError = true;
- if(vaildationFailReason != ''){
- vaildationFailReason += "鍖荤敓鍖哄垎(鑱屽姟)涓嶈兘涓虹┖锛�";
- }else{
- vaildationFailReason = "鍖荤敓鍖哄垎(鑱屽姟)涓嶈兘涓虹┖锛�";
+ if (vaildationFailReason != '') {
+ vaildationFailReason += '鍖荤敓鍖哄垎(鑱屽姟)涓嶈兘涓虹┖锛�';
+ } else {
+ vaildationFailReason = '鍖荤敓鍖哄垎(鑱屽姟)涓嶈兘涓虹┖锛�';
}
-
}
// PIPL update Yin Mingjie 21/02/2022 start
- if(field.get("v.fieldName") === 'Name'){
- agencyReport['name'] = field.get("v.value");
- }else if(field.get("v.fieldName") === 'Type__c'){
- agencyReport['type'] = field.get("v.value");
- }else if(field.get("v.fieldName") === 'Doctor_Division1__c'){
- agencyReport['doctorDivision1'] = field.get("v.value");
+ if (field.get('v.fieldName') === 'Name') {
+ agencyReport['name'] = field.get('v.value');
+ } else if (field.get('v.fieldName') === 'Type__c') {
+ agencyReport['type'] = field.get('v.value');
+ } else if (field.get('v.fieldName') === 'Doctor_Division1__c') {
+ agencyReport['doctorDivision1'] = field.get('v.value');
}
// PIPL update Yin Mingjie 21/02/2022 end
});
-
+
if (!showValidationError) {
// PIPL update Yin Mingjie 21/02/2022 start
/*
@@ -103,50 +111,72 @@
var agencyHospitalid = component.get('v.hospitalLinkId');
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
- debugger
+ debugger;
let hospitalName = '';
//璋冪敤鍚庣searchAgencyDataId鏂规硶鏌ヨ鍑哄尰闄笅闈㈡墍鏈夊鎴蜂汉鍛榙ataid
- helper.CallBackAction(component,'searchAgencyDataId',{
- hospitalId : agencyHospitalid
- },function(data){
- if(data.getState() == "SUCCESS"){
- var data = data.getReturnValue();
- if(data.IsSuccess == true){
- let agencyContactIds = ''
- if(data.Message == '' && data.Data && data.Data.length > 0){
- hospitalName = data.Data[0].Agency_Hospital__r.Name;
- for(var i=0;i<data.Data.length;i++){
- if(data.Data[i].AWS_Data_Id__c)
- agencyContactIds += ','+data.Data[i].AWS_Data_Id__c;
+ helper.CallBackAction(
+ component,
+ 'searchAgencyDataId',
+ {
+ hospitalId: agencyHospitalid
+ },
+ function (data) {
+ if (data.getState() == 'SUCCESS') {
+ var data = data.getReturnValue();
+ if (data.IsSuccess == true) {
+ let agencyContactIds = '';
+ if (
+ data.Message == '' &&
+ data.Data &&
+ data.Data.length > 0
+ ) {
+ hospitalName =
+ data.Data[0].Agency_Hospital__r.Name;
+ for (var i = 0; i < data.Data.length; i++) {
+ if (data.Data[i].AWS_Data_Id__c)
+ agencyContactIds +=
+ ',' + data.Data[i].AWS_Data_Id__c;
+ }
+ agencyContactIds =
+ agencyContactIds.substring(1);
+ agencyReport['agencyContactIds'] =
+ agencyContactIds;
+ } else {
+ agencyReport['agencyContactIds'] =
+ agencyContactIds;
}
- agencyContactIds = agencyContactIds.substring(1);
- agencyReport['agencyContactIds'] = agencyContactIds;
- }else{
- agencyReport['agencyContactIds'] = agencyContactIds;
- }
- var arr = new Array();
- arr.push(agencyReport);
- var requestData = JSON.stringify(arr);
- // helper.set_aws_url(component,data,agencyHospitalid);
+ var arr = new Array();
+ arr.push(agencyReport);
+ var requestData = JSON.stringify(arr);
+ // helper.set_aws_url(component,data,agencyHospitalid);
- var token = component.get('v.AWStoken');
- var newUrl = component.get('v.AWSinsert') + 'V2';
-
- component.set('v.login',true);
- helper.insert_agencycontact(component,token,newUrl,requestData,agencyHospitalid,helper,hospitalName);
- }else{
+ var token = component.get('v.AWStoken');
+ var newUrl = component.get('v.AWSinsert') + 'V2';
+
+ component.set('v.loginEdit', true);
+ helper.insert_agencycontact(
+ component,
+ token,
+ newUrl,
+ requestData,
+ agencyHospitalid,
+ helper,
+ hospitalName
+ );
+ } else {
+ helper.ShowToast({
+ message: data.message,
+ type: 'error'
+ });
+ }
+ } else {
helper.ShowToast({
- "message" : data.message,
- "type" : "error"
+ message: 'searchAgency澶辫触',
+ type: 'error'
});
}
- }else{
- helper.ShowToast({
- "message" : 'searchAgency澶辫触',
- "type" : "error"
- });
}
- })
+ );
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
// var arr = new Array();
// arr.push(agencyReport);
@@ -155,12 +185,12 @@
// var token = component.get('v.AWStoken');
// var newUrl = component.get('v.AWSinsert');
-
+
// component.set('v.login',true);
// helper.insert_agencycontact(component,token,newUrl,data,agencyHospitalid,helper);
// PIPL update Yin Mingjie 21/02/2022 end
- }else{
+ } else {
component.find('OppMessage').setError(vaildationFailReason);
}
// var eventFields = event.getParam("fields");
@@ -168,151 +198,166 @@
// component.find('recordEditForm').submit(eventFields);
// vivek 娣诲姞楠岃瘉 end
},
-
- createCancel : function(component, event, helper) {
+
+ createCancel: function (component, event, helper) {
helper.createCancel(component, event, helper);
},
-
- yes_button : function(component, event, helper) {
+
+ yes_button: function (component, event, helper) {
component.set('v.confirm_status', 1);
- helper.close_confirm(component, component.get('v.modal_confirm_title'), component.get('v.modal_confirm_text'));
+ helper.close_confirm(
+ component,
+ component.get('v.modal_confirm_title'),
+ component.get('v.modal_confirm_text')
+ );
},
- no_button : function(component, event, helper) {
+ no_button: function (component, event, helper) {
component.set('v.confirm_status', 2);
- helper.close_confirm(component, component.get('v.modal_confirm_title'), component.get('v.modal_confirm_text'));
+ helper.close_confirm(
+ component,
+ component.get('v.modal_confirm_title'),
+ component.get('v.modal_confirm_text')
+ );
},
-
- toggle_report : function(component, event, helper) {
+
+ toggle_report: function (component, event, helper) {
helper.toggle_report(component);
},
- save_report : function(component, event, helper) {
+ save_report: function (component, event, helper) {
helper.save_report(component, event, helper);
},
-
- select_date_change : function(component, event, helper) {
+
+ select_date_change: function (component, event, helper) {
helper.select_date_change(component, event, helper);
},
-
- select_agency_change : function(component, event, helper) {
+
+ select_agency_change: function (component, event, helper) {
helper.select_agency_change(component, event, helper);
},
-
- hosChange : function(component, event, helper) {
- var hospital_name = event.getParam("value");
- if (hospital_name.match(/(\S+\s)+/)) {
- helper.searchHos(component, event, helper);
- } else {
- helper.hideSearch(component, event, helper);
- }
+
+ hosChange: function (component, event, helper) {
+ var hospital_name = event.getParam('value');
+ if (hospital_name.match(/(\S+\s)+/)) {
+ helper.searchHos(component, event, helper);
+ } else {
+ helper.hideSearch(component, event, helper);
+ }
},
-
- selectHos : function(component, event, helper) {
- helper.selectHos(component, event, helper);
+
+ selectHos: function (component, event, helper) {
+ helper.selectHos(component, event, helper);
helper.setOpportunity_cfilter(component);
},
- select_department : function(component, event, helper) {
+ select_department: function (component, event, helper) {
helper.select_department(component, event, helper);
helper.setOpportunity_cfilter(component);
},
- select_purpose_type : function(component, event, helper) {
+ select_purpose_type: function (component, event, helper) {
helper.select_purpose_type(component, event, helper);
},
-
- doctor_change : function(component, event, helper) {
+
+ doctor_change: function (component, event, helper) {
helper.doctor_change(component, event, helper);
},
-
- opportunityChange : function(component, event, helper) {
+
+ opportunityChange: function (component, event, helper) {
helper.opportunityChange(component, event, helper);
},
-
- productcategoryChange1 : function(component, event, helper) {
+
+ productcategoryChange1: function (component, event, helper) {
helper.productcategoryChange1(component, event, helper);
},
- productcategoryChange2 : function(component, event, helper) {
+ productcategoryChange2: function (component, event, helper) {
helper.productcategoryChange2(component, event, helper);
},
- productcategoryChange3 : function(component, event, helper) {
+ productcategoryChange3: function (component, event, helper) {
helper.productcategoryChange3(component, event, helper);
},
- stageNameChange : function(component, event, helper) {
+ stageNameChange: function (component, event, helper) {
helper.stageNameChange(component, event, helper);
},
- onDragOver : function(component, event, helper) {
+ onDragOver: function (component, event, helper) {
event.preventDefault();
},
-
- onDrop : function(component, event, helper) {
+
+ onDrop: function (component, event, helper) {
event.stopPropagation();
event.preventDefault();
- event.dataTransfer.dropEffect='copy';
- var files=event.dataTransfer.files;
- helper.readFile(component,helper,files[0]);
+ event.dataTransfer.dropEffect = 'copy';
+ var files = event.dataTransfer.files;
+ helper.readFile(component, helper, files[0]);
},
- CreateRecord : function(component, event, helper){
- var files = event.getSource().get("v.files");
+ CreateRecord: function (component, event, helper) {
+ var files = event.getSource().get('v.files');
// var fileInput = component.find("file").getElement();
// var file = fileInput.files[0];
- helper.readFile(component,helper,files[0]);
+ helper.readFile(component, helper, files[0]);
+ component.set('v.showErrorInfo', false);
},
- processFileContent : function(component,event,helper){
- helper.saveRecords(component,event,helper);
- },
-
- cancel : function(component,event,helper){
- component.set("v.showMain",true);
+ processFileContent: function (component, event, helper) {
+ helper.saveRecords(component, event, helper);
+ component.set('v.showErrorInfo', false);
},
- import : function(component,event,helper){
+ cancel: function (component, event, helper) {
+ component.set('v.showMain', true);
+ },
+
+ import: function (component, event, helper) {
// component.find('file').click();
// console.log('lll'+component.find('file'));
helper.showImport(component);
},
- exportDate : function(component,event,helper){
- var stockData = component.get("v.reports_date");
- console.log('瀵煎嚭鏁版嵁'+stockData);
- var csv = helper.convertArrayOfObjectsToCSV(component,stockData);
- if (csv == null){return;}
+ exportDate: function (component, event, helper) {
+ var stockData = component.get('v.reports_date');
+ console.log('瀵煎嚭鏁版嵁' + stockData);
+ var csv = helper.convertArrayOfObjectsToCSV(component, stockData);
+ if (csv == null) {
+ return;
+ }
- // ####--code for create a temp. <a> html tag [link tag] for download the CSV file--####
- var universalBOM = "\uFEFF";
+ // ####--code for create a temp. <a> html tag [link tag] for download the CSV file--####
+ var universalBOM = '\uFEFF';
var hiddenElement = document.createElement('a');
- hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(universalBOM+csv);
- hiddenElement.target = '_self'; //
- hiddenElement.download = 'ExportData.csv'; // CSV file Name* you can change it.[only name not .csv]
+ hiddenElement.href =
+ 'data:text/csv;charset=utf-8,' + encodeURI(universalBOM + csv);
+ hiddenElement.target = '_self'; //
+ hiddenElement.download = 'ExportData.csv'; // CSV file Name* you can change it.[only name not .csv]
document.body.appendChild(hiddenElement); // Required for FireFox browser
hiddenElement.click(); // using click() js function to download csv file
// helper.showExport(component);
-
},
- export_condition : function(component,event,helper){
+ export_condition: function (component, event, helper) {
helper.showExport(component);
},
- select_repores_date : function(component,event,helper){
- helper.select_repores_date(component,event,helper);
+ select_repores_date: function (component, event, helper) {
+ helper.select_repores_date(component, event, helper);
// var stockData = component.get("v.reports_date");
// console.log('鏌ュ嚭鐨勬暟鎹�'+stockData);
// helper.showExportDate(component,stockData);
// this.export(component,event,helper);
},
- export : function(component,event,helper){
+ export: function (component, event, helper) {
console.log('杩涘叆export');
- var stockData = component.get("v.reports_date");
- console.log('鏌ュ嚭鐨勬暟鎹�'+stockData);
+ var stockData = component.get('v.reports_date');
+ console.log('鏌ュ嚭鐨勬暟鎹�' + stockData);
// helper.showExportDate(component,stockData);
// helper.showExport(component);
},
- close_import : function(component,event,helper){
- component.set("v.showMain",true);
+ close_import: function (component, event, helper) {
+ component.set('v.showMain', true);
helper.close_import(component);
},
- close_export : function(component,event,helper){
- component.set("v.showMain",true);
+ close_export: function (component, event, helper) {
+ component.set('v.showMain', true);
helper.close_export(component);
+ },
+ exportErrorInfo: function (component, event, helper) {
+ helper.exportErrorInfoHelper(component);
}
-})
\ No newline at end of file
+});
diff --git a/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js b/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js
index 4222c03..4129232 100644
--- a/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js
+++ b/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js
@@ -1,77 +1,126 @@
({
- doinit : function(component, event, helper) {
+ doinit: function (component, event, helper) {
this.report_date_list(component, event, helper, 5);
- component.set('v.login',true);
+ component.set('v.login', true);
var action = component.get('c.getalldata');
- action.setCallback(this,function(response){
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
var res = response.getReturnValue();
- component.set('v.alldata',res.reports);
- component.set('v.fieldsmap',res.fieldsMap);
- component.set('v.allselectlist',res.allselectlist);
- component.set('v.doclist',res.doclist);
+ component.set('v.alldata', res.reports);
+ component.set('v.fieldsmap', res.fieldsMap);
+ component.set('v.allselectlist', res.allselectlist);
+ component.set('v.doclist', res.doclist);
// PIPL update Yin Mingjie 21/02/2022 start
- component.find('select_agency_person').set('v.options', this.conv_selected(res.allselectlist.AgencyPerson__c));
+ component
+ .find('select_agency_person')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.AgencyPerson__c)
+ );
// this.search_contact(component, event, helper,res.allselectlist.AgencyPerson__c);
// PIPL update Yin Mingjie 21/02/2022 end
- component.find('select_department').set('v.options', this.conv_selected(res.allselectlist.Department_Cateogy__c));
- component.find('select_purpose_type').set('v.options', this.conv_selected(res.allselectlist.Purpose_Type__c));
- component.find('select_result').set('v.options', this.conv_selected(res.allselectlist.Result__c));
- component.find('select_stageName').set('v.options', this.conv_selected(res.allselectlist.StageName__c));
- //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
- component.find('SupportNeeds__c').set('v.options', this.conv_selected(res.allselectlist.SupportNeeds__c));
- //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
- component.set('v.selected_agency_person', res.allselectlist.AgencyPerson__c[0].label);
+ component
+ .find('select_department')
+ .set(
+ 'v.options',
+ this.conv_selected(
+ res.allselectlist.Department_Cateogy__c
+ )
+ );
+ component
+ .find('select_purpose_type')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.Purpose_Type__c)
+ );
+ component
+ .find('select_result')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.Result__c)
+ );
+ component
+ .find('select_stageName')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.StageName__c)
+ );
+ //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
+ component
+ .find('SupportNeeds__c')
+ .set(
+ 'v.options',
+ this.conv_selected(res.allselectlist.SupportNeeds__c)
+ );
+ //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
+ component.set(
+ 'v.selected_agency_person',
+ res.allselectlist.AgencyPerson__c[0].label
+ );
component.set('v.dialog_type', '鏂板缓');
- component.set('v.awsurl', res.awsurl);// 20220222 PI鏀归�� by Bright
- component.set('v.contactawsurl', res.contactawsurl);// 20220222 PI鏀归�� by Bright
-
- this.get_reports(component, event, helper, component.find('select_date').get('v.value'), component.find('select_agency_person').get('v.value'));
-
- component.set('v.login',false);
- }
- else{
+ component.set('v.awsurl', res.awsurl); // 20220222 PI鏀归�� by Bright
+ component.set('v.contactawsurl', res.contactawsurl); // 20220222 PI鏀归�� by Bright
+
+ this.get_reports(
+ component,
+ event,
+ helper,
+ component.find('select_date').get('v.value'),
+ component.find('select_agency_person').get('v.value')
+ );
+
+ component.set('v.login', false);
+ } else {
this.error('doinit failed.');
- component.set('v.login',false);
+ component.set('v.login', false);
}
});
$A.enqueueAction(action);
},
-
+
// PIPL update Yin Mingjie 21/02/2022 start
- search_contact : function(component, event, helper, resobj) {
+ search_contact: function (component, event, helper, resobj) {
let contactData = Object.create(null);
var dataArr = new Array();
for (let i = 0; i < resobj.length; i++) {
- if (resobj[i].awsid != null && resobj[i].awsid != ''){
+ if (resobj[i].awsid != null && resobj[i].awsid != '') {
contactData[resobj[i].awsid] = resobj[i];
dataArr.push(resobj[i].awsid);
}
}
- let obj= Object.create(null);
+ let obj = Object.create(null);
obj['dataIds'] = dataArr;
var payload = JSON.stringify(obj);
- this.search_contact_url(component, 'Contact', (result)=>{
+ this.search_contact_url(component, 'Contact', (result) => {
var token = result.token;
var searchUrl = result.searchUrl;
- this.search_core(token,searchUrl,payload,(result)=>{
- if(result.status == '0'){
- if(result.object != null){
- this.to_contact_list(result,contactData,component);
- }else{
- component.set('v.login',false);
+ this.search_core(
+ token,
+ searchUrl,
+ payload,
+ (result) => {
+ if (result.status == '0') {
+ if (result.object != null) {
+ this.to_contact_list(
+ result,
+ contactData,
+ component
+ );
+ } else {
+ component.set('v.loginEdit', false);
+ }
+ } else {
+ this.error('AWS search status1 : ' + result.status);
+ component.set('v.loginEdit', false);
}
- }else{
- this.error('AWS search status1 : ' + result.status);
- component.set('v.login',false);
- }
- },component);
-
+ },
+ component
+ );
});
},
- to_contact_list : function(result,retMap,component) {
+ to_contact_list: function (result, retMap, component) {
var resls = result.object;
var res = [];
var space = {};
@@ -88,35 +137,34 @@
t['value'] = retMap[resls[i].dataId].value;
res.push(t);
}
- component.find('select_agency_person').set('v.options',res);
- component.set('v.allselectlistAgencyPerson',res);
- component.set('v.login',false);
+ component.find('select_agency_person').set('v.options', res);
+ component.set('v.allselectlistAgencyPerson', res);
+ component.set('v.loginEdit', false);
},
- search_contact_url : function(component, sobject, callback) {
+ search_contact_url: function (component, sobject, callback) {
var action = component.get('c.getAwsurl');
action.setParams({
- "sobj" : sobject,
+ sobj: sobject
});
- action.setCallback(this,function(response){
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
var result = response.getReturnValue();
- if(callback)callback(result);
- }
- else{
+ if (callback) callback(result);
+ } else {
this.error('AWS url/token error.');
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
}
});
$A.enqueueAction(action);
},
// PIPL update Yin Mingjie 21/02/2022 end
- select_department : function(component, event, helper) {
- var dc = component.find("select_department").get("v.value");
- dc = dc ? '%'+dc+'%' : '';
- var purpose_type = component.find("select_purpose_type").get("v.value");
+ select_department: function (component, event, helper) {
+ var dc = component.find('select_department').get('v.value');
+ dc = dc ? '%' + dc + '%' : '';
+ var purpose_type = component.find('select_purpose_type').get('v.value');
if (purpose_type) {
if (purpose_type.substr(-3) == 'OPD') {
purpose_type = 'OPD';
@@ -127,22 +175,25 @@
}
}
if (dc != '' || purpose_type != '') {
-
var action = component.get('c.getProductList');
action.setParams({
- "dc" : dc,
- "opdsis" : purpose_type,
+ dc: dc,
+ opdsis: purpose_type
});
- action.setCallback(this,function(response){
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
-
+ if (state == 'SUCCESS') {
var res = response.getReturnValue();
- component.find('select_Product1').set("v.options", JSON.parse(JSON.stringify(res)));
- component.find('select_Product2').set("v.options", JSON.parse(JSON.stringify(res)));
- component.find('select_Product3').set("v.options", JSON.parse(JSON.stringify(res)));
- }
- else{
+ component
+ .find('select_Product1')
+ .set('v.options', JSON.parse(JSON.stringify(res)));
+ component
+ .find('select_Product2')
+ .set('v.options', JSON.parse(JSON.stringify(res)));
+ component
+ .find('select_Product3')
+ .set('v.options', JSON.parse(JSON.stringify(res)));
+ } else {
this.error('getProductList failed.');
}
});
@@ -154,26 +205,26 @@
}
},
- get_reports : function(component, event, helper, date_str, person_str) {
+ get_reports: function (component, event, helper, date_str, person_str) {
if (!date_str) {
return false;
}
-
+
date_str = this.get_date_string(date_str);
-
+
var action = component.get('c.getReports');
action.setParams({
- "date_str" : date_str,
- "person_str" : person_str,
+ date_str: date_str,
+ person_str: person_str
});
- component.set('v.login',true);
- action.setCallback(this,function(response){
+ component.set('v.login', true);
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
var res = response.getReturnValue();
- component.set('v.reports', res.reports);
-
+ component.set('v.reports', res.reports);
+
// 20220222 PI鏀归�� by Bright--start
let dataIds = [];
let dataIds1 = [];
@@ -185,68 +236,96 @@
dataIds.push(rep.doctor2__r.AWS_Data_Id__c);
}
- if (rep.Person_In_Charge2__r && rep.Person_In_Charge2__r.AWS_Data_Id__c) {
+ if (
+ rep.Person_In_Charge2__r &&
+ rep.Person_In_Charge2__r.AWS_Data_Id__c
+ ) {
dataIds1.push(rep.Person_In_Charge2__r.AWS_Data_Id__c);
}
}
let Foo = null;
- Foo = function(){
- if(b && b1){
+ Foo = function () {
+ if (b && b1) {
for (const rep of res.reports) {
- if (rep.doctor2__r && rep.doctor2__r.AWS_Data_Id__c && mm.hasOwnProperty(rep.doctor2__r.AWS_Data_Id__c)) {
- rep.doctor2__r.awsdata = mm[rep.doctor2__r.AWS_Data_Id__c];
+ if (
+ rep.doctor2__r &&
+ rep.doctor2__r.AWS_Data_Id__c &&
+ mm.hasOwnProperty(rep.doctor2__r.AWS_Data_Id__c)
+ ) {
+ rep.doctor2__r.awsdata =
+ mm[rep.doctor2__r.AWS_Data_Id__c];
}
- if (rep.Person_In_Charge2__r && rep.Person_In_Charge2__r.AWS_Data_Id__c && mm.hasOwnProperty(rep.Person_In_Charge2__r.AWS_Data_Id__c)) {
- rep.Person_In_Charge2__r.awsdata = mm[rep.Person_In_Charge2__r.AWS_Data_Id__c];
+ if (
+ rep.Person_In_Charge2__r &&
+ rep.Person_In_Charge2__r.AWS_Data_Id__c &&
+ mm.hasOwnProperty(
+ rep.Person_In_Charge2__r.AWS_Data_Id__c
+ )
+ ) {
+ rep.Person_In_Charge2__r.awsdata =
+ mm[rep.Person_In_Charge2__r.AWS_Data_Id__c];
}
}
- $A.getCallback(()=>component.set('v.reports', res.reports))();
- }else{
- console.log('b='+b + ',b1='+b1+',continue');
- setTimeout(Foo,100);
+ $A.getCallback(() =>
+ component.set('v.reports', res.reports)
+ )();
+ } else {
+ console.log('b=' + b + ',b1=' + b1 + ',continue');
+ setTimeout(Foo, 100);
}
- }
-
- if(dataIds.length > 0){
+ };
+
+ if (dataIds.length > 0) {
let awsurl = component.get('v.awsurl');
- helper.search_core(awsurl.token,awsurl.searchUrl,JSON.stringify({
- "dataIds":dataIds
- }),(result)=>{
- if(result.status == '0'){
-
- for (const m of result.object) {
- mm[m.dataId] = m;
+ helper.search_core(
+ awsurl.token,
+ awsurl.searchUrl,
+ JSON.stringify({
+ dataIds: dataIds
+ }),
+ (result) => {
+ if (result.status == '0') {
+ for (const m of result.object) {
+ mm[m.dataId] = m;
+ }
+ b = true;
+ Foo();
+ } else {
+ //this.error('AWS search status2 : ' + result.status);
+ this.success('璇烽噸鏂板埛鏂伴〉闈㈣繘琛岃В瀵�');
}
- b = true;
- Foo();
- }else{
- this.error('璇烽噸鏂板埛鏂颁竴涓嬮〉闈€��');
- }
- },component);
- }else{
+ },
+ component
+ );
+ } else {
b = true;
}
-
-
- if(dataIds1.length > 0){
+ if (dataIds1.length > 0) {
let contactawsurl = component.get('v.contactawsurl');
- helper.search_core(contactawsurl.token,contactawsurl.searchUrl,JSON.stringify({
- "dataIds":dataIds1
- }),(result)=>{
- if(result.status == '0'){
-
- for (const m of result.object) {
- mm[m.dataId] = m;
+ helper.search_core(
+ contactawsurl.token,
+ contactawsurl.searchUrl,
+ JSON.stringify({
+ dataIds: dataIds1
+ }),
+ (result) => {
+ if (result.status == '0') {
+ for (const m of result.object) {
+ mm[m.dataId] = m;
+ }
+ b1 = true;
+ Foo();
+ } else {
+ this.error(
+ 'AWS search status3 : ' + result.status
+ );
}
- b1 = true;
- Foo();
- }else{
- this.error('AWS search status3 : ' + result.status);
- }
- },component);
- }else{
+ },
+ component
+ );
+ } else {
b1 = true;
}
// 20220222 PI鏀归�� by Bright--end
@@ -255,53 +334,231 @@
// 鏇存柊淇濆瓨寰屻伄select_data鐢�
var report_id = component.get('v.update_select_report_data_id');
-
- if (report_id != "") {
+
+ if (report_id != '') {
for (i = 0; i < res.reports.length; i++) {
if (res.reports[i]['Id'] == report_id) {
- component.set('v.select_report_data', res.reports[i]);
+ component.set(
+ 'v.select_report_data',
+ res.reports[i]
+ );
break;
}
}
component.set('v.update_select_report_data_id', '');
}
-
+
if (res.reports.length > 0) {
component.set('v.list_message', '');
} else {
component.set('v.list_message', 'no_data');
}
- component.set('v.login',false);
- }
- else{
+ component.set('v.login', false);
+ } else {
this.error('get_reports failed.');
- component.set('v.login',false);
+ component.set('v.login', false);
}
});
$A.enqueueAction(action);
},
-
- select_date_change : function(component, event, helper) {
- this.get_reports(component, event, helper, component.find('select_date').get('v.value'), component.find('select_agency_person').get('v.value'));
- this.new_button_disabled(component, event, helper);
-
- component.set('v.select_report_data_radio', '');
- component.find('copy_button').set('v.disabled', true);
+ get_reports_edit: function (
+ component,
+ event,
+ helper,
+ date_str,
+ person_str
+ ) {
+ if (!date_str) {
+ return false;
+ }
+
+ date_str = this.get_date_string(date_str);
+
+ var action = component.get('c.getReports');
+ action.setParams({
+ date_str: date_str,
+ person_str: person_str
+ });
+
+ component.set('v.loginEdit', true);
+ action.setCallback(this, function (response) {
+ var state = response.getState();
+ if (state == 'SUCCESS') {
+ var res = response.getReturnValue();
+ component.set('v.reports', res.reports);
+
+ // 20220222 PI鏀归�� by Bright--start
+ let dataIds = [];
+ let dataIds1 = [];
+ let mm = {};
+ let b = false;
+ let b1 = false;
+ for (const rep of res.reports) {
+ if (rep.doctor2__r && rep.doctor2__r.AWS_Data_Id__c) {
+ dataIds.push(rep.doctor2__r.AWS_Data_Id__c);
+ }
+
+ if (
+ rep.Person_In_Charge2__r &&
+ rep.Person_In_Charge2__r.AWS_Data_Id__c
+ ) {
+ dataIds1.push(rep.Person_In_Charge2__r.AWS_Data_Id__c);
+ }
+ }
+ let Foo = null;
+ Foo = function () {
+ if (b && b1) {
+ for (const rep of res.reports) {
+ if (
+ rep.doctor2__r &&
+ rep.doctor2__r.AWS_Data_Id__c &&
+ mm.hasOwnProperty(rep.doctor2__r.AWS_Data_Id__c)
+ ) {
+ rep.doctor2__r.awsdata =
+ mm[rep.doctor2__r.AWS_Data_Id__c];
+ }
+ if (
+ rep.Person_In_Charge2__r &&
+ rep.Person_In_Charge2__r.AWS_Data_Id__c &&
+ mm.hasOwnProperty(
+ rep.Person_In_Charge2__r.AWS_Data_Id__c
+ )
+ ) {
+ rep.Person_In_Charge2__r.awsdata =
+ mm[rep.Person_In_Charge2__r.AWS_Data_Id__c];
+ }
+ }
+
+ $A.getCallback(() =>
+ component.set('v.reports', res.reports)
+ )();
+ } else {
+ console.log('b=' + b + ',b1=' + b1 + ',continue');
+ setTimeout(Foo, 100);
+ }
+ };
+
+ if (dataIds.length > 0) {
+ let awsurl = component.get('v.awsurl');
+ helper.search_core(
+ awsurl.token,
+ awsurl.searchUrl,
+ JSON.stringify({
+ dataIds: dataIds
+ }),
+ (result) => {
+ if (result.status == '0') {
+ for (const m of result.object) {
+ mm[m.dataId] = m;
+ }
+ b = true;
+ Foo();
+ } else {
+ //this.error('AWS search status2 : ' + result.status);
+ this.success('璇烽噸鏂板埛鏂伴〉闈㈣繘琛岃В瀵�');
+ }
+ },
+ component
+ );
+ } else {
+ b = true;
+ }
+
+ if (dataIds1.length > 0) {
+ let contactawsurl = component.get('v.contactawsurl');
+ helper.search_core(
+ contactawsurl.token,
+ contactawsurl.searchUrl,
+ JSON.stringify({
+ dataIds: dataIds1
+ }),
+ (result) => {
+ if (result.status == '0') {
+ for (const m of result.object) {
+ mm[m.dataId] = m;
+ }
+ b1 = true;
+ Foo();
+ } else {
+ this.error(
+ 'AWS search status3 : ' + result.status
+ );
+ }
+ },
+ component
+ );
+ } else {
+ b1 = true;
+ }
+ // 20220222 PI鏀归�� by Bright--end
+
+ component.set('v.report_count', res.reports.length);
+
+ // 鏇存柊淇濆瓨寰屻伄select_data鐢�
+ var report_id = component.get('v.update_select_report_data_id');
+
+ if (report_id != '') {
+ for (i = 0; i < res.reports.length; i++) {
+ if (res.reports[i]['Id'] == report_id) {
+ component.set(
+ 'v.select_report_data',
+ res.reports[i]
+ );
+ break;
+ }
+ }
+ component.set('v.update_select_report_data_id', '');
+ }
+
+ if (res.reports.length > 0) {
+ component.set('v.list_message', '');
+ } else {
+ component.set('v.list_message', 'no_data');
+ }
+ component.set('v.loginEdit', false);
+ } else {
+ this.error('get_reports failed.');
+ component.set('v.loginEdit', false);
+ }
+ });
+ $A.enqueueAction(action);
},
-
- select_agency_change : function(component, event, helper) {
- var select_value = component.find('select_agency_person').get('v.value');
- var new_label = this.get_agency_person_name(component, select_value);
- component.set('v.selected_agency_person', new_label);
-
- this.get_reports(component, event, helper, component.find('select_date').get('v.value'), select_value);
+
+ select_date_change: function (component, event, helper) {
+ this.get_reports(
+ component,
+ event,
+ helper,
+ component.find('select_date').get('v.value'),
+ component.find('select_agency_person').get('v.value')
+ );
this.new_button_disabled(component, event, helper);
component.set('v.select_report_data_radio', '');
component.find('copy_button').set('v.disabled', true);
},
-
- get_agency_person_name : function(component, agency_person_value) {
+
+ select_agency_change: function (component, event, helper) {
+ var select_value = component
+ .find('select_agency_person')
+ .get('v.value');
+ var new_label = this.get_agency_person_name(component, select_value);
+ component.set('v.selected_agency_person', new_label);
+
+ this.get_reports(
+ component,
+ event,
+ helper,
+ component.find('select_date').get('v.value'),
+ select_value
+ );
+ this.new_button_disabled(component, event, helper);
+
+ component.set('v.select_report_data_radio', '');
+ component.find('copy_button').set('v.disabled', true);
+ },
+
+ get_agency_person_name: function (component, agency_person_value) {
// PIPL update Yin Mingjie 21/02/2022 start
var allselectlist = component.get('v.allselectlist.AgencyPerson__c');
// var allselectlist = component.get('v.allselectlistAgencyPerson');
@@ -315,78 +572,111 @@
}
return new_label;
},
-
- new_button_disabled : function(component, event, helper) {
+
+ new_button_disabled: function (component, event, helper) {
var select_date = component.find('select_date').get('v.value');
- var select_agency = component.find('select_agency_person').get('v.value');
+ var select_agency = component
+ .find('select_agency_person')
+ .get('v.value');
if (select_date && select_agency) {
component.find('new_button').set('v.disabled', false);
} else {
component.find('new_button').set('v.disabled', true);
}
},
-
- toggle_report : function(component) {
+
+ toggle_report: function (component) {
var modal_window = component.find('modal_window');
var modal_bg = component.find('modal_bg');
if ($A.util.hasClass(modal_window, 'disp_none')) {
// OPEN
$A.util.removeClass(modal_window, 'disp_none');
- $A.util.removeClass(modal_bg, 'disp_none');
-
- if (component.get('v.mode') == 'edit' || component.get('v.mode') == 'copy') {
+ $A.util.removeClass(modal_bg, 'disp_none');
+ component.set('v.loginEdit', true);
+ if (
+ component.get('v.mode') == 'edit' ||
+ component.get('v.mode') == 'copy'
+ ) {
var select_data = '';
if (component.get('v.mode') == 'edit') {
select_data = component.get('v.select_report_data');
} else if (component.get('v.mode') == 'copy') {
select_data = component.get('v.select_report_data_radio');
}
-
+
var reports = component.get('v.reports');
var Agency_Hospital_text = '';
var Agency_Hospital_parent_id = '';
- debugger
- // 鍖婚櫌鍚�
+ debugger;
+ // 鍖婚櫌鍚�
if (select_data['Agency_Hospital__c'] != '') {
for (var i = 0; i < reports.length; i++) {
- if (reports[i]['Agency_Hospital__c'] == select_data['Agency_Hospital__c']) {
- Agency_Hospital_text = reports[i]['Agency_Hospital__r']['Name'];
- Agency_Hospital_parent_id = reports[i]['Agency_Hospital__r']['Hospital__c'];
+ if (
+ reports[i]['Agency_Hospital__c'] ==
+ select_data['Agency_Hospital__c']
+ ) {
+ Agency_Hospital_text =
+ reports[i]['Agency_Hospital__r']['Name'];
+ Agency_Hospital_parent_id =
+ reports[i]['Agency_Hospital__r']['Hospital__c'];
}
}
component.set('v.hospital', Agency_Hospital_text);
component.set('v.hospitalId', Agency_Hospital_parent_id);
- component.set('v.hospitalLinkId', select_data['Agency_Hospital__c']);
+ component.set(
+ 'v.hospitalLinkId',
+ select_data['Agency_Hospital__c']
+ );
component.find('new_con').set('v.disabled', false);
}
-
+
// 绉戝
if (select_data['Department_Cateogy__c'] != '') {
- this.set_selected(component, 'select_department', select_data['Department_Cateogy__c']);
+ this.set_selected(
+ component,
+ 'select_department',
+ select_data['Department_Cateogy__c']
+ );
}
// 鎷滆浜�
- component.set('v.default_select_doctor_id', select_data['doctor2__c']);
- this.set_doctor_list(component);
-
+ component.set(
+ 'v.default_select_doctor_id',
+ select_data['doctor2__c']
+ );
+ this.set_doctor_list(component);
+
// 娲诲姩鍖哄垎
if (select_data['Purpose_Type__c'] != '') {
- this.set_selected(component, 'select_purpose_type', select_data['Purpose_Type__c']);
+ this.set_selected(
+ component,
+ 'select_purpose_type',
+ select_data['Purpose_Type__c']
+ );
this.select_purpose_type(component);
}
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
// 鏀彺闇�姹�
if (select_data['SupportNeeds__c'] != '') {
- this.set_selected(component, 'SupportNeeds__c', select_data['SupportNeeds__c']);
- }
- //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
- // 绲愭灉
- if (select_data['Result__c'] != '' && typeof select_data['Result__c'] !== "undefined") {
- component.find('select_result').set('v.value', select_data['Result__c']);
+ this.set_selected(
+ component,
+ 'SupportNeeds__c',
+ select_data['SupportNeeds__c']
+ );
}
-
+ //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
+ // 绲愭灉
+ if (
+ select_data['Result__c'] != '' &&
+ typeof select_data['Result__c'] !== 'undefined'
+ ) {
+ component
+ .find('select_result')
+ .set('v.value', select_data['Result__c']);
+ }
+
// 璇环
var report_id = component.get('v.edit_copy_select_report_id');
- if (report_id != "") {
+ if (report_id != '') {
var select_opp = '';
var select_product_category1 = '';
var select_product_category2 = '';
@@ -394,169 +684,232 @@
var reportDate;
var i = 0;
for (i = 0; i < reports.length; i++) {
- if (report_id == reports[i]["Id"]) {
- select_opp = reports[i]["Opportunity__c"];
- select_product_category1 = reports[i]["Product_Category1__c"];
- select_product_category2 = reports[i]["Product_Category2__c"];
- select_product_category3 = reports[i]["Product_Category3__c"];
- reportDate = reports[i]["Report_Date__c"];
+ if (report_id == reports[i]['Id']) {
+ select_opp = reports[i]['Opportunity__c'];
+ select_product_category1 =
+ reports[i]['Product_Category1__c'];
+ select_product_category2 =
+ reports[i]['Product_Category2__c'];
+ select_product_category3 =
+ reports[i]['Product_Category3__c'];
+ reportDate = reports[i]['Report_Date__c'];
break;
}
}
-
+
// 璇环
if (select_opp != null && select_opp != '') {
- var select_opp_name = component.get('v.reports')[i].OppName__c;
+ var select_opp_name =
+ component.get('v.reports')[i].OppName__c;
component.set('v.data.Opportunity__c', select_opp);
- if ($A.get("$Browser.formFactor") == 'DESKTOP') {
- var values = [{
- type: 'Agency_Opportunity__c',
- id: select_opp,
- label: select_opp_name,
- icon : {
- url:'/img/icon/t4v35/custom/custom12_120.png',
- backgroundColor:'dc71d1',
- alt:'Agency_Opportunity__c'
+ if ($A.get('$Browser.formFactor') == 'DESKTOP') {
+ var values = [
+ {
+ type: 'Agency_Opportunity__c',
+ id: select_opp,
+ label: select_opp_name,
+ icon: {
+ url: '/img/icon/t4v35/custom/custom12_120.png',
+ backgroundColor: 'dc71d1',
+ alt: 'Agency_Opportunity__c'
+ }
}
- }];
+ ];
component.set('v.data.Opportunity__c', select_opp);
// component.find('input-opportunity').get("v.body")[0].set('v.values', values);
} else {
- component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', select_opp_name);
+ component
+ .find('input-opportunity')
+ .get('v.body')[0]
+ .set('v.selectedLabel', select_opp_name);
}
}
-
+
// 浜у搧鍖哄垎
- if (select_product_category1 != null && select_product_category1 != '') {
- component.find('select_Product1').set('v.value', select_product_category1);
+ if (
+ select_product_category1 != null &&
+ select_product_category1 != ''
+ ) {
+ component
+ .find('select_Product1')
+ .set('v.value', select_product_category1);
}
- if (select_product_category2 != null && select_product_category2 != '') {
- component.find('select_Product2').set('v.value', select_product_category2);
+ if (
+ select_product_category2 != null &&
+ select_product_category2 != ''
+ ) {
+ component
+ .find('select_Product2')
+ .set('v.value', select_product_category2);
}
- if (select_product_category3 != null && select_product_category3 != '') {
- component.find('select_Product3').set('v.value', select_product_category3);
+ if (
+ select_product_category3 != null &&
+ select_product_category3 != ''
+ ) {
+ component
+ .find('select_Product3')
+ .set('v.value', select_product_category3);
}
if (reportDate != null) {
+ console.log('reportDate = ' + reportDate);
component.set('v.data.Report_Date__c', reportDate);
}
-
- component.set('v.edit_copy_select_report_id', "");
- }
+
+ component.set('v.edit_copy_select_report_id', '');
+ }
}
+ setTimeout(function () {
+ component.set('v.loginEdit', false);
+ }, 1000);
} else {
// CLOSE
var select_report_data = component.get('v.select_report_data');
var Report_Date__c = component.get('v.data.Report_Date__c');
var Agency_Hospital__c = component.get('v.hospitalLinkId');
- var Department_Cateogy__c = component.find('select_department').get('v.value');
+ var Department_Cateogy__c = component
+ .find('select_department')
+ .get('v.value');
var doctor2__c = component.find('select_doctor').get('v.value');
- var Purpose_Type__c = component.find('select_purpose_type').get('v.value');
- var SupportNeeds__c = component.find('SupportNeeds__c').get('v.value');
+ var Purpose_Type__c = component
+ .find('select_purpose_type')
+ .get('v.value');
+ var SupportNeeds__c = component
+ .find('SupportNeeds__c')
+ .get('v.value');
var Opportunity__c = component.get('v.data.Opportunity__c');
- var Product_Category1__c = component.find('select_Product1').get('v.value');
- var Product_Category2__c = component.find('select_Product2').get('v.value');
- var Product_Category3__c = component.find('select_Product3').get('v.value');
+ var Product_Category1__c = component
+ .find('select_Product1')
+ .get('v.value');
+ var Product_Category2__c = component
+ .find('select_Product2')
+ .get('v.value');
+ var Product_Category3__c = component
+ .find('select_Product3')
+ .get('v.value');
var Result__c = component.find('select_result').get('v.value');
-
+
if (select_report_data !== null) {
- if (typeof select_report_data['Opportunity__c'] === "undefined") {
- select_report_data['Opportunity__c'] = "";
+ if (
+ typeof select_report_data['Opportunity__c'] === 'undefined'
+ ) {
+ select_report_data['Opportunity__c'] = '';
}
- if (typeof select_report_data['Product_Category1__c'] === "undefined") {
- select_report_data['Product_Category1__c'] = "";
+ if (
+ typeof select_report_data['Product_Category1__c'] ===
+ 'undefined'
+ ) {
+ select_report_data['Product_Category1__c'] = '';
}
- if (typeof select_report_data['Product_Category2__c'] === "undefined") {
- select_report_data['Product_Category2__c'] = "";
+ if (
+ typeof select_report_data['Product_Category2__c'] ===
+ 'undefined'
+ ) {
+ select_report_data['Product_Category2__c'] = '';
}
- if (typeof select_report_data['Product_Category3__c'] === "undefined") {
- select_report_data['Product_Category3__c'] = "";
+ if (
+ typeof select_report_data['Product_Category3__c'] ===
+ 'undefined'
+ ) {
+ select_report_data['Product_Category3__c'] = '';
}
- if (typeof select_report_data['Result__c'] === "undefined") {
- select_report_data['Result__c'] = "";
+ if (typeof select_report_data['Result__c'] === 'undefined') {
+ select_report_data['Result__c'] = '';
}
}
-
+
if (component.get('v.mode') == 'new') {
- var confirm_title = '璀﹀憡!'
+ var confirm_title = '璀﹀憡!';
var confirm_text = '鏀惧純鏂板缓鍛ㄦ姤锛�';
-
- if (!Report_Date__c &&
+
+ if (
+ !Report_Date__c &&
!Agency_Hospital__c &&
!Department_Cateogy__c &&
!doctor2__c &&
!Purpose_Type__c &&
- !SupportNeeds__c&&//WAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔�
+ !SupportNeeds__c && //WAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔�
!Opportunity__c &&
!Product_Category1__c &&
!Product_Category2__c &&
!Product_Category3__c &&
- !Result__c)
- {
+ !Result__c
+ ) {
this.allclear(component);
$A.util.addClass(modal_window, 'disp_none');
- $A.util.addClass(modal_bg, 'disp_none');
- } else {
- this.close_confirm(component, confirm_title, confirm_text);
- }
- } else if (component.get('v.mode') == 'copy') {
- var confirm_title = '璀﹀憡!'
- var confirm_text = '鏀惧純鏂板缓鍛ㄦ姤锛�';
-
- if (select_report_data['Report_Date__c'] == Report_Date__c &&
- select_report_data['Agency_Hospital__c'] == Agency_Hospital__c &&
- select_report_data['Department_Cateogy__c'] == Department_Cateogy__c &&
- select_report_data['doctor2__c'] == doctor2__c &&
- select_report_data['Purpose_Type__c'] == Purpose_Type__c &&
- select_report_data['SupportNeeds__c'] == SupportNeeds__c &&//WAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔�
- select_report_data['Opportunity__c'] == Opportunity__c &&
- select_report_data['Product_Category1__c'] == Product_Category1__c &&
- select_report_data['Product_Category2__c'] == Product_Category2__c &&
- select_report_data['Product_Category3__c'] == Product_Category3__c &&
- select_report_data['Result__c'] == Result__c)
- {
- this.allclear(component);
- $A.util.addClass(modal_window, 'disp_none');
- $A.util.addClass(modal_bg, 'disp_none');
- } else {
- this.close_confirm(component, confirm_title, confirm_text);
- }
- } else if (component.get('v.mode') == 'edit') {
- var confirm_title = '璀﹀憡!'
- var confirm_text = '鏀惧純缂栬緫鍛ㄦ姤锛�';
-
- if (select_report_data['Report_Date__c'] == Report_Date__c &&
- select_report_data['Agency_Hospital__c'] == Agency_Hospital__c &&
- select_report_data['Department_Cateogy__c'] == Department_Cateogy__c &&
- select_report_data['doctor2__c'] == doctor2__c &&
- select_report_data['Purpose_Type__c'] == Purpose_Type__c &&
- select_report_data['SupportNeeds__c'] == SupportNeeds__c &&//WAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔�
- select_report_data['Opportunity__c'] == Opportunity__c &&
- select_report_data['Product_Category1__c'] == Product_Category1__c &&
- select_report_data['Product_Category2__c'] == Product_Category2__c &&
- select_report_data['Product_Category3__c'] == Product_Category3__c &&
- select_report_data['Result__c'] == Result__c)
- {
- this.allclear(component);
- $A.util.addClass(modal_window, 'disp_none');
- $A.util.addClass(modal_bg, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
} else {
this.close_confirm(component, confirm_title, confirm_text);
}
- }
+ } else if (component.get('v.mode') == 'copy') {
+ var confirm_title = '璀﹀憡!';
+ var confirm_text = '鏀惧純鏂板缓鍛ㄦ姤锛�';
+ if (
+ select_report_data['Report_Date__c'] == Report_Date__c &&
+ select_report_data['Agency_Hospital__c'] ==
+ Agency_Hospital__c &&
+ select_report_data['Department_Cateogy__c'] ==
+ Department_Cateogy__c &&
+ select_report_data['doctor2__c'] == doctor2__c &&
+ select_report_data['Purpose_Type__c'] == Purpose_Type__c &&
+ select_report_data['SupportNeeds__c'] == SupportNeeds__c && //WAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔�
+ select_report_data['Opportunity__c'] == Opportunity__c &&
+ select_report_data['Product_Category1__c'] ==
+ Product_Category1__c &&
+ select_report_data['Product_Category2__c'] ==
+ Product_Category2__c &&
+ select_report_data['Product_Category3__c'] ==
+ Product_Category3__c &&
+ select_report_data['Result__c'] == Result__c
+ ) {
+ this.allclear(component);
+ $A.util.addClass(modal_window, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
+ } else {
+ this.close_confirm(component, confirm_title, confirm_text);
+ }
+ } else if (component.get('v.mode') == 'edit') {
+ var confirm_title = '璀﹀憡!';
+ var confirm_text = '鏀惧純缂栬緫鍛ㄦ姤锛�';
+
+ if (
+ select_report_data['Report_Date__c'] == Report_Date__c &&
+ select_report_data['Agency_Hospital__c'] ==
+ Agency_Hospital__c &&
+ select_report_data['Department_Cateogy__c'] ==
+ Department_Cateogy__c &&
+ select_report_data['doctor2__c'] == doctor2__c &&
+ select_report_data['Purpose_Type__c'] == Purpose_Type__c &&
+ select_report_data['SupportNeeds__c'] == SupportNeeds__c && //WAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔�
+ select_report_data['Opportunity__c'] == Opportunity__c &&
+ select_report_data['Product_Category1__c'] ==
+ Product_Category1__c &&
+ select_report_data['Product_Category2__c'] ==
+ Product_Category2__c &&
+ select_report_data['Product_Category3__c'] ==
+ Product_Category3__c &&
+ select_report_data['Result__c'] == Result__c
+ ) {
+ this.allclear(component);
+ $A.util.addClass(modal_window, 'disp_none');
+ $A.util.addClass(modal_bg, 'disp_none');
+ } else {
+ this.close_confirm(component, confirm_title, confirm_text);
+ }
+ }
}
},
-
- close_confirm : function(component, title, text) {
+
+ close_confirm: function (component, title, text) {
var confirm_status = component.get('v.confirm_status');
component.set('v.modal_confirm_title', title);
component.set('v.modal_confirm_text', text);
var modal_window = component.find('modal_window');
var modal_bg = component.find('modal_bg');
- var modal_confirm = component.find('modal_confirm');
- var modal_confirm_bg = component.find('modal_confirm_bg');
+ var modal_confirm = component.find('modal_confirm');
+ var modal_confirm_bg = component.find('modal_confirm_bg');
if (confirm_status == 0) {
$A.util.addClass(modal_window, 'disp_none');
@@ -569,62 +922,83 @@
$A.util.addClass(modal_confirm_bg, 'disp_none');
component.set('v.mode', '');
this.allclear(component);
- component.set('v.reports_now', "");
+ component.set('v.reports_now', '');
component.set('v.reports_now_count', 0);
component.set('v.confirm_status', 0);
} else if (confirm_status == 2) {
// 鍚�
$A.util.removeClass(modal_window, 'disp_none');
- $A.util.removeClass(modal_bg, 'disp_none');
+ $A.util.removeClass(modal_bg, 'disp_none');
$A.util.addClass(modal_confirm, 'disp_none');
- $A.util.addClass(modal_confirm_bg, 'disp_none');
+ $A.util.addClass(modal_confirm_bg, 'disp_none');
component.set('v.confirm_status', 0);
}
},
- new_report : function(component, event, helper) {
+ new_report: function (component, event, helper) {
component.set('v.mode', 'new');
component.set('v.dialog_type', '鏂板缓');
var select_date = component.find('select_date').get('v.value');
- var select_agency = component.find('select_agency_person').get('v.value');
+ var select_agency = component
+ .find('select_agency_person')
+ .get('v.value');
component.set('v.selected_date', select_date);
var name = component.get('v.selected_agency_person');
- var ret = this.create_report_header(component, name, select_agency, select_date);
+ var ret = this.create_report_header(
+ component,
+ name,
+ select_agency,
+ select_date
+ );
// PIPL update Yin Mingjie 21/02/2022 start
- this.set_aws_url(component,'Agency_Contact__c')
+ this.set_aws_url(component, 'Agency_Contact__c');
// PIPL update Yin Mingjie 21/02/2022 end
},
-
- copy_button : function(component, event, helper) {
+
+ copy_button: function (component, event, helper) {
this.allclear(component);
component.set('v.mode', 'copy');
component.set('v.dialog_type', '鏂板缓');
var select_report_data = component.get('v.select_report_data_radio');
component.set('v.loadOpp', true);
// 閫�
- var now = new Date();
- var start_day = new Date(now.getFullYear(), now.getMonth(), (now.getDate() - now.getDay() + 1));
- var select_date = start_day.getFullYear() + '/' + (start_day.getMonth() + 1) + '/' + start_day.getDate();
+ var now = new Date();
+ var start_day = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() - now.getDay() + 1
+ );
+ var select_date =
+ start_day.getFullYear() +
+ '/' +
+ (start_day.getMonth() + 1) +
+ '/' +
+ start_day.getDate();
this.set_selected(component, 'select_date', select_date);
component.set('v.selected_date', select_date);
-
+
// 鎷呭綋
var select_agency = select_report_data['Person_In_Charge2__c'];
var new_label = this.get_agency_person_name(component, select_agency);
component.set('v.selected_agency_person', new_label);
this.set_selected(component, 'select_agency_person', select_agency);
-
+
this.new_button_disabled(component, event, helper);
var name = component.get('v.selected_agency_person');
-
+
component.set('v.edit_copy_select_report_id', select_report_data['Id']);
component.set('v.select_report_data', select_report_data);
- var ret = this.create_report_header(component, name, select_agency, select_date);
+ var ret = this.create_report_header(
+ component,
+ name,
+ select_agency,
+ select_date
+ );
},
-
- change_report_radio : function(component, event, helper) {
+
+ change_report_radio: function (component, event, helper) {
var reports = component.get('v.reports');
for (var i = 0; i < reports.length; i++) {
if (reports[i].Name == event.getSource().get('v.label')) {
@@ -634,39 +1008,52 @@
}
}
},
-
- edit_button : function(component, event, helper) {
+
+ edit_button: function (component, event, helper) {
+ component.set('v.login', true);
this.allclear(component);
component.set('v.loadOpp', true);
var index = event.getSource().get('v.value');
- component.set('v.select_report_data', component.get('v.reports')[index]);
+ component.set(
+ 'v.select_report_data',
+ component.get('v.reports')[index]
+ );
component.set('v.mode', 'edit');
component.set('v.dialog_type', '缂栬緫');
var select_date = component.get('v.reports')[index].Submit_date__c;
- var select_agency = component.get('v.reports')[index].Person_In_Charge2__c;
+ var select_agency =
+ component.get('v.reports')[index].Person_In_Charge2__c;
var text_tmp = select_date.split('-');
- var select_date_text = text_tmp[0] + '/' + Number(text_tmp[1]) + '/' + Number(text_tmp[2]);
+ var select_date_text =
+ text_tmp[0] + '/' + Number(text_tmp[1]) + '/' + Number(text_tmp[2]);
component.set('v.selected_date', select_date_text);
var name = component.get('v.reports')[index].Person_In_Charge2__r.Name;
-
+
this.set_selected(component, 'select_agency_person', select_agency);
this.new_button_disabled(component, event, helper);
-
+
var new_label = this.get_agency_person_name(component, select_agency);
component.set('v.selected_agency_person', new_label);
- component.set('v.edit_copy_select_report_id', component.get('v.reports')[index].Id);
-
- var ret = this.create_report_header(component, name, select_agency, select_date);
- },
-
- save_report : function(component, event, helper) {
+ component.set(
+ 'v.edit_copy_select_report_id',
+ component.get('v.reports')[index].Id
+ );
+ var ret = this.create_report_header(
+ component,
+ name,
+ select_agency,
+ select_date
+ );
+ },
+
+ save_report: function (component, event, helper) {
// 20220222 PI鏀归�� by Bright--start
let doctor2Name = '';
let visitortitle = '';
- for(let op of component.find('select_doctor').get('v.options')){
+ for (let op of component.find('select_doctor').get('v.options')) {
if (op.selected) {
doctor2Name = op.label;
visitortitle = op.Doctor_Division1__c;
@@ -674,44 +1061,56 @@
}
// 20220222 PI鏀归�� by Bright--end
-
component.find('save_button').set('v.disabled', true);
var Report_Date__c = component.get('v.data.Report_Date__c');
- // alert('Report_Date__c'+Report_Date__c);
- var Person_In_Charge2__c = "";
- var Submit_date__c = "";
+ // alert('Report_Date__c'+Report_Date__c);
+ var Person_In_Charge2__c = '';
+ var Submit_date__c = '';
if (component.get('v.mode') == 'edit') {
// 鍛� Submit_date__c
- Submit_date__c = component.get('v.select_report_data').Submit_date__c;
+ Submit_date__c = component.get(
+ 'v.select_report_data'
+ ).Submit_date__c;
// alert('Submit_date__c'+Submit_date__c);
-
// 鎷呭綋 Person_In_Charge2__c
- Person_In_Charge2__c = component.get('v.select_report_data').Person_In_Charge2__c;
+ Person_In_Charge2__c = component.get(
+ 'v.select_report_data'
+ ).Person_In_Charge2__c;
} else {
// 鍛� Submit_date__c
- Submit_date__c = this.get_date_string(component.find('select_date').get('v.value'));
+ Submit_date__c = this.get_date_string(
+ component.find('select_date').get('v.value')
+ );
// alert('Submit_date__c'+Submit_date__c);
// 鎷呭綋 Person_In_Charge2__c
- Person_In_Charge2__c = component.find('select_agency_person').get('v.value');
+ Person_In_Charge2__c = component
+ .find('select_agency_person')
+ .get('v.value');
}
// Agency_Report_Header__c
- var Agency_Report_Header__c = component.get('v.agency_report_header_id');
-
+ var Agency_Report_Header__c = component.get(
+ 'v.agency_report_header_id'
+ );
+
// 鍖婚櫌 Agency_Hospital__c (Agency_Hospital_Link__c)
var Agency_Hospital__c = component.get('v.hospitalLinkId');
-
+
// 绉戝 Department_Cateogy__c
- var Department_Cateogy__c = component.find('select_department').get('v.value');
-
+ var Department_Cateogy__c = component
+ .find('select_department')
+ .get('v.value');
+
// 鎷滆浜� doctor2__c
var doctor2__c = component.find('select_doctor').get('v.value');
-
+
// 娲诲姩鍖哄垎 Purpose_Type__c
- var Purpose_Type__c = component.find('select_purpose_type').get('v.value');
- //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
+ var Purpose_Type__c = component
+ .find('select_purpose_type')
+ .get('v.value');
+ //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
// 鏀彺闇�姹� SupportNeeds__c
var SupportNeeds__c = component.find('SupportNeeds__c').get('v.value');
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
@@ -719,19 +1118,35 @@
var Opportunity__c = component.get('v.data.Opportunity__c');
var StageName__c = component.find('select_stageName').get('v.value');
- var Amount__c = component.get('v.oppdata.Amount__c') != null ? component.get('v.oppdata.Amount__c').toString() : '';
- var OCMSale_Price__c = component.get('v.oppdata.OCMSale_Price__c') != null ? component.get('v.oppdata.OCMSale_Price__c').toString() : '';
- var Close_Forecasted_Date__c = component.get('v.oppdata.Close_Forecasted_Date__c');
+ var Amount__c =
+ component.get('v.oppdata.Amount__c') != null
+ ? component.get('v.oppdata.Amount__c').toString()
+ : '';
+ var OCMSale_Price__c =
+ component.get('v.oppdata.OCMSale_Price__c') != null
+ ? component.get('v.oppdata.OCMSale_Price__c').toString()
+ : '';
+ var Close_Forecasted_Date__c = component.get(
+ 'v.oppdata.Close_Forecasted_Date__c'
+ );
var StageName__c_o = component.get('v.StageName__c_o');
var Amount__c_o = component.get('v.Amount__c_o');
var OCMSale_Price__c_o = component.get('v.OCMSale_Price__c_o');
- var Close_Forecasted_Date__c_o = component.get('v.Close_Forecasted_Date__c_o');
+ var Close_Forecasted_Date__c_o = component.get(
+ 'v.Close_Forecasted_Date__c_o'
+ );
if (StageName__c_o == undefined) StageName__c_o = '';
if (Amount__c_o == undefined) Amount__c_o = '';
if (OCMSale_Price__c_o == undefined) OCMSale_Price__c_o = '';
- if (Close_Forecasted_Date__c_o == undefined) Close_Forecasted_Date__c_o = '';
- if (StageName__c == StageName__c_o && OCMSale_Price__c_o == OCMSale_Price__c && Amount__c == Amount__c_o && Close_Forecasted_Date__c == Close_Forecasted_Date__c_o) {
+ if (Close_Forecasted_Date__c_o == undefined)
+ Close_Forecasted_Date__c_o = '';
+ if (
+ StageName__c == StageName__c_o &&
+ OCMSale_Price__c_o == OCMSale_Price__c &&
+ Amount__c == Amount__c_o &&
+ Close_Forecasted_Date__c == Close_Forecasted_Date__c_o
+ ) {
StageName__c = '';
Amount__c = '';
OCMSale_Price__c = '';
@@ -739,35 +1154,71 @@
}
// 浜у搧鍖哄垎 Product_Category__c (ProductTypes__c)
- var Product_Category1__c = component.find('select_Product1').get('v.value');
- var Product_Category2__c = component.find('select_Product2').get('v.value');
- var Product_Category3__c = component.find('select_Product3').get('v.value');
-
+ var Product_Category1__c = component
+ .find('select_Product1')
+ .get('v.value');
+ var Product_Category2__c = component
+ .find('select_Product2')
+ .get('v.value');
+ var Product_Category3__c = component
+ .find('select_Product3')
+ .get('v.value');
+
// 绲愭灉 Result__c
var Result__c = component.find('select_result').get('v.value');
-
+
// 銉愩儶銉囥兗銈枫儳銉�
var error = [];
- if (!Report_Date__c) { error.push("娲诲姩鏃� 涓嶅瓨鍦�"); }
- if (!Submit_date__c) { error.push("鍛� 涓嶅瓨鍦�"); }
+ if (!Report_Date__c) {
+ error.push('娲诲姩鏃� 涓嶅瓨鍦�');
+ }
+ if (!Submit_date__c) {
+ error.push('鍛� 涓嶅瓨鍦�');
+ }
var rDate = new Date(Report_Date__c);
var sDate = new Date(Submit_date__c);
sDate.setDate(sDate.getDate() - 1);
- if (rDate < sDate) {error.push('娲诲姩鏃ュ繀椤绘槸鏈懆锛�'); }
+ if (rDate < sDate) {
+ error.push('娲诲姩鏃ュ繀椤绘槸鏈懆锛�');
+ }
sDate.setDate(sDate.getDate() + 7);
- if (rDate >= sDate) {error.push('娲诲姩鏃ュ繀椤绘槸鏈懆锛�'); }
-
- if (!Person_In_Charge2__c) { error.push("鎷呭綋 涓嶅瓨鍦�"); }
- if (!Agency_Report_Header__c) { this.error("Report Header Id 涓嶅瓨鍦�"); }
- if (!Agency_Hospital__c) { error.push("鍖婚櫌 涓嶅瓨鍦�"); }
- if (!Department_Cateogy__c) { error.push("绉戝 涓嶅瓨鍦�"); }
- if (!doctor2__c) { error.push("鎷滆浜� 涓嶅瓨鍦�"); }
- if (!Purpose_Type__c) { error.push("娲诲姩鍖哄垎 涓嶅瓨鍦�"); }
+ if (rDate >= sDate) {
+ error.push('娲诲姩鏃ュ繀椤绘槸鏈懆锛�');
+ }
+
+ if (!Person_In_Charge2__c) {
+ error.push('鎷呭綋 涓嶅瓨鍦�');
+ }
+ if (!Agency_Report_Header__c) {
+ this.error('Report Header Id 涓嶅瓨鍦�');
+ }
+ if (!Agency_Hospital__c) {
+ error.push('鍖婚櫌 涓嶅瓨鍦�');
+ }
+ if (!Department_Cateogy__c) {
+ error.push('绉戝 涓嶅瓨鍦�');
+ }
+ if (!doctor2__c) {
+ error.push('鎷滆浜� 涓嶅瓨鍦�');
+ }
+ if (!Purpose_Type__c) {
+ error.push('娲诲姩鍖哄垎 涓嶅瓨鍦�');
+ }
// if (!SupportNeeds__c) { error.push("鏀彺闇�姹� 涓嶅瓨鍦�"); }
- if (!Opportunity__c) { Opportunity__c = ""; }
- if (!Product_Category1__c) { error.push("浜у搧鍖哄垎1 涓嶅瓨鍦�"); }
- if (Purpose_Type__c && (Purpose_Type__c.substr(-3) == 'SIS' || Purpose_Type__c.substr(-3) == 'OPD')) {
- if (!Result__c) { error.push("缁撴灉 涓嶅瓨鍦�"); }
+ if (!Opportunity__c) {
+ Opportunity__c = '';
+ }
+ if (!Product_Category1__c) {
+ error.push('浜у搧鍖哄垎1 涓嶅瓨鍦�');
+ }
+ if (
+ Purpose_Type__c &&
+ (Purpose_Type__c.substr(-3) == 'SIS' ||
+ Purpose_Type__c.substr(-3) == 'OPD')
+ ) {
+ if (!Result__c) {
+ error.push('缁撴灉 涓嶅瓨鍦�');
+ }
}
for (var i = 0; i < error.length; i++) {
this.warning(error[i]);
@@ -777,62 +1228,74 @@
return false;
}
-
// 淇濆瓨鍑︾悊
- component.set('v.login',true);
- if (component.get('v.mode') == 'edit') {
+ component.set('v.loginEdit', true);
+ if (component.get('v.mode') == 'edit') {
var Agency_Report__c = component.get('v.select_report_data').Id;
var action = component.get('c.editAgencyReport');
- debugger
+ debugger;
// alert("Purpose_Type:"+Purpose_Type__c+","+"SupportNeedsc:"+SupportNeeds__c);
action.setParams({
- "Agency_Report_Id" : Agency_Report__c,
- "Department_Cateogy" : Department_Cateogy__c,
- "Purpose_Type" : Purpose_Type__c,
- //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
- "SupportNeedsc" : SupportNeeds__c,
- //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
- "Agency_Report_Header" : Agency_Report_Header__c,
- "Agency_Hospital" : Agency_Hospital__c,
- "Person_In_Charge2" : Person_In_Charge2__c,
- "doctor" : doctor2__c,
- "Submit_date" : Submit_date__c,
- "Product_Category1" : Product_Category1__c,
- "Product_Category2" : Product_Category2__c,
- "Product_Category3" : Product_Category3__c,
- "Result" : Result__c,
- "Opportunity" : Opportunity__c,
- "StageName" : StageName__c,
- "oppAmount" : Amount__c,
- "oppOCMPrice" : OCMSale_Price__c,
- "Close_Forecasted_Date" : Close_Forecasted_Date__c,
- "Report_Date" : Report_Date__c,
+ Agency_Report_Id: Agency_Report__c,
+ Department_Cateogy: Department_Cateogy__c,
+ Purpose_Type: Purpose_Type__c,
+ //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
+ SupportNeedsc: SupportNeeds__c,
+ //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
+ Agency_Report_Header: Agency_Report_Header__c,
+ Agency_Hospital: Agency_Hospital__c,
+ Person_In_Charge2: Person_In_Charge2__c,
+ doctor: doctor2__c,
+ Submit_date: Submit_date__c,
+ Product_Category1: Product_Category1__c,
+ Product_Category2: Product_Category2__c,
+ Product_Category3: Product_Category3__c,
+ Result: Result__c,
+ Opportunity: Opportunity__c,
+ StageName: StageName__c,
+ oppAmount: Amount__c,
+ oppOCMPrice: OCMSale_Price__c,
+ Close_Forecasted_Date: Close_Forecasted_Date__c,
+ Report_Date: Report_Date__c
});
-
- action.setCallback(this,function(response){
+
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
this.success('缂栬緫淇濆瓨鎴愬姛');
var report_id = response.getReturnValue();
component.set('v.create_agency_report_id', report_id);
-
- var select_agency_list = component.get('v.allselectlist').AgencyPerson__c;
+
+ var select_agency_list =
+ component.get('v.allselectlist').AgencyPerson__c;
for (var i = 0; i < select_agency_list.length; i++) {
- if (select_agency_list[i].value == component.get('v.select_report_data').Person_In_Charge2__c) {
+ if (
+ select_agency_list[i].value ==
+ component.get('v.select_report_data')
+ .Person_In_Charge2__c
+ ) {
select_agency_list[i].selected = true;
} else {
select_agency_list[i].selected = false;
}
}
- component.find('select_agency_person').set('v.options', select_agency_list);
-
+ component
+ .find('select_agency_person')
+ .set('v.options', select_agency_list);
+
component.set('v.update_select_report_data_id', report_id);
- this.get_reports(component, event, helper, component.get('v.select_report_data').Submit_date__c, component.get('v.select_report_data').Person_In_Charge2__c);
+ this.get_reports_edit(
+ component,
+ event,
+ helper,
+ component.get('v.select_report_data').Submit_date__c,
+ component.get('v.select_report_data')
+ .Person_In_Charge2__c
+ );
component.find('save_button').set('v.disabled', false);
- component.set('v.login',false);
- }
- else{
+ component.set('v.loginEdit', false);
+ } else {
// var error = response.getError();
// alert(JSON.stringify(error));
// alert(JSON.stringify(error[0].fieldErrors));
@@ -844,60 +1307,66 @@
// }
this.error('save_report failed.');
component.find('save_button').set('v.disabled', false);
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
}
});
$A.enqueueAction(action);
} else {
/* Save (New & Copy) */
-
+
var action = component.get('c.saveAgencyReport');
debugger;
// alert(SupportNeeds__c);
action.setParams({
- "Department_Cateogy" : Department_Cateogy__c,
- "Purpose_Type" : Purpose_Type__c,
+ Department_Cateogy: Department_Cateogy__c,
+ Purpose_Type: Purpose_Type__c,
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
- "SupportNeedsc" : SupportNeeds__c,
+ SupportNeedsc: SupportNeeds__c,
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
- "Agency_Report_Header" : Agency_Report_Header__c,
- "Agency_Hospital" : Agency_Hospital__c,
- "Person_In_Charge2" : Person_In_Charge2__c,
- "doctor" : doctor2__c,
- "Submit_date" : Submit_date__c,
- "Product_Category1" : Product_Category1__c,
- "Product_Category2" : Product_Category2__c,
- "Product_Category3" : Product_Category3__c,
- "Result" : Result__c,
- "Opportunity" : Opportunity__c,
- "StageName" : StageName__c,
- "oppAmount" : Amount__c,
- "oppOCMPrice" : OCMSale_Price__c,
- "Close_Forecasted_Date" : Close_Forecasted_Date__c,
- "Report_Date" : Report_Date__c,
+ Agency_Report_Header: Agency_Report_Header__c,
+ Agency_Hospital: Agency_Hospital__c,
+ Person_In_Charge2: Person_In_Charge2__c,
+ doctor: doctor2__c,
+ Submit_date: Submit_date__c,
+ Product_Category1: Product_Category1__c,
+ Product_Category2: Product_Category2__c,
+ Product_Category3: Product_Category3__c,
+ Result: Result__c,
+ Opportunity: Opportunity__c,
+ StageName: StageName__c,
+ oppAmount: Amount__c,
+ oppOCMPrice: OCMSale_Price__c,
+ Close_Forecasted_Date: Close_Forecasted_Date__c,
+ Report_Date: Report_Date__c
});
- action.setCallback(this,function(response){
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
this.success('淇濆瓨鎴愬姛');
var report_id = response.getReturnValue();
component.set('v.create_agency_report_id', report_id);
-
- this.get_reports(component, event, helper, component.find('select_date').get('v.value'), component.find('select_agency_person').get('v.value'));
- // 銉€兗銉�銉偊銈c兂銉夈偊鍐呫伄涓�瑕х敤
+ this.get_reports_edit(
+ component,
+ event,
+ helper,
+ component.find('select_date').get('v.value'),
+ component.find('select_agency_person').get('v.value')
+ );
+
+ // 銉€兗銉�銉偊銈c兂銉夈偊鍐呫伄涓�瑕х敤
var action2 = component.get('c.getReportsById');
action2.setParams({
- "report_id" : report_id,
+ report_id: report_id
});
- action2.setCallback(this,function(response){
+ action2.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
var res = response.getReturnValue();
var reports_now = component.get('v.reports_now');
var reports_now_count = 0;
- if (reports_now.length > 0 && reports_now != "") {
+ if (reports_now.length > 0 && reports_now != '') {
reports_now_count = reports_now.length;
}
@@ -907,61 +1376,87 @@
res[0].doctor2NameOrigin = doctor2Name;
res[0].visitorTitleOrigin = visitortitle;
// 20220222 PI鏀归�� by Bright--end
- reports_now[reports_now_count] = res[0];
-
- reports_now.sort(function(a,b) {
- if(a.Name>b.Name) return -1;
- if(a.Name < b.Name) return 1;
+ reports_now[reports_now_count] = res[0];
+
+ reports_now.sort(function (a, b) {
+ if (a.Name > b.Name) return -1;
+ if (a.Name < b.Name) return 1;
return 0;
});
-
+
component.set('v.reports_now', reports_now);
- component.set('v.reports_now_count', reports_now.length);
- var data_list = component.find('modal_data_list_tr');
+ component.set(
+ 'v.reports_now_count',
+ reports_now.length
+ );
+ var data_list =
+ component.find('modal_data_list_tr');
}
- }
- else{
+ } else {
this.error('get_reports_now failed.');
- component.find('save_button').set('v.disabled', false);
- component.set('v.login',false);
+ component
+ .find('save_button')
+ .set('v.disabled', false);
+ component.set('v.loginEdit', false);
}
});
$A.enqueueAction(action2);
-
+
this.allclear(component);
component.find('save_button').set('v.disabled', false);
- component.set('v.login',false);
- }
- else{
+ component.set('v.loginEdit', false);
+ } else {
var error = response.getError();
// alert(JSON.stringify(error));
this.error('saveAgencyReport failed.');
component.find('save_button').set('v.disabled', false);
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
}
});
$A.enqueueAction(action);
}
},
-
- allclear : function(component) {
- var clear = [{label:'', value:'', selected:true}];
+
+ allclear: function (component) {
+ var clear = [{ label: '', value: '', selected: true }];
component.set('v.hospital', '');
- component.set('v.hospitalId', '');
+ component.set('v.hospitalId', '');
component.set('v.hospitalLinkId', '');
component.find('new_con').set('v.disabled', true);
component.find('select_doctor').set('v.options', clear);
component.set('v.doctor_title', '');
- component.find('select_department').set('v.options', this.conv_selected(component.get('v.allselectlist.Department_Cateogy__c')));
- component.find('select_purpose_type').set('v.options', this.conv_selected(component.get('v.allselectlist.Purpose_Type__c')));
+ component
+ .find('select_department')
+ .set(
+ 'v.options',
+ this.conv_selected(
+ component.get('v.allselectlist.Department_Cateogy__c')
+ )
+ );
+ component
+ .find('select_purpose_type')
+ .set(
+ 'v.options',
+ this.conv_selected(
+ component.get('v.allselectlist.Purpose_Type__c')
+ )
+ );
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
- component.find('SupportNeeds__c').set('v.options', this.conv_selected(component.get('v.allselectlist.SupportNeeds__c')));
+ component
+ .find('SupportNeeds__c')
+ .set(
+ 'v.options',
+ this.conv_selected(
+ component.get('v.allselectlist.SupportNeeds__c')
+ )
+ );
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
// ToDo闇�瑕佹祴璇曟墜鏈轰笂鑳借繍琛屼笉
component.set('v.data.Opportunity__c', '');
- component.find('select_Product1').set('v.value','');
- component.find('select_Product2').set('v.value','');
- component.find('select_Product3').set('v.value','');
+ component.find('select_Product1').set('v.value', '');
+ component.find('select_Product2').set('v.value', '');
+ component.find('select_Product3').set('v.value', '');
+ console.log('reportDate = 绌�');
component.set('v.data.Report_Date__c', '');
component.set('v.oppdata.Close_Forecasted_Date__c', '');
component.set('v.oppdata.Amount__c', '');
@@ -972,16 +1467,28 @@
component.set('v.Amount__c_o', '');
component.set('v.OCMSale_Price__c_o', '');
component.set('v.StageName__c_o', '');
- $A.util.addClass(component.find('input-opportunity-stage'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount1'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount2'), 'disp_none');
+ $A.util.addClass(
+ component.find('input-opportunity-stage'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount1'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount2'),
+ 'disp_none'
+ );
$A.util.addClass(component.find('input-opportunity-date'), 'disp_none');
- $A.util.removeClass(component.find('input-opportunity-blank'), 'disp_none');
+ $A.util.removeClass(
+ component.find('input-opportunity-blank'),
+ 'disp_none'
+ );
// if ($A.get("$Browser.formFactor") == 'DESKTOP') {
- // var values = [];
- // component.find('input-opportunity').get("v.body")[0].set('v.values', values);
+ // var values = [];
+ // component.find('input-opportunity').get("v.body")[0].set('v.values', values);
// } else {
- // component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', '');
+ // component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', '');
// }
// component.find('input-opportunity').set("v.body",[]);
// if (component.find('input-product-category1'))
@@ -993,38 +1500,96 @@
component.find('select_result').set('v.value', '');
this.select_purpose_type(component);
},
-
- report_date_list : function(component, event, helper, count) {
+
+ report_date_list: function (component, event, helper, count) {
var ret_obj = [];
- var now = new Date();
+ var now = new Date();
for (var i = 0; i < count; i++) {
+ var start_day = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() - now.getDay() + 1 - i * 7
+ );
+ var end_day = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() + (7 - now.getDay()) - i * 7
+ );
- var start_day = new Date(now.getFullYear(), now.getMonth(), (now.getDate() - now.getDay() + 1 - (i * 7)));
- var end_day = new Date(now.getFullYear(), now.getMonth(), now.getDate() + (7 - now.getDay()) - (i * 7));
-
- var start_day_show = new Date(now.getFullYear(), now.getMonth(), (now.getDate() - now.getDay() - (i * 7)));
- var end_day_show = new Date(now.getFullYear(), now.getMonth(), now.getDate() + (6 - now.getDay()) - (i * 7));
- var date_text = start_day.getFullYear() + '/' + (start_day.getMonth() + 1) + '/' + start_day.getDate() + '~' + end_day.getFullYear() + '/' + (end_day.getMonth() + 1) + '/' + end_day.getDate();
+ var start_day_show = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() - now.getDay() - i * 7
+ );
+ var end_day_show = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate() + (6 - now.getDay()) - i * 7
+ );
+ var date_text =
+ start_day.getFullYear() +
+ '/' +
+ (start_day.getMonth() + 1) +
+ '/' +
+ start_day.getDate() +
+ '~' +
+ end_day.getFullYear() +
+ '/' +
+ (end_day.getMonth() + 1) +
+ '/' +
+ end_day.getDate();
if (i == 0) {
ret_obj.push({
- selected : true,
- value : start_day.getFullYear() + '/' + (start_day.getMonth() + 1) + '/' + start_day.getDate(),
- label : start_day_show.getFullYear() + '/' + (start_day_show.getMonth() + 1) + '/' + start_day_show.getDate() + '~' + end_day_show.getFullYear() + '/' + (end_day_show.getMonth() + 1) + '/' + end_day_show.getDate(),
+ selected: true,
+ value:
+ start_day.getFullYear() +
+ '/' +
+ (start_day.getMonth() + 1) +
+ '/' +
+ start_day.getDate(),
+ label:
+ start_day_show.getFullYear() +
+ '/' +
+ (start_day_show.getMonth() + 1) +
+ '/' +
+ start_day_show.getDate() +
+ '~' +
+ end_day_show.getFullYear() +
+ '/' +
+ (end_day_show.getMonth() + 1) +
+ '/' +
+ end_day_show.getDate()
});
} else {
ret_obj.push({
- selected : false,
- value : start_day.getFullYear() + '/' + (start_day.getMonth() + 1) + '/' + start_day.getDate(),
- label : start_day_show.getFullYear() + '/' + (start_day_show.getMonth() + 1) + '/' + start_day_show.getDate() + '~' + end_day_show.getFullYear() + '/' + (end_day_show.getMonth() + 1) + '/' + end_day_show.getDate(),
+ selected: false,
+ value:
+ start_day.getFullYear() +
+ '/' +
+ (start_day.getMonth() + 1) +
+ '/' +
+ start_day.getDate(),
+ label:
+ start_day_show.getFullYear() +
+ '/' +
+ (start_day_show.getMonth() + 1) +
+ '/' +
+ start_day_show.getDate() +
+ '~' +
+ end_day_show.getFullYear() +
+ '/' +
+ (end_day_show.getMonth() + 1) +
+ '/' +
+ end_day_show.getDate()
});
}
}
- component.find('select_date').set('v.options', ret_obj);
+ component.find('select_date').set('v.options', ret_obj);
component.set('v.report_date_list', ret_obj);
},
-
- create_report_header : function(component, name, s_agency, s_date) {
+
+ create_report_header: function (component, name, s_agency, s_date) {
s_date = this.get_date_string(s_date);
if (s_date == false) {
this.error('get_date_string failed.');
@@ -1037,39 +1602,38 @@
this.error('create_header_input_key failed.');
return false;
}
-
+
var key2 = s_date.replace(/-/g, '');
var action = component.get('c.createReportHeader');
action.setParams({
- "name" : name,
- "s_date" : s_date,
- "s_agency" : s_agency,
- "head_key" : head_key,
+ name: name,
+ s_date: s_date,
+ s_agency: s_agency,
+ head_key: head_key
});
-
- component.set('v.login',true);
- action.setCallback(this,function(response){
+
+ component.set('v.login', true);
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
var res = response.getReturnValue();
component.set('v.agency_report_header_id', res);
- component.set('v.login',false);
+ component.set('v.login', false);
this.toggle_report(component);
- }
- else{
+ } else {
this.error('createReportHeader callback failed.');
- component.set('v.login',false);
+ component.set('v.login', false);
}
});
$A.enqueueAction(action);
},
- create_header_input_key : function(agency_id, s_date) {
- if (typeof(s_date) != 'string') {
+ create_header_input_key: function (agency_id, s_date) {
+ if (typeof s_date != 'string') {
s_date = this.get_date_string(s_date);
if (s_date == false) {
- this.error('get_date_string in create_header_input_key.')
+ this.error('get_date_string in create_header_input_key.');
return false;
}
}
@@ -1078,7 +1642,7 @@
}
s_date = s_date.replace(/-/g, '');
- var headkey = agency_id + ":" + s_date;
+ var headkey = agency_id + ':' + s_date;
return headkey;
},
@@ -1086,14 +1650,14 @@
/* typeof is not cool
* @ret : String, Boolean, Date, Error, Array, Function, Null, Undefined, etc
*/
- object_type : function(obj) {
+ object_type: function (obj) {
var obj_type = Object.prototype.toString.call(obj).slice(8, -1);
return obj_type;
},
// create yyyy-mm-dd string
- get_date_string : function(val) {
- if (typeof(val) == 'string') {
+ get_date_string: function (val) {
+ if (typeof val == 'string') {
if (val.match(/^\d{4}\/\d{1,2}\/\d{1,2}$/)) {
val = val.replace(/[\/]/g, '-');
var tmp = val.split('-');
@@ -1114,39 +1678,39 @@
if (String(mm).length == 1) {
mm = '0' + mm;
}
-
+
var dd = '';
if (String(val.getDate()).length == 1) {
dd = '0' + val.getDate();
} else {
dd = val.getDate();
}
-
+
val = val.getFullYear() + '-' + mm + '-' + dd;
} else {
return false;
}
-
+
return val;
},
-
- searchHos : function(component, event, helper) {
- var hospital_name = event.getParam("value");
- var action = component.get("c.getHospitalList");
- debugger;
- action.setParams({"hospital_name": hospital_name});
- action.setCallback(this, function(response) {
+ searchHos: function (component, event, helper) {
+ var hospital_name = event.getParam('value');
+ var action = component.get('c.getHospitalList');
+ debugger;
+ action.setParams({ hospital_name: hospital_name });
+
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state === "SUCCESS") {
- var hospital_list = component.find('hospital_list');
- var hosList = response.getReturnValue();
- if (hosList.length > 0) {
- $A.util.addClass(hospital_list, 'slds-is-open');
- } else {
- $A.util.removeClass(hospital_list, 'slds-is-open');
- }
- component.set("v.hospitalList", response.getReturnValue());
+ if (state === 'SUCCESS') {
+ var hospital_list = component.find('hospital_list');
+ var hosList = response.getReturnValue();
+ if (hosList.length > 0) {
+ $A.util.addClass(hospital_list, 'slds-is-open');
+ } else {
+ $A.util.removeClass(hospital_list, 'slds-is-open');
+ }
+ component.set('v.hospitalList', response.getReturnValue());
} else {
$A.util.removeClass(hospital_list, 'slds-is-open');
}
@@ -1154,17 +1718,17 @@
$A.enqueueAction(action);
},
- hideSearch : function(component, event, helper) {
- var hospital_list = component.find('hospital_list');
- $A.util.removeClass(hospital_list, 'slds-is-open');
+ hideSearch: function (component, event, helper) {
+ var hospital_list = component.find('hospital_list');
+ $A.util.removeClass(hospital_list, 'slds-is-open');
},
- selectHos : function(component, event, helper) {
- debugger
- var hospital_list = component.find('hospital_list');
- $A.util.removeClass(hospital_list, 'slds-is-open');
- var accname = event.currentTarget.dataset.accname;
- var accid = event.currentTarget.dataset.accid;
+ selectHos: function (component, event, helper) {
+ debugger;
+ var hospital_list = component.find('hospital_list');
+ $A.util.removeClass(hospital_list, 'slds-is-open');
+ var accname = event.currentTarget.dataset.accname;
+ var accid = event.currentTarget.dataset.accid;
var hospital_data = component.get('v.hospitalList');
for (var i = 0; i < hospital_data.length; i++) {
if (hospital_data[i].Hospital__c == accid) {
@@ -1173,32 +1737,40 @@
component.find('new_con').set('v.disabled', false);
}
}
- component.set("v.hospital", accname);
- component.set("v.hospitalId", accid);
+ component.set('v.hospital', accname);
+ component.set('v.hospitalId', accid);
this.set_doctor_list(component);
this.opportunityChange(component, event, helper);
},
-
- select_purpose_type : function(component) {
+
+ select_purpose_type: function (component) {
var purpose_type = component.find('select_purpose_type').get('v.value');
- if (purpose_type != null && purpose_type != undefined && purpose_type.substr(-3) == 'OPD' || purpose_type.substr(-3) == 'SIS') {
+ if (
+ (purpose_type != null &&
+ purpose_type != undefined &&
+ purpose_type.substr(-3) == 'OPD') ||
+ purpose_type.substr(-3) == 'SIS'
+ ) {
var result = component.find('result');
- $A.util.removeClass(result, 'disp_none');
+ $A.util.removeClass(result, 'disp_none');
} else {
component.find('select_result').set('v.value', '');
var result = component.find('result');
- $A.util.addClass(result, 'disp_none');
+ $A.util.addClass(result, 'disp_none');
}
this.select_department(component, null, null);
},
-
- doctor_change : function(component, event, helper) {
+
+ doctor_change: function (component, event, helper) {
var doctor_value = component.find('select_doctor').get('v.value');
var doctor_list = component.get('v.doctor_list');
var flg = false;
for (var i = 0; i < doctor_list.length; i++) {
if (doctor_list[i].value == doctor_value) {
- component.set('v.doctor_title', doctor_list[i].Doctor_Division1__c);
+ component.set(
+ 'v.doctor_title',
+ doctor_list[i].Doctor_Division1__c
+ );
flg = true;
break;
}
@@ -1208,30 +1780,36 @@
}
},
// PIPL update Yin Mingjie 21/02/2022 start
- set_aws_url : function(component,sobject) {
+ set_aws_url: function (component, sobject) {
var action = component.get('c.getAwsurl');
action.setParams({
- "sobj" : sobject,
+ sobj: sobject
});
- action.setCallback(this,function(response){
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
var awsmap = this.conv_selected(response.getReturnValue());
- component.set('v.AWStoken',awsmap.token);
- component.set('v.AWSinsert',awsmap.newUrl);
- component.set('v.AWSsearch',awsmap.searchUrl);
- component.set('v.AWStransactionURL',awsmap.transactionURL);
- }
- else{
+ component.set('v.AWStoken', awsmap.token);
+ component.set('v.AWSinsert', awsmap.newUrl);
+ component.set('v.AWSsearch', awsmap.searchUrl);
+ component.set('v.AWStransactionURL', awsmap.transactionURL);
+ } else {
this.error('AWS url/token error.');
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
}
});
$A.enqueueAction(action);
},
- insert_agencycontact : function(component,token,newUrl,payload,agencyHospitalid,helper,hospitalName) {
-
+ insert_agencycontact: function (
+ component,
+ token,
+ newUrl,
+ payload,
+ agencyHospitalid,
+ helper,
+ hospitalName
+ ) {
// AWSService.insert(newUrl,payload,function(result){
// if(result.status == '0'){
// $A.getCallback(function(){
@@ -1244,7 +1822,7 @@
// component.find('OppMessage').setError('AWS insert error.');
// }
// },token);
-
+
fetch(newUrl, {
method: 'POST',
body: payload,
@@ -1252,49 +1830,63 @@
'Content-Type': 'application/json',
'pi-token': token
}
- }).then((data) => {
- return data.json();
- }).then((result) => {
- if(result.status == '0'){
- $A.getCallback(function(){
- helper.to_agencycontact(component,result,agencyHospitalid);
- })();
- }else{
- console.log('AWS status error:' + result)
- component.set('v.login',false);
- if(result.status == '129'){
- component.find('OppMessage').setError('璇ュ鎴蜂汉鍛樺悕瀛楀凡瀛樺湪锛屽湪'+hospitalName+'鍖婚櫌锛岃淇敼');
- }else{
- component.find('OppMessage').setError('AWS insert error.');
+ })
+ .then((data) => {
+ return data.json();
+ })
+ .then((result) => {
+ if (result.status == '0') {
+ $A.getCallback(function () {
+ helper.to_agencycontact(
+ component,
+ result,
+ agencyHospitalid
+ );
+ })();
+ } else {
+ console.log('AWS status error:' + result);
+ component.set('v.loginEdit', false);
+ if (result.status == '129') {
+ component
+ .find('OppMessage')
+ .setError(
+ '璇ュ鎴蜂汉鍛樺悕瀛楀凡瀛樺湪锛屽湪' +
+ hospitalName +
+ '鍖婚櫌锛岃淇敼'
+ );
+ } else {
+ component
+ .find('OppMessage')
+ .setError('AWS insert error.');
+ }
}
- }
- }).catch(error => {
- console.log('AWS insert error:' + error)
- component.set('v.login',false);
- component.find('OppMessage').setError('AWS insert error.');
- });
-
+ })
+ .catch((error) => {
+ console.log('AWS insert error:' + error);
+ component.set('v.loginEdit', false);
+ component.find('OppMessage').setError('AWS insert error.');
+ });
},
- to_agencycontact : function(component,result,agencyHospitalid) {
+ to_agencycontact: function (component, result, agencyHospitalid) {
var action = component.get('c.saveAgencyContact');
action.setParams({
- "name" : result.object[0].name,
+ name: result.object[0].name,
//"nameEncrypt" : result.object[0].nameEncrypt,
- "type" : result.object[0].type,
+ type: result.object[0].type,
//"typeEncrypt" : result.object[0].typeEncrypt,
- "doctorDivision1" : result.object[0].doctorDivision1,
+ doctorDivision1: result.object[0].doctorDivision1,
//"doctorDivision1Encrypt" : result.object[0].doctorDivision1Encrypt,
- "agencyHospitalid" : agencyHospitalid,
- "awsid" : result.object[0].dataId,
+ agencyHospitalid: agencyHospitalid,
+ awsid: result.object[0].dataId
});
- action.setCallback(this,function(response){
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
var acMap = this.conv_selected(response.getReturnValue());
console.log(acMap);
- if(acMap.AgencyContactId != ''){
- //纭浜嬪姟
+ if (acMap.AgencyContactId != '') {
+ //纭浜嬪姟
var token = component.get('v.AWStoken');
var confirmUrl = component.get('v.AWStransactionURL');
@@ -1303,24 +1895,28 @@
data['sfRecordId'] = '';
data['txId'] = result.txId;
- this.to_confirm(component,token,confirmUrl,JSON.stringify(data));
- }else if(acMap.errormsg != ''){
+ this.to_confirm(
+ component,
+ token,
+ confirmUrl,
+ JSON.stringify(data)
+ );
+ } else if (acMap.errormsg != '') {
this.error(acMap.errormsg);
- component.set('v.login',false);
- }else {
+ component.set('v.loginEdit', false);
+ } else {
this.error('agency contact insert id error.');
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
}
- }
- else{
+ } else {
this.error('agency contact insert error.');
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
}
});
$A.enqueueAction(action);
},
- to_confirm : function(component,token,confirmUrl,payload) {
+ to_confirm: function (component, token, confirmUrl, payload) {
fetch(confirmUrl, {
method: 'POST',
body: payload,
@@ -1328,40 +1924,47 @@
'Content-Type': 'application/json',
'pi-token': token
}
- }).then((data) => {
- return data.json();
- }).then((result) => {
- if(result.status == '0' && result.hasOwnProperty('success') && result.success){
- component.set('v.truthy', false);
- var modal_newAC = component.find('modal_newAC')
- $A.util.addClass(modal_newAC, 'disp_none');
- this.success('.瀹㈡埛浜哄憳宸插垱寤恒��');
- this.set_doctor_list(component);
- }else {
+ })
+ .then((data) => {
+ return data.json();
+ })
+ .then((result) => {
+ if (
+ result.status == '0' &&
+ result.hasOwnProperty('success') &&
+ result.success
+ ) {
+ component.set('v.truthy', false);
+ var modal_newAC = component.find('modal_newAC');
+ $A.util.addClass(modal_newAC, 'disp_none');
+ this.success('.瀹㈡埛浜哄憳宸插垱寤恒��');
+ this.set_doctor_list(component);
+ } else {
+ this.error('AWS confirm error.');
+ component.set('v.loginEdit', false);
+ }
+ })
+ .catch((error) => {
this.error('AWS confirm error.');
- component.set('v.login',false);
- }
- }).catch(error => {
- this.error('AWS confirm error.');
- component.set('v.login',false);
- });
+ component.set('v.loginEdit', false);
+ });
},
// PIPL update Yin Mingjie 21/02/2022 end
- set_doctor_list : function(component) {
+ set_doctor_list: function (component) {
var hospital_id = component.get('v.hospitalLinkId');
if (hospital_id) {
- component.set('v.login',true);
+ component.set('v.loginEdit', true);
var action = component.get('c.getDoctorList');
action.setParams({
- "hospital_id" : hospital_id,
+ hospital_id: hospital_id
});
- action.setCallback(this,function(response){
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
var retMap = this.conv_selected(response.getReturnValue());
// PIPL update Yin Mingjie 21/02/2022 start
- this.AWS_search(retMap,component);
+ this.AWS_search(retMap, component);
/*
var default_doctor = component.get('v.default_select_doctor_id');
if (default_doctor != '' && res.length > 0) {
@@ -1388,11 +1991,10 @@
component.set('v.doctor_list', res);
component.set('v.login',false);
*/
- // PIPL update Yin Mingjie 21/02/2022 end
- }
- else{
+ // PIPL update Yin Mingjie 21/02/2022 end
+ } else {
this.error('set_doctor_list failed.');
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
}
});
$A.enqueueAction(action);
@@ -1400,35 +2002,49 @@
},
// PIPL update Yin Mingjie 21/02/2022 start
- AWS_search : function(retMap,component) {
+ AWS_search: function (retMap, component) {
var token = retMap.sre.token;
var searchUrl = retMap.sre.searchUrl;
var dataArr = new Array();
for (const key in retMap) {
- if (key == 'sre') {continue;}
+ if (key == 'sre') {
+ continue;
+ }
dataArr.push(key);
}
- if(dataArr.length == 0){
- component.set('v.login',false);
+ if (dataArr.length == 0) {
+ component.set('v.loginEdit', false);
this.warning('娌℃湁鎵惧埌绗﹀悎鏉′欢鐨勫鎴蜂汉鍛�');
return;
}
- let obj= Object.create(null);
+ let obj = Object.create(null);
obj['dataIds'] = dataArr;
var data = JSON.stringify(obj);
- this.search_agency_contact(token,searchUrl,data,retMap,component);
+ this.search_agency_contact(token, searchUrl, data, retMap, component);
},
- search_agency_contact : function(token,searchUrl,payload,retMap,component) {
- this.search_core(token,searchUrl,payload,(result)=>{
- if(result.status == '0'){
- this.to_doctor_list(result,retMap,component);
- }else{
- this.error('AWS search status4 : ' + result.status);
- component.set('v.login',false);
- }
- },component);
+ search_agency_contact: function (
+ token,
+ searchUrl,
+ payload,
+ retMap,
+ component
+ ) {
+ this.search_core(
+ token,
+ searchUrl,
+ payload,
+ (result) => {
+ if (result.status == '0') {
+ this.to_doctor_list(result, retMap, component);
+ } else {
+ this.error('AWS search status4 : ' + result.status);
+ component.set('v.loginEdit', false);
+ }
+ },
+ component
+ );
// fetch(searchUrl, {
// method: 'POST',
// body: payload,
@@ -1439,13 +2055,13 @@
// }).then((data) => {
// return data.json();
// }).then((result) => {
-
+
// }).catch(error => {
// this.error('AWS search error.');
// component.set('v.login',false);
// });
},
- search_core : function(token,searchUrl,payload,callback,component) {
+ search_core: function (token, searchUrl, payload, callback, component) {
console.log('token = ' + token);
console.log('searchUrl = ' + searchUrl);
console.log('payload = ' + payload);
@@ -1456,19 +2072,22 @@
'Content-Type': 'application/json',
'pi-token': token
}
- }).then((data) => {
- return data.json();
- }).then((result) => {
- component.set('v.login',false);
- if(callback)callback(result);
- }).catch(error => {
- console.log('error = ' + JSON.stringify(error));
- this.error('AWS search error.');
- component.set('v.login',false);
- });
+ })
+ .then((data) => {
+ return data.json();
+ })
+ .then((result) => {
+ component.set('v.loginEdit', false);
+ if (callback) callback(result);
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.error('AWS search error.');
+ component.set('v.loginEdit', false);
+ });
},
- to_doctor_list : function(result,retMap,component) {
+ to_doctor_list: function (result, retMap, component) {
var resls = result.object;
var res = [];
var space = {};
@@ -1506,10 +2125,10 @@
component.set('v.doctor_title', res[0].Doctor_Division1__c);
}
}
-
+
component.set('v.default_select_doctor_id', '');
component.set('v.doctor_list', res);
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
},
// PIPL update Yin Mingjie 21/02/2022 end
@@ -1524,52 +2143,99 @@
// }
// options.splice(remove,1);
// },
-
- opportunityChange : function(component, event, helper) {
- debugger
+
+ opportunityChange: function (component, event, helper) {
+ debugger;
var opp_id = component.get('v.data.Opportunity__c');
if (opp_id == '') {
- $A.util.addClass(component.find('input-opportunity-stage'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount1'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount2'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-date'), 'disp_none');
- $A.util.removeClass(component.find('input-opportunity-blank'), 'disp_none');
+ $A.util.addClass(
+ component.find('input-opportunity-stage'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount1'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount2'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-date'),
+ 'disp_none'
+ );
+ $A.util.removeClass(
+ component.find('input-opportunity-blank'),
+ 'disp_none'
+ );
} else if (opp_id == 'MALFORMED_ID') {
component.set('v.data.Opportunity__c', '');
- $A.util.addClass(component.find('input-opportunity-stage'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount1'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount2'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-date'), 'disp_none');
- $A.util.removeClass(component.find('input-opportunity-blank'), 'disp_none');
- } else if (opp_id != "") {
+ $A.util.addClass(
+ component.find('input-opportunity-stage'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount1'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount2'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-date'),
+ 'disp_none'
+ );
+ $A.util.removeClass(
+ component.find('input-opportunity-blank'),
+ 'disp_none'
+ );
+ } else if (opp_id != '') {
var hospital_link_id = component.get('v.hospitalLinkId');
if (hospital_link_id == '') {
this.warning('鍖婚櫌涓嶅瓨鍦�');
// ToDo闇�瑕佹祴璇曟墜鏈轰笂鑳借繍琛屼笉
component.set('v.data.Opportunity__c', '');
- $A.util.addClass(component.find('input-opportunity-stage'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount1'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount2'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-date'), 'disp_none');
- $A.util.removeClass(component.find('input-opportunity-blank'), 'disp_none');
+ $A.util.addClass(
+ component.find('input-opportunity-stage'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount1'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount2'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-date'),
+ 'disp_none'
+ );
+ $A.util.removeClass(
+ component.find('input-opportunity-blank'),
+ 'disp_none'
+ );
// if ($A.get("$Browser.formFactor") == 'DESKTOP') {
// var values = [];
// // component.find('input-opportunity').get("v.body")[0].set('v.values', values);
// } else {
- // component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', '');
+ // component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', '');
// }
return false;
}
- var action = component.get('c.selectOpportunityByIdAndHospitalLinkId');
+ var action = component.get(
+ 'c.selectOpportunityByIdAndHospitalLinkId'
+ );
action.setParams({
- "opportunity_id" : opp_id,
- "agency_hospital_link_id" : component.get('v.hospitalLinkId'),
+ opportunity_id: opp_id,
+ agency_hospital_link_id: component.get('v.hospitalLinkId')
});
- component.set('v.login',true);
- action.setCallback(this,function(response){
+ component.set('v.loginEdit', true);
+ action.setCallback(this, function (response) {
var state = response.getState();
- if(state == 'SUCCESS'){
+ if (state == 'SUCCESS') {
var res = response.getReturnValue();
if (res.length <= 0) {
if (component.get('v.data.Opportunity__c')) {
@@ -1577,18 +2243,33 @@
}
// ToDo闇�瑕佹祴璇曟墜鏈轰笂鑳借繍琛屼笉
component.set('v.data.Opportunity__c', '');
- $A.util.addClass(component.find('input-opportunity-stage'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount1'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-amount2'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-date'), 'disp_none');
- $A.util.removeClass(component.find('input-opportunity-blank'), 'disp_none');
+ $A.util.addClass(
+ component.find('input-opportunity-stage'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount1'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-amount2'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-date'),
+ 'disp_none'
+ );
+ $A.util.removeClass(
+ component.find('input-opportunity-blank'),
+ 'disp_none'
+ );
// if ($A.get("$Browser.formFactor") == 'DESKTOP') {
// var values = [];
// component.find('input-opportunity').get("v.body")[0].set('v.values', values);
// } else {
- // component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', '');
+ // component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', '');
// }
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
return false;
}
//SWAG-CKH5M8 銆愬鎵樸�戝懆鎶ュ叧鑱旇浠凤紝鍙�夋嫨璇环鑼冨洿璋冩暣 fy start
@@ -1605,77 +2286,127 @@
// // var values = [];
// // component.find('input-opportunity').get("v.body")[0].set('v.values', values);
// // } else {
- // // component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', '');
+ // // component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', '');
// // }
// component.set('v.login',false);
// return false;
// }
//SWAG-CKH5M8 銆愬鎵樸�戝懆鎶ュ叧鑱旇浠凤紝鍙�夋嫨璇环鑼冨洿璋冩暣 fy end
- else {
+ else {
component.set('v.loadOpp', false);
- component.set('v.oppdata',res[0]);
- this.set_selected(component, 'select_stageName', res[0].StageName__c);
- component.set('v.Close_Forecasted_Date__c_o', res[0].Close_Forecasted_Date__c);
+ component.set('v.oppdata', res[0]);
+ this.set_selected(
+ component,
+ 'select_stageName',
+ res[0].StageName__c
+ );
+ component.set(
+ 'v.Close_Forecasted_Date__c_o',
+ res[0].Close_Forecasted_Date__c
+ );
component.set('v.Amount__c_o', res[0].Amount__c);
- component.set('v.OCMSale_Price__c_o', res[0].OCMSale_Price__c);
+ component.set(
+ 'v.OCMSale_Price__c_o',
+ res[0].OCMSale_Price__c
+ );
component.set('v.StageName__c_o', res[0].StageName__c);
- $A.util.removeClass(component.find('input-opportunity-stage'), 'disp_none');
- $A.util.removeClass(component.find('input-opportunity-amount1'), 'disp_none');
- $A.util.removeClass(component.find('input-opportunity-amount2'), 'disp_none');
- $A.util.removeClass(component.find('input-opportunity-date'), 'disp_none');
- $A.util.addClass(component.find('input-opportunity-blank'), 'disp_none');
+ $A.util.removeClass(
+ component.find('input-opportunity-stage'),
+ 'disp_none'
+ );
+ $A.util.removeClass(
+ component.find('input-opportunity-amount1'),
+ 'disp_none'
+ );
+ $A.util.removeClass(
+ component.find('input-opportunity-amount2'),
+ 'disp_none'
+ );
+ $A.util.removeClass(
+ component.find('input-opportunity-date'),
+ 'disp_none'
+ );
+ $A.util.addClass(
+ component.find('input-opportunity-blank'),
+ 'disp_none'
+ );
}
-
- component.set('v.login',false);
- }
- else{
- this.error('selectOpportunityByIdAndHospitalLinkId failed.');
- component.set('v.login',false);
+
+ component.set('v.loginEdit', false);
+ } else {
+ this.error(
+ 'selectOpportunityByIdAndHospitalLinkId failed.'
+ );
+ component.set('v.loginEdit', false);
}
});
$A.enqueueAction(action);
}
},
-
- productcategoryChange1 : function(component, event, helper) {
- var product_category_id = component.find('select_Product1').get('v.value');
+
+ productcategoryChange1: function (component, event, helper) {
+ var product_category_id = component
+ .find('select_Product1')
+ .get('v.value');
var pcId1 = component.find('select_Product2').get('v.value');
var pcId2 = component.find('select_Product3').get('v.value');
var p1bool = pcId1 != '' && pcId1 != null && pcId1 != undefined;
var p2bool = pcId2 != '' && pcId2 != null && pcId2 != undefined;
- var p0bool = product_category_id != '' && product_category_id != null && product_category_id != undefined;
- if ((p1bool && p0bool && product_category_id == pcId1) || (p2bool && p0bool && product_category_id == pcId2)) {
+ var p0bool =
+ product_category_id != '' &&
+ product_category_id != null &&
+ product_category_id != undefined;
+ if (
+ (p1bool && p0bool && product_category_id == pcId1) ||
+ (p2bool && p0bool && product_category_id == pcId2)
+ ) {
this.warning('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
- component.find('select_Product1').set('v.value','');
+ component.find('select_Product1').set('v.value', '');
}
},
- productcategoryChange2 : function(component, event, helper) {
- var product_category_id = component.find('select_Product2').get('v.value');
+ productcategoryChange2: function (component, event, helper) {
+ var product_category_id = component
+ .find('select_Product2')
+ .get('v.value');
var pcId1 = component.find('select_Product1').get('v.value');
var pcId2 = component.find('select_Product3').get('v.value');
var p1bool = pcId1 != '' && pcId1 != null && pcId1 != undefined;
var p2bool = pcId2 != '' && pcId2 != null && pcId2 != undefined;
- var p0bool = product_category_id != '' && product_category_id != null && product_category_id != undefined;
- if ((p1bool && p0bool && product_category_id == pcId1) || (p2bool && p0bool && product_category_id == pcId2)) {
+ var p0bool =
+ product_category_id != '' &&
+ product_category_id != null &&
+ product_category_id != undefined;
+ if (
+ (p1bool && p0bool && product_category_id == pcId1) ||
+ (p2bool && p0bool && product_category_id == pcId2)
+ ) {
this.warning('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
- component.find('select_Product2').set('v.value','');
+ component.find('select_Product2').set('v.value', '');
}
},
- productcategoryChange3 : function(component, event, helper) {
- var product_category_id = component.find('select_Product3').get('v.value');
+ productcategoryChange3: function (component, event, helper) {
+ var product_category_id = component
+ .find('select_Product3')
+ .get('v.value');
var pcId1 = component.find('select_Product1').get('v.value');
var pcId2 = component.find('select_Product2').get('v.value');
var p1bool = pcId1 != '' && pcId1 != null && pcId1 != undefined;
var p2bool = pcId2 != '' && pcId2 != null && pcId2 != undefined;
- var p0bool = product_category_id != '' && product_category_id != null && product_category_id != undefined;
- if ((p1bool && p0bool && product_category_id == pcId1) || (p2bool && p0bool && product_category_id == pcId2)) {
+ var p0bool =
+ product_category_id != '' &&
+ product_category_id != null &&
+ product_category_id != undefined;
+ if (
+ (p1bool && p0bool && product_category_id == pcId1) ||
+ (p2bool && p0bool && product_category_id == pcId2)
+ ) {
this.warning('涓嶈兘閫夋嫨鍚屾牱鐨勪骇鍝佸尯鍒�');
- component.find('select_Product3').set('v.value','');
+ component.find('select_Product3').set('v.value', '');
}
},
-
- conv_selected : function(obj) {
+
+ conv_selected: function (obj) {
for (var i = 0; i < obj.length; i++) {
if (obj[i].selected) {
if (obj[i].selected == 'true') {
@@ -1685,11 +2416,11 @@
}
}
}
-
+
return obj;
},
-
- set_selected : function (component, aura_id_name, value) {
+
+ set_selected: function (component, aura_id_name, value) {
var select_tmp = component.find(aura_id_name).get('v.options');
if (select_tmp) {
for (var i = 0; i < select_tmp.length; i++) {
@@ -1705,44 +2436,44 @@
return false;
}
},
-
- success : function(message) {
- var toastEvent = $A.get("e.force:showToast");
+
+ success: function (message) {
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title" : "鎴愬姛!",
- "message" : message,
- "type" : "success",
- "duration" : "5000"
+ title: '鎴愬姛!',
+ message: message,
+ type: 'success',
+ duration: '5000'
});
toastEvent.fire();
},
-
- warning : function(message) {
- var toastEvent = $A.get("e.force:showToast");
+
+ warning: function (message) {
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "璀﹀憡!",
- "message": message,
- "type":"warning",
- "duration" : "10000"
+ title: '璀﹀憡!',
+ message: message,
+ type: 'warning',
+ duration: '10000'
});
toastEvent.fire();
},
-
- error : function(message) {
+
+ error: function (message) {
// $('toastMessage.forceToastManager').css('white-space', 'pre-wrap');
- var toastEvent = $A.get("e.force:showToast");
+ var toastEvent = $A.get('e.force:showToast');
toastEvent.setParams({
- "title": "閿欒!",
- "message": message,
- "type":"error",
- "duration" : "sticky"
+ title: '閿欒!',
+ message: message,
+ type: 'error',
+ duration: 'sticky'
});
toastEvent.fire();
},
-
- createCon : function(component, event, helper) {
- var modal_newAC = component.find('modal_newAC')
+
+ createCon: function (component, event, helper) {
+ var modal_newAC = component.find('modal_newAC');
$A.util.removeClass(modal_newAC, 'disp_none');
component.set('v.truthy', true);
// var modal_newAC = component.find('modal_newAC')
@@ -1755,7 +2486,7 @@
// var fields = component.find("newOpportunityField");
// var vaildationFailReason = '';
// var currentDate = new Date().toJSON().slice(0,10);
-
+
// fields.forEach(function (field) {
// if(field.get("v.fieldName") === 'Type__c' && $A.util.isEmpty(field.get("v.value"))){
// showValidationError = true;
@@ -1765,63 +2496,66 @@
// vaildationFailReason = "鍖荤敓鍖哄垎(鑱屽姟)涓嶈兘涓虹┖锛�";
// }
// });
-
+
// if (showValidationError) {
// component.find('OppMessage').setError(vaildationFailReason);
// }
// },
// vivek end 娣诲姞楠岃瘉
- hideCmp : function(component, event, helper) {
- var div1 = component.find('report')
- var div2 = component.find('report_list')
+ hideCmp: function (component, event, helper) {
+ var div1 = component.find('report');
+ var div2 = component.find('report_list');
$A.util.addClass(div1, 'disp_none');
$A.util.addClass(div2, 'disp_none');
},
-
- handleSuccess : function(component, event, helper) {
+
+ handleSuccess: function (component, event, helper) {
var insertId = event.getParams().response.Id;
var displayValue = event.getParams().response.fields.Name.value;
event.setParams({});
component.set('v.truthy', false);
- var modal_newAC = component.find('modal_newAC')
+ var modal_newAC = component.find('modal_newAC');
$A.util.addClass(modal_newAC, 'disp_none');
this.success('.瀹㈡埛浜哄憳宸插垱寤恒��');
this.set_doctor_list(component);
},
-
- createCancel : function(component, event, helper) {
+
+ createCancel: function (component, event, helper) {
component.set('v.truthy', false);
- var modal_newAC = component.find('modal_newAC')
+ var modal_newAC = component.find('modal_newAC');
$A.util.addClass(modal_newAC, 'disp_none');
},
- setOpportunity_cfilter : function(component) {
- debugger
+ setOpportunity_cfilter: function (component) {
+ debugger;
var hosId = component.get('v.hospitalId');
- var Department_Cateogy__c = component.find('select_department').get('v.value');
+ var Department_Cateogy__c = component
+ .find('select_department')
+ .get('v.value');
var opportunity_cfilter = '';
if (hosId != '' && hosId != null) {
- opportunity_cfilter = ' Agency_Hospital__r.Hospital__c=' + '\'' + hosId + '\'';
+ opportunity_cfilter =
+ ' Agency_Hospital__r.Hospital__c=' + "'" + hosId + "'";
}
if (Department_Cateogy__c != '' && Department_Cateogy__c != null) {
if (opportunity_cfilter != '' && opportunity_cfilter != null) {
opportunity_cfilter += ' AND ';
}
- opportunity_cfilter += 'Department_Cateogy__c=' + '\'' + Department_Cateogy__c + '\'';
+ opportunity_cfilter +=
+ 'Department_Cateogy__c=' + "'" + Department_Cateogy__c + "'";
}
component.set('v.opportunity_cfilter', opportunity_cfilter);
component.set('v.data.Opportunity__c', null);
},
- readFile: function(component, helper, file) {
+ readFile: function (component, helper, file) {
if (!file) return;
// console.log('file'+file.name);
- if(!file.name.match(/\.(csv||CSV)$/)){
+ if (!file.name.match(/\.(csv||CSV)$/)) {
return alert('only support csv files');
- }else{
-
+ } else {
reader = new FileReader();
- reader.onerror =function errorHandler(evt) {
- switch(evt.target.error.code) {
+ reader.onerror = function errorHandler(evt) {
+ switch (evt.target.error.code) {
case evt.target.error.NOT_FOUND_ERR:
alert('File Not Found!');
break;
@@ -1832,138 +2566,176 @@
break; // noop
default:
alert('An error occurred reading this file.');
- };
- }
+ }
+ };
//reader.onprogress = updateProgress;
- reader.onabort = function(e) {
+ reader.onabort = function (e) {
alert('File read cancelled');
};
- reader.onloadstart = function(e) {
-
- var output = '<ui type=\"disc\"><li><strong>'+file.name +'</strong> ('+file.type+')- '+file.size+'bytes, last modified: '+file.lastModifiedDate.toLocaleDateString()+'</li></ui>';
- component.set("v.filename",file.name);
- component.set("v.TargetFileName",output);
-
+ reader.onloadstart = function (e) {
+ var output =
+ '<ui type="disc"><li><strong>' +
+ file.name +
+ '</strong> (' +
+ file.type +
+ ')- ' +
+ file.size +
+ 'bytes, last modified: ' +
+ file.lastModifiedDate.toLocaleDateString() +
+ '</li></ui>';
+ component.set('v.filename', file.name);
+ component.set('v.TargetFileName', output);
};
- reader.onload = function(e) {
- var data=e.target.result;
- component.set("v.fileContentData",data);
- console.log("file data"+JSON.stringify(data));
+ reader.onload = function (e) {
+ var data = e.target.result;
+ component.set('v.fileContentData', data);
+ console.log('file data' + JSON.stringify(data));
// console.log("file data"+encodeURI(JSON.stringify(data),"utf-8"));
var allTextLines = data.split(/\r\n|\n/);
- var dataRows=allTextLines.length-1;
+ var dataRows = allTextLines.length - 1;
var headers = allTextLines[0].split(',');
-
+
// console.log("Rows length::"+dataRows);
-
-
- var numOfRows=component.get("v.NumOfRecords");
- if(dataRows > numOfRows+1 || dataRows == 1 || dataRows== 0){
-
- alert("File Rows between 1 to "+numOfRows+" .");
- component.set("v.showMain",true);
-
- }
- else{
+
+ var numOfRows = component.get('v.NumOfRecords');
+ if (
+ dataRows > numOfRows + 1 ||
+ dataRows == 1 ||
+ dataRows == 0
+ ) {
+ alert('File Rows between 1 to ' + numOfRows + ' .');
+ component.set('v.showMain', true);
+ } else {
var lines = [];
var filecontentdata;
- var content = "<table class=\"table slds-table slds-table--bordered slds-table--cell-buffer\">";
- content += "<thead><tr class=\"slds-text-title--caps\">";
- content += '<th scope=\"col"\>'+'琛屽彿'+'</th>';
- for(i=0;i<headers.length; i++){
- content += '<th scope=\"col"\>'+headers[i]+'</th>';
+ var content =
+ '<table class="table slds-table slds-table--bordered slds-table--cell-buffer">';
+ content += '<thead><tr class="slds-text-title--caps">';
+ content += '<th scope="col">' + '琛屽彿' + '</th>';
+ for (i = 0; i < headers.length; i++) {
+ content += '<th scope="col">' + headers[i] + '</th>';
}
- content += "</tr></thead>";
- for (var i=1; i<allTextLines.length; i++) {
+ content += '</tr></thead>';
+ for (var i = 1; i < allTextLines.length; i++) {
filecontentdata = allTextLines[i].split(',');
- if(filecontentdata[0]!=''){
- content +="<tr>";
- content +="<td>"+i+"</td>";
- for(var j=0;j<filecontentdata.length;j++){
- content +='<td>'+filecontentdata[j]+'</td>';
+ if (filecontentdata[0] != '') {
+ content += '<tr>';
+ content += '<td>' + i + '</td>';
+ for (var j = 0; j < filecontentdata.length; j++) {
+ content +=
+ '<td>' + filecontentdata[j] + '</td>';
}
- content +="</tr>";
+ content += '</tr>';
}
}
- content += "</table>";
+ content += '</table>';
console.log(content);
- component.set("v.TableContent",content);
- component.set("v.showMain",false);
+ component.set('v.TableContent', content);
+ component.set('v.showMain', false);
}
- }
- reader.readAsText(file,'gb2312');
-
+ };
+ reader.readAsText(file, 'gb2312');
}
var reader = new FileReader();
- reader.onloadend = function() {
-
- };
+ reader.onloadend = function () {};
reader.readAsDataURL(file);
},
-
- saveRecords : function(component,event,helper){
- component.set('v.login',true);
+
+ saveRecords: function (component, event, helper) {
+ debugger;
+ component.set('v.loginEdit', true);
//fy 瀵煎叆 20220424 start
- var action1 = component.get("c.processDataAWSId");
- action1.setParams({
- fileData : component.get("v.fileContentData"),
- });
- action1.setCallback(this, function(response) {
- console.log('response = ' + JSON.stringify(response));
+ var action1 = component.get('c.processDataAWSId');
+ action1.setParams({
+ fileData: component.get('v.fileContentData')
+ });
+ debugger;
+ action1.setCallback(this, function (response) {
+ console.log('response = ' + JSON.stringify(response));
var state = response.getState();
- if (state === "SUCCESS") {
+ if (state === 'SUCCESS') {
var ress = response.getReturnValue();
- console.log('ress = ' + JSON.stringify(ress));
- if(ress){
- var valur =ress.split('error1');
- if(valur.length<=1){
+ console.log('ress = ' + JSON.stringify(ress));
+ if (ress) {
+ var valur = ress.split('error1');
+ if (valur.length <= 1) {
var res = JSON.parse(response.getReturnValue());
- console.log('res = ' + JSON.stringify(res));
+ console.log('res = ' + JSON.stringify(res));
var dataArr = new Array();
var dataMap = new Map();
- res.forEach(item => {
- if(item.AWS_Data_Id__c){
+ res.forEach((item) => {
+ if (item.AWS_Data_Id__c) {
dataArr.push(item.AWS_Data_Id__c);
//dataMap.set(item.AWS_Data_Id__c,item.Name_Encrypted__c);
- dataMap.set(item.AWS_Data_Id__c,item.AWS_Data_Id__c); //zhj 鏂版柟妗堟敼閫� 2022-12-21
+ dataMap.set(
+ item.AWS_Data_Id__c,
+ item.AWS_Data_Id__c
+ ); //zhj 鏂版柟妗堟敼閫� 2022-12-21
}
});
- debugger
- let obj= Object.create(null);
+ let obj = Object.create(null);
obj['dataIds'] = dataArr;
var payload = JSON.stringify(obj);
- this.search_contact_url(component, 'Agency_Contact__c', (result)=>{
- var token = result.token;
- var searchUrl = result.searchUrl;
- this.search_core(token,searchUrl,payload,(result)=>{
- if(result.status == '0'){
- if(result.object != null&&result.object.length != 0){
- // var resultjson = JSON.stringify(result.object);
- // if(resultjson){
- // debugger
- // console.warn('001');
- // component.set('v.login',true);
- // this.ImportMethod(component,resultjson);
- // }
- component.set('v.login',true);
- this.saveRecordsEditFile(component,dataMap,result.object,helper);
- }else{
- this.error('AWS search status5 ' );
- component.set('v.login',false);
- }
- }else{
- this.error('AWS search status6 : ' + result.status);
- component.set('v.login',false);
- }
- },component);
- // var resultjson =null;
- // this.ImportMethod(component,resultjson);
-
- });
+ console.log('payload zhj = ' + JSON.stringify(payload));
+
+ this.search_contact_url(
+ component,
+ 'Agency_Contact__c',
+ (result) => {
+ var token = result.token;
+ var searchUrl = result.searchUrl;
+ this.search_core(
+ token,
+ searchUrl,
+ payload,
+ (result) => {
+ if (result.status == '0') {
+ if (
+ result.object != null &&
+ result.object.length != 0
+ ) {
+ // var resultjson = JSON.stringify(result.object);
+ // if(resultjson){
+ // debugger
+ // console.warn('001');
+ // component.set('v.login',true);
+ // this.ImportMethod(component,resultjson);
+ // }
+ component.set(
+ 'v.loginEdit',
+ true
+ );
+ this.saveRecordsEditFile(
+ component,
+ dataMap,
+ result.object,
+ helper
+ );
+ } else {
+ this.error('AWS 鏌ヨ鏁版嵁涓虹┖ ');
+ component.set(
+ 'v.loginEdit',
+ false
+ );
+ }
+ } else {
+ this.error(
+ 'AWS search status6 : ' +
+ result.status
+ );
+ component.set('v.loginEdit', false);
+ }
+ },
+ component
+ );
+ // var resultjson =null;
+ // this.ImportMethod(component,resultjson);
+ }
+ );
// var resultjson =null;
// this.ImportMethod(component,resultjson);
- }else{
- this.error(valur[1]+'\n'+"璇蜂慨鏀瑰悗閲嶆柊涓婁紶");
+ } else {
+ this.error(valur[1] + '\n' + '璇蜂慨鏀瑰悗閲嶆柊涓婁紶');
}
}
}
@@ -1972,18 +2744,18 @@
//fy 瀵煎叆 20220424 end
// var action = component.get("c.processData");
// var selectDate = component.find('select_date').get('v.value');
- // var fieldsList=['Name','Phone','AccountNumber']; //Please write your code dynamic
+ // var fieldsList=['Name','Phone','AccountNumber']; //Please write your code dynamic
// var sss=component.get("v.fileContentData");
- // action.setParams({
+ // action.setParams({
// fileData : component.get("v.fileContentData"),
// //selectDateselectDate :component.find('select_date').get('v.value'),
// sobjectName:'Account', //Any object
// fields:fieldsList
- // });
+ // });
// action.setCallback(this, function(response) {
// var state = response.getState();
// if (state === "SUCCESS") {
-
+
// var res = response.getReturnValue();
// var res1 = '';
// console.log("[[[[[["+res);
@@ -2004,7 +2776,7 @@
// // alert('saved successfully');
// component.set('v.login',false);
// }
-
+
// }
// else if (state === "INCOMPLETE") {
// // do something
@@ -2014,7 +2786,7 @@
// var errors = response.getError();
// if (errors) {
// if (errors[0] && errors[0].message) {
- // console.log("Error message: " +
+ // console.log("Error message: " +
// errors[0].message);
// component.set('v.login',false);
// }
@@ -2025,332 +2797,719 @@
// }
// });
// $A.enqueueAction(action);
-
- },ImportMethod : function(component,fileStr){
- var actionss = component.get("c.processData");
- var selectDate = component.find('select_date').get('v.value');
- var fieldsList=['Name','Phone','AccountNumber']; //Please write your code dynamic
- var sss=component.get("v.fileContentData");
- actionss.setParams({
+ },
+ isNumber: function (str) {
+ return /^\d+$/.test(str);
+ },
+ ImportMethod: function (component, fileStr) {
+ debugger;
+ var actionss = component.get('c.processData');
+ var selectDate = component.find('select_date').get('v.value');
+ var fieldsList = ['Name', 'Phone', 'AccountNumber']; //Please write your code dynamic
+ var sss = component.get('v.fileContentData');
+ actionss.setParams({
// fileData : component.get("v.fileContentData"),
- fileData : fileStr,
+ fileData: fileStr,
// selectDateselectDate :component.find('select_date').get('v.value'),
- sobjectName:'Account', //Any object
- fields:fieldsList
+ sobjectName: 'Account', //Any object
+ fields: fieldsList
// Agency_ContactListjson:resultjson
- });
- actionss.setCallback(this, function(response) {
- console.log('002');
- var state = response.getState();
- if (state === "SUCCESS") {
- var res = response.getReturnValue();
- var res1 = '';
- console.log("[[[[[["+res);
- if(res != 'success'){
- var ress = res.split('=');
- console.log(ress);
- for (var i=0; i<ress.length; i++) {
- res1 += ress[i].substr(7)+'\n';
+ });
+ actionss.setCallback(this, function (response) {
+ console.log('002');
+ var state = response.getState();
+ if (state === 'SUCCESS') {
+ var res = response.getReturnValue();
+ var res1 = '';
+ console.log('[[[[[[' + res);
+ if (res != 'success') {
+ var ress = res.split('=');
+ console.log(ress);
+ let errorDatas = [];
+ let errorDataRow = [];
+ debugger;
+ var fileContentData = component
+ .get('v.fileContentData')
+ .split('\n');
+ for (var i = 0; i < ress.length; i++) {
+ res1 += ress[i].substr(7) + '\n';
+ if (ress[i] != '') {
+ let errorData = {};
+ if (
+ !this.isNumber(
+ ress[i].substr(7).substring(1, 2)
+ )
+ ) {
+ continue;
+ }
+ let index = errorDataRow.indexOf(
+ ress[i].substr(7).substring(1, 2)
+ );
+ if (index == -1) {
+ errorData.errorRow = ress[i]
+ .substr(7)
+ .substring(1, 2);
+ errorDataRow.push(errorData.errorRow);
+ errorData.errorInfo = ress[i]
+ .substr(7)
+ .substring(5)
+ .replace('=', '');
+ if (errorData.errorInfo == '鎷滆浜轰笉瀛樺湪') {
+ console.log(
+ 'errorData.errorRow = ' +
+ errorData.errorRow
+ );
+ errorData.errorInfo =
+ '鎷滆浜� ' +
+ fileContentData[
+ errorData.errorRow
+ ].split(',')[4] +
+ '涓嶅瓨鍦�';
+ }
+ errorDatas.push(errorData);
+ } else {
+ if (
+ ress[i].substr(7).substring(5) ==
+ '鎷滆浜轰笉瀛樺湪'
+ ) {
+ errorDatas[index].errorInfo +=
+ '; ' +
+ '鎷滆浜� ' +
+ fileContentData[
+ errorDatas[index].errorRow
+ ].split(',')[4] +
+ '涓嶅瓨鍦�';
+ } else {
+ errorDatas[index].errorInfo +=
+ '; ' + ress[i].substr(7).substring(5);
+ }
+ }
}
- // $('.forceToastManager').css('white-space', 'pre-wrap');
- console.log("=="+res1);
- this.error(res1+"璇蜂慨鏀瑰悗閲嶆柊涓婁紶");
- component.set('v.login',false);
- }else{
- component.set("v.showMain",true);
- this.success("瀵煎叆鎴愬姛");
- // alert('saved successfully');
- component.set('v.login',false);
}
-
- }
- else if (state === "INCOMPLETE") {
- // do something
- component.set('v.login',false);
- }
- else if (state === "ERROR") {
- var errors = response.getError();
- if (errors) {
- if (errors[0] && errors[0].message) {
- console.log("Error message: " +
- errors[0].message);
- component.set('v.login',false);
+ let errorColumns = [
+ {
+ label: '閿欒琛�',
+ fieldName: 'errorRow',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 100
+ },
+ {
+ label: '閿欒淇℃伅',
+ fieldName: 'errorInfo',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 300,
+ wrapText: true
}
- } else {
- console.log("Unknown error");
- component.set('v.login',false);
+ ];
+ for (
+ var i = 0;
+ i < fileContentData[0].split(',').length;
+ i++
+ ) {
+ errorColumns.push({
+ label: fileContentData[0].split(',')[i],
+ fieldName: 'field' + i,
+ type: 'text',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 120
+ });
}
+
+ for (var i = 0; i < errorDatas.length; i++) {
+ let data = fileContentData[errorDatas[i].errorRow];
+ console.log('data = ' + JSON.stringify(data));
+ if (data) {
+ for (var j = 0; j < data.split(',').length; j++) {
+ let label = 'field' + j;
+ errorDatas[i][label] = data.split(',')[j];
+ }
+ }
+ }
+ component.set('v.errorColumns', errorColumns);
+ component.set('v.errorData', errorDatas);
+ component.set('v.showErrorInfo', true);
+ console.log('==' + res1);
+ this.error(res1 + '璇蜂慨鏀瑰悗閲嶆柊涓婁紶');
+ component.set('v.loginEdit', false);
+ } else {
+ component.set('v.showMain', true);
+ this.success('瀵煎叆鎴愬姛');
+ // alert('saved successfully');
+ component.set('v.loginEdit', false);
}
- });
+ } else if (state === 'INCOMPLETE') {
+ // do something
+ component.set('v.loginEdit', false);
+ } else if (state === 'ERROR') {
+ var errors = response.getError();
+ if (errors) {
+ if (errors[0] && errors[0].message) {
+ console.log('Error message: ' + errors[0].message);
+ component.set('v.loginEdit', false);
+ }
+ } else {
+ console.log('Unknown error');
+ component.set('v.loginEdit', false);
+ }
+ }
+ });
$A.enqueueAction(actionss);
- },saveRecordsEditFile : function(component,dataMap,searchData,helper){
+ },
+ saveRecordsEditFile: function (component, dataMap, searchData, helper) {
var searchDataMap = new Map();
- for (var i = 0; i < searchData.length; i++) {
- var sd = searchData[i];
- searchDataMap.set(sd.name.replace(' ',''),sd.dataId);
- }
- console.log('searchDataMap='+searchDataMap);
- var error = '';
- var fileData = component.get("v.fileContentData");
- var files = fileData.split('\n');
+ for (var i = 0; i < searchData.length; i++) {
+ var sd = searchData[i];
+ if (sd.name) searchDataMap.set(sd.name.replace(' ', ''), sd.dataId);
+ }
+ console.log('searchDataMap=' + searchDataMap);
+ var error = '';
+ var fileData = component.get('v.fileContentData');
+ var files = fileData.split('\n');
- var fileStr = files[0];
- fileStr += '\n';
+ var fileStr = files[0];
+ fileStr += '\n';
- for (var i = 1; i < files.length-1; i++) {
- var filelist = files[i].split(',');
- var fileName = filelist[4];
+ for (var i = 1; i < files.length - 1; i++) {
+ var filelist = files[i].split(',');
+ var fileName = filelist[4];
- if (searchDataMap.get(fileName.replace(' ',''))) {
- var nameDataId = searchDataMap.get(fileName.replace(' ',''));
+ if (searchDataMap.get(fileName.replace(' ', ''))) {
+ var nameDataId = searchDataMap.get(fileName.replace(' ', ''));
if (dataMap.get(nameDataId)) {
- filelist[4] = dataMap.get(nameDataId); //zhj 鏂版柟妗堟敼閫� filelist[4]涓嶅啀瀛樼殑nameEncrpt 2022-12-21
- }else {
- error += 'error1 绗�'+i+'琛屾暟鎹嫓璁夸汉SF涓嶅瓨鍦�';
- error += '=';
+ filelist[4] = dataMap.get(nameDataId); //zhj 鏂版柟妗堟敼閫� filelist[4]涓嶅啀瀛樼殑nameEncrpt 2022-12-21
+ } else {
+ error += 'error1 绗�' + i + '琛屾暟鎹嫓璁夸汉SF涓嶅瓨鍦�';
+ error += '=';
}
- }else {
- error += 'error1 绗�'+i+'琛屾暟鎹嫓璁夸汉AWS涓嶅瓨鍦�';
- error += '=';
+ } else {
+ error += 'error1 绗�' + i + '琛屾暟鎹嫓璁夸汉AWS涓嶅瓨鍦�';
+ error += '=';
}
fileStr += filelist.toString();
- fileStr += '\n';
+ fileStr += '\n';
}
if (error != '') {
+ console.log('zhj error = ' + error);
+ let errorArray = error.split('error1');
+ let errorDatas = [];
+ let errorDataRow = [];
+ debugger;
+ var fileContentData = component
+ .get('v.fileContentData')
+ .split('\n');
+ console.log('errorArray = ' + JSON.stringify(errorArray));
+ for (var i in errorArray) {
+ if (errorArray[i] != '') {
+ let errorData = {};
+ if (!this.isNumber(errorArray[i].trim().substring(1, 2))) {
+ continue;
+ }
+ let index = errorDataRow.indexOf(
+ errorArray[i].trim().substring(1, 2)
+ );
+ if (index == -1) {
+ errorData.errorRow = errorArray[i]
+ .trim()
+ .substring(1, 2);
+ errorDataRow.push(errorData.errorRow);
+ errorData.errorInfo = errorArray[i]
+ .trim()
+ .substring(5, errorArray[i].trim().length)
+ .replace('=', '');
+ if (errorData.errorInfo == '鎷滆浜篈WS涓嶅瓨鍦�') {
+ errorData.errorInfo =
+ '鎷滆浜� ' +
+ fileContentData[errorData.errorRow].split(
+ ','
+ )[4] +
+ '涓嶅瓨鍦�';
+ }
+ errorDatas.push(errorData);
+ } else {
+ if (
+ errorArray[i].trim().substring(5) ==
+ '鎷滆浜篈WS涓嶅瓨鍦�'
+ ) {
+ errorData[index].errorInfo =
+ '; ' +
+ '鎷滆浜� ' +
+ fileContentData[
+ errorDatas[index].errorRow
+ ].split(',')[4] +
+ '涓嶅瓨鍦�';
+ } else {
+ errorDatas[index].errorInfo +=
+ '; ' +
+ errorArray[i]
+ .trim()
+ .substring(5, errorArray[i].trim().length);
+ }
+ }
+ }
+ }
+ var fileContentData = component
+ .get('v.fileContentData')
+ .split('\n');
+ let errorColumns = [
+ {
+ label: '閿欒琛�',
+ fieldName: 'errorRow',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 100
+ },
+ {
+ label: '閿欒淇℃伅',
+ fieldName: 'errorInfo',
+ type: 'text',
+ hideDefaultActions: true,
+ initialWidth: 300,
+ wrapText: true
+ }
+ ];
+ for (var i = 0; i < fileContentData[0].split(',').length; i++) {
+ errorColumns.push({
+ label: fileContentData[0].split(',')[i],
+ fieldName: 'field' + i,
+ type: 'text',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 120
+ });
+ }
+
+ for (var i = 0; i < errorDatas.length; i++) {
+ let data = fileContentData[errorDatas[i].errorRow];
+ console.log('data = ' + JSON.stringify(data));
+ for (var j = 0; j < data.split(',').length; j++) {
+ let label = 'field' + j;
+ errorDatas[i][label] = data.split(',')[j];
+ }
+ }
+ console.log('errorDatas =' + JSON.stringify(errorDatas));
+ component.set('v.errorColumns', errorColumns);
+ component.set('v.errorData', errorDatas);
+ component.set('v.showErrorInfo', true);
+
+ console.log('error = ' + error);
+ component.set('v.errorMessage', error);
+
this.error(error);
- console.log('error='+error);
- component.set('v.login',false);
+ console.log('error=' + error);
+ component.set('v.loginEdit', false);
return;
- }
+ }
- console.log('fileStr='+fileStr);
- $A.getCallback(function(){
- debugger
- helper.ImportMethod(component,fileStr);
- })();
-
- },
- convertArrayOfObjectsToCSV : function(component,objectRecords){
- var csvStringResult, counter, keys, columnDivider, lineDivider,thkeys;
+ console.log('fileStr=' + fileStr);
+ $A.getCallback(function () {
+ debugger;
+ helper.ImportMethod(component, fileStr);
+ })();
+ },
+ convertArrayOfObjectsToCSV: function (component, objectRecords) {
+ var csvStringResult, counter, keys, columnDivider, lineDivider, thkeys;
if (objectRecords == null || !objectRecords.length) {
return null;
- }
+ }
columnDivider = ',';
- lineDivider = '\n';
+ lineDivider = '\n';
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start ,'SupportNeeds__c' ,'鏀彺闇�姹�'
- keys = ['Submit_date__c','Person_In_Charge2__c','Report_Date__c','Agency_Hospital__c','Department_Cateogy__c','doctor2__c','visitor_title__c','Product_Category1__c','Product_Category2__c','Product_Category3__c','Purpose_Type__c','Result__c','SupportNeeds__c'];
- thkeys = ['鍛�','鎷呭綋','娲诲姩鏃�','鍖婚櫌','绉戝','鎷滆浜�','鑱屼綅','浜у搧鍖哄垎1','浜у搧鍖哄垎2','浜у搧鍖哄垎3','娲诲姩鍖哄垎','缁撴灉','鏀彺闇�姹�']
+ keys = [
+ 'Submit_date__c',
+ 'Person_In_Charge2__c',
+ 'Report_Date__c',
+ 'Agency_Hospital__c',
+ 'Department_Cateogy__c',
+ 'doctor2__c',
+ 'visitor_title__c',
+ 'Product_Category1__c',
+ 'Product_Category2__c',
+ 'Product_Category3__c',
+ 'Purpose_Type__c',
+ 'Result__c',
+ 'SupportNeeds__c'
+ ];
+ thkeys = [
+ '鍛�',
+ '鎷呭綋',
+ '娲诲姩鏃�',
+ '鍖婚櫌',
+ '绉戝',
+ '鎷滆浜�',
+ '鑱屼綅',
+ '浜у搧鍖哄垎1',
+ '浜у搧鍖哄垎2',
+ '浜у搧鍖哄垎3',
+ '娲诲姩鍖哄垎',
+ '缁撴灉',
+ '鏀彺闇�姹�'
+ ];
csvStringResult = '';
csvStringResult += thkeys.join(columnDivider);
csvStringResult += lineDivider;
- console.log("杩涘叆瀵煎嚭helper");
- for(var i=0; i < objectRecords.length; i++){
+ console.log('杩涘叆瀵煎嚭helper');
+ for (var i = 0; i < objectRecords.length; i++) {
counter = 0;
- for(var sTempkey in keys) {
+ for (var sTempkey in keys) {
var skey = keys[sTempkey];
- if(counter > 0){
- csvStringResult += columnDivider;
+ if (counter > 0) {
+ csvStringResult += columnDivider;
}
- if(typeof objectRecords[i][skey] === "undefined"){
- csvStringResult += '"'+''+'"';
+ if (typeof objectRecords[i][skey] === 'undefined') {
+ csvStringResult += '"' + '' + '"';
continue;
- }
- if(skey == 'Person_In_Charge2__c'){
- csvStringResult += '"'+ objectRecords[i].Person_In_Charge2__r.Name+'"';
- }else if(skey == 'Agency_Hospital__c'){
- csvStringResult += '"'+ objectRecords[i].Agency_Hospital__r.Name+'"';
- }else if(skey == 'doctor2__c'){
- csvStringResult += '"'+ objectRecords[i].doctor2__r.Name+'"';
- }else if(skey == 'Product_Category1__c'){
- csvStringResult += '"'+ objectRecords[i].Product_Category1__r.Name+'"';
- }else if(skey == 'Product_Category2__c'){
- csvStringResult += '"'+ objectRecords[i].Product_Category2__r.Name+'"';
- }else if(skey == 'Product_Category3__c'){
- csvStringResult += '"'+ objectRecords[i].Product_Category3__r.Name+'"';
}
- else if(skey == 'SupportNeeds__c'){//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
- csvStringResult += '"'+ objectRecords[i].SupportNeeds__c+'"';
- }
- else{
- csvStringResult += '"'+ objectRecords[i][skey]+'"';
+ if (skey == 'Person_In_Charge2__c') {
+ csvStringResult +=
+ '"' + objectRecords[i].Person_In_Charge2__r.Name + '"';
+ } else if (skey == 'Agency_Hospital__c') {
+ csvStringResult +=
+ '"' + objectRecords[i].Agency_Hospital__r.Name + '"';
+ } else if (skey == 'doctor2__c') {
+ csvStringResult +=
+ '"' + objectRecords[i].doctor2__r.Name + '"';
+ } else if (skey == 'Product_Category1__c') {
+ csvStringResult +=
+ '"' + objectRecords[i].Product_Category1__r.Name + '"';
+ } else if (skey == 'Product_Category2__c') {
+ csvStringResult +=
+ '"' + objectRecords[i].Product_Category2__r.Name + '"';
+ } else if (skey == 'Product_Category3__c') {
+ csvStringResult +=
+ '"' + objectRecords[i].Product_Category3__r.Name + '"';
+ } else if (skey == 'SupportNeeds__c') {
+ //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
+ csvStringResult +=
+ '"' + objectRecords[i].SupportNeeds__c + '"';
+ } else {
+ csvStringResult += '"' + objectRecords[i][skey] + '"';
}
counter++;
-
- } // inner for loop close
- console.log("瀵煎嚭寰幆缁撴潫");
+ } // inner for loop close
+ console.log('瀵煎嚭寰幆缁撴潫');
csvStringResult += lineDivider;
- }// outer main for loop close
-
- // return the CSV formate String
- return csvStringResult;
+ } // outer main for loop close
+
+ // return the CSV formate String
+ return csvStringResult;
},
- showExportDate : function(component,objectRecords){
- console.log('杩涘叆showexceportdate'+objectRecords);//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start ,'SupportNeeds__c' ,'鏀彺闇�姹�'
- var keys = ['Submit_date__c','Person_In_Charge2__c','Report_Date__c','Agency_Hospital__c','Department_Cateogy__c','doctor2__c','visitor_title__c','Product_Category1__c','Product_Category2__c','Product_Category3__c','Purpose_Type__c','Result__c','SupportNeeds__c'];
- var headers = ['鍛�','鎷呭綋','娲诲姩鏃�','鍖婚櫌','绉戝','鎷滆浜�','鑱屼綅','浜у搧鍖哄垎1','浜у搧鍖哄垎2','浜у搧鍖哄垎3','娲诲姩鍖哄垎','缁撴灉','鏀彺闇�姹�']
- var content = "<table class=\"table slds-table slds-table--bordered slds-table--cell-buffer\">";
- content += "<thead><tr class=\"slds-text-title--caps\">";
- for(i=0;i<headers.length; i++){
- content += '<th scope=\"col"\>'+headers[i]+'</th>';
+ showExportDate: function (component, objectRecords) {
+ console.log('杩涘叆showexceportdate' + objectRecords); //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start ,'SupportNeeds__c' ,'鏀彺闇�姹�'
+ var keys = [
+ 'Submit_date__c',
+ 'Person_In_Charge2__c',
+ 'Report_Date__c',
+ 'Agency_Hospital__c',
+ 'Department_Cateogy__c',
+ 'doctor2__c',
+ 'visitor_title__c',
+ 'Product_Category1__c',
+ 'Product_Category2__c',
+ 'Product_Category3__c',
+ 'Purpose_Type__c',
+ 'Result__c',
+ 'SupportNeeds__c'
+ ];
+ var headers = [
+ '鍛�',
+ '鎷呭綋',
+ '娲诲姩鏃�',
+ '鍖婚櫌',
+ '绉戝',
+ '鎷滆浜�',
+ '鑱屼綅',
+ '浜у搧鍖哄垎1',
+ '浜у搧鍖哄垎2',
+ '浜у搧鍖哄垎3',
+ '娲诲姩鍖哄垎',
+ '缁撴灉',
+ '鏀彺闇�姹�'
+ ];
+ var content =
+ '<table class="table slds-table slds-table--bordered slds-table--cell-buffer">';
+ content += '<thead><tr class="slds-text-title--caps">';
+ for (i = 0; i < headers.length; i++) {
+ content += '<th scope="col">' + headers[i] + '</th>';
}
- content += "</tr></thead>";
- for(var i=0; i < objectRecords.length; i++){
- console.log('for'+content);
+ content += '</tr></thead>';
+ for (var i = 0; i < objectRecords.length; i++) {
+ console.log('for' + content);
content += '<tr>';
// content += '<td>'+(i+1)+'</td>';
- for(var sTempkey in keys) {
- console.log('for1'+sTempkey);
+ for (var sTempkey in keys) {
+ console.log('for1' + sTempkey);
var skey = keys[sTempkey];
- if(typeof objectRecords[i][skey] === "undefined"){
- content += '<td>'+''+'</td>';
+ if (typeof objectRecords[i][skey] === 'undefined') {
+ content += '<td>' + '' + '</td>';
continue;
}
- console.log('for2'+objectRecords[i].Person_In_Charge2__r.Name);
- if(skey == 'Person_In_Charge2__c'){
- content += '<td>'+ objectRecords[i].Person_In_Charge2__r.Name+'</td>';
- }else if(skey == 'Agency_Hospital__c'){
- content += '<td>'+ objectRecords[i].Agency_Hospital__r.Name+'</td>';
- }else if(skey == 'doctor2__c'){
- content += '<td>'+ objectRecords[i].doctor2__r.Name+'</td>';
- }else if(skey == 'Product_Category1__c'){
- content += '<td>'+ objectRecords[i].Product_Category1__r.Name+'</td>';
- }else if(skey == 'Product_Category2__c'){
- content += '<td>'+ objectRecords[i].Product_Category2__r.Name+'</td>';
- }else if(skey == 'Product_Category3__c'){
- content += '<td>'+ objectRecords[i].Product_Category3__r.Name+'</td>';
+ console.log(
+ 'for2' + objectRecords[i].Person_In_Charge2__r.Name
+ );
+ if (skey == 'Person_In_Charge2__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].Person_In_Charge2__r.Name +
+ '</td>';
+ } else if (skey == 'Agency_Hospital__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].Agency_Hospital__r.Name +
+ '</td>';
+ } else if (skey == 'doctor2__c') {
+ content +=
+ '<td>' + objectRecords[i].doctor2__r.Name + '</td>';
+ } else if (skey == 'Product_Category1__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].Product_Category1__r.Name +
+ '</td>';
+ } else if (skey == 'Product_Category2__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].Product_Category2__r.Name +
+ '</td>';
+ } else if (skey == 'Product_Category3__c') {
+ content +=
+ '<td>' +
+ objectRecords[i].Product_Category3__r.Name +
+ '</td>';
+ } else if (skey == 'SupportNeeds__c') {
+ //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
+ content +=
+ '<td>' + objectRecords[i].SupportNeeds__c + '</td>';
+ } else {
+ content += '<td>' + objectRecords[i][skey] + '</td>';
}
- else if(skey == 'SupportNeeds__c'){//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
- content += '<td>'+ objectRecords[i].SupportNeeds__c+'</td>';
- }
- else{
- content += '<td>'+ objectRecords[i][skey]+'</td>';
- }
- } // inner for loop close
- content += '</tr>'
- }// outer main for loop close
+ } // inner for loop close
+ content += '</tr>';
+ } // outer main for loop close
content += '</table>';
- console.log("helper寰幆缁撴潫"+content);
- component.set("v.TableContent2",content);
- component.set("v.showMain",false);
+ console.log('helper寰幆缁撴潫' + content);
+ component.set('v.TableContent2', content);
+ component.set('v.showMain', false);
},
- select_repores_date : function(component,event,helper){
- component.set('v.login',true);
+ select_repores_date: function (component, event, helper) {
+ component.set('v.loginEdit', true);
var reportsdate1 = component.find('input-report-date1').get('v.value');
var reportsdate2 = component.find('input-report-date2').get('v.value');
- console.log('杈撳叆鐨勫紑濮嬫棩鏈�'+reportsdate1+'杈撳叆鐨勭粨鏉熸棩鏈�'+reportsdate2);
- var action = component.get("c.getReportsByDate");
+ console.log(
+ '杈撳叆鐨勫紑濮嬫棩鏈�' + reportsdate1 + '杈撳叆鐨勭粨鏉熸棩鏈�' + reportsdate2
+ );
+ var action = component.get('c.getReportsByDate');
console.log('杈撳叆鐨勫紑濮嬫棩鏈�1');
- action.setParams({
- date1 : reportsdate1,
+ action.setParams({
+ date1: reportsdate1,
date2: reportsdate2
});
console.log('杈撳叆鐨勫紑濮嬫棩鏈�2');
- action.setCallback(this, function(response) {
+ action.setCallback(this, function (response) {
var state = response.getState();
- if (state === "SUCCESS") {
-
+ if (state === 'SUCCESS') {
var res = response.getReturnValue();
- console.log('杈撳叆鐨勫紑濮嬫棩鏈�3'+res);
- component.set('v.login',false);
+ console.log('杈撳叆鐨勫紑濮嬫棩鏈�3' + res);
+ component.set('v.loginEdit', false);
// PI 鏀归�� By Bright 20220328
- if(true){
+ if (true) {
let awsids = [];
for (let ri in res) {
- if(res[ri] && res[ri].doctor2__r && res[ri].doctor2__r.AWS_Data_Id__c){
+ if (
+ res[ri] &&
+ res[ri].doctor2__r &&
+ res[ri].doctor2__r.AWS_Data_Id__c
+ ) {
awsids.push(res[ri].doctor2__r.AWS_Data_Id__c);
}
- }
- if(awsids.length > 0){
+ }
+ if (awsids.length > 0) {
let awsurl = component.get('v.awsurl');
-
- AWSService.search(awsurl.searchUrl,{
- dataIds:awsids
- }, function(data){
- if(data && data.object && data.object.length){
- let m = {};
- for(let di in data.object){
- if(data.object[di] && data.object[di].dataId){
- m[data.object[di].dataId] = data.object[di];
+
+ AWSService.search(
+ awsurl.searchUrl,
+ {
+ dataIds: awsids
+ },
+ function (data) {
+ if (data && data.object && data.object.length) {
+ let m = {};
+ for (let di in data.object) {
+ if (
+ data.object[di] &&
+ data.object[di].dataId
+ ) {
+ m[data.object[di].dataId] =
+ data.object[di];
+ }
+ }
+
+ for (let ri in res) {
+ if (
+ res[ri] &&
+ res[ri].doctor2__r &&
+ res[ri].doctor2__r.AWS_Data_Id__c &&
+ m.hasOwnProperty(
+ res[ri].doctor2__r
+ .AWS_Data_Id__c
+ )
+ ) {
+ res[ri].doctor2__r.Name =
+ m[
+ res[
+ ri
+ ].doctor2__r.AWS_Data_Id__c
+ ].name;
+ res[ri].visitor_title__c =
+ m[
+ res[
+ ri
+ ].doctor2__r.AWS_Data_Id__c
+ ].doctorDivision1;
+ }
}
}
-
- for(let ri in res){
- if(res[ri] && res[ri].doctor2__r && res[ri].doctor2__r.AWS_Data_Id__c && m.hasOwnProperty(res[ri].doctor2__r.AWS_Data_Id__c)){
- res[ri].doctor2__r.Name = m[res[ri].doctor2__r.AWS_Data_Id__c].name;
- res[ri].visitor_title__c = m[res[ri].doctor2__r.AWS_Data_Id__c].doctorDivision1;
-
- }
- }
- }
- helper.showExportDate(component, res);
-
- component.set('v.login', false);
- }, awsurl.token);
- }else{
+ helper.showExportDate(component, res);
+
+ component.set('v.loginEdit', false);
+ },
+ awsurl.token
+ );
+ } else {
helper.showExportDate(component, res);
}
}
-
component.set('v.reports_date', res);
-
- }else{
+ } else {
alert('瀵煎嚭澶辫触,璇锋鏌ユ椿鍔ㄦ棩');
- component.set('v.login',false);
+ component.set('v.loginEdit', false);
}
});
$A.enqueueAction(action);
-
},
- showImport : function(component){
+ showImport: function (component) {
// console.log('杩涘叆');
// component.find('file').click();
var modalimport = component.find('modal_import');
var modalimportbg = component.find('modal_importbg');
$A.util.removeClass(modalimport, 'disp_none');
- $A.util.removeClass(modalimportbg,'disp_none');
+ $A.util.removeClass(modalimportbg, 'disp_none');
},
- showExport : function(component) {
+ showExport: function (component) {
var modalimport = component.find('modal_export');
var modalimportbg = component.find('modal_exportbg');
$A.util.removeClass(modalimport, 'disp_none');
- $A.util.removeClass(modalimportbg,'disp_none');
+ $A.util.removeClass(modalimportbg, 'disp_none');
},
- close_import : function(component){
+ close_import: function (component) {
var modalimport = component.find('modal_import');
var modalimportbg = component.find('modal_importbg');
$A.util.addClass(modalimport, 'disp_none');
- $A.util.addClass(modalimportbg,'disp_none');
+ $A.util.addClass(modalimportbg, 'disp_none');
},
- close_export : function(component){
+ close_export: function (component) {
var modalimport = component.find('modal_export');
var modalimportbg = component.find('modal_exportbg');
$A.util.addClass(modalimport, 'disp_none');
- $A.util.addClass(modalimportbg,'disp_none');
+ $A.util.addClass(modalimportbg, 'disp_none');
},
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
- CallBackAction : function(component,action_name,para,callback) {
- var action = component.get("c." + action_name.trimStart().replace("c.",""));
- if(para){
+ CallBackAction: function (component, action_name, para, callback) {
+ var action = component.get(
+ 'c.' + action_name.trimStart().replace('c.', '')
+ );
+ if (para) {
action.setParams(para);
}
- if(callback){
- action.setCallback(this,function(data){
+ if (callback) {
+ action.setCallback(this, function (data) {
callback(data);
});
}
-
+
$A.enqueueAction(action);
- },
+ },
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
+
+ //zhj 瀵煎嚭閿欒淇℃伅 2023-05-16 start
+ exportErrorInfoHelper: function (component) {
+ var errorData = component.get('v.errorData');
+ var errorColumns = component.get('v.errorColumns');
+
+ var datas = [];
+ let errorColumnsArray = [];
+ for (var i in errorColumns) {
+ errorColumnsArray.push(errorColumns[i].label);
+ }
+ datas.push(errorColumnsArray);
+ //datas.push(errorColumns);
+
+ for (var i in errorData) {
+ let data = [];
+ data.push(errorData[i].errorRow);
+ data.push(errorData[i].errorInfo);
+ for (var j = 0; j < Object.keys(errorData[i]).length - 2; j++) {
+ data.push(errorData[i]['field' + j]);
+ }
+ datas.push(data);
+ }
+
+ console.log('datas = ' + JSON.stringify(datas));
+ var csv = this.convertToCSV(component, datas);
+ console.log('csv = ' + JSON.stringify(csv));
+ this.downloadCSV(component, csv);
+ },
+
+ convertToCSV: function (component, data) {
+ console.log('enter convertToCSV');
+ console.log('data = ' + data);
+ var csv = '';
+ for (var i = 0; i < data.length; i++) {
+ var row = data[i];
+ console.log('row = ' + JSON.stringify(row));
+ for (var j = 0; j < row.length; j++) {
+ var val = '';
+ val = row[j] === null ? '' : row[j].toString();
+ console.log('val = ' + val);
+ if (
+ val.indexOf(',') !== -1 ||
+ val.indexOf('"') !== -1 ||
+ val.indexOf('\n') !== -1
+ ) {
+ //val = '"' + val.replace(/"/g,'""') + '"';
+ }
+ if (j > 0) {
+ csv += ',';
+ }
+ csv += val;
+ }
+ csv += '\n';
+ }
+ return csv;
+ },
+
+ downloadCSV: function (component, csv) {
+ var link = document.createElement('a');
+ // 璁剧疆瀛楃闆嗗拰鏂囦欢澶�
+ var bom = '\uFEFF';
+ link.href =
+ 'data:text/csv;charset=utf-8,' + encodeURIComponent(bom + csv);
+ link.download = 'data.csv';
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ }
+ //zhj 瀵煎嚭閿欒淇℃伅 2023-05-16 end
// searchAgencyContact : function(res) {
// var agencyContacts = [];
@@ -2386,4 +3545,4 @@
// var data = this.search(searchUrl,data,token);
// return data;searchUrl,requestSearchPayload,token
// },
-})
\ No newline at end of file
+});
diff --git a/force-app/main/default/classes/ArriveGoodsController.cls b/force-app/main/default/classes/ArriveGoodsController.cls
index 256f301..6371001 100644
--- a/force-app/main/default/classes/ArriveGoodsController.cls
+++ b/force-app/main/default/classes/ArriveGoodsController.cls
@@ -10,14 +10,14 @@
//鏇存柊鏄庣粏鍙栨秷鏃堕棿
public List<Consumable_order_details2__c> consumableorderdetails2Cancle = new List<Consumable_order_details2__c>();
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- Map<String,Consumable_order_details2__c> orderdetails2trMap = new Map<String,Consumable_order_details2__c>();
+ Map<String, Consumable_order_details2__c> orderdetails2trMap = new Map<String, Consumable_order_details2__c>();
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
- public List<Consumable_order_details2__c> consumableorderdetails2Insert= new List<Consumable_order_details2__c>();
- public List<Consumable_order_details2__c> consumableorderdetails2Nobox= new List<Consumable_order_details2__c>();
+ public List<Consumable_order_details2__c> consumableorderdetails2Insert = new List<Consumable_order_details2__c>();
+ public List<Consumable_order_details2__c> consumableorderdetails2Nobox = new List<Consumable_order_details2__c>();
public List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordserror { get; set; }
public transient List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsdummy { get; set; }
- public List<ConsumableorderdetailsInfo> ShowGoodsofReturnList{get;set;}
- public List<ConsumableorderdetailsInfo> ShowGoodsofRemoveBoxReturnList{get;set;}
+ public List<ConsumableorderdetailsInfo> ShowGoodsofReturnList { get; set; }
+ public List<ConsumableorderdetailsInfo> ShowGoodsofRemoveBoxReturnList { get; set; }
//add by rentx 20210602 CHAN-C3K4ZQ
public List<List<ConsumableorderdetailsInfo>> consumableorderdetailsRecordsview { get; set; }
//add by rentx 20210602 CHAN-C3K4ZQ
@@ -26,11 +26,11 @@
//瓒呭嚭瀹氳揣鏁伴噺鐨勪骇鍝�
public List<String> cancellationProList = new List<String>();
//閿欒淇℃伅
- public String alertMessage {set;get;}
- public integer getinventorysize(){
+ public String alertMessage { get; set; }
+ public integer getinventorysize() {
return consumableInventory.size();
}
- public integer geterrorsize(){
+ public integer geterrorsize() {
return ConsumableorderdetailsRecordserror.size();
}
Set<String> noboxBarcodeList = new Set<String>();
@@ -51,25 +51,24 @@
Map<String, Decimal> overOrderCunMap = new Map<String, Decimal>();
//瓒呭嚭BARCODE鍜屽瀷鍙�
Map<String, List<String>> overOrderBARcodeCunMap = new Map<String, List<String>>();
- list<String> overOrderBARcodeTTTTTT = new list<String>();
+ list<String> overOrderBARcodeTTTTTT = new List<String>();
//涓嶇鍚堢殑barcode鍜屽瀷鍙�
Map<String, List<String>> notEqualBARcodeCunMap = new Map<String, List<String>>();
- list<String> overOrderBARcodeSSSSSS = new list<String>();
- list<String> productList = new list<String>();
- list<String> notInlist = new list<String>();
+ list<String> overOrderBARcodeSSSSSS = new List<String>();
+ list<String> productList = new List<String>();
+ list<String> notInlist = new List<String>();
//涓嶉�夋嫨璁㈠崟鏃朵繚瀛樿鍗旾D銆佷骇鍝佸瀷鍙风敤
//List<String> orderId = new List<String>();
//List<String> prodName = new List<String>();
//搴撳瓨鐧诲綍浣跨敤
- list<String> notInStorelist = new list<String>();
- list<String> exitBarCodeList = new list<String>();
-
+ list<String> notInStorelist = new List<String>();
+ list<String> exitBarCodeList = new List<String>();
// Map<String, Consumable_order_details2__c> reallMap = new Map<String, Consumable_order_details2__c>();
- Map<String,String> HosErrorMap = new Map<String,String>();
+ Map<String, String> HosErrorMap = new Map<String, String>();
List<String> HosErrorList = new List<String>();
- public String baseUrl {get;private set;}
+ public String baseUrl { get; private set; }
public String ESetId { get; set; }
public String arriveId = '';
private String accountid = null;
@@ -79,9 +78,9 @@
public Decimal orderCountNotarrive = 0;
private id return_Order_id = null;
private id inventory_Order_id = null;
- public boolean ReturnFLGbln {get;set;}
- public boolean saveFLGbln {get;set;}
- public String ArrType{get;set;}
+ public boolean ReturnFLGbln { get; set; }
+ public boolean saveFLGbln { get; set; }
+ public String ArrType { get; set; }
// 鐧诲綍鑰呭伐浣滃湴
private String userWorkLocation;
@@ -91,7 +90,7 @@
public String product_Type = null;
public Boolean EngFlag = false;
public Boolean ETFlag = false;
- public ArriveGoodsController(){
+ public ArriveGoodsController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
ESetId = ApexPages.currentPage().getParameters().get('esetId');
ArrType = ApexPages.currentPage().getParameters().get('ArrType');
@@ -102,21 +101,21 @@
consumableorderdetailsRecordsUse = new List<ConsumableorderdetailsInfo>();
consumableInventoryUse = new List<ConsumableorderdetailsInfo>();
consumableorderdetails2Cancle = new List<Consumable_order_details2__c>();
- orderdetails2trMap = new Map<String,Consumable_order_details2__c>();
+ orderdetails2trMap = new Map<String, Consumable_order_details2__c>();
detailsSummary = new List<ConsumableorderdetailsInfo>();
- saveFLGbln = FALSE;
+ saveFLGbln = false;
//overOrderBARcodeTTTTTT.add('');
- //add by rentx 20210602 CHAN-C3K4ZQ start
+ //add by rentx 20210602 CHAN-C3K4ZQ start
consumableorderdetailsRecordsview = new List<List<ConsumableorderdetailsInfo>>();
- //add by rentx 20210602 CHAN-C3K4ZQ end
+ //add by rentx 20210602 CHAN-C3K4ZQ end
// OrderAllMap = new Map<String, String>();
}
//add by rentx 20210602 CHAN-C3K4ZQ start 鍑洪敊鐨勫師鍥犳槸椤甸潰鏈�澶氬睍绀�1000鏉℃暟鎹�,浣嗘槸闇�瑕佸睍绀虹殑鏁版嵁瓒呰繃浜�1000鏉�,鐜板湪鎶婂睍绀轰笂绾挎敼涓�1000 * 1000
- public void makeRecordsView(List<ConsumableorderdetailsInfo> recordsdummy){
+ public void makeRecordsView(List<ConsumableorderdetailsInfo> recordsdummy) {
consumableorderdetailsRecordsview = new List<List<ConsumableorderdetailsInfo>>();
- if(recordsdummy.size() > 1000){
+ if (recordsdummy.size() > 1000) {
List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsbreak = new List<ConsumableorderdetailsInfo>();
List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsbreakover = new List<ConsumableorderdetailsInfo>();
ConsumableorderdetailsInfo c = null;
@@ -126,24 +125,24 @@
//閫夋嫨浜у搧view
ConsumableorderdetailsRecordsbreak = new List<ConsumableorderdetailsInfo>();
ConsumableorderdetailsRecordsbreakover = new List<ConsumableorderdetailsInfo>();
- if(recordsdummy.size() > 1000){
- for(Integer i = 0; i < recordsdummy.size(); i++){
- if(i < 1000){
+ if (recordsdummy.size() > 1000) {
+ for (Integer i = 0; i < recordsdummy.size(); i++) {
+ if (i < 1000) {
c = recordsdummy.get(i);
ConsumableorderdetailsRecordsbreak.add(c);
- }else{
+ } else {
c = recordsdummy.get(i);
ConsumableorderdetailsRecordsbreakover.add(c);
}
}
consumableorderdetailsRecordsview.add(ConsumableorderdetailsRecordsbreak);
consumableorderdetailsRecordsview.add(ConsumableorderdetailsRecordsbreakover);
- }else{
+ } else {
consumableorderdetailsRecordsview.add(recordsdummy);
}
- // Integer count = recordsdummy.size() / 1000;
- // Integer last = recordsdummy.size() - (1000*count);
+ // Integer count = recordsdummy.size() / 1000;
+ // Integer last = recordsdummy.size() - (1000*count);
// for(Integer i = 0; i < count ; i++){
// List<ConsumableorderdetailsInfo> tempList = new List<ConsumableorderdetailsInfo>();
@@ -161,7 +160,7 @@
// }
// consumableorderdetailsRecordsview.add(tempList);
// }
- }else{
+ } else {
consumableorderdetailsRecordsview.add(recordsdummy);
}
}
@@ -169,108 +168,128 @@
public void init() {
// String userId = '00510000007cthP';
String userId = UserInfo.getUserId();
- List<user> Useracc = New List<user>();
- Useracc = [SELECT accountid, Work_Location__c,UserPro_Type__c FROM user WHERE id =:userId];
+ List<user> Useracc = new List<user>();
+ Useracc = [SELECT accountid, Work_Location__c, UserPro_Type__c FROM user WHERE id = :userId];
accountid = Useracc[0].accountid;
//--------AddStart-----XHL--------------20181008-------------
userPro_Type = Useracc[0].UserPro_Type__c;
- if(String.isBlank(userPro_Type)){
+ if (String.isBlank(userPro_Type)) {
userPro_Type = 'ET';
}
- if(userPro_Type == 'ENG'){
+ if (userPro_Type == 'ENG') {
product_Type = 'ET';
EngFlag = true;
- }else{
+ } else {
product_Type = 'ENG';
ETFlag = true;
}
userPro_Typestr = '%' + userPro_Type + '%';
//--------AddEnd-----XHL--------------20181008-------------
userWorkLocation = Useracc[0].Work_Location__c;
- system.debug('userWorkLocation'+ userWorkLocation);
- List<account> accountInfo = [SELECT Name FROM account WHERE id =:accountid];
+ system.debug('userWorkLocation' + userWorkLocation);
+ List<account> accountInfo = [SELECT Name FROM account WHERE id = :accountid];
accountName = accountInfo[0].Name;
- system.debug('accountName'+ accountName);
+ system.debug('accountName' + accountName);
coc = new Consumable_order__c();
- if(ArrType=='ReG'){
+ if (ArrType == 'ReG') {
ReturnFLGbln = true;
- }else{
+ } else {
ReturnFLGbln = false;
}
- if(ESetId != '' && ESetId !=null){
- List<Consumable_order__c> qs = New List<Consumable_order__c>();
- List<Consumable_order_details2__c> reSet1 = New List<Consumable_order_details2__c>();
- List<Consumable_Orderdetails__c> reSet = New List<Consumable_Orderdetails__c>();
- qs = [SELECT Id,Name,Order_status__c,Dealer_Info__c,Deliver_date__c,ReturnGs_Upload_Date__c,
- Order_Reason__c,Order_date__c,
- Contract_application_decision__c,Order_type__c,Total_num__c,
- OrderNumber_arrived__c,Delivery_detail_count__c,OrderNumber_notarrive__c,orderPattern__c
- FROM Consumable_order__c
- WHERE Id =:ESetId AND Order_Owner_WorkLocal__c =: userWorkLocation
- AND Dealer_Info__c = :accountid];
- if (qs.size()>0){
+ if (ESetId != '' && ESetId != null) {
+ List<Consumable_order__c> qs = new List<Consumable_order__c>();
+ List<Consumable_order_details2__c> reSet1 = new List<Consumable_order_details2__c>();
+ List<Consumable_Orderdetails__c> reSet = new List<Consumable_Orderdetails__c>();
+ qs = [
+ SELECT
+ Id,
+ Name,
+ Order_status__c,
+ Dealer_Info__c,
+ Deliver_date__c,
+ ReturnGs_Upload_Date__c,
+ Order_Reason__c,
+ Order_date__c,
+ Contract_application_decision__c,
+ Order_type__c,
+ Total_num__c,
+ OrderNumber_arrived__c,
+ Delivery_detail_count__c,
+ OrderNumber_notarrive__c,
+ orderPattern__c
+ FROM Consumable_order__c
+ WHERE Id = :ESetId AND Order_Owner_WorkLocal__c = :userWorkLocation AND Dealer_Info__c = :accountid
+ ];
+ if (qs.size() > 0) {
coc = qs[0];
orderCountAll = coc.Total_num__c;
orderCountNotarrive = coc.OrderNumber_notarrive__c;
}
//浜у搧瀹氳揣鏁伴噺
- reSet = [SELECT Asset_Model_No__c,
- Consumable_order__c,
- Consumable_count__c
- FROM Consumable_Orderdetails__c
- WHERE Consumable_order__c = :ESetId AND Order_Owner_WorkLocal__c =: userWorkLocation];
+ reSet = [
+ SELECT Asset_Model_No__c, Consumable_order__c, Consumable_count__c
+ FROM Consumable_Orderdetails__c
+ WHERE Consumable_order__c = :ESetId AND Order_Owner_WorkLocal__c = :userWorkLocation
+ ];
for (Integer i = 0; i < reSet.size(); i++) {
productList.add(reSet[i].Asset_Model_No__c);
- orderProductCunMap.put(reSet[i].Asset_Model_No__c,reSet[i].Consumable_count__c);
- orderProductArrivedCunMap.put(reSet[i].Asset_Model_No__c,0);
- orderWantArriveCunMap.put(reSet[i].Asset_Model_No__c,0);
- overOrderCunMap.put(reSet[i].Asset_Model_No__c,0);
- overOrderBARcodeCunMap.put(reSet[i].Asset_Model_No__c,overOrderBARcodeTTTTTT);
+ orderProductCunMap.put(reSet[i].Asset_Model_No__c, reSet[i].Consumable_count__c);
+ orderProductArrivedCunMap.put(reSet[i].Asset_Model_No__c, 0);
+ orderWantArriveCunMap.put(reSet[i].Asset_Model_No__c, 0);
+ overOrderCunMap.put(reSet[i].Asset_Model_No__c, 0);
+ overOrderBARcodeCunMap.put(reSet[i].Asset_Model_No__c, overOrderBARcodeTTTTTT);
//overOrderCunMap.put(reSet[i].Asset_Model_No__c,0);
}
//
- reSet1 = [SELECT Id,
- Name,
- Intra_Trade_List_RMB__c,
- Asset_Model_No__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,
- Sterilization_limit__c,
- Deliver_date__c,
- Bar_Code__c,
- Arrive_date__c,
- Send_Date__c,
- Consumable_order_minor__r.Name,
- Consumable_order_minor__c,
- Dealer_Arrive__c,
- Guarantee_period_for_products__c,
- CFDA_Status__c,
- Box_Piece__c,
- Rrturn_count__c,
- ProductPacking_list_manual__c,
- Report_Product_Approbation__c,
- Report_Product_Expiration__c
- //add by rentx 2020-10-14 start
- ,ContractNo_text__c/*,ContractNo__c1*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- //add by rentx 2020-10-14 end
- FROM Consumable_order_details2__c
- WHERE recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
- AND Arrive_Owner_Work_Location__c = : userWorkLocation
- AND Consumable_order_minor__c = :ESetId
- AND Dealer_Arrive__c = true
- AND Box_Piece__c != '涓�' ];
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ //add by rentx 2020-10-14 start
+ ContractNo_text__c /*,ContractNo__c1*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ //add by rentx 2020-10-14 end
+ FROM Consumable_order_details2__c
+ WHERE
+ recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Consumable_order_minor__c = :ESetId
+ AND Dealer_Arrive__c = TRUE
+ AND Box_Piece__c != '涓�'
+ ];
for (Integer i = 0; i < reSet1.size(); i++) {
// OrderAllMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
//init鐨勬椂鍊欎笉灞曠ず宸茬粡鍏ュ簱鐨勬槑缁� by rentx 20210617 CHAN-C3K4ZQ
// ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet1[i]));
//update by rentx 20210617 end CHAN-C3K4ZQ
- if(orderProductArrivedCunMap.containsKey(reSet1[i].Asset_Model_No__c)){
- orderProductArrivedCunMap.put(reSet1[i].Asset_Model_No__c,orderProductArrivedCunMap.get(reSet1[i].Asset_Model_No__c)+1);
+ if (orderProductArrivedCunMap.containsKey(reSet1[i].Asset_Model_No__c)) {
+ orderProductArrivedCunMap.put(
+ reSet1[i].Asset_Model_No__c,
+ orderProductArrivedCunMap.get(reSet1[i].Asset_Model_No__c) + 1
+ );
}
}
//add by rentx 20210602 start CHAN-C3K4ZQ
@@ -281,53 +300,53 @@
//========20160311======ADD_Start================================
// 灏嗛〉闈㈡垨鍙栧緱BarCode鍘绘帀閲嶅鐨勶紝杞崲鎴怢ist
//========20160311======ADD_Start================================
- public List<String> ParseBarCode(String Code){
- String[] Cache = new String[]{};
+ public List<String> ParseBarCode(String Code) {
+ String[] Cache = new List<String>{};
Cache = Code.split('\n');
- Set <String> Buff = new Set<String>();
- for(String A : Cache){
+ Set<String> Buff = new Set<String>();
+ for (String A : Cache) {
Buff.add(A.toUpperCase());
}
List<String> outPut = new List<String>();
- for(String B :Buff){
+ for (String B : Buff) {
B = B.trim();
- if(B.length() > 8){
- String tracingCode = B.substring(B.length() - 5,B.length());
- barMcodeMap.put(B,tracingCode);
+ if (B.length() > 8) {
+ String tracingCode = B.substring(B.length() - 5, B.length());
+ barMcodeMap.put(B, tracingCode);
}
outPut.add(B);
- }system.debug('barMcodeMap绛変簬'+barMcodeMap);
+ }
+ system.debug('barMcodeMap绛変簬' + barMcodeMap);
return outPut;
}
-
//========20160311======ADD_End==================================
//鑾峰彇鏄庣粏
public void SearchPro() {
- notInlist = new list<String>();
+ notInlist = new List<String>();
otherAgencyMap = new Map<String, String>();
barMcodeMap = new Map<String, String>();
consumableInventory = new List<ConsumableorderdetailsInfo>();
consumableInventoryUse = new List<ConsumableorderdetailsInfo>();
consumableorderdetails2Cancle = new List<Consumable_order_details2__c>();
- orderdetails2trMap = new Map<String,Consumable_order_details2__c>();
+ orderdetails2trMap = new Map<String, Consumable_order_details2__c>();
//add by rentx 2021-01-27 start
HosErrorList = new List<String>();
- HosErrorMap = new Map<String,String>();
+ HosErrorMap = new Map<String, String>();
//add by rentx 2021-01-27 end
- noboxBarcodeList.clear();
- //鍐嶆绱㈤」鐩竻绌�
- ConsumableorderdetailsRecordserror = new List<ConsumableorderdetailsInfo>();
- ErrorIdMap = new Map<String, String>();
- ErrorIdMap.clear();
- AllMap = new Map<String, String>();
- AllMap.clear();
- ExistIdMap = new Map<String, String>();
- ExistIdMap.clear();
- consumableorderdetails2Insert = new List<Consumable_order_details2__c>();
- ConsumableorderdetailsRecordsdummy = new List<ConsumableorderdetailsInfo>();
- /*if(EsetId != null && EsetId != ''){
+ noboxBarcodeList.clear();
+ //鍐嶆绱㈤」鐩竻绌�
+ ConsumableorderdetailsRecordserror = new List<ConsumableorderdetailsInfo>();
+ ErrorIdMap = new Map<String, String>();
+ ErrorIdMap.clear();
+ AllMap = new Map<String, String>();
+ AllMap.clear();
+ ExistIdMap = new Map<String, String>();
+ ExistIdMap.clear();
+ consumableorderdetails2Insert = new List<Consumable_order_details2__c>();
+ ConsumableorderdetailsRecordsdummy = new List<ConsumableorderdetailsInfo>();
+ /*if(EsetId != null && EsetId != ''){
List<Consumable_order_details2__c> reSet1 = [SELECT Id,
Name,
Intra_Trade_List_RMB__c,
@@ -378,334 +397,467 @@
BarCodeListP = new List<String>();
BarCodeListP = ParseBarCode(barcode);
Consumable_order_details2__c p = new Consumable_order_details2__c();
- List<Consumable_order_details2__c> Ins = New List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> Ins = new List<Consumable_order_details2__c>();
List<Consumable_order_details2__c> reSet = new List<Consumable_order_details2__c>();
List<Consumable_order_details2__c> reSet1 = new List<Consumable_order_details2__c>();
- if(barcode == null || barcode.trim() ==''){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'璇疯緭鍏arCode鍙枫��'));
+ if (barcode == null || barcode.trim() == '') {
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '璇疯緭鍏arCode鍙枫��'));
return;
}
//瀵规瘮鍏ㄩ儴搴撳瓨涓槸鍚﹀瓨鍦ㄧ鐞嗙紪鐮佷竴鏍凤紝barcode鍙蜂笉涓�鏍风殑浜у搧
- reSet1 = [SELECT Id, Name,TracingCode__c,Bar_Code__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c = false
- AND Dealer_Saled__c = false
- AND Lose_Flag__c = false
- AND Dealer_Returned__c = false
- AND Cancellation_Flag__c = false
- AND TracingCode__c in :barMcodeMap.values()
- AND Bar_Code__c not in :barMcodeMap.keySet()
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- ORDER BY Name ];
- if(reSet1.size()>0){
+ reSet1 = [
+ SELECT Id, Name, TracingCode__c, Bar_Code__c, Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND TracingCode__c IN :barMcodeMap.values()
+ AND Bar_Code__c NOT IN :barMcodeMap.keySet()
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
- for(String str : barMcodeMap.keySet()){
- if(barMcodeMap.get(str) == reSet1[i].TracingCode__c){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, str + ' 鐨勭鐞嗙紪鐮佸凡缁忓瓨鍦ㄤ簬绯荤粺鐨勫簱瀛樹腑锛岃纭杈撳叆淇℃伅鏄惁鏈夎銆�'));
- ErrorIdMap.put(str,str);
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ } else {
+ for (String str : barMcodeMap.keySet()) {
+ if (barMcodeMap.get(str) == reSet1[i].TracingCode__c) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ str + ' 鐨勭鐞嗙紪鐮佸凡缁忓瓨鍦ㄤ簬绯荤粺鐨勫簱瀛樹腑锛岃纭杈撳叆淇℃伅鏄惁鏈夎銆�'
+ )
+ );
+ ErrorIdMap.put(str, str);
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
}
}
//绠$悊缂栫爜涓虹┖鐨勪骇鍝�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- TracingCode__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- //AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND (TracingCode__c = null
- OR TracingCode__c = '')
- ORDER BY Name ];
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ TracingCode__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ //AND Arrive_Owner_Work_Location__c =: userWorkLocation
+ AND (TracingCode__c = NULL
+ OR TracingCode__c = '')
+ ORDER BY Name
+ ];
- if(reSet1.size()>0){
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ヤ骇鍝佹病鏈夌鐞嗙紪鐮侊紝鏃犳硶鍏ュ簱';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '绠$悊缂栫爜涓虹┖鐨勪骇鍝� ' + ErrorIdMap));
//鏁翠綋鍒拌揣
- if(EsetId == null || EsetId == ''){
- if(ArrType!='ReG'){
- //鍒拌揣浣嗕骇鍝佺被鍨嬩笌鐢ㄦ埛鐨勭被鍨嬩笉绗�
- reSet1 = [SELECT Id,Name,Intra_Trade_List_RMB__c,Asset_Model_No__c,
- Consumable_Product__c,Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,Consumable_Product__r.Asset_Model_No__c,
- Sterilization_limit__c,Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,
- Consumable_order_minor__c,Dealer_Arrive__c,
- Guarantee_period_for_products__c,CFDA_Status__c,
- ProductPacking_list_manual__c,Report_Product_Approbation__c,
- Report_Product_Expiration__c,Box_Piece__c, Rrturn_count__c,
- Product_Type__c
- ,ContractNo_text__c/*,ContractNo__c1*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- FROM Consumable_order_details2__c
- WHERE Bar_Code__c in :BarCodeListP
- AND ( not Product_Type__c like :userPro_Typestr)
+ if (EsetId == null || EsetId == '') {
+ if (ArrType != 'ReG') {
+ //鍒拌揣浣嗕骇鍝佺被鍨嬩笌鐢ㄦ埛鐨勭被鍨嬩笉绗�
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ Product_Type__c,
+ ContractNo_text__c /*,ContractNo__c1*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ FROM Consumable_order_details2__c
+ WHERE
+ Bar_Code__c IN :BarCodeListP
+ AND (NOT Product_Type__c LIKE :userPro_Typestr)
AND Dealer_Info_text__c = :accountName
- AND ((Consumable_order_minor__c != null
- AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation)
- OR Consumable_order_minor__c = null)
- ORDER BY Name ];
+ AND ((Consumable_order_minor__c != NULL
+ AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation)
+ OR Consumable_order_minor__c = NULL)
+ ORDER BY Name
+ ];
- if(reSet1.size()>0){
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
- String str = '浜у搧绫诲瀷['+reSet1[i].Product_Type__c+']涓庣敤鎴风殑绫诲瀷['+userPro_Type+']涓嶇';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ } else {
+ String str = '浜у搧绫诲瀷[' + reSet1[i].Product_Type__c + ']涓庣敤鎴风殑绫诲瀷[' + userPro_Type + ']涓嶇';
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//閿�鍞骇鍝�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,OwnerId,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Saled__c = true
- AND Dealer_Returned__c = false
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- AND (Arrive_Owner_Work_Location__c =: userWorkLocation
- OR OwnerId = :System.Label.User_OlympusSystem)
- ORDER BY Name ];
- if(reSet1.size()>0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ OwnerId,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Saled__c = TRUE
+ AND Dealer_Returned__c = FALSE
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ AND (Arrive_Owner_Work_Location__c = :userWorkLocation
+ OR OwnerId = :System.Label.User_OlympusSystem)
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '';
if (reSet1[i].OwnerId == System.Label.User_OlympusSystem) {
str = '璇ュ晢鍝佹槸鐩撮攢浜у搧璇峰厛杩斿搧';
- }else{
+ } else {
str = '璇ュ晢鍝佸凡缁忛攢鍞�';
}
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
-
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//鍑哄簱浜у搧
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Shipment__c = true
- AND Dealer_Returned__c = false
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- ORDER BY Name ];
- if(reSet1.size()>0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Shipment__c = TRUE
+ AND Dealer_Returned__c = FALSE
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佸凡缁忓嚭搴�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//宸插埌璐т骇鍝�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Lose_Flag__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Returned__c = false
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- ORDER BY Name ];
- if(reSet1.size()>0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Lose_Flag__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Returned__c = FALSE
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佸凡缁忓埌璐�';
- if (reSet1[i].Lose_Flag__c == TRUE) {
+ if (reSet1[i].Lose_Flag__c == true) {
str = '璇ュ晢鍝佸凡缁忎涪澶�';
}
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//宸叉媶鐩掍骇鍝�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Bar_Code__c in :BarCodeListP
- AND (Dealer_Info_text__c != :accountName
- OR (Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c !=: userWorkLocation))
- AND Box_Piece__c = '涓�'
- ORDER BY Name ];
- if(reSet1.size()>0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Bar_Code__c IN :BarCodeListP
+ AND (Dealer_Info_text__c != :accountName
+ OR (Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c != :userWorkLocation))
+ AND Box_Piece__c = '涓�'
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '宸叉媶鐩掔殑浜у搧涓嶈兘鍏ュ簱';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
// 缁忛攢鍟嗕箣闂存垨鑰呭悓涓�缁忛攢鍟嗕笉鍚屽伐浣滃湴璋冭揣
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,Asset_Model_No__c, Arrive_Owner_Work_Location__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,Box_Piece__c,
- Deliver_date__c,Bar_Code__c,TracingCode__c, Dealer_Info_text__c, OwnerId, Lose_Flag__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,SerialLotNo__c, Dealer_Arrive__c,
- Consumable_Arrived_order__r.Dealer_Info__c, Consumable_Arrived_order__r.Dealer_Info__r.Name,
- Intra_Trade_List_RMB__c, Dealer_Shipment__c, Dealer_Saled__c,Consumable_Product__r.Asset_Model_No__c
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- ,SummonsForDirction_det__c,Transfer_Time__c,Frist_Transfer_Agency__c,Agency_Transfer__c
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- // 棣栨鍏ュ簱缁忛攢鍟嗕俊鎭� add by gzw 2020-04-27 start
- ,Agencyinfo_fromSAP__c,Frist_Storage_Agency__c
- // 棣栨鍏ュ簱缁忛攢鍟嗕俊鎭� add by gzw 2020-04-27 end
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Arrive_Owner_Work_Location__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Box_Piece__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ TracingCode__c,
+ Dealer_Info_text__c,
+ OwnerId,
+ Lose_Flag__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ SerialLotNo__c,
+ Dealer_Arrive__c,
+ Consumable_Arrived_order__r.Dealer_Info__c,
+ Consumable_Arrived_order__r.Dealer_Info__r.Name,
+ Intra_Trade_List_RMB__c,
+ Dealer_Shipment__c,
+ Dealer_Saled__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
+ SummonsForDirction_det__c,
+ Transfer_Time__c,
+ Frist_Transfer_Agency__c,
+ Agency_Transfer__c,
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
+ // 棣栨鍏ュ簱缁忛攢鍟嗕俊鎭� add by gzw 2020-04-27 start
+ Agencyinfo_fromSAP__c,
+ Frist_Storage_Agency__c,
+ // 棣栨鍏ュ簱缁忛攢鍟嗕俊鎭� add by gzw 2020-04-27 end
- //add by rentx 2020-10-13 start 浜掔浉璋冭揣鏃�,鍊熷叆鏂硅褰昐AP鍚堝悓鍙�
- ,ContractNo_text__c/*,ContractNo__c */
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- //add by rentx 2020-10-13 end
- //add by rentx 2021-03-22 start
- ,hospitalSpecialOffer__c
- ,exchangeOutPattern__c
- ,Report_Product_Expiration__c
- //add by rentx 2021-03-22 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = TRUE
- //AND Dealer_Shipment__c= false
- //AND Dealer_Saled__c = FALSE
- AND Dealer_Returned__c = FALSE
- AND Cancellation_Flag__c = FALSE
- AND Bar_Code__c in :BarCodeListP
- //AND (Dealer_Shipment__c = FALSE
- // OR (Dealer_Shipment__c = TRUE
- // AND Consumable_Shipment_order__r.SummonsForDirction__c != '浜掔浉璋冭揣'))
- AND (Dealer_Info_text__c != :accountName
- OR (Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c != :userWorkLocation)
- )
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- order by Bar_Code__c, Transfer_Time__c desc
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
- ];
- if(reSet1.size()>0){
+ //add by rentx 2020-10-13 start 浜掔浉璋冭揣鏃�,鍊熷叆鏂硅褰昐AP鍚堝悓鍙�
+ ContractNo_text__c /*,ContractNo__c */,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c,
+ // tcm end
+ //add by rentx 2020-10-13 end
+ //add by rentx 2021-03-22 start
+ hospitalSpecialOffer__c,
+ exchangeOutPattern__c,
+ Report_Product_Expiration__c
+ //add by rentx 2021-03-22 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ //AND Dealer_Shipment__c= false
+ //AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c IN :BarCodeListP
+ //AND (Dealer_Shipment__c = FALSE
+ // OR (Dealer_Shipment__c = TRUE
+ // AND Consumable_Shipment_order__r.SummonsForDirction__c != '浜掔浉璋冭揣'))
+ AND (Dealer_Info_text__c != :accountName
+ OR (Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c != :userWorkLocation))
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
+ ORDER BY Bar_Code__c, Transfer_Time__c DESC
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
- if(otherAgencyMap.containsKey(reSet1[i].Bar_Code__c)){
+ } else {
+ if (otherAgencyMap.containsKey(reSet1[i].Bar_Code__c)) {
continue;
- }else{
+ } else {
//鍏朵粬缁忛攢鍟嗗嚭搴撲骇鍝佸彲浠ュ叆搴�
List<String> barcodedetList = new List<String>();
barcodedetList.add(reSet1[i].Bar_Code__c);
barcodedetList.add(String.valueOf(reSet1[i].Sterilization_limit__c));
barcodedetList.add(reSet1[i].SerialLotNo__c);
barcodedetList.add(reSet1[i].TracingCode__c);
- if (reSet1[i].Lose_Flag__c == false
+ if (reSet1[i].Lose_Flag__c == false) {
//&& reSet1[i].Dealer_Info_text__c == accountName
- ) {
consumableorderdetails2Cancle.add(reSet1[i]);
}
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- if (reSet1[i].SummonsForDirction_det__c == '浜掔浉璋冭揣' && !orderdetails2trMap.containsKey(reSet1[i].Bar_Code__c)) {
+ if (
+ reSet1[i].SummonsForDirction_det__c == '浜掔浉璋冭揣' &&
+ !orderdetails2trMap.containsKey(reSet1[i].Bar_Code__c)
+ ) {
orderdetails2trMap.put(reSet1[i].Bar_Code__c, reSet1[i]);
}
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
- consumableInventory.add(new ConsumableorderdetailsInfo(reSet1[i],barcodedetList));
+ consumableInventory.add(new ConsumableorderdetailsInfo(reSet1[i], barcodedetList));
Consumable_order_details2__c codsIns = new Consumable_order_details2__c();
- codsIns.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- codsIns.Intra_Trade_List_RMB__c = reSet1[i].Intra_Trade_List_RMB__c;
+ codsIns.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ codsIns.Intra_Trade_List_RMB__c = reSet1[i].Intra_Trade_List_RMB__c;
//gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
- codsIns.Asset_Model_No__c = reSet1[i].Asset_Model_No__c;
- codsIns.Direct_Arrive_Product__c = true;
- codsIns.Sterilization_limit__c = reSet1[i].Sterilization_limit__c;
- codsIns.Consumable_Product__c = reSet1[i].Consumable_Product__c;
- codsIns.Bar_Code__c = reSet1[i].Bar_Code__c;
- codsIns.SerialLotNo__c = reSet1[i].SerialLotNo__c;
- codsIns.TracingCode__c = reSet1[i].TracingCode__c;
+ codsIns.Asset_Model_No__c = reSet1[i].Asset_Model_No__c;
+ codsIns.Direct_Arrive_Product__c = true;
+ codsIns.Sterilization_limit__c = reSet1[i].Sterilization_limit__c;
+ codsIns.Consumable_Product__c = reSet1[i].Consumable_Product__c;
+ codsIns.Bar_Code__c = reSet1[i].Bar_Code__c;
+ codsIns.SerialLotNo__c = reSet1[i].SerialLotNo__c;
+ codsIns.TracingCode__c = reSet1[i].TracingCode__c;
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- codsIns.Transfer_Time__c = reSet1[i].Transfer_Time__c == null? 1 : reSet1[i].Transfer_Time__c;
- codsIns.Frist_Transfer_Agency__c = reSet1[i].Frist_Transfer_Agency__c == null ? reSet1[i].Dealer_Info_text__c : reSet1[i].Frist_Transfer_Agency__c;
- codsIns.Agency_Transfer__c = true;
+ codsIns.Transfer_Time__c = reSet1[i].Transfer_Time__c == null ? 1 : reSet1[i].Transfer_Time__c;
+ codsIns.Frist_Transfer_Agency__c = reSet1[i].Frist_Transfer_Agency__c == null
+ ? reSet1[i].Dealer_Info_text__c
+ : reSet1[i].Frist_Transfer_Agency__c;
+ codsIns.Agency_Transfer__c = true;
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
-
+
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 start
- codsIns.Agencyinfo_fromSAP__c = reSet1[i].Agencyinfo_fromSAP__c;
- codsIns.Frist_Storage_Agency__c = reSet1[i].Frist_Storage_Agency__c;
+ codsIns.Agencyinfo_fromSAP__c = reSet1[i].Agencyinfo_fromSAP__c;
+ codsIns.Frist_Storage_Agency__c = reSet1[i].Frist_Storage_Agency__c;
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 end
//add by rentx 2020-10-13 start 浜掔浉璋冭揣鏃�,璁板綍SAP鍚堝悓鍙�
// update tcm start
if (String.isBlank(reSet1[i].Consumable_order_minor__r.ContractNo__c)) {
- codsIns.ContractNo_text__c= reSet1[i].ContractNo_text__c;
- }else {
- codsIns.ContractNo_text__c= reSet1[i].Consumable_order_minor__r.ContractNo__c;
+ codsIns.ContractNo_text__c = reSet1[i].ContractNo_text__c;
+ } else {
+ codsIns.ContractNo_text__c = reSet1[i].Consumable_order_minor__r.ContractNo__c;
}
// update tcm end
//add by rentx 2020-10-13 end
//add by rentx 2021-03-22 start
// if (reSet1[i].Lose_Flag__c == true){
- if (reSet1[i].hospitalSpecialOffer__c == true && reSet1[i].SummonsForDirction_det__c == '浜掔浉璋冭揣'){
+ if (reSet1[i].hospitalSpecialOffer__c == true && reSet1[i].SummonsForDirction_det__c == '浜掔浉璋冭揣') {
codsIns.exchangeOutPattern__c = true;
}
//add by rentx 2021-03-22 end
consumableorderdetails2Insert.add(codsIns);
- otherAgencyMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ otherAgencyMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
//String str = '璇ュ晢鍝佸湪鍏朵粬缁忛攢鍟嗗簱瀛�';
//ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
//ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
@@ -714,56 +866,81 @@
}
}
- //鍙戦敊搴� 鏈埌璐�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,Asset_Model_No__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,TracingCode__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,SerialLotNo__c,Dealer_Arrive__c,
- Dealer_Shipment__c, Dealer_Saled__c,Consumable_Product__r.Asset_Model_No__c
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- ,SummonsForDirction_det__c,Transfer_Time__c,Frist_Transfer_Agency__c,Agency_Transfer__c,
- Dealer_Info_text__c,Intra_Trade_List_RMB__c
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- // 棣栨鍏ュ簱缁忛攢鍟嗕俊鎭� add by gzw 2020-04-27 start
- ,Agencyinfo_fromSAP__c,Frist_Storage_Agency__c
- // 棣栨鍏ュ簱缁忛攢鍟嗕俊鎭� add by gzw 2020-04-27 end
- //add by rentx 2020-10-13 start 浜掔浉璋冭揣鏃�,鍊熷叆鏂硅褰昐AP鍚堝悓鍙�
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- //add by rentx 2020-10-13 end 浜掔浉璋冭揣鏃�,鍊熷叆鏂硅褰昐AP鍚堝悓鍙�
- ,hospitalSpecialOffer__c
- ,exchangeOutPattern__c
- ,Lose_Flag__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = FALSE
- AND Dealer_Shipment__c= FALSE
- AND Dealer_Saled__c = FALSE
- //AND Cancellation_Flag__c = FALSE
- AND Bar_Code__c in :BarCodeListP
- AND (Dealer_Info_text__c != :accountName
- OR (Dealer_Info_text__c = :accountName
- AND ((Consumable_order_minor__c != null
- AND (Consumable_order_minor__r.Order_Owner_WorkLocal__c != :userWorkLocation
- OR (Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation
- AND Cancellation_Flag__c = TRUE)))
- OR (Consumable_order_minor__c = null AND Cancellation_Flag__c = TRUE)))
- )
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- order by Bar_Code__c, Transfer_Time__c desc
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
- ];
- if(reSet1.size()>0){
+ //鍙戦敊搴� 鏈埌璐�
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ TracingCode__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ SerialLotNo__c,
+ Dealer_Arrive__c,
+ Dealer_Shipment__c,
+ Dealer_Saled__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
+ SummonsForDirction_det__c,
+ Transfer_Time__c,
+ Frist_Transfer_Agency__c,
+ Agency_Transfer__c,
+ Dealer_Info_text__c,
+ Intra_Trade_List_RMB__c,
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
+ // 棣栨鍏ュ簱缁忛攢鍟嗕俊鎭� add by gzw 2020-04-27 start
+ Agencyinfo_fromSAP__c,
+ Frist_Storage_Agency__c,
+ // 棣栨鍏ュ簱缁忛攢鍟嗕俊鎭� add by gzw 2020-04-27 end
+ //add by rentx 2020-10-13 start 浜掔浉璋冭揣鏃�,鍊熷叆鏂硅褰昐AP鍚堝悓鍙�
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c,
+ // tcm end
+ //add by rentx 2020-10-13 end 浜掔浉璋冭揣鏃�,鍊熷叆鏂硅褰昐AP鍚堝悓鍙�
+ hospitalSpecialOffer__c,
+ exchangeOutPattern__c,
+ Lose_Flag__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = FALSE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ //AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c IN :BarCodeListP
+ AND (Dealer_Info_text__c != :accountName
+ OR (Dealer_Info_text__c = :accountName
+ AND ((Consumable_order_minor__c != NULL
+ AND (Consumable_order_minor__r.Order_Owner_WorkLocal__c != :userWorkLocation
+ OR (Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation
+ AND Cancellation_Flag__c = TRUE)))
+ OR (Consumable_order_minor__c = NULL
+ AND Cancellation_Flag__c = TRUE))))
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
+ ORDER BY Bar_Code__c, Transfer_Time__c DESC
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
- if(otherAgencyMap.containsKey(reSet1[i].Bar_Code__c)){
+ } else {
+ if (otherAgencyMap.containsKey(reSet1[i].Bar_Code__c)) {
continue;
- }else{
+ } else {
//鍙栨秷鏄庣粏
List<String> barcodedetList = new List<String>();
barcodedetList.add(reSet1[i].Bar_Code__c);
@@ -772,189 +949,243 @@
barcodedetList.add(reSet1[i].TracingCode__c);
// 鍙戦敊搴撳瓨鏃讹紝鑷姩鍙栨秷 update by gzw 2020-04-15 start
//if (reSet1[i].Consumable_order_minor__c == null) {
- consumableorderdetails2Cancle.add(reSet1[i]);
+ consumableorderdetails2Cancle.add(reSet1[i]);
//}
// 鍙戦敊搴撳瓨鏃讹紝鑷姩鍙栨秷 update by gzw 2020-04-15 start
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- if (reSet1[i].SummonsForDirction_det__c == '浜掔浉璋冭揣' && !orderdetails2trMap.containsKey(reSet1[i].Bar_Code__c)) {
-
+ if (
+ reSet1[i].SummonsForDirction_det__c == '浜掔浉璋冭揣' &&
+ !orderdetails2trMap.containsKey(reSet1[i].Bar_Code__c)
+ ) {
orderdetails2trMap.put(reSet1[i].Bar_Code__c, reSet1[i]);
}
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
- consumableInventory.add(new ConsumableorderdetailsInfo(reSet1[i],barcodedetList));
+ consumableInventory.add(new ConsumableorderdetailsInfo(reSet1[i], barcodedetList));
Consumable_order_details2__c codsIns = new Consumable_order_details2__c();
- codsIns.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- codsIns.Intra_Trade_List_RMB__c = reSet1[i].Intra_Trade_List_RMB__c;
+ codsIns.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ codsIns.Intra_Trade_List_RMB__c = reSet1[i].Intra_Trade_List_RMB__c;
//gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
- codsIns.Asset_Model_No__c = reSet1[i].Asset_Model_No__c;
- codsIns.Direct_Arrive_Product__c = true;
- codsIns.Sterilization_limit__c = reSet1[i].Sterilization_limit__c;
- codsIns.Consumable_Product__c = reSet1[i].Consumable_Product__c;
- codsIns.Bar_Code__c = reSet1[i].Bar_Code__c;
- codsIns.SerialLotNo__c = reSet1[i].SerialLotNo__c;
- codsIns.TracingCode__c = reSet1[i].TracingCode__c;
+ codsIns.Asset_Model_No__c = reSet1[i].Asset_Model_No__c;
+ codsIns.Direct_Arrive_Product__c = true;
+ codsIns.Sterilization_limit__c = reSet1[i].Sterilization_limit__c;
+ codsIns.Consumable_Product__c = reSet1[i].Consumable_Product__c;
+ codsIns.Bar_Code__c = reSet1[i].Bar_Code__c;
+ codsIns.SerialLotNo__c = reSet1[i].SerialLotNo__c;
+ codsIns.TracingCode__c = reSet1[i].TracingCode__c;
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
// 娌℃湁鍏ュ簱鏃讹紝娌℃湁鍊熻皟淇℃伅
- codsIns.Transfer_Time__c = reSet1[i].Transfer_Time__c;
- codsIns.Frist_Transfer_Agency__c = reSet1[i].Frist_Transfer_Agency__c;
- codsIns.Agency_Transfer__c = reSet1[i].Agency_Transfer__c;
+ codsIns.Transfer_Time__c = reSet1[i].Transfer_Time__c;
+ codsIns.Frist_Transfer_Agency__c = reSet1[i].Frist_Transfer_Agency__c;
+ codsIns.Agency_Transfer__c = reSet1[i].Agency_Transfer__c;
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
-
+
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 start
- codsIns.Agencyinfo_fromSAP__c = reSet1[i].Agencyinfo_fromSAP__c;
- codsIns.Frist_Storage_Agency__c = reSet1[i].Frist_Storage_Agency__c;
+ codsIns.Agencyinfo_fromSAP__c = reSet1[i].Agencyinfo_fromSAP__c;
+ codsIns.Frist_Storage_Agency__c = reSet1[i].Frist_Storage_Agency__c;
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 end
//add by rentx 2020-10-13 start 浜掔浉璋冭揣鏃�,鍊熷叆鏂硅褰昐AP鍚堝悓鍙�
// update tcm start
if (String.isBlank(reSet1[i].Consumable_order_minor__r.ContractNo__c)) {
- codsIns.ContractNo_text__c= reSet1[i].ContractNo_text__c;
- }else {
- codsIns.ContractNo_text__c= reSet1[i].Consumable_order_minor__r.ContractNo__c;
+ codsIns.ContractNo_text__c = reSet1[i].ContractNo_text__c;
+ } else {
+ codsIns.ContractNo_text__c = reSet1[i].Consumable_order_minor__r.ContractNo__c;
}
// update tcm end
//add by rentx 2020-10-13 end 浜掔浉璋冭揣鏃�,鍊熷叆鏂硅褰昐AP鍚堝悓鍙�
//add by rentx 2021-03-22 start
// if (reSet1[i].Lose_Flag__c == true){
- if (reSet1[i].hospitalSpecialOffer__c == true && reSet1[i].SummonsForDirction_det__c == '浜掔浉璋冭揣'){
+ if (reSet1[i].hospitalSpecialOffer__c == true && reSet1[i].SummonsForDirction_det__c == '浜掔浉璋冭揣') {
codsIns.exchangeOutPattern__c = true;
}
//add by rentx 2021-03-22 end
consumableorderdetails2Insert.add(codsIns);
- otherAgencyMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ otherAgencyMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
}
- }else{
+ } else {
//杩斿搧妫�鏌�
- //鍒拌揣浣嗕骇鍝佺被鍨嬩笌鐢ㄦ埛鐨勭被鍨嬩笉绗�
- reSet1 = [SELECT Id,Name,Intra_Trade_List_RMB__c,Asset_Model_No__c,
- Consumable_Product__c,Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,Consumable_Product__r.Asset_Model_No__c,
- Sterilization_limit__c,Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,
- Consumable_order_minor__c,Dealer_Arrive__c,
- Guarantee_period_for_products__c,CFDA_Status__c,
- ProductPacking_list_manual__c,Report_Product_Approbation__c,
- Report_Product_Expiration__c,Box_Piece__c, Rrturn_count__c,
- Product_Type__c
- //add by rentx 2020-10-14 start
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- //add by rentx 2020-10-14 end
- FROM Consumable_order_details2__c
- WHERE Bar_Code__c in :BarCodeListP
- AND ( not Product_Type__c like :userPro_Typestr)
+ //鍒拌揣浣嗕骇鍝佺被鍨嬩笌鐢ㄦ埛鐨勭被鍨嬩笉绗�
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ Product_Type__c,
+ //add by rentx 2020-10-14 start
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ //add by rentx 2020-10-14 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Bar_Code__c IN :BarCodeListP
+ AND (NOT Product_Type__c LIKE :userPro_Typestr)
AND Dealer_Info_text__c = :accountName
- AND ((Consumable_order_minor__c != null
- AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation)
- OR Consumable_order_minor__c = null)
- ORDER BY Name ];
+ AND ((Consumable_order_minor__c != NULL
+ AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation)
+ OR Consumable_order_minor__c = NULL)
+ ORDER BY Name
+ ];
- if(reSet1.size()>0){
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
- String str = '浜у搧绫诲瀷['+reSet1[i].Product_Type__c+']涓庣敤鎴风殑绫诲瀷['+userPro_Type+']涓嶇';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ } else {
+ String str = '浜у搧绫诲瀷[' + reSet1[i].Product_Type__c + ']涓庣敤鎴风殑绫诲瀷[' + userPro_Type + ']涓嶇';
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c
- //add by rentx 2020-10-14 start
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- ,Report_Product_Expiration__c
- //add by rentx 2020-10-14 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = FALSE
- AND Dealer_Shipment__c= FALSE
- AND Dealer_Saled__c = FALSE
- AND Dealer_Returned__c = false
- AND Bar_Code__c in :BarCodeListP
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ //add by rentx 2020-10-14 start
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c,
+ // tcm end
+ Report_Product_Expiration__c
+ //add by rentx 2020-10-14 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = FALSE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Bar_Code__c IN :BarCodeListP
AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];//娌″埌璐�
- if(reSet1.size()>0){
+ ORDER BY Name
+ ]; //娌″埌璐�
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佸皻鏈叆搴�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,ToDueDateDays__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Lose_Flag__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c
- //add by rentx 2020-10-14 start
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- , Report_Product_Expiration__c
- //add by rentx 2020-10-14 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c= FALSE
- AND Dealer_Saled__c = FALSE
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Returned__c = false
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- //AND Lose_Flag__c = FALSE
- // AND Lose_Flag__c = FALSE
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- // Gzw 20201215淇锛屾媶鐩掍骇鍝佷笉鍒ゆ柇
- AND Box_Piece__c = '鐩�'
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
- ORDER BY Name ];//娌″嚭搴擄紝娌¢攢鍞紝灏辨槸鍦ㄥ簱
- if(reSet1.size()>0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ ToDueDateDays__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Lose_Flag__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ //add by rentx 2020-10-14 start
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c,
+ // tcm end
+ Report_Product_Expiration__c
+ //add by rentx 2020-10-14 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Returned__c = FALSE
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
+ //AND Lose_Flag__c = FALSE
+ // AND Lose_Flag__c = FALSE
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
+ // Gzw 20201215淇锛屾媶鐩掍骇鍝佷笉鍒ゆ柇
+ AND Box_Piece__c = '鐩�'
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
+ ORDER BY Name
+ ]; //娌″嚭搴擄紝娌¢攢鍞紝灏辨槸鍦ㄥ簱
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
-
+ } else {
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
// String str = '璇ュ晢鍝佸湪搴�';
// if (reSet1[i].Lose_Flag__c) {
// str = '璇ュ晢鍝佷涪澶�';
// }
String str = '';
- if(reSet1[i].Lose_Flag__c == false){
- str = '璇ュ晢鍝佸湪搴�';//娌″嚭搴� 锛屾病閿�鍞紝娌′涪澶卞氨鏄湪搴撱��
+ if (reSet1[i].Lose_Flag__c == false) {
+ str = '璇ュ晢鍝佸湪搴�'; //娌″嚭搴� 锛屾病閿�鍞紝娌′涪澶卞氨鏄湪搴撱��
}
- if(reSet1[i].Lose_Flag__c == true && reSet1[i].ToDueDateDays__c >= 0){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING, '浜у搧'+reSet1[i].Consumable_Product__r.Name+'瀛樺湪涓㈠け璁板綍'));//濡傛灉涓㈠け浜у搧灏辩粰鎻愮ず銆�
+ if (reSet1[i].Lose_Flag__c == true && reSet1[i].ToDueDateDays__c >= 0) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.WARNING,
+ '浜у搧' + reSet1[i].Consumable_Product__r.Name + '瀛樺湪涓㈠け璁板綍'
+ )
+ ); //濡傛灉涓㈠け浜у搧灏辩粰鎻愮ず銆�
}
if (reSet1[i].Lose_Flag__c == true && reSet1[i].ToDueDateDays__c < 0) {
str = '杩囨湡宸查攢瀛樹骇鍝侊紝涓嶅厑璁歌繑鍝�';
}
- if(str != ''){
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ if (str != '') {
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
// ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
// ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
@@ -964,82 +1195,82 @@
}
}
-
-
-
//鍒拌揣姝g‘淇℃伅
- reSet = [SELECT Id,
- Name,
- Intra_Trade_List_RMB__c,
- Asset_Model_No__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,
- Consumable_Product__r.Asset_Model_No__c,
- Sterilization_limit__c,
- Deliver_date__c,
- Bar_Code__c,
- Arrive_date__c,
- Send_Date__c,
- Box_Piece__c,
- Rrturn_count__c,
- Consumable_order_minor__r.Name,
- Consumable_order_minor__c,
- Dealer_Arrive__c,
- Guarantee_period_for_products__c,
- CFDA_Status__c,
- ProductPacking_list_manual__c,
- Report_Product_Approbation__c,
- Report_Product_Expiration__c,
- Consumable_Product__r.Pro2_Dealer_ENG__c,
- Consumable_Product__r.Pro2_Dealer_Object__c,
- TracingCode__c,
- Agencyinfo_fromSAP__c,
- Frist_Storage_Agency__c,
- Dealer_Info_text__c
- //add by rentx 2020-10-14 start
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- //add by rentx 2020-10-14 end
- FROM Consumable_order_details2__c
- WHERE recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
- AND Cancellation_Date__c = null
- AND Dealer_Arrive__c = false
- AND Product_Type__c like :userPro_Typestr
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- AND ((Consumable_order_minor__c != null
- AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation)
- OR Consumable_order_minor__c = null)
- ORDER BY Name ];
+ reSet = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ Consumable_Product__r.Pro2_Dealer_ENG__c,
+ Consumable_Product__r.Pro2_Dealer_Object__c,
+ TracingCode__c,
+ Agencyinfo_fromSAP__c,
+ Frist_Storage_Agency__c,
+ Dealer_Info_text__c,
+ //add by rentx 2020-10-14 start
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ //add by rentx 2020-10-14 end
+ FROM Consumable_order_details2__c
+ WHERE
+ recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ AND Cancellation_Date__c = NULL
+ AND Dealer_Arrive__c = FALSE
+ AND Product_Type__c LIKE :userPro_Typestr
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ AND ((Consumable_order_minor__c != NULL
+ AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation)
+ OR Consumable_order_minor__c = NULL)
+ ORDER BY Name
+ ];
- if(reSet.size()>0){
+ if (reSet.size() > 0) {
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'ErrorIdMap+++ '+ ErrorIdMap.keyset()));
- Map<String,String> errorMap = new Map<String,String>();
+ Map<String, String> errorMap = new Map<String, String>();
for (Integer i = 0; i < reSet.size(); i++) {
-
- if(ExistIdMap.containsKey(reSet[i].Bar_Code__c) || ErrorIdMap.containsKey(reSet[i].Bar_Code__c)){
+ if (ExistIdMap.containsKey(reSet[i].Bar_Code__c) || ErrorIdMap.containsKey(reSet[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
Matcher n = Pattern.compile('[0-9]').matcher(reSet[i].TracingCode__c);
- if(n.find()){
+ if (n.find()) {
String str = '绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒銆�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet[i],str));
- ErrorIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet[i], str));
+ ErrorIdMap.put(reSet[i].Bar_Code__c, reSet[i].Bar_Code__c);
continue;
}
- if(otherAgencyMap.containsKey(reSet[i].Bar_Code__c)){
- for (Integer j=0; j<consumableInventory.size(); j++) {
+ if (otherAgencyMap.containsKey(reSet[i].Bar_Code__c)) {
+ for (Integer j = 0; j < consumableInventory.size(); j++) {
ConsumableorderdetailsInfo codInfo = consumableInventory.get(j);
if (codInfo.barCodeNo == reSet[i].Bar_Code__c) {
consumableInventory.remove(j);
break;
}
}
- for (Integer m=0; m<consumableorderdetails2Insert.size(); m++) {
+ for (Integer m = 0; m < consumableorderdetails2Insert.size(); m++) {
Consumable_order_details2__c cod2 = consumableorderdetails2Insert.get(m);
if (cod2.Bar_Code__c == reSet[i].Bar_Code__c) {
consumableorderdetails2Insert.remove(m);
@@ -1051,84 +1282,92 @@
//prodName.add(reSet[i].Consumable_Product__r.Name);
ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet[i]));
ConsumableorderdetailsRecords.add(new ConsumableorderdetailsInfo(reSet[i]));
- ExistIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
+ ExistIdMap.put(reSet[i].Bar_Code__c, reSet[i].Bar_Code__c);
}
}
}
//barcode涓嶄竴鑷达紝绠$悊缂栫爜涓�鑷�
- reSet = [SELECT Id,
- Name,
- Intra_Trade_List_RMB__c,
- Asset_Model_No__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,
- Consumable_Product__r.Asset_Model_No__c,
- Sterilization_limit__c,
- Deliver_date__c,
- Bar_Code__c,
- Arrive_date__c,
- Send_Date__c,
- Consumable_order_minor__r.Name,
- Consumable_order_minor__c,
- Dealer_Arrive__c,
- Guarantee_period_for_products__c,
- CFDA_Status__c,
- ProductPacking_list_manual__c,
- Report_Product_Approbation__c,
- Report_Product_Expiration__c,
- Box_Piece__c,
- Rrturn_count__c,
- TracingCode__c
- ,Agencyinfo_fromSAP__c
- ,Frist_Storage_Agency__c
- //add by rentx 2020-10-14 start
- ,ContractNo_text__c/*,ContractNo__c */
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- //add by rentx 2020-10-14 end
- FROM Consumable_order_details2__c
- WHERE recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
- AND Dealer_Info_text__c = :accountName
- //update by rentx 2021-01-04 start CHAN-BWX3XW
- // AND Consumable_order_minor__c != null
- // AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation
- AND ((Consumable_order_minor__c != null AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation) OR Consumable_order_minor__c = null)
- //update by rentx 2021-01-04 end CHAN-BWX3XW
- AND Dealer_Arrive__c = false
- AND Cancellation_Date__c = null
- AND TracingCode__c in :barMcodeMap.values()
- AND Bar_Code__c not in :barMcodeMap.keySet()
- ORDER BY Name ];
+ reSet = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ TracingCode__c,
+ Agencyinfo_fromSAP__c,
+ Frist_Storage_Agency__c,
+ //add by rentx 2020-10-14 start
+ ContractNo_text__c /*,ContractNo__c */,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ //add by rentx 2020-10-14 end
+ FROM Consumable_order_details2__c
+ WHERE
+ recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ AND Dealer_Info_text__c = :accountName
+ //update by rentx 2021-01-04 start CHAN-BWX3XW
+ // AND Consumable_order_minor__c != null
+ // AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation
+ AND ((Consumable_order_minor__c != NULL
+ AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation)
+ OR Consumable_order_minor__c = NULL)
+ //update by rentx 2021-01-04 end CHAN-BWX3XW
+ AND Dealer_Arrive__c = FALSE
+ AND Cancellation_Date__c = NULL
+ AND TracingCode__c IN :barMcodeMap.values()
+ AND Bar_Code__c NOT IN :barMcodeMap.keySet()
+ ORDER BY Name
+ ];
- if(reSet.size()>0){
+ if (reSet.size() > 0) {
for (Integer i = 0; i < reSet.size(); i++) {
- if(ExistIdMap.containsKey(reSet[i].Bar_Code__c) || ErrorIdMap.containsKey(reSet[i].Bar_Code__c)){
+ if (ExistIdMap.containsKey(reSet[i].Bar_Code__c) || ErrorIdMap.containsKey(reSet[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
Matcher n = Pattern.compile('[0-9]').matcher(reSet[i].TracingCode__c);
- if(n.find()){
+ if (n.find()) {
String str = '绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒銆�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet[i],str));
- ErrorIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet[i], str));
+ ErrorIdMap.put(reSet[i].Bar_Code__c, reSet[i].Bar_Code__c);
continue;
}
- ExistIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
- for(String str : barMcodeMap.keySet()){
+ ExistIdMap.put(reSet[i].Bar_Code__c, reSet[i].Bar_Code__c);
+ for (String str : barMcodeMap.keySet()) {
// BarCode涓嶄竴鑷存椂鐨勮鍛婁俊鎭�
- if(reSet[i].Bar_Code__c != str && reSet[i].TracingCode__c == barMcodeMap.get(str)){
+ if (reSet[i].Bar_Code__c != str && reSet[i].TracingCode__c == barMcodeMap.get(str)) {
// 20220815 ljh SWAG-CH65B7 start
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'姝ょ鐞嗙紪鐮佷笌瀹為檯鍙戣揣BarCode涓嶄竴鑷达紝璇锋牳瀵圭鐞嗙紪鐮�('+ str +')鐨勫叆搴撳強搴撳瓨鏁版嵁銆�'));
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'鏉″舰鐮佷负('+ str +')鐨勫叆搴撴暟鎹笌鍙戣揣鏁版嵁涓嶄竴鑷�'));
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.WARNING, '鏉″舰鐮佷负(' + str + ')鐨勫叆搴撴暟鎹笌鍙戣揣鏁版嵁涓嶄竴鑷�')
+ );
// 20220815 ljh SWAG-CH65B7 end
}
- if(barMcodeMap.get(str) == reSet[i].TracingCode__c){
+ if (barMcodeMap.get(str) == reSet[i].TracingCode__c) {
reSet[i].Bar_Code__c = str;
//=====================================
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'鍏ュ簱BarCode('+ str +')鍜屽簱瀛樻潯鐮佷笉涓�鑷淬��'));
- ExistIdMap.put(str,str);
+ ExistIdMap.put(str, str);
}
}
ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet[i]));
@@ -1137,360 +1376,488 @@
}
}
-
// CHAN-BD43NK 鍏抽棴鐩存帴杩斿搧鍔熻兘 杩藉姞 barcode涓嶄竴鑷村垽鏂�
- reSet1 = [SELECT Id,Name,TracingCode__c,Bar_Code__c,Sale_orderName__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND (Dealer_Shipment__c = true
- OR Dealer_Saled__c = true)
- AND TracingCode__c in :barMcodeMap.values()
- AND Bar_Code__c not in :barMcodeMap.keySet()
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- ORDER BY Name ];
- if(reSet1.size()>0){
+ reSet1 = [
+ SELECT Id, Name, TracingCode__c, Bar_Code__c, Sale_orderName__c, Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND (Dealer_Shipment__c = TRUE
+ OR Dealer_Saled__c = TRUE)
+ AND TracingCode__c IN :barMcodeMap.values()
+ AND Bar_Code__c NOT IN :barMcodeMap.keySet()
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
- for(String str : barMcodeMap.keySet()){
- if(barMcodeMap.get(str) == reSet1[i].TracingCode__c){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'barcode' +str + '涓庡嚭搴撳崟' + reSet1[i].Sale_orderName__c + ' 涓殑绠$悊缂栫爜涓�鑷达紝浣咮arcode涓嶅悓锛岃纭鍏蜂綋鏁版嵁銆�'));
- ErrorIdMap.put(str,str);
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ } else {
+ for (String str : barMcodeMap.keySet()) {
+ if (barMcodeMap.get(str) == reSet1[i].TracingCode__c) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ 'barcode' +
+ str +
+ '涓庡嚭搴撳崟' +
+ reSet1[i].Sale_orderName__c +
+ ' 涓殑绠$悊缂栫爜涓�鑷达紝浣咮arcode涓嶅悓锛岃纭鍏蜂綋鏁版嵁銆�'
+ )
+ );
+ ErrorIdMap.put(str, str);
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
}
}
- integer RGcnt = GoodsReturnCheck();
+ integer RGcnt = GoodsReturnCheck();
AllMap.putAll(ErrorIdMap);
AllMap.putAll(ExistIdMap);
- if(RGcnt>0){
- for(String str:GrList){
- AllMap.put(str,str);
+ if (RGcnt > 0) {
+ for (String str : GrList) {
+ AllMap.put(str, str);
}
}
//寰楀埌涓嶅瓨鍦ㄧ殑BarCode
//return;
- for(Integer i = 0; i < BarCodeListP.size(); i++){
- if(AllMap.containsKey(BarCodeListP[i])){
+ for (Integer i = 0; i < BarCodeListP.size(); i++) {
+ if (AllMap.containsKey(BarCodeListP[i])) {
continue;
- }else if(otherAgencyMap.containsKey(BarCodeListP[i])){
+ } else if (otherAgencyMap.containsKey(BarCodeListP[i])) {
continue;
}
//add by rentx 2021-01-27 start
- else if (coc!= null && coc.orderPattern__c == 'hospitalorder') {
+ else if (coc != null && coc.orderPattern__c == 'hospitalorder') {
HosErrorList.add(BarCodeListP[i]);
continue;
}
//add by rentx 2021-01-27 end
- else{
+ else {
notInlist.add(BarCodeListP[i]);
- otherAgencyMap.put(BarCodeListP[i],BarCodeListP[i]);
+ otherAgencyMap.put(BarCodeListP[i], BarCodeListP[i]);
}
}
// CHAN-BD43NK 鍏抽棴鐩存帴杩斿搧鍔熻兘
- if(notInlist.size()>0){
- if(ArrType!='ReG'){
+ if (notInlist.size() > 0) {
+ if (ArrType != 'ReG') {
inventoryEntryNoESetId(notInlist);
- if(notInStorelist.size() > 0){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode鍙�'+ notInStorelist + '涓嶅瓨鍦ㄣ��'));
+ if (notInStorelist.size() > 0) {
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'BarCode鍙�' + notInStorelist + '涓嶅瓨鍦ㄣ��'));
return;
}
- }else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode鍙�'+ notInlist + '涓嶅瓨鍦紝鏃犲搴旂殑鍑哄簱鍗曪紝璇峰厛鎿嶄綔浜у搧鍏ュ簱銆�'));
+ } else {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ 'BarCode鍙�' + notInlist + '涓嶅瓨鍦紝鏃犲搴旂殑鍑哄簱鍗曪紝璇峰厛鎿嶄綔浜у搧鍏ュ簱銆�'
+ )
+ );
return;
}
}
- //add by rentx 2021-01-27 start
- if (HosErrorList.size() > 0) {
- for (String str : HosErrorList) {
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode鍙�:' + str + HosErrorMap.get(str)+''));
-
+ //add by rentx 2021-01-27 start
+ if (HosErrorList.size() > 0) {
+ for (String str : HosErrorList) {
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'BarCode鍙�:' + str + HosErrorMap.get(str) + ''));
+ }
}
- }
- //add by rentx 2021-01-27 end
-
- }else{
- //宸插彇娑堜骇鍝�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = FALSE
- AND Dealer_Shipment__c= FALSE
- AND Dealer_Saled__c = FALSE
- AND Dealer_Returned__c = false
- AND Cancellation_Date__c != null
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];//娌″埌璐�
- if(reSet1.size()>0){
- for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
- // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
- continue;
- }else{
- String str = '璇ュ晢鍝佸彇娑�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
- }
- }
- }
- //宸茬粡閿�鍞�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Saled__c = true
- AND Dealer_Returned__c =false
- AND Dealer_Info_text__c = :accountName
- AND Bar_Code__c in :BarCodeListP
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- ORDER BY Name ];
- if(reSet1.size()>0){
- for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
- // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
- continue;
- }else{
- String str = '璇ュ晢鍝佸凡缁忛攢鍞�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
- }
- }
- }
- //宸茬粡鍑哄簱浜у搧
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Shipment__c = true
- AND Dealer_Returned__c =false
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Bar_Code__c in :BarCodeListP
- ORDER BY Name ];
- if(reSet1.size()>0){
- for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
- // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
- continue;
- }else{
- String str = '璇ュ晢鍝佸凡缁忓嚭搴�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
- }
- }
- }
- //宸茬粡鍒拌揣浜у搧
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Lose_Flag__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Returned__c =false
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- ORDER BY Name ];
- if(reSet1.size()>0){
- for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
- // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
- continue;
- }else{
- String str = '璇ュ晢鍝佸凡缁忓埌璐�';
- if (reSet1[i].Lose_Flag__c == TRUE) {
- str = '璇ュ晢鍝佸凡缁忎涪澶�';
- }
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
- }
- }
- }
- //涓嶅睘浜庢湰璁㈠崟
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Box_Piece__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
- FROM Consumable_order_details2__c
- WHERE Consumable_order_minor__c != :ESetId
- AND Bar_Code__c in :BarCodeListP
- //AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];
- if(reSet1.size()>0){
- for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
- // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
- continue;
- }else{
- String str = '璇ユ秷鑰楀搧涓嶅睘浜庢湰璁㈠崟';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
- }
- }
- }
- //鍒拌揣浣嗕骇鍝佺被鍨嬩笌鐢ㄦ埛鐨勭被鍨嬩笉绗�
- reSet1 = [SELECT Id,Name,Intra_Trade_List_RMB__c,Asset_Model_No__c,
- Consumable_Product__c,Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,Consumable_Product__r.Asset_Model_No__c,
- Sterilization_limit__c,Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,
- Consumable_order_minor__c,Dealer_Arrive__c,
- Guarantee_period_for_products__c,CFDA_Status__c,
- ProductPacking_list_manual__c,Report_Product_Approbation__c,
- Report_Product_Expiration__c,Box_Piece__c, Rrturn_count__c,
- Product_Type__c
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- FROM Consumable_order_details2__c
- WHERE recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
- AND Dealer_Info_text__c = :accountName
- AND ( not Product_Type__c like :userPro_Typestr)
- AND Consumable_order_minor__c = :ESetId
- AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation
- AND Dealer_Arrive__c = false
- AND Cancellation_Date__c = null
- AND Bar_Code__c in :BarCodeListP
- ORDER BY Name ];
- if(reSet1.size()>0){
- for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
- // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
- continue;
- }else{
- String str = '浜у搧绫诲瀷['+reSet1[i].Product_Type__c+']涓庣敤鎴风殑绫诲瀷['+userPro_Type+']涓嶇';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
- }
- }
- }
-
- //鍒拌揣姝g‘淇℃伅
- reSet = [SELECT Id,Name,Intra_Trade_List_RMB__c,Asset_Model_No__c,
- Consumable_Product__c,Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,Consumable_Product__r.Asset_Model_No__c,
- Sterilization_limit__c,Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,
- Consumable_order_minor__c,Dealer_Arrive__c,
- Guarantee_period_for_products__c,CFDA_Status__c,
- ProductPacking_list_manual__c,Report_Product_Approbation__c,
- Report_Product_Expiration__c,Box_Piece__c, Rrturn_count__c,
- TracingCode__c,
- Agencyinfo_fromSAP__c,
- Frist_Storage_Agency__c,
- Dealer_Info_text__c
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- FROM Consumable_order_details2__c
- WHERE recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
- AND Dealer_Info_text__c = :accountName
- AND Product_Type__c like :userPro_Typestr
- AND Consumable_order_minor__c = :ESetId
- AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation
- AND Dealer_Arrive__c = false
- AND Cancellation_Date__c = null
- AND Bar_Code__c in :BarCodeListP
- ORDER BY Name ];
- if(reSet.size()>0){
- Map<String,String> errorMap = new Map<String,String>();
- for (Integer i = 0; i < reSet.size(); i++) {
- if(ExistIdMap.containsKey(reSet[i].Bar_Code__c) || ErrorIdMap.containsKey(reSet[i].Bar_Code__c)){
+ //add by rentx 2021-01-27 end
+ } else {
+ //宸插彇娑堜骇鍝�
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = FALSE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Cancellation_Date__c != NULL
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ]; //娌″埌璐�
+ if (reSet1.size() > 0) {
+ for (Integer i = 0; i < reSet1.size(); i++) {
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
+ String str = '璇ュ晢鍝佸彇娑�';
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
+ }
+ }
+ }
+ //宸茬粡閿�鍞�
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Saled__c = TRUE
+ AND Dealer_Returned__c = FALSE
+ AND Dealer_Info_text__c = :accountName
+ AND Bar_Code__c IN :BarCodeListP
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
+ for (Integer i = 0; i < reSet1.size(); i++) {
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
+ // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
+ continue;
+ } else {
+ String str = '璇ュ晢鍝佸凡缁忛攢鍞�';
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
+ }
+ }
+ }
+ //宸茬粡鍑哄簱浜у搧
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Shipment__c = TRUE
+ AND Dealer_Returned__c = FALSE
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Bar_Code__c IN :BarCodeListP
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
+ for (Integer i = 0; i < reSet1.size(); i++) {
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
+ // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
+ continue;
+ } else {
+ String str = '璇ュ晢鍝佸凡缁忓嚭搴�';
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
+ }
+ }
+ }
+ //宸茬粡鍒拌揣浜у搧
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Lose_Flag__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Returned__c = FALSE
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
+ for (Integer i = 0; i < reSet1.size(); i++) {
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
+ // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
+ continue;
+ } else {
+ String str = '璇ュ晢鍝佸凡缁忓埌璐�';
+ if (reSet1[i].Lose_Flag__c == true) {
+ str = '璇ュ晢鍝佸凡缁忎涪澶�';
+ }
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
+ }
+ }
+ }
+ //涓嶅睘浜庢湰璁㈠崟
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Box_Piece__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Report_Product_Expiration__c
+ FROM Consumable_order_details2__c
+ WHERE Consumable_order_minor__c != :ESetId AND Bar_Code__c IN :BarCodeListP
+ //AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
+ for (Integer i = 0; i < reSet1.size(); i++) {
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
+ // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
+ continue;
+ } else {
+ String str = '璇ユ秷鑰楀搧涓嶅睘浜庢湰璁㈠崟';
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
+ }
+ }
+ }
+ //鍒拌揣浣嗕骇鍝佺被鍨嬩笌鐢ㄦ埛鐨勭被鍨嬩笉绗�
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ Product_Type__c,
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ FROM Consumable_order_details2__c
+ WHERE
+ recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ AND Dealer_Info_text__c = :accountName
+ AND (NOT Product_Type__c LIKE :userPro_Typestr)
+ AND Consumable_order_minor__c = :ESetId
+ AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation
+ AND Dealer_Arrive__c = FALSE
+ AND Cancellation_Date__c = NULL
+ AND Bar_Code__c IN :BarCodeListP
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
+ for (Integer i = 0; i < reSet1.size(); i++) {
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
+ // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
+ continue;
+ } else {
+ String str = '浜у搧绫诲瀷[' + reSet1[i].Product_Type__c + ']涓庣敤鎴风殑绫诲瀷[' + userPro_Type + ']涓嶇';
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
+ }
+ }
+ }
+
+ //鍒拌揣姝g‘淇℃伅
+ reSet = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ TracingCode__c,
+ Agencyinfo_fromSAP__c,
+ Frist_Storage_Agency__c,
+ Dealer_Info_text__c,
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ FROM Consumable_order_details2__c
+ WHERE
+ recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ AND Dealer_Info_text__c = :accountName
+ AND Product_Type__c LIKE :userPro_Typestr
+ AND Consumable_order_minor__c = :ESetId
+ AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation
+ AND Dealer_Arrive__c = FALSE
+ AND Cancellation_Date__c = NULL
+ AND Bar_Code__c IN :BarCodeListP
+ ORDER BY Name
+ ];
+ if (reSet.size() > 0) {
+ Map<String, String> errorMap = new Map<String, String>();
+ for (Integer i = 0; i < reSet.size(); i++) {
+ if (ExistIdMap.containsKey(reSet[i].Bar_Code__c) || ErrorIdMap.containsKey(reSet[i].Bar_Code__c)) {
+ // 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
+ continue;
+ } else {
Matcher n = Pattern.compile('[0-9]').matcher(reSet[i].TracingCode__c);
- if(n.find()){
+ if (n.find()) {
String str = '绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒銆�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet[i],str));
- ErrorIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet[i], str));
+ ErrorIdMap.put(reSet[i].Bar_Code__c, reSet[i].Bar_Code__c);
continue;
}
ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet[i]));
ConsumableorderdetailsRecords.add(new ConsumableorderdetailsInfo(reSet[i]));
- ExistIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
+ ExistIdMap.put(reSet[i].Bar_Code__c, reSet[i].Bar_Code__c);
}
}
}
//barcode涓嶄竴鑷达紝绠$悊缂栫爜涓�鑷�
- reSet = [SELECT Id,
- Name,
- Intra_Trade_List_RMB__c,
- Asset_Model_No__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,
- Consumable_Product__r.Asset_Model_No__c,
- Sterilization_limit__c,
- Deliver_date__c,
- Bar_Code__c,
- Arrive_date__c,
- Send_Date__c,
- Box_Piece__c,
- Rrturn_count__c,
- Consumable_order_minor__r.Name,
- Consumable_order_minor__c,
- Dealer_Arrive__c,
- Guarantee_period_for_products__c,
- CFDA_Status__c,
- ProductPacking_list_manual__c,
- Report_Product_Approbation__c,
- Report_Product_Expiration__c,
- TracingCode__c
- ,Agencyinfo_fromSAP__c
- ,Frist_Storage_Agency__c
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- FROM Consumable_order_details2__c
- WHERE recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
- AND Cancellation_Date__c = null
- AND Dealer_Arrive__c = false
- AND TracingCode__c in :barMcodeMap.values()
- AND Bar_Code__c not in :barMcodeMap.keySet()
- AND Dealer_Info_text__c = :accountName
- AND ((Consumable_order_minor__c != null
- AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation)
- OR Consumable_order_minor__c = null)
- ORDER BY Name ];
- if(reSet.size()>0){
+ reSet = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ TracingCode__c,
+ Agencyinfo_fromSAP__c,
+ Frist_Storage_Agency__c,
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ FROM Consumable_order_details2__c
+ WHERE
+ recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ AND Cancellation_Date__c = NULL
+ AND Dealer_Arrive__c = FALSE
+ AND TracingCode__c IN :barMcodeMap.values()
+ AND Bar_Code__c NOT IN :barMcodeMap.keySet()
+ AND Dealer_Info_text__c = :accountName
+ AND ((Consumable_order_minor__c != NULL
+ AND Consumable_order_minor__r.Order_Owner_WorkLocal__c = :userWorkLocation)
+ OR Consumable_order_minor__c = NULL)
+ ORDER BY Name
+ ];
+ if (reSet.size() > 0) {
for (Integer i = 0; i < reSet.size(); i++) {
- if(ExistIdMap.containsKey(reSet[i].Bar_Code__c) || ErrorIdMap.containsKey(reSet[i].Bar_Code__c)){
+ if (ExistIdMap.containsKey(reSet[i].Bar_Code__c) || ErrorIdMap.containsKey(reSet[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
Matcher n = Pattern.compile('[0-9]').matcher(reSet[i].TracingCode__c);
- if(n.find()){
+ if (n.find()) {
String str = '绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒銆�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet[i],str));
- ErrorIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet[i], str));
+ ErrorIdMap.put(reSet[i].Bar_Code__c, reSet[i].Bar_Code__c);
continue;
}
- ExistIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
- for(String str : barMcodeMap.keySet()){
- if(barMcodeMap.get(str) == reSet[i].TracingCode__c){
+ ExistIdMap.put(reSet[i].Bar_Code__c, reSet[i].Bar_Code__c);
+ for (String str : barMcodeMap.keySet()) {
+ if (barMcodeMap.get(str) == reSet[i].TracingCode__c) {
reSet[i].Bar_Code__c = str;
- ExistIdMap.put(str,str);
+ ExistIdMap.put(str, str);
}
}
ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet[i]));
@@ -1501,28 +1868,27 @@
AllMap.putAll(ErrorIdMap);
AllMap.putAll(ExistIdMap);
//寰楀埌涓嶅瓨鍦ㄧ殑BarCode
- for(Integer i = 0; i < BarCodeListP.size(); i++){
- if(AllMap.containsKey(BarCodeListP[i])){
+ for (Integer i = 0; i < BarCodeListP.size(); i++) {
+ if (AllMap.containsKey(BarCodeListP[i])) {
continue;
- }else if(otherAgencyMap.containsKey(BarCodeListP[i])){
+ } else if (otherAgencyMap.containsKey(BarCodeListP[i])) {
continue;
}
//add by rentx 2021-01-27 start
- else if (coc!= null && coc.orderPattern__c == 'hospitalorder') {
+ else if (coc != null && coc.orderPattern__c == 'hospitalorder') {
HosErrorList.add(BarCodeListP[i]);
continue;
-
}
//add by rentx 2021-01-27 end
- else{
+ else {
notInlist.add(BarCodeListP[i]);
- otherAgencyMap.put(BarCodeListP[i],BarCodeListP[i]);
+ otherAgencyMap.put(BarCodeListP[i], BarCodeListP[i]);
}
}
- if(notInlist.size()>0){
+ if (notInlist.size() > 0) {
inventoryEntry(notInlist);
- if(notInStorelist.size() > 0){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode鍙�'+ notInStorelist + '涓嶅瓨鍦ㄣ��'));
+ if (notInStorelist.size() > 0) {
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'BarCode鍙�' + notInStorelist + '涓嶅瓨鍦ㄣ��'));
return;
}
}
@@ -1531,135 +1897,188 @@
//add by rentx 2021-01-27 start 褰撹鍗曚负鍖婚櫌鐗逛环绫诲瀷鐨勮鍗曟椂,濡傛灉鎵句笉鍒癰arcode,涓嶈В鏋�,骞朵笖榛樿璇arcode瀵瑰簲鐨勬槑缁�2涓洪潪鍖婚櫌鐗逛环浜у搧,鐩存帴鎶ラ敊
if (HosErrorList.size() > 0) {
for (String str : HosErrorList) {
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode鍙�:' + str +'鏄潪鍖婚櫌鐗逛环浜у搧'));
-
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'BarCode鍙�:' + str + '鏄潪鍖婚櫌鐗逛环浜у搧'));
}
}
//add by rentx 2021-01-27 end
- makeArrivedSummary();
-
+ makeArrivedSummary();
//add by rentx 20210602 start CHAN-C3K4ZQ
makeRecordsView(ConsumableorderdetailsRecordsdummy);
//add by rentx 20210602 end CHAN-C3K4ZQ
}
-
- public void inventoryEntryNoESetId (List<String> barCodeList){
+ public void inventoryEntryNoESetId(List<String> barCodeList) {
//鎵�鏈塨arcode瑙f瀽鍒扮殑Jancode
List<String> alljanCodeList = new List<String>();
List<String> allotCodeList = new List<String>();
List<String> barCode01List = new List<String>();
List<String> barCode241List = new List<String>();
- Map<String,Map<String,String>> barJancodeMap = new Map<String,Map<String,String>>();
- Map<String,Map<String,String>> barOtcodeMap = new Map<String,Map<String,String>>();
- Map<String,List<String>> barcodeinfoMap = new Map<String,List<String>>();
- Map<String,String> barcoderightMap = new Map<String,String>();
+ Map<String, Map<String, String>> barJancodeMap = new Map<String, Map<String, String>>();
+ Map<String, Map<String, String>> barOtcodeMap = new Map<String, Map<String, String>>();
+ Map<String, List<String>> barcodeinfoMap = new Map<String, List<String>>();
+ Map<String, String> barcoderightMap = new Map<String, String>();
notInStorelist.clear();
- for(Integer i = 0; i < barCodeList.size(); i++){
- Date expirationDate = null ;
+ for (Integer i = 0; i < barCodeList.size(); i++) {
+ Date expirationDate = null;
String serialNoorLotNo = '';
String tracingCode = '';
String productDateStr = '';
- Date productionDate = null ;
+ Date productionDate = null;
String expirationDateStr = '';
- if(barCodeList[i].length() >= 3){
- if(barCodeList[i].substring(0,2) =='01'){
+ if (barCodeList[i].length() >= 3) {
+ if (barCodeList[i].substring(0, 2) == '01') {
String janCodeMark = '';
//鐢熶骇鏃ユ湡
List<String> janCode = new List<String>();
- if(barCodeList[i].length() < 16){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨勪綅鏁颁笉瓒�16锛屼笉绗﹀悎瑕佹眰閿欒锛�'));
+ if (barCodeList[i].length() < 16) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')鐨勪綅鏁颁笉瓒�16锛屼笉绗﹀悎瑕佹眰閿欒锛�'
+ )
+ );
continue;
- }else {
+ } else {
//if(barCodeList[i].substring(0,2) !='01'){
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')娌℃湁janCode锛屼笉绗﹀悎瑕佹眰锛�'));
// return;
//}
- janCodeMark = barCodeList[i].substring(2,16);
- try{
- Decimal test = Decimal.valueOf(janCodeMark);
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨刯anCode閿欒锛�'));
+ janCodeMark = barCodeList[i].substring(2, 16);
+ try {
+ Decimal test = Decimal.valueOf(janCodeMark);
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')鐨刯anCode閿欒锛�')
+ );
continue;
}
}
- if(barCodeList[i].length() >= 22){
- if(barCodeList[i].substring(barCodeList[i].length() - 8,barCodeList[i].length()-5)!='250'){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')娌℃湁绠$悊缂栫爜锛�'));
+ if (barCodeList[i].length() >= 22) {
+ if (barCodeList[i].substring(barCodeList[i].length() - 8, barCodeList[i].length() - 5) != '250') {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')娌℃湁绠$悊缂栫爜锛�')
+ );
continue;
}
- if( barCodeList[i].substring(16,18) =='11'){
- try{
- productDateStr = '20' + barCodeList[i].substring(18,20) + '-' + barCodeList[i].substring(20,22) + '-01' ;
+ if (barCodeList[i].substring(16, 18) == '11') {
+ try {
+ productDateStr = '20' + barCodeList[i].substring(18, 20) + '-' + barCodeList[i].substring(20, 22) + '-01';
productionDate = Date.valueOf(productDateStr);
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')鐨勭敓浜ф棩鏈�' + productDateStr + '閿欒锛�'));
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')鐨勭敓浜ф棩鏈�' + productDateStr + '閿欒锛�'
+ )
+ );
continue;
}
- if(barCodeList[i].length() >=32){
- if( barCodeList[i].substring(24,26) =='17'){
- try{
- if(barCodeList[i].substring(30,32)=='00'){
- expirationDateStr = '20' + barCodeList[i].substring(26,28) + '-' + barCodeList[i].substring(28,30) + '-' + '01' ;
+ if (barCodeList[i].length() >= 32) {
+ if (barCodeList[i].substring(24, 26) == '17') {
+ try {
+ if (barCodeList[i].substring(30, 32) == '00') {
+ expirationDateStr =
+ '20' +
+ barCodeList[i].substring(26, 28) +
+ '-' +
+ barCodeList[i].substring(28, 30) +
+ '-' +
+ '01';
expirationDate = Date.valueOf(expirationDateStr);
expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
- }else{
- expirationDateStr = '20' + barCodeList[i].substring(26,28) + '-' + barCodeList[i].substring(28,30) + '-' +barCodeList[i].substring(30,32) ;
- expirationDate = Date.valueOf(expirationDateStr);
+ } else {
+ expirationDateStr =
+ '20' +
+ barCodeList[i].substring(26, 28) +
+ '-' +
+ barCodeList[i].substring(28, 30) +
+ '-' +
+ barCodeList[i].substring(30, 32);
+ expirationDate = Date.valueOf(expirationDateStr);
}
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'));
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'
+ )
+ );
continue;
}
- if(barCodeList[i].length() >= 42){
- if(barCodeList[i].substring(32,34) =='10' || barCodeList[i].substring(32,34) =='21'){
- serialNoorLotNo = barCodeList[i].substring(34,barCodeList[i].length() - 8) ;
+ if (barCodeList[i].length() >= 42) {
+ if (barCodeList[i].substring(32, 34) == '10' || barCodeList[i].substring(32, 34) == '21') {
+ serialNoorLotNo = barCodeList[i].substring(34, barCodeList[i].length() - 8);
}
}
- }else if(barCodeList[i].substring(24,26) =='10' || barCodeList[i].substring(24,26) =='21'){
- serialNoorLotNo = barCodeList[i].substring(26,barCodeList[i].length() - 8) ;
+ } else if (barCodeList[i].substring(24, 26) == '10' || barCodeList[i].substring(24, 26) == '21') {
+ serialNoorLotNo = barCodeList[i].substring(26, barCodeList[i].length() - 8);
}
}
- }else if(barCodeList[i].substring(16,18) =='17'){
- try{
- if(barCodeList[i].substring(22,24)=='00'){
- expirationDateStr = '20' + barCodeList[i].substring(18,20) + '-' + barCodeList[i].substring(20,22) + '-01';
+ } else if (barCodeList[i].substring(16, 18) == '17') {
+ try {
+ if (barCodeList[i].substring(22, 24) == '00') {
+ expirationDateStr =
+ '20' +
+ barCodeList[i].substring(18, 20) +
+ '-' +
+ barCodeList[i].substring(20, 22) +
+ '-01';
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧expirationDateStr' + expirationDateStr));
expirationDate = Date.valueOf(expirationDateStr);
expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
- }else{
- expirationDateStr = '20' + barCodeList[i].substring(18,20) + '-' + barCodeList[i].substring(20,22) + '-' +barCodeList[i].substring(22,24);
+ } else {
+ expirationDateStr =
+ '20' +
+ barCodeList[i].substring(18, 20) +
+ '-' +
+ barCodeList[i].substring(20, 22) +
+ '-' +
+ barCodeList[i].substring(22, 24);
expirationDate = Date.valueOf(expirationDateStr);
}
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'));
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'
+ )
+ );
continue;
}
- if(barCodeList[i].length() >= 34){
- if(barCodeList[i].substring(24,26) =='10' || barCodeList[i].substring(24,26) =='21'){
- serialNoorLotNo = barCodeList[i].substring(26,barCodeList[i].length() - 8) ;
+ if (barCodeList[i].length() >= 34) {
+ if (barCodeList[i].substring(24, 26) == '10' || barCodeList[i].substring(24, 26) == '21') {
+ serialNoorLotNo = barCodeList[i].substring(26, barCodeList[i].length() - 8);
}
}
-
- }else if(barCodeList[i].length() >= 26){
- if(barCodeList[i].substring(16,18) =='10' || barCodeList[i].substring(16,18) =='21'){
- serialNoorLotNo = barCodeList[i].substring(18,barCodeList[i].length() - 8) ;
+ } else if (barCodeList[i].length() >= 26) {
+ if (barCodeList[i].substring(16, 18) == '10' || barCodeList[i].substring(16, 18) == '21') {
+ serialNoorLotNo = barCodeList[i].substring(18, barCodeList[i].length() - 8);
}
}
}
- if(barCodeList[i].length() >= 24 && barCodeList[i].substring(barCodeList[i].length() - 8,barCodeList[i].length()-5)=='250'){
- if(barCodeList[i].substring(barCodeList[i].length() - 8,barCodeList[i].length()-5)=='250'){
- tracingCode = barCodeList[i].substring(barCodeList[i].length() - 5,barCodeList[i].length());
+ if (
+ barCodeList[i].length() >= 24 &&
+ barCodeList[i].substring(barCodeList[i].length() - 8, barCodeList[i].length() - 5) == '250'
+ ) {
+ if (barCodeList[i].substring(barCodeList[i].length() - 8, barCodeList[i].length() - 5) == '250') {
+ tracingCode = barCodeList[i].substring(barCodeList[i].length() - 5, barCodeList[i].length());
Matcher n = Pattern.compile('[0-9]').matcher(tracingCode);
- if(n.find()){
+ if (n.find()) {
String str = '绠$悊缂栫爜涓嶆纭紝璇蜂笌绠$悊鍛樼‘璁ゆ槸鍚﹂敊璇��';
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒锛�'));
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒锛�'
+ )
+ );
continue;
}
- }else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨則racingCode閿欒锛�'));
+ } else {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')鐨則racingCode閿欒锛�')
+ );
continue;
}
}
@@ -1668,404 +2087,590 @@
barcodedetList.add(String.valueOf(expirationDate));
barcodedetList.add(serialNoorLotNo);
barcodedetList.add(tracingCode);
- Integer jan1 = Integer.valueOf(janCodeMark.substring(0, 1));
- Integer jan2 = Integer.valueOf(janCodeMark.substring(1, 2));
- Integer jan3 = Integer.valueOf(janCodeMark.substring(2, 3));
- Integer jan4 = Integer.valueOf(janCodeMark.substring(3, 4));
- Integer jan5 = Integer.valueOf(janCodeMark.substring(4, 5));
- Integer jan6 = Integer.valueOf(janCodeMark.substring(5, 6));
- Integer jan7 = Integer.valueOf(janCodeMark.substring(6, 7));
- Integer jan8 = Integer.valueOf(janCodeMark.substring(7, 8));
- Integer jan9 = Integer.valueOf(janCodeMark.substring(8, 9));
+ Integer jan1 = Integer.valueOf(janCodeMark.substring(0, 1));
+ Integer jan2 = Integer.valueOf(janCodeMark.substring(1, 2));
+ Integer jan3 = Integer.valueOf(janCodeMark.substring(2, 3));
+ Integer jan4 = Integer.valueOf(janCodeMark.substring(3, 4));
+ Integer jan5 = Integer.valueOf(janCodeMark.substring(4, 5));
+ Integer jan6 = Integer.valueOf(janCodeMark.substring(5, 6));
+ Integer jan7 = Integer.valueOf(janCodeMark.substring(6, 7));
+ Integer jan8 = Integer.valueOf(janCodeMark.substring(7, 8));
+ Integer jan9 = Integer.valueOf(janCodeMark.substring(8, 9));
Integer jan10 = Integer.valueOf(janCodeMark.substring(9, 10));
Integer jan11 = Integer.valueOf(janCodeMark.substring(10, 11));
Integer jan12 = Integer.valueOf(janCodeMark.substring(11, 12));
Integer jan13 = Integer.valueOf(janCodeMark.substring(12, 13));
- Integer count12 = jan2 + jan3*3 + jan4 + jan5*3 + jan6 + jan7*3 + jan8 + jan9*3 + jan10 + jan11*3 +jan12 + jan13*3;
- Integer count13 = jan1*3 + jan2 + jan3*3 + jan4 + jan5*3 + jan6 + jan7*3 + jan8 + jan9*3 + jan10 + jan11*3 +jan12 + jan13*3;
- String frost12 = (String.valueOf(count12)).substring((String.valueOf(count12)).length()-1);
- String frost13 = (String.valueOf(count13)).substring((String.valueOf(count13)).length()-1);
+ Integer count12 =
+ jan2 +
+ jan3 * 3 +
+ jan4 +
+ jan5 * 3 +
+ jan6 +
+ jan7 * 3 +
+ jan8 +
+ jan9 * 3 +
+ jan10 +
+ jan11 * 3 +
+ jan12 +
+ jan13 * 3;
+ Integer count13 =
+ jan1 * 3 +
+ jan2 +
+ jan3 * 3 +
+ jan4 +
+ jan5 * 3 +
+ jan6 +
+ jan7 * 3 +
+ jan8 +
+ jan9 * 3 +
+ jan10 +
+ jan11 * 3 +
+ jan12 +
+ jan13 * 3;
+ String frost12 = (String.valueOf(count12)).substring((String.valueOf(count12)).length() - 1);
+ String frost13 = (String.valueOf(count13)).substring((String.valueOf(count13)).length() - 1);
//鍑忓幓12浣嶄釜浣�
- frost12 = (String.valueOf(10 - Integer.valueOf(frost12))).substring((String.valueOf(10 - Integer.valueOf(frost12))).length()-1);
- frost13 = (String.valueOf(10 - Integer.valueOf(frost13))).substring((String.valueOf(10 - Integer.valueOf(frost13))).length()-1);
+ frost12 = (String.valueOf(10 - Integer.valueOf(frost12)))
+ .substring((String.valueOf(10 - Integer.valueOf(frost12))).length() - 1);
+ frost13 = (String.valueOf(10 - Integer.valueOf(frost13)))
+ .substring((String.valueOf(10 - Integer.valueOf(frost13))).length() - 1);
janCode.add(janCodeMark.substring(1, 13) + frost12);
janCode.add(janCodeMark.substring(0, 13) + frost12);
janCode.add(janCodeMark.substring(1, 13) + frost13);
janCode.add(janCodeMark.substring(0, 13) + frost13);
alljanCodeList.addAll(janCode);
- Map<String,String> janCodeMap = new Map<String,String>();
- janCodeMap.put(janCodeMark.substring(1, 13) + frost12,barCodeList[i]);
- janCodeMap.put(janCodeMark.substring(0, 13) + frost12,barCodeList[i]);
- janCodeMap.put(janCodeMark.substring(1, 13) + frost13,barCodeList[i]);
- janCodeMap.put(janCodeMark.substring(0, 13) + frost13,barCodeList[i]);
+ Map<String, String> janCodeMap = new Map<String, String>();
+ janCodeMap.put(janCodeMark.substring(1, 13) + frost12, barCodeList[i]);
+ janCodeMap.put(janCodeMark.substring(0, 13) + frost12, barCodeList[i]);
+ janCodeMap.put(janCodeMark.substring(1, 13) + frost13, barCodeList[i]);
+ janCodeMap.put(janCodeMark.substring(0, 13) + frost13, barCodeList[i]);
barJancodeMap.put(barCodeList[i], janCodeMap);
barcodeinfoMap.put(barCodeList[i], barcodedetList);
barCode01List.add(barCodeList[i]);
- }else if(barCodeList[i].substring(0,3) =='241'){
- if(barCodeList[i].length() > 8 && barCodeList[i].substring(barCodeList[i].length() - 8,barCodeList[i].length()-5)!='250'){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')娌℃湁绠$悊缂栫爜锛�'));
+ } else if (barCodeList[i].substring(0, 3) == '241') {
+ if (
+ barCodeList[i].length() > 8 &&
+ barCodeList[i].substring(barCodeList[i].length() - 8, barCodeList[i].length() - 5) != '250'
+ ) {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')娌℃湁绠$悊缂栫爜锛�')
+ );
continue;
}
List<String> otCodeList = new List<String>();
- Map<String,String> otCodeMap = new Map<String,String>();
- if(barCodeList[i].length() < 7){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨勪綅鏁颁笉瓒�16锛屼笉绗﹀悎瑕佹眰閿欒锛�'));
+ Map<String, String> otCodeMap = new Map<String, String>();
+ if (barCodeList[i].length() < 7) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')鐨勪綅鏁颁笉瓒�16锛屼笉绗﹀悎瑕佹眰閿欒锛�'
+ )
+ );
continue;
- }else if(barCodeList[i].length() == 11){
- String otCode4 = barCodeList[i].substring(3,7);
- String otCode5 = barCodeList[i].substring(3,8);
- String otCode6 = barCodeList[i].substring(3,9);
- String otCode7 = barCodeList[i].substring(3,10);
- String otCode8 = barCodeList[i].substring(3,11);
+ } else if (barCodeList[i].length() == 11) {
+ String otCode4 = barCodeList[i].substring(3, 7);
+ String otCode5 = barCodeList[i].substring(3, 8);
+ String otCode6 = barCodeList[i].substring(3, 9);
+ String otCode7 = barCodeList[i].substring(3, 10);
+ String otCode8 = barCodeList[i].substring(3, 11);
otCodeList.add(otCode4);
otCodeList.add(otCode5);
otCodeList.add(otCode6);
otCodeList.add(otCode7);
otCodeList.add(otCode8);
- otCodeMap.put(otCode4,barCodeList[i]);
- otCodeMap.put(otCode5,barCodeList[i]);
- otCodeMap.put(otCode6,barCodeList[i]);
- otCodeMap.put(otCode7,barCodeList[i]);
- otCodeMap.put(otCode8,barCodeList[i]);
- }else if(barCodeList[i].length() >= 12){
- String otCode4 = barCodeList[i].substring(3,7);
- String otCode5 = barCodeList[i].substring(3,8);
- String otCode6 = barCodeList[i].substring(3,9);
- String otCode7 = barCodeList[i].substring(3,10);
- String otCode8 = barCodeList[i].substring(3,11);
- String otCode9 = barCodeList[i].substring(3,12);
+ otCodeMap.put(otCode4, barCodeList[i]);
+ otCodeMap.put(otCode5, barCodeList[i]);
+ otCodeMap.put(otCode6, barCodeList[i]);
+ otCodeMap.put(otCode7, barCodeList[i]);
+ otCodeMap.put(otCode8, barCodeList[i]);
+ } else if (barCodeList[i].length() >= 12) {
+ String otCode4 = barCodeList[i].substring(3, 7);
+ String otCode5 = barCodeList[i].substring(3, 8);
+ String otCode6 = barCodeList[i].substring(3, 9);
+ String otCode7 = barCodeList[i].substring(3, 10);
+ String otCode8 = barCodeList[i].substring(3, 11);
+ String otCode9 = barCodeList[i].substring(3, 12);
otCodeList.add(otCode4);
otCodeList.add(otCode5);
otCodeList.add(otCode6);
otCodeList.add(otCode7);
otCodeList.add(otCode8);
otCodeList.add(otCode9);
- otCodeMap.put(otCode4,barCodeList[i]);
- otCodeMap.put(otCode5,barCodeList[i]);
- otCodeMap.put(otCode6,barCodeList[i]);
- otCodeMap.put(otCode7,barCodeList[i]);
- otCodeMap.put(otCode8,barCodeList[i]);
- otCodeMap.put(otCode9,barCodeList[i]);
+ otCodeMap.put(otCode4, barCodeList[i]);
+ otCodeMap.put(otCode5, barCodeList[i]);
+ otCodeMap.put(otCode6, barCodeList[i]);
+ otCodeMap.put(otCode7, barCodeList[i]);
+ otCodeMap.put(otCode8, barCodeList[i]);
+ otCodeMap.put(otCode9, barCodeList[i]);
}
allotCodeList.addAll(otCodeList);
barOtcodeMap.put(barCodeList[i], otCodeMap);
barCode241List.add(barCodeList[i]);
- }else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')涓嶇鍚堣姹傦紒'));
+ } else {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')涓嶇鍚堣姹傦紒')
+ );
continue;
}
- }else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')涓嶇鍚堣姹傦紒'));
+ } else {
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')涓嶇鍚堣姹傦紒'));
continue;
}
}
//01閫氳繃妫�绱骇鍝佹槸鍚﹀瓨鍦�
//-----------XHL--------------UpdateSTART----------------20181010------
- if(alljanCodeList.size() > 0){
- List<Product2__c> product2InStore = [SELECT Id, Name,Name__c,Intra_Trade_List_RMB__c,Asset_Model_No__c,OT_CODE__c,Product2_Jancode__c,
- Pro2_Dealer_ENG__c,Pro2_Dealer_Object__c
+ if (alljanCodeList.size() > 0) {
+ List<Product2__c> product2InStore = [
+ SELECT
+ Id,
+ Name,
+ Name__c,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ OT_CODE__c,
+ Product2_Jancode__c,
+ Pro2_Dealer_ENG__c,
+ Pro2_Dealer_Object__c
FROM Product2__c
- WHERE Product2_Jancode__c in :alljanCodeList
- order by SFDA_Expiration_Date__c desc ] ;
- if(product2InStore.size() > 0){
+ WHERE Product2_Jancode__c IN :alljanCodeList
+ ORDER BY SFDA_Expiration_Date__c DESC
+ ];
+ if (product2InStore.size() > 0) {
// CHAN-AVSAST
- Map<String,String> rightBar = new Map<String,String>();
- Map<String,String> errorMap = new Map<String,String>();
- for(String bar: barJancodeMap.keySet() ){
+ Map<String, String> rightBar = new Map<String, String>();
+ Map<String, String> errorMap = new Map<String, String>();
+ for (String bar : barJancodeMap.keySet()) {
Integer cou = 0;
- for(Product2__c produ: product2InStore){
- if(barJancodeMap.get(bar).containsKey(produ.Product2_Jancode__c) && !rightBar.containsKey(bar)){
- cou ++;
- if(EngFlag == TRUE && produ.Pro2_Dealer_ENG__c == TRUE){
- consumableInventory.add(new ConsumableorderdetailsInfo(produ,barcodeinfoMap.get(bar)));
- consumableInventoryUse.add(new ConsumableorderdetailsInfo(produ,barcodeinfoMap.get(bar)));
+ for (Product2__c produ : product2InStore) {
+ if (barJancodeMap.get(bar).containsKey(produ.Product2_Jancode__c) && !rightBar.containsKey(bar)) {
+ cou++;
+ if (EngFlag == true && produ.Pro2_Dealer_ENG__c == true) {
+ consumableInventory.add(new ConsumableorderdetailsInfo(produ, barcodeinfoMap.get(bar)));
+ consumableInventoryUse.add(new ConsumableorderdetailsInfo(produ, barcodeinfoMap.get(bar)));
rightBar.put(bar, bar);
- }else if(ETFlag == TRUE && produ.Pro2_Dealer_Object__c == TRUE){
- consumableInventory.add(new ConsumableorderdetailsInfo(produ,barcodeinfoMap.get(bar)));
- consumableInventoryUse.add(new ConsumableorderdetailsInfo(produ,barcodeinfoMap.get(bar)));
+ } else if (ETFlag == true && produ.Pro2_Dealer_Object__c == true) {
+ consumableInventory.add(new ConsumableorderdetailsInfo(produ, barcodeinfoMap.get(bar)));
+ consumableInventoryUse.add(new ConsumableorderdetailsInfo(produ, barcodeinfoMap.get(bar)));
rightBar.put(bar, bar);
- }else{
+ } else {
errorMap.put(bar, bar);
}
}
-
}
- if(cou <= 0 ){
+ if (cou <= 0) {
notInStorelist.add(bar);
}
}
- if(errorMap.size() > 0){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode鍙穂'+ errorMap.values() +']浜у搧绫诲瀷['+product_Type+']涓庣敤鎴风被鍨媅'+userPro_Type+']涓嶇'));
+ if (errorMap.size() > 0) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ 'BarCode鍙穂' + errorMap.values() + ']浜у搧绫诲瀷[' + product_Type + ']涓庣敤鎴风被鍨媅' + userPro_Type + ']涓嶇'
+ )
+ );
}
}
}
-
+
//241閫氳繃妫�绱骇鍝佹槸鍚﹀瓨鍦�
- if(allotCodeList.size() > 0){
- Map<String,String> errorMap = new Map<String,String>();
- Map<String,String> exitBarCodeMap = new Map<String,String>();
- List<Product2__c> product2InStore = [SELECT Id, Name,Name__c,Intra_Trade_List_RMB__c,Asset_Model_No__c,OT_CODE__c,Product2_Jancode__c,
- Pro2_Dealer_ENG__c,Pro2_Dealer_Object__c
+ if (allotCodeList.size() > 0) {
+ Map<String, String> errorMap = new Map<String, String>();
+ Map<String, String> exitBarCodeMap = new Map<String, String>();
+ List<Product2__c> product2InStore = [
+ SELECT
+ Id,
+ Name,
+ Name__c,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ OT_CODE__c,
+ Product2_Jancode__c,
+ Pro2_Dealer_ENG__c,
+ Pro2_Dealer_Object__c
FROM Product2__c
- WHERE OT_CODE__c in :allotCodeList
- AND (not Product_Type__c like :userPro_Typestr)] ;
- if(product2InStore.size() > 0){
-
- for(Product2__c produ: product2InStore){
- for(String bar: barOtcodeMap.keySet() ){
- if(barOtcodeMap.get(bar).containsKey(produ.OT_CODE__c)){
- exitBarCodeMap.put(bar,bar);
+ WHERE OT_CODE__c IN :allotCodeList AND (NOT Product_Type__c LIKE :userPro_Typestr)
+ ];
+ if (product2InStore.size() > 0) {
+ for (Product2__c produ : product2InStore) {
+ for (String bar : barOtcodeMap.keySet()) {
+ if (barOtcodeMap.get(bar).containsKey(produ.OT_CODE__c)) {
+ exitBarCodeMap.put(bar, bar);
errorMap.put(bar, bar);
}
}
}
}
- if(errorMap.size() > 0){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode鍙穂'+ errorMap.values() +']浜у搧绫诲瀷['+product_Type+']涓庣敤鎴穂'+userPro_Type+']绫诲瀷涓嶇'));
+ if (errorMap.size() > 0) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ 'BarCode鍙穂' + errorMap.values() + ']浜у搧绫诲瀷[' + product_Type + ']涓庣敤鎴穂' + userPro_Type + ']绫诲瀷涓嶇'
+ )
+ );
}
- product2InStore = [SELECT Id, Name,Name__c,Intra_Trade_List_RMB__c,Asset_Model_No__c,OT_CODE__c,Product2_Jancode__c,
- Pro2_Dealer_ENG__c,Pro2_Dealer_Object__c
+ product2InStore = [
+ SELECT
+ Id,
+ Name,
+ Name__c,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ OT_CODE__c,
+ Product2_Jancode__c,
+ Pro2_Dealer_ENG__c,
+ Pro2_Dealer_Object__c
FROM Product2__c
- WHERE OT_CODE__c in :allotCodeList
- AND Product_Type__c like :userPro_Typestr] ;
-
- if(product2InStore.size() > 0){
-
- for(Product2__c produ: product2InStore){
- for(String bar: barOtcodeMap.keySet() ){
- Date expirationDate = null ;
+ WHERE OT_CODE__c IN :allotCodeList AND Product_Type__c LIKE :userPro_Typestr
+ ];
+
+ if (product2InStore.size() > 0) {
+ for (Product2__c produ : product2InStore) {
+ for (String bar : barOtcodeMap.keySet()) {
+ Date expirationDate = null;
String serialNoorLotNo = '';
String tracingCode = '';
String productDateStr = '';
- Date productionDate = null ;
+ Date productionDate = null;
String expirationDateStr = '';
- if(barOtcodeMap.get(bar).containsKey(produ.OT_CODE__c)){
+ if (barOtcodeMap.get(bar).containsKey(produ.OT_CODE__c)) {
Integer oTcodeLength = produ.OT_CODE__c.length();
- if(bar.length() >= oTcodeLength + 11){
- if( bar.substring(oTcodeLength + 3,oTcodeLength + 5) =='11'){
- try{
- productDateStr = '20' + bar.substring(oTcodeLength + 5,oTcodeLength + 7) + '-' + bar.substring(oTcodeLength + 7,oTcodeLength + 9) + '-01' ;
- productionDate = Date.valueOf(productDateStr);
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + bar + ')鐨勭敓浜ф棩鏈�' + productDateStr + '閿欒锛�'));
- continue;
- }
- if(bar.length() >=oTcodeLength + 3 + 16){
- if( bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='17'){
- try{
- if(bar.substring(oTcodeLength + 3 + 14,oTcodeLength + 3 + 16)=='00'){
- expirationDateStr = '20' + bar.substring(oTcodeLength + 3 + 10,oTcodeLength + 3 + 12) + '-' + bar.substring(oTcodeLength + 3 + 12,oTcodeLength + 3 + 14) + '-' + '01' ;
- expirationDate = Date.valueOf(expirationDateStr);
- expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
- }else{
- expirationDateStr = '20' + bar.substring(oTcodeLength + 3 + 10,oTcodeLength + 3 + 12) + '-' + bar.substring(oTcodeLength + 3 + 12,oTcodeLength + 3 + 14) + '-' +bar.substring(oTcodeLength + 3 + 14,oTcodeLength + 3 + 16) ;
- expirationDate = Date.valueOf(expirationDateStr);
- }
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + bar + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'));
- continue;
- }
- if(bar.length() >= oTcodeLength + 3 + 25){
- if(bar.substring(oTcodeLength + 3 + 16,oTcodeLength + 3 + 18) =='10' || bar.substring(oTcodeLength + 3 + 16,oTcodeLength + 3 + 18) =='21'){
- serialNoorLotNo = bar.substring(oTcodeLength + 3 + 18,bar.length() - 8) ;
- //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'serialNoorLotNo' + serialNoorLotNo));
- }
- }
- }else if(bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='10' || bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='21'){
- serialNoorLotNo = bar.substring(oTcodeLength + 3 + 10,bar.length() - 8) ;
- //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'serialNoorLotNo' + serialNoorLotNo));
- }
- }
- }else if(bar.substring(oTcodeLength + 3,oTcodeLength + 5) =='17'){
- try{
- if(bar.substring(oTcodeLength + 3 + 6,oTcodeLength + 3 + 8)=='00'){
- expirationDateStr = '20' + bar.substring(oTcodeLength + 3 + 2,oTcodeLength + 3 + 4) + '-' + bar.substring(oTcodeLength + 3 + 4,oTcodeLength + 3 + 6) + '-01';
- expirationDate = Date.valueOf(expirationDateStr);
- expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
- }else{
- expirationDateStr = '20' + bar.substring(oTcodeLength + 3 + 2,oTcodeLength + 3 + 4) + '-' + bar.substring(oTcodeLength + 3 + 4,oTcodeLength + 3 + 6) + '-' +bar.substring(oTcodeLength + 3 + 6,oTcodeLength + 3 + 8);
- expirationDate = Date.valueOf(expirationDateStr);
- }
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + bar + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'));
- continue;
- }
- if(bar.length() >=oTcodeLength + 20){
- if(bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='10' || bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='21'){
- serialNoorLotNo = bar.substring(oTcodeLength + 3 + 10,bar.length() - 8) ;
- }
- }
-
- }else if(bar.length() >= oTcodeLength + 12){
- if(bar.substring(oTcodeLength + 3,oTcodeLength + 5) =='10' || bar.substring(oTcodeLength + 3,oTcodeLength + 5) =='21'){
- serialNoorLotNo = bar.substring(oTcodeLength + 3 + 2,bar.length() - 8) ;
- }
- }
- }
- if(bar.length() >= oTcodeLength + 3 + 8 && bar.substring(bar.length() - 8,bar.length()-5)=='250'){
- if(bar.substring(bar.length() - 8,bar.length()-5)=='250'){
- tracingCode = bar.substring(bar.length() - 5,bar.length());
- Matcher n = Pattern.compile('[0-9]').matcher(tracingCode);
- if(n.find()){
- String str = '绠$悊缂栫爜涓嶆纭紝璇蜂笌绠$悊鍛樼‘璁ゆ槸鍚﹂敊璇��';
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + bar + ')绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒锛�'));
- continue;
- }
- }else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + bar + ')鐨則racingCode閿欒锛�'));
+ if (bar.length() >= oTcodeLength + 11) {
+ if (bar.substring(oTcodeLength + 3, oTcodeLength + 5) == '11') {
+ try {
+ productDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 5, oTcodeLength + 7) +
+ '-' +
+ bar.substring(oTcodeLength + 7, oTcodeLength + 9) +
+ '-01';
+ productionDate = Date.valueOf(productDateStr);
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + bar + ')鐨勭敓浜ф棩鏈�' + productDateStr + '閿欒锛�'
+ )
+ );
continue;
}
+ if (bar.length() >= oTcodeLength + 3 + 16) {
+ if (bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '17') {
+ try {
+ if (bar.substring(oTcodeLength + 3 + 14, oTcodeLength + 3 + 16) == '00') {
+ expirationDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 3 + 10, oTcodeLength + 3 + 12) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 12, oTcodeLength + 3 + 14) +
+ '-' +
+ '01';
+ expirationDate = Date.valueOf(expirationDateStr);
+ expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
+ } else {
+ expirationDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 3 + 10, oTcodeLength + 3 + 12) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 12, oTcodeLength + 3 + 14) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 14, oTcodeLength + 3 + 16);
+ expirationDate = Date.valueOf(expirationDateStr);
+ }
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + bar + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'
+ )
+ );
+ continue;
+ }
+ if (bar.length() >= oTcodeLength + 3 + 25) {
+ if (
+ bar.substring(oTcodeLength + 3 + 16, oTcodeLength + 3 + 18) == '10' ||
+ bar.substring(oTcodeLength + 3 + 16, oTcodeLength + 3 + 18) == '21'
+ ) {
+ serialNoorLotNo = bar.substring(oTcodeLength + 3 + 18, bar.length() - 8);
+ //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'serialNoorLotNo' + serialNoorLotNo));
+ }
+ }
+ } else if (
+ bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '10' ||
+ bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '21'
+ ) {
+ serialNoorLotNo = bar.substring(oTcodeLength + 3 + 10, bar.length() - 8);
+ //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'serialNoorLotNo' + serialNoorLotNo));
+ }
+ }
+ } else if (bar.substring(oTcodeLength + 3, oTcodeLength + 5) == '17') {
+ try {
+ if (bar.substring(oTcodeLength + 3 + 6, oTcodeLength + 3 + 8) == '00') {
+ expirationDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 3 + 2, oTcodeLength + 3 + 4) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 4, oTcodeLength + 3 + 6) +
+ '-01';
+ expirationDate = Date.valueOf(expirationDateStr);
+ expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
+ } else {
+ expirationDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 3 + 2, oTcodeLength + 3 + 4) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 4, oTcodeLength + 3 + 6) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 6, oTcodeLength + 3 + 8);
+ expirationDate = Date.valueOf(expirationDateStr);
+ }
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + bar + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'
+ )
+ );
+ continue;
+ }
+ if (bar.length() >= oTcodeLength + 20) {
+ if (
+ bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '10' ||
+ bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '21'
+ ) {
+ serialNoorLotNo = bar.substring(oTcodeLength + 3 + 10, bar.length() - 8);
+ }
+ }
+ } else if (bar.length() >= oTcodeLength + 12) {
+ if (
+ bar.substring(oTcodeLength + 3, oTcodeLength + 5) == '10' ||
+ bar.substring(oTcodeLength + 3, oTcodeLength + 5) == '21'
+ ) {
+ serialNoorLotNo = bar.substring(oTcodeLength + 3 + 2, bar.length() - 8);
+ }
}
- exitBarCodeMap.put(bar,bar);
- List<String> barcodedetList = new List<String>();
- barcodedetList.add(bar);
- barcodedetList.add(String.valueOf(expirationDate));
- barcodedetList.add(serialNoorLotNo);
- barcodedetList.add(tracingCode);
- consumableInventory.add(new ConsumableorderdetailsInfo(produ,barcodedetList));
- consumableInventoryUse.add(new ConsumableorderdetailsInfo(produ,barcodedetList));
-
+ }
+ if (bar.length() >= oTcodeLength + 3 + 8 && bar.substring(bar.length() - 8, bar.length() - 5) == '250') {
+ if (bar.substring(bar.length() - 8, bar.length() - 5) == '250') {
+ tracingCode = bar.substring(bar.length() - 5, bar.length());
+ Matcher n = Pattern.compile('[0-9]').matcher(tracingCode);
+ if (n.find()) {
+ String str = '绠$悊缂栫爜涓嶆纭紝璇蜂笌绠$悊鍛樼‘璁ゆ槸鍚﹂敊璇��';
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + bar + ')绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒锛�'
+ )
+ );
+ continue;
+ }
+ } else {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + bar + ')鐨則racingCode閿欒锛�')
+ );
+ continue;
+ }
+ }
+ exitBarCodeMap.put(bar, bar);
+ List<String> barcodedetList = new List<String>();
+ barcodedetList.add(bar);
+ barcodedetList.add(String.valueOf(expirationDate));
+ barcodedetList.add(serialNoorLotNo);
+ barcodedetList.add(tracingCode);
+ consumableInventory.add(new ConsumableorderdetailsInfo(produ, barcodedetList));
+ consumableInventoryUse.add(new ConsumableorderdetailsInfo(produ, barcodedetList));
}
}
-
}
}
- for(String bartxt :barCode241List){
- if(!exitBarCodeMap.containsKey(bartxt)){
- if(!errorMap.containsKey(bartxt)){
- notInStorelist.add(bartxt);
- }
- }
+ for (String bartxt : barCode241List) {
+ if (!exitBarCodeMap.containsKey(bartxt)) {
+ if (!errorMap.containsKey(bartxt)) {
+ notInStorelist.add(bartxt);
+ }
+ }
}
}
-
}
-
- public void inventoryEntry (List<String> barCodeList){
+ public void inventoryEntry(List<String> barCodeList) {
//鎵�鏈塨arcode瑙f瀽鍒扮殑Jancode
List<String> alljanCodeList = new List<String>();
List<String> allotCodeList = new List<String>();
List<String> barCode01List = new List<String>();
List<String> barCode241List = new List<String>();
- Map<String,Map<String,String>> barJancodeMap = new Map<String,Map<String,String>>();
- Map<String,Map<String,String>> barOtcodeMap = new Map<String,Map<String,String>>();
- Map<String,List<String>> barcodeinfoMap = new Map<String,List<String>>();
+ Map<String, Map<String, String>> barJancodeMap = new Map<String, Map<String, String>>();
+ Map<String, Map<String, String>> barOtcodeMap = new Map<String, Map<String, String>>();
+ Map<String, List<String>> barcodeinfoMap = new Map<String, List<String>>();
notInStorelist.clear();
notEqualBARcodeCunMap.clear();
- Map<String,String> orderdetailMap = new Map<String,String>();
- List<Consumable_Orderdetails__c> orderdetail = [SELECT Id, Name, Consumable_order__c,
- Consumable_Product__c,Asset_Model_No__c
- FROM Consumable_Orderdetails__c
- WHERE Consumable_order__r.Dealer_Info__c = :accountid
- AND Consumable_order__c != null
- AND Consumable_order__c = :ESetId
- AND Order_Owner_WorkLocal__c = :userWorkLocation
- ORDER BY Name ];
- for(Integer i = 0; i < orderdetail.size(); i++){
+ Map<String, String> orderdetailMap = new Map<String, String>();
+ List<Consumable_Orderdetails__c> orderdetail = [
+ SELECT Id, Name, Consumable_order__c, Consumable_Product__c, Asset_Model_No__c
+ FROM Consumable_Orderdetails__c
+ WHERE
+ Consumable_order__r.Dealer_Info__c = :accountid
+ AND Consumable_order__c != NULL
+ AND Consumable_order__c = :ESetId
+ AND Order_Owner_WorkLocal__c = :userWorkLocation
+ ORDER BY Name
+ ];
+ for (Integer i = 0; i < orderdetail.size(); i++) {
orderdetailMap.put(orderdetail[i].Consumable_Product__c, orderdetail[i].Consumable_Product__c);
}
- for(Integer i = 0; i < barCodeList.size(); i++){
- Date expirationDate = null ;
+ for (Integer i = 0; i < barCodeList.size(); i++) {
+ Date expirationDate = null;
String serialNoorLotNo = '';
String tracingCode = '';
String productDateStr = '';
- Date productionDate = null ;
+ Date productionDate = null;
String expirationDateStr = '';
- if(barCodeList[i].substring(0,2) =='01'){
+ if (barCodeList[i].substring(0, 2) == '01') {
String janCodeMark = '';
//鐢熶骇鏃ユ湡
List<String> janCode = new List<String>();
- if(barCodeList[i].length() < 16){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨勪綅鏁颁笉瓒�16锛屼笉绗﹀悎瑕佹眰閿欒锛�'));
+ if (barCodeList[i].length() < 16) {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')鐨勪綅鏁颁笉瓒�16锛屼笉绗﹀悎瑕佹眰閿欒锛�')
+ );
continue;
- }else {
- janCodeMark = barCodeList[i].substring(2,16);
- try{
- Decimal test = Decimal.valueOf(janCodeMark);
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨刯anCode閿欒锛�'));
+ } else {
+ janCodeMark = barCodeList[i].substring(2, 16);
+ try {
+ Decimal test = Decimal.valueOf(janCodeMark);
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')鐨刯anCode閿欒锛�')
+ );
continue;
}
}
- if(barCodeList[i].length() >= 22){
- if(barCodeList[i].substring(barCodeList[i].length() - 8,barCodeList[i].length()-5)!='250'){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')娌℃湁绠$悊缂栫爜锛�'));
+ if (barCodeList[i].length() >= 22) {
+ if (barCodeList[i].substring(barCodeList[i].length() - 8, barCodeList[i].length() - 5) != '250') {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')娌℃湁绠$悊缂栫爜锛�')
+ );
continue;
}
- if( barCodeList[i].substring(16,18) =='11'){
- try{
- productDateStr = '20' + barCodeList[i].substring(18,20) + '-' + barCodeList[i].substring(20,22) + '-01' ;
+ if (barCodeList[i].substring(16, 18) == '11') {
+ try {
+ productDateStr = '20' + barCodeList[i].substring(18, 20) + '-' + barCodeList[i].substring(20, 22) + '-01';
productionDate = Date.valueOf(productDateStr);
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')鐨勭敓浜ф棩鏈�' + productDateStr + '閿欒锛�'));
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')鐨勭敓浜ф棩鏈�' + productDateStr + '閿欒锛�'
+ )
+ );
continue;
}
- if(barCodeList[i].length() >=32){
- if( barCodeList[i].substring(24,26) =='17'){
- try{
- if(barCodeList[i].substring(30,32)=='00'){
- expirationDateStr = '20' + barCodeList[i].substring(26,28) + '-' + barCodeList[i].substring(28,30) + '-' + '01' ;
+ if (barCodeList[i].length() >= 32) {
+ if (barCodeList[i].substring(24, 26) == '17') {
+ try {
+ if (barCodeList[i].substring(30, 32) == '00') {
+ expirationDateStr =
+ '20' +
+ barCodeList[i].substring(26, 28) +
+ '-' +
+ barCodeList[i].substring(28, 30) +
+ '-' +
+ '01';
expirationDate = Date.valueOf(expirationDateStr);
expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
- }else{
- expirationDateStr = '20' + barCodeList[i].substring(26,28) + '-' + barCodeList[i].substring(28,30) + '-' +barCodeList[i].substring(30,32) ;
- expirationDate = Date.valueOf(expirationDateStr);
+ } else {
+ expirationDateStr =
+ '20' +
+ barCodeList[i].substring(26, 28) +
+ '-' +
+ barCodeList[i].substring(28, 30) +
+ '-' +
+ barCodeList[i].substring(30, 32);
+ expirationDate = Date.valueOf(expirationDateStr);
}
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'));
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'
+ )
+ );
continue;
}
- if(barCodeList[i].length() >= 42){
- if(barCodeList[i].substring(32,34) =='10' || barCodeList[i].substring(32,34) =='21'){
- serialNoorLotNo = barCodeList[i].substring(34,barCodeList[i].length() - 8) ;
+ if (barCodeList[i].length() >= 42) {
+ if (barCodeList[i].substring(32, 34) == '10' || barCodeList[i].substring(32, 34) == '21') {
+ serialNoorLotNo = barCodeList[i].substring(34, barCodeList[i].length() - 8);
}
}
- }else if(barCodeList[i].substring(24,26) =='10' || barCodeList[i].substring(24,26) =='21'){
- serialNoorLotNo = barCodeList[i].substring(26,barCodeList[i].length() - 8) ;
+ } else if (barCodeList[i].substring(24, 26) == '10' || barCodeList[i].substring(24, 26) == '21') {
+ serialNoorLotNo = barCodeList[i].substring(26, barCodeList[i].length() - 8);
}
}
- }else if(barCodeList[i].substring(16,18) =='17'){
- try{
- if(barCodeList[i].substring(22,24)=='00'){
- expirationDateStr = '20' + barCodeList[i].substring(18,20) + '-' + barCodeList[i].substring(20,22) + '-01';
+ } else if (barCodeList[i].substring(16, 18) == '17') {
+ try {
+ if (barCodeList[i].substring(22, 24) == '00') {
+ expirationDateStr =
+ '20' +
+ barCodeList[i].substring(18, 20) +
+ '-' +
+ barCodeList[i].substring(20, 22) +
+ '-01';
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧expirationDateStr' + expirationDateStr));
expirationDate = Date.valueOf(expirationDateStr);
expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
- }else{
- expirationDateStr = '20' + barCodeList[i].substring(18,20) + '-' + barCodeList[i].substring(20,22) + '-' +barCodeList[i].substring(22,24);
+ } else {
+ expirationDateStr =
+ '20' +
+ barCodeList[i].substring(18, 20) +
+ '-' +
+ barCodeList[i].substring(20, 22) +
+ '-' +
+ barCodeList[i].substring(22, 24);
expirationDate = Date.valueOf(expirationDateStr);
}
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'));
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'
+ )
+ );
continue;
}
- if(barCodeList[i].length() >= 34){
- if(barCodeList[i].substring(24,26) =='10' || barCodeList[i].substring(24,26) =='21'){
- serialNoorLotNo = barCodeList[i].substring(26,barCodeList[i].length() - 8) ;
+ if (barCodeList[i].length() >= 34) {
+ if (barCodeList[i].substring(24, 26) == '10' || barCodeList[i].substring(24, 26) == '21') {
+ serialNoorLotNo = barCodeList[i].substring(26, barCodeList[i].length() - 8);
}
}
-
- }else if(barCodeList[i].length() >= 26){
- if(barCodeList[i].substring(16,18) =='10' || barCodeList[i].substring(16,18) =='21'){
- serialNoorLotNo = barCodeList[i].substring(18,barCodeList[i].length() - 8) ;
+ } else if (barCodeList[i].length() >= 26) {
+ if (barCodeList[i].substring(16, 18) == '10' || barCodeList[i].substring(16, 18) == '21') {
+ serialNoorLotNo = barCodeList[i].substring(18, barCodeList[i].length() - 8);
}
}
}
- if(barCodeList[i].length() >= 24 && barCodeList[i].substring(barCodeList[i].length() - 8,barCodeList[i].length()-5)=='250'){
- if(barCodeList[i].substring(barCodeList[i].length() - 8,barCodeList[i].length()-5)=='250'){
- tracingCode = barCodeList[i].substring(barCodeList[i].length() - 5,barCodeList[i].length());
+ if (
+ barCodeList[i].length() >= 24 &&
+ barCodeList[i].substring(barCodeList[i].length() - 8, barCodeList[i].length() - 5) == '250'
+ ) {
+ if (barCodeList[i].substring(barCodeList[i].length() - 8, barCodeList[i].length() - 5) == '250') {
+ tracingCode = barCodeList[i].substring(barCodeList[i].length() - 5, barCodeList[i].length());
Matcher n = Pattern.compile('[0-9]').matcher(tracingCode);
- if(n.find()){
+ if (n.find()) {
String str = '绠$悊缂栫爜涓嶆纭紝璇蜂笌绠$悊鍛樼‘璁ゆ槸鍚﹂敊璇��';
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒锛�'));
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + barCodeList[i] + ')绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒锛�'
+ )
+ );
continue;
}
- }else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨則racingCode閿欒锛�'));
+ } else {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')鐨則racingCode閿欒锛�')
+ );
continue;
}
}
@@ -2074,275 +2679,397 @@
barcodedetList.add(String.valueOf(expirationDate));
barcodedetList.add(serialNoorLotNo);
barcodedetList.add(tracingCode);
- Integer jan1 = Integer.valueOf(janCodeMark.substring(0, 1));
- Integer jan2 = Integer.valueOf(janCodeMark.substring(1, 2));
- Integer jan3 = Integer.valueOf(janCodeMark.substring(2, 3));
- Integer jan4 = Integer.valueOf(janCodeMark.substring(3, 4));
- Integer jan5 = Integer.valueOf(janCodeMark.substring(4, 5));
- Integer jan6 = Integer.valueOf(janCodeMark.substring(5, 6));
- Integer jan7 = Integer.valueOf(janCodeMark.substring(6, 7));
- Integer jan8 = Integer.valueOf(janCodeMark.substring(7, 8));
- Integer jan9 = Integer.valueOf(janCodeMark.substring(8, 9));
+ Integer jan1 = Integer.valueOf(janCodeMark.substring(0, 1));
+ Integer jan2 = Integer.valueOf(janCodeMark.substring(1, 2));
+ Integer jan3 = Integer.valueOf(janCodeMark.substring(2, 3));
+ Integer jan4 = Integer.valueOf(janCodeMark.substring(3, 4));
+ Integer jan5 = Integer.valueOf(janCodeMark.substring(4, 5));
+ Integer jan6 = Integer.valueOf(janCodeMark.substring(5, 6));
+ Integer jan7 = Integer.valueOf(janCodeMark.substring(6, 7));
+ Integer jan8 = Integer.valueOf(janCodeMark.substring(7, 8));
+ Integer jan9 = Integer.valueOf(janCodeMark.substring(8, 9));
Integer jan10 = Integer.valueOf(janCodeMark.substring(9, 10));
Integer jan11 = Integer.valueOf(janCodeMark.substring(10, 11));
Integer jan12 = Integer.valueOf(janCodeMark.substring(11, 12));
Integer jan13 = Integer.valueOf(janCodeMark.substring(12, 13));
- Integer count12 = jan2 + jan3*3 + jan4 + jan5*3 + jan6 + jan7*3 + jan8 + jan9*3 + jan10 + jan11*3 +jan12 + jan13*3;
-
- Integer count13 = jan1*3 + jan2 + jan3*3 + jan4 + jan5*3 + jan6 + jan7*3 + jan8 + jan9*3 + jan10 + jan11*3 +jan12 + jan13*3;
- String frost12 = (String.valueOf(count12)).substring((String.valueOf(count12)).length()-1);
- String frost13 = (String.valueOf(count13)).substring((String.valueOf(count13)).length()-1);
+ Integer count12 =
+ jan2 +
+ jan3 * 3 +
+ jan4 +
+ jan5 * 3 +
+ jan6 +
+ jan7 * 3 +
+ jan8 +
+ jan9 * 3 +
+ jan10 +
+ jan11 * 3 +
+ jan12 +
+ jan13 * 3;
+
+ Integer count13 =
+ jan1 * 3 +
+ jan2 +
+ jan3 * 3 +
+ jan4 +
+ jan5 * 3 +
+ jan6 +
+ jan7 * 3 +
+ jan8 +
+ jan9 * 3 +
+ jan10 +
+ jan11 * 3 +
+ jan12 +
+ jan13 * 3;
+ String frost12 = (String.valueOf(count12)).substring((String.valueOf(count12)).length() - 1);
+ String frost13 = (String.valueOf(count13)).substring((String.valueOf(count13)).length() - 1);
//鍑忓幓12浣嶄釜浣�4
- frost12 = (String.valueOf(10 - Integer.valueOf(frost12))).substring((String.valueOf(10 - Integer.valueOf(frost12))).length()-1);
- frost13 = (String.valueOf(10 - Integer.valueOf(frost13))).substring((String.valueOf(10 - Integer.valueOf(frost13))).length()-1);
-
+ frost12 = (String.valueOf(10 - Integer.valueOf(frost12)))
+ .substring((String.valueOf(10 - Integer.valueOf(frost12))).length() - 1);
+ frost13 = (String.valueOf(10 - Integer.valueOf(frost13)))
+ .substring((String.valueOf(10 - Integer.valueOf(frost13))).length() - 1);
+
janCode.add(janCodeMark.substring(1, 13) + frost12);
janCode.add(janCodeMark.substring(0, 13) + frost12);
janCode.add(janCodeMark.substring(1, 13) + frost13);
janCode.add(janCodeMark.substring(0, 13) + frost13);
alljanCodeList.addAll(janCode);
- Map<String,String> janCodeMap = new Map<String,String>();
- janCodeMap.put(janCodeMark.substring(1, 13) + frost12,barCodeList[i]);
- janCodeMap.put(janCodeMark.substring(0, 13) + frost12,barCodeList[i]);
- janCodeMap.put(janCodeMark.substring(1, 13) + frost13,barCodeList[i]);
- janCodeMap.put(janCodeMark.substring(0, 13) + frost13,barCodeList[i]);
+ Map<String, String> janCodeMap = new Map<String, String>();
+ janCodeMap.put(janCodeMark.substring(1, 13) + frost12, barCodeList[i]);
+ janCodeMap.put(janCodeMark.substring(0, 13) + frost12, barCodeList[i]);
+ janCodeMap.put(janCodeMark.substring(1, 13) + frost13, barCodeList[i]);
+ janCodeMap.put(janCodeMark.substring(0, 13) + frost13, barCodeList[i]);
barJancodeMap.put(barCodeList[i], janCodeMap);
barcodeinfoMap.put(barCodeList[i], barcodedetList);
barCode01List.add(barCodeList[i]);
- }else if(barCodeList[i].substring(0,3) =='241'){
- if(barCodeList[i].length() > 8 && barCodeList[i].substring(barCodeList[i].length() - 8,barCodeList[i].length()-5)!='250'){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')娌℃湁绠$悊缂栫爜锛�'));
+ } else if (barCodeList[i].substring(0, 3) == '241') {
+ if (
+ barCodeList[i].length() > 8 &&
+ barCodeList[i].substring(barCodeList[i].length() - 8, barCodeList[i].length() - 5) != '250'
+ ) {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')娌℃湁绠$悊缂栫爜锛�')
+ );
continue;
}
List<String> otCodeList = new List<String>();
- Map<String,String> otCodeMap = new Map<String,String>();
- if(barCodeList[i].length() < 7){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')鐨勪綅鏁颁笉瓒�16锛屼笉绗﹀悎瑕佹眰閿欒锛�'));
+ Map<String, String> otCodeMap = new Map<String, String>();
+ if (barCodeList[i].length() < 7) {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')鐨勪綅鏁颁笉瓒�16锛屼笉绗﹀悎瑕佹眰閿欒锛�')
+ );
continue;
- }else if(barCodeList[i].length() == 11){
- String otCode4 = barCodeList[i].substring(3,7);
- String otCode5 = barCodeList[i].substring(3,8);
- String otCode6 = barCodeList[i].substring(3,9);
- String otCode7 = barCodeList[i].substring(3,10);
- String otCode8 = barCodeList[i].substring(3,11);
+ } else if (barCodeList[i].length() == 11) {
+ String otCode4 = barCodeList[i].substring(3, 7);
+ String otCode5 = barCodeList[i].substring(3, 8);
+ String otCode6 = barCodeList[i].substring(3, 9);
+ String otCode7 = barCodeList[i].substring(3, 10);
+ String otCode8 = barCodeList[i].substring(3, 11);
otCodeList.add(otCode4);
otCodeList.add(otCode5);
otCodeList.add(otCode6);
otCodeList.add(otCode7);
otCodeList.add(otCode8);
- otCodeMap.put(otCode4,barCodeList[i]);
- otCodeMap.put(otCode5,barCodeList[i]);
- otCodeMap.put(otCode6,barCodeList[i]);
- otCodeMap.put(otCode7,barCodeList[i]);
- otCodeMap.put(otCode8,barCodeList[i]);
- }else if(barCodeList[i].length() >= 12){
- String otCode4 = barCodeList[i].substring(3,7);
- String otCode5 = barCodeList[i].substring(3,8);
- String otCode6 = barCodeList[i].substring(3,9);
- String otCode7 = barCodeList[i].substring(3,10);
- String otCode8 = barCodeList[i].substring(3,11);
- String otCode9 = barCodeList[i].substring(3,12);
+ otCodeMap.put(otCode4, barCodeList[i]);
+ otCodeMap.put(otCode5, barCodeList[i]);
+ otCodeMap.put(otCode6, barCodeList[i]);
+ otCodeMap.put(otCode7, barCodeList[i]);
+ otCodeMap.put(otCode8, barCodeList[i]);
+ } else if (barCodeList[i].length() >= 12) {
+ String otCode4 = barCodeList[i].substring(3, 7);
+ String otCode5 = barCodeList[i].substring(3, 8);
+ String otCode6 = barCodeList[i].substring(3, 9);
+ String otCode7 = barCodeList[i].substring(3, 10);
+ String otCode8 = barCodeList[i].substring(3, 11);
+ String otCode9 = barCodeList[i].substring(3, 12);
otCodeList.add(otCode4);
otCodeList.add(otCode5);
otCodeList.add(otCode6);
otCodeList.add(otCode7);
otCodeList.add(otCode8);
otCodeList.add(otCode9);
- otCodeMap.put(otCode4,barCodeList[i]);
- otCodeMap.put(otCode5,barCodeList[i]);
- otCodeMap.put(otCode6,barCodeList[i]);
- otCodeMap.put(otCode7,barCodeList[i]);
- otCodeMap.put(otCode8,barCodeList[i]);
- otCodeMap.put(otCode9,barCodeList[i]);
+ otCodeMap.put(otCode4, barCodeList[i]);
+ otCodeMap.put(otCode5, barCodeList[i]);
+ otCodeMap.put(otCode6, barCodeList[i]);
+ otCodeMap.put(otCode7, barCodeList[i]);
+ otCodeMap.put(otCode8, barCodeList[i]);
+ otCodeMap.put(otCode9, barCodeList[i]);
}
allotCodeList.addAll(otCodeList);
barOtcodeMap.put(barCodeList[i], otCodeMap);
barCode241List.add(barCodeList[i]);
- }else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + barCodeList[i] + ')娌℃湁janCode鎴朞Tcode锛屼笉绗﹀悎瑕佹眰锛�'));
+ } else {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + barCodeList[i] + ')娌℃湁janCode鎴朞Tcode锛屼笉绗﹀悎瑕佹眰锛�')
+ );
continue;
}
}
//01閫氳繃妫�绱骇鍝佹槸鍚﹀瓨鍦�
- Map<String,String> rightBar = new Map<String,String>();
- if(alljanCodeList.size() > 0){
- Map<String,String> exitBarCodeMap = new Map<String,String>();
- List<Product2__c> product2InStore = [SELECT Id, Name,Name__c,Intra_Trade_List_RMB__c,Asset_Model_No__c,OT_CODE__c,Product2_Jancode__c,
- Pro2_Dealer_ENG__c,Pro2_Dealer_Object__c,
- Product_Type__c
- FROM Product2__c
- WHERE Product2_Jancode__c in :alljanCodeList
- AND (not Product_Type__c like :userPro_Typestr)
- order by SFDA_Expiration_Date__c desc ] ;
- if(product2InStore.size() > 0){
- Map<String,String> errorMap = new Map<String,String>();
- for(Product2__c produ: product2InStore){
- for(String bar: barJancodeMap.keySet() ){
- if(barJancodeMap.get(bar).containsKey(produ.Product2_Jancode__c) && !rightBar.containsKey(bar)){
- exitBarCodeMap.put(bar,bar);
+ Map<String, String> rightBar = new Map<String, String>();
+ if (alljanCodeList.size() > 0) {
+ Map<String, String> exitBarCodeMap = new Map<String, String>();
+ List<Product2__c> product2InStore = [
+ SELECT
+ Id,
+ Name,
+ Name__c,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ OT_CODE__c,
+ Product2_Jancode__c,
+ Pro2_Dealer_ENG__c,
+ Pro2_Dealer_Object__c,
+ Product_Type__c
+ FROM Product2__c
+ WHERE Product2_Jancode__c IN :alljanCodeList AND (NOT Product_Type__c LIKE :userPro_Typestr)
+ ORDER BY SFDA_Expiration_Date__c DESC
+ ];
+ if (product2InStore.size() > 0) {
+ Map<String, String> errorMap = new Map<String, String>();
+ for (Product2__c produ : product2InStore) {
+ for (String bar : barJancodeMap.keySet()) {
+ if (barJancodeMap.get(bar).containsKey(produ.Product2_Jancode__c) && !rightBar.containsKey(bar)) {
+ exitBarCodeMap.put(bar, bar);
errorMap.put(bar, bar);
}
-
}
}
- if(errorMap.size() > 0){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode鍙穂'+ errorMap.values() +']浜у搧绫诲瀷['+product_Type+']涓庣敤鎴风殑绫诲瀷['+userPro_Type+']涓嶇'));
+ if (errorMap.size() > 0) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ 'BarCode鍙穂' + errorMap.values() + ']浜у搧绫诲瀷[' + product_Type + ']涓庣敤鎴风殑绫诲瀷[' + userPro_Type + ']涓嶇'
+ )
+ );
}
- }
- product2InStore = [SELECT Id, Name,Name__c,Intra_Trade_List_RMB__c,Asset_Model_No__c,OT_CODE__c,Product2_Jancode__c,
- Pro2_Dealer_ENG__c,Pro2_Dealer_Object__c,
- Product_Type__c
- FROM Product2__c
- WHERE Product2_Jancode__c in :alljanCodeList
- AND Product_Type__c like :userPro_Typestr
- order by SFDA_Expiration_Date__c desc ] ;
- if(product2InStore.size() > 0){
- Map<String,String> errorMap = new Map<String,String>();
- for(Product2__c produ: product2InStore){
- for(String bar: barJancodeMap.keySet() ){
- if(barJancodeMap.get(bar).containsKey(produ.Product2_Jancode__c) && !rightBar.containsKey(bar)){
- exitBarCodeMap.put(bar,bar);
- if(orderdetailMap.containsKey(produ.Id)){
- consumableInventory.add(new ConsumableorderdetailsInfo(produ,barcodeinfoMap.get(bar)));
+ }
+ product2InStore = [
+ SELECT
+ Id,
+ Name,
+ Name__c,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ OT_CODE__c,
+ Product2_Jancode__c,
+ Pro2_Dealer_ENG__c,
+ Pro2_Dealer_Object__c,
+ Product_Type__c
+ FROM Product2__c
+ WHERE Product2_Jancode__c IN :alljanCodeList AND Product_Type__c LIKE :userPro_Typestr
+ ORDER BY SFDA_Expiration_Date__c DESC
+ ];
+ if (product2InStore.size() > 0) {
+ Map<String, String> errorMap = new Map<String, String>();
+ for (Product2__c produ : product2InStore) {
+ for (String bar : barJancodeMap.keySet()) {
+ if (barJancodeMap.get(bar).containsKey(produ.Product2_Jancode__c) && !rightBar.containsKey(bar)) {
+ exitBarCodeMap.put(bar, bar);
+ if (orderdetailMap.containsKey(produ.Id)) {
+ consumableInventory.add(new ConsumableorderdetailsInfo(produ, barcodeinfoMap.get(bar)));
rightBar.put(bar, bar);
- }else{
- consumableInventory.add(new ConsumableorderdetailsInfo(produ,barcodeinfoMap.get(bar)));
+ } else {
+ consumableInventory.add(new ConsumableorderdetailsInfo(produ, barcodeinfoMap.get(bar)));
rightBar.put(bar, bar);
- list<String> overOrderBARcodeCunList = new list<String>();
- if(notEqualBARcodeCunMap.containsKey(produ.Id)){
+ list<String> overOrderBARcodeCunList = new List<String>();
+ if (notEqualBARcodeCunMap.containsKey(produ.Id)) {
overOrderBARcodeCunList = notEqualBARcodeCunMap.get(produ.Id).clone();
overOrderBARcodeCunList.add(bar);
- notEqualBARcodeCunMap.put(produ.Id,overOrderBARcodeCunList);
- }else{
+ notEqualBARcodeCunMap.put(produ.Id, overOrderBARcodeCunList);
+ } else {
overOrderBARcodeCunList.add(bar);
- notEqualBARcodeCunMap.put(produ.Id,overOrderBARcodeCunList);
+ notEqualBARcodeCunMap.put(produ.Id, overOrderBARcodeCunList);
}
}
-
}
}
}
}
- for(String bartxt :barCode01List){
- if(!exitBarCodeMap.containsKey(bartxt)){
- notInStorelist.add(bartxt);
- }
+ for (String bartxt : barCode01List) {
+ if (!exitBarCodeMap.containsKey(bartxt)) {
+ notInStorelist.add(bartxt);
+ }
}
-
}
//241閫氳繃妫�绱骇鍝佹槸鍚﹀瓨鍦�
- if(allotCodeList.size() > 0){
- Map<String,String> exitBarCodeMap = new Map<String,String>();
- Map<String,String> errorMap = new Map<String,String>();
- List<Product2__c> product2InStore = [SELECT Id, Name,Name__c,Intra_Trade_List_RMB__c,Asset_Model_No__c,OT_CODE__c,
- Pro2_Dealer_Object__c,Pro2_Dealer_ENG__c
- FROM Product2__c
- WHERE OT_CODE__c in :allotCodeList
- AND (not Product_Type__c like :userPro_Typestr)] ;
- if(product2InStore.size() > 0){
- for(Product2__c produ: product2InStore){
- for(String bar: barOtcodeMap.keySet() ){
- if(barOtcodeMap.get(bar).containsKey(produ.OT_CODE__c)){
- exitBarCodeMap.put(bar,bar);
+ if (allotCodeList.size() > 0) {
+ Map<String, String> exitBarCodeMap = new Map<String, String>();
+ Map<String, String> errorMap = new Map<String, String>();
+ List<Product2__c> product2InStore = [
+ SELECT Id, Name, Name__c, Intra_Trade_List_RMB__c, Asset_Model_No__c, OT_CODE__c, Pro2_Dealer_Object__c, Pro2_Dealer_ENG__c
+ FROM Product2__c
+ WHERE OT_CODE__c IN :allotCodeList AND (NOT Product_Type__c LIKE :userPro_Typestr)
+ ];
+ if (product2InStore.size() > 0) {
+ for (Product2__c produ : product2InStore) {
+ for (String bar : barOtcodeMap.keySet()) {
+ if (barOtcodeMap.get(bar).containsKey(produ.OT_CODE__c)) {
+ exitBarCodeMap.put(bar, bar);
errorMap.put(bar, bar);
}
}
}
}
- if(errorMap.size() > 0){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode鍙穂'+ errorMap.values() +']浜у搧绫诲瀷['+product_Type+']涓庣敤鎴穂'+userPro_Type+']绫诲瀷涓嶇'));
+ if (errorMap.size() > 0) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ 'BarCode鍙穂' + errorMap.values() + ']浜у搧绫诲瀷[' + product_Type + ']涓庣敤鎴穂' + userPro_Type + ']绫诲瀷涓嶇'
+ )
+ );
}
- product2InStore = [SELECT Id, Name,Name__c,Intra_Trade_List_RMB__c,Asset_Model_No__c,OT_CODE__c,
- Pro2_Dealer_Object__c,Pro2_Dealer_ENG__c
- FROM Product2__c
- WHERE OT_CODE__c in :allotCodeList
- AND Product_Type__c like :userPro_Typestr] ;
-
- if(product2InStore.size() > 0){
- for(Product2__c produ: product2InStore){
- for(String bar: barOtcodeMap.keySet() ){
- Date expirationDate = null ;
+ product2InStore = [
+ SELECT Id, Name, Name__c, Intra_Trade_List_RMB__c, Asset_Model_No__c, OT_CODE__c, Pro2_Dealer_Object__c, Pro2_Dealer_ENG__c
+ FROM Product2__c
+ WHERE OT_CODE__c IN :allotCodeList AND Product_Type__c LIKE :userPro_Typestr
+ ];
+
+ if (product2InStore.size() > 0) {
+ for (Product2__c produ : product2InStore) {
+ for (String bar : barOtcodeMap.keySet()) {
+ Date expirationDate = null;
String serialNoorLotNo = '';
String tracingCode = '';
String productDateStr = '';
- Date productionDate = null ;
+ Date productionDate = null;
String expirationDateStr = '';
Integer oTcodeLength = produ.OT_CODE__c.length();
- if(bar.length() >= oTcodeLength + 11){
- if( bar.substring(oTcodeLength + 3,oTcodeLength + 5) =='11'){
- try{
- productDateStr = '20' + bar.substring(oTcodeLength + 5,oTcodeLength + 7) + '-' + bar.substring(oTcodeLength + 7,oTcodeLength + 9) + '-01' ;
+ if (bar.length() >= oTcodeLength + 11) {
+ if (bar.substring(oTcodeLength + 3, oTcodeLength + 5) == '11') {
+ try {
+ productDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 5, oTcodeLength + 7) +
+ '-' +
+ bar.substring(oTcodeLength + 7, oTcodeLength + 9) +
+ '-01';
productionDate = Date.valueOf(productDateStr);
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + bar + ')鐨勭敓浜ф棩鏈�' + productDateStr + '閿欒锛�'));
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + bar + ')鐨勭敓浜ф棩鏈�' + productDateStr + '閿欒锛�'
+ )
+ );
continue;
}
- if(bar.length() >=oTcodeLength + 3 + 16){
+ if (bar.length() >= oTcodeLength + 3 + 16) {
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode17' + bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10)));
- if( bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='17'){
- try{
- if(bar.substring(oTcodeLength + 3 + 14,oTcodeLength + 3 + 16)=='00'){
- expirationDateStr = '20' + bar.substring(oTcodeLength + 3 + 10,oTcodeLength + 3 + 12) + '-' + bar.substring(oTcodeLength + 3 + 12,oTcodeLength + 3 + 14) + '-' + '01' ;
+ if (bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '17') {
+ try {
+ if (bar.substring(oTcodeLength + 3 + 14, oTcodeLength + 3 + 16) == '00') {
+ expirationDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 3 + 10, oTcodeLength + 3 + 12) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 12, oTcodeLength + 3 + 14) +
+ '-' +
+ '01';
expirationDate = Date.valueOf(expirationDateStr);
expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
- }else{
- expirationDateStr = '20' + bar.substring(oTcodeLength + 3 + 10,oTcodeLength + 3 + 12) + '-' + bar.substring(oTcodeLength + 3 + 12,oTcodeLength + 3 + 14) + '-' +bar.substring(oTcodeLength + 3 + 14,oTcodeLength + 3 + 16) ;
- expirationDate = Date.valueOf(expirationDateStr);
+ } else {
+ expirationDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 3 + 10, oTcodeLength + 3 + 12) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 12, oTcodeLength + 3 + 14) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 14, oTcodeLength + 3 + 16);
+ expirationDate = Date.valueOf(expirationDateStr);
}
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + bar + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'));
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + bar + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'
+ )
+ );
continue;
}
- if(bar.length() >= oTcodeLength + 3 + 25){
- if(bar.substring(oTcodeLength + 3 + 16,oTcodeLength + 3 + 18) =='10' || bar.substring(oTcodeLength + 3 + 16,oTcodeLength + 3 + 18) =='21'){
- serialNoorLotNo = bar.substring(oTcodeLength + 3 + 18,bar.length() - 8) ;
+ if (bar.length() >= oTcodeLength + 3 + 25) {
+ if (
+ bar.substring(oTcodeLength + 3 + 16, oTcodeLength + 3 + 18) == '10' ||
+ bar.substring(oTcodeLength + 3 + 16, oTcodeLength + 3 + 18) == '21'
+ ) {
+ serialNoorLotNo = bar.substring(oTcodeLength + 3 + 18, bar.length() - 8);
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'serialNoorLotNo' + serialNoorLotNo));
}
}
- }else if(bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='10' || bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='21'){
- serialNoorLotNo = bar.substring(oTcodeLength + 3 + 10,bar.length() - 8) ;
+ } else if (
+ bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '10' ||
+ bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '21'
+ ) {
+ serialNoorLotNo = bar.substring(oTcodeLength + 3 + 10, bar.length() - 8);
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'serialNoorLotNo' + serialNoorLotNo));
}
}
- }else if(bar.substring(oTcodeLength + 3,oTcodeLength + 5) =='17'){
- try{
- if(bar.substring(oTcodeLength + 3 + 6,oTcodeLength + 3 + 8)=='00'){
- expirationDateStr = '20' + bar.substring(oTcodeLength + 3 + 2,oTcodeLength + 3 + 4) + '-' + bar.substring(oTcodeLength + 3 + 4,oTcodeLength + 3 + 6) + '-01';
+ } else if (bar.substring(oTcodeLength + 3, oTcodeLength + 5) == '17') {
+ try {
+ if (bar.substring(oTcodeLength + 3 + 6, oTcodeLength + 3 + 8) == '00') {
+ expirationDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 3 + 2, oTcodeLength + 3 + 4) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 4, oTcodeLength + 3 + 6) +
+ '-01';
expirationDate = Date.valueOf(expirationDateStr);
expirationDate = expirationDate.addMonths(1).toStartofMonth().addDays(-1);
- }else{
- expirationDateStr = '20' + bar.substring(oTcodeLength + 3 + 2,oTcodeLength + 3 + 4) + '-' + bar.substring(oTcodeLength + 3 + 4,oTcodeLength + 3 + 6) + '-' +bar.substring(oTcodeLength + 3 + 6,oTcodeLength + 3 + 8);
+ } else {
+ expirationDateStr =
+ '20' +
+ bar.substring(oTcodeLength + 3 + 2, oTcodeLength + 3 + 4) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 4, oTcodeLength + 3 + 6) +
+ '-' +
+ bar.substring(oTcodeLength + 3 + 6, oTcodeLength + 3 + 8);
expirationDate = Date.valueOf(expirationDateStr);
}
- }catch(Exception e){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + bar + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'));
+ } catch (Exception e) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + bar + ')鐨勬粎鑿屾湁鍔规湡闄�' + expirationDateStr + '閿欒锛�'
+ )
+ );
continue;
}
- if(bar.length() >=oTcodeLength + 20){
- if(bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='10' || bar.substring(oTcodeLength + 3 + 8,oTcodeLength + 3 + 10) =='21'){
- serialNoorLotNo = bar.substring(oTcodeLength + 3 + 10,bar.length() - 8) ;
+ if (bar.length() >= oTcodeLength + 20) {
+ if (
+ bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '10' ||
+ bar.substring(oTcodeLength + 3 + 8, oTcodeLength + 3 + 10) == '21'
+ ) {
+ serialNoorLotNo = bar.substring(oTcodeLength + 3 + 10, bar.length() - 8);
}
}
-
- }else if(bar.length() >= oTcodeLength + 12){
- if(bar.substring(oTcodeLength + 3,oTcodeLength + 5) =='10' || bar.substring(oTcodeLength + 3,oTcodeLength + 5) =='21'){
- serialNoorLotNo = bar.substring(oTcodeLength + 3 + 2,bar.length() - 8) ;
+ } else if (bar.length() >= oTcodeLength + 12) {
+ if (
+ bar.substring(oTcodeLength + 3, oTcodeLength + 5) == '10' ||
+ bar.substring(oTcodeLength + 3, oTcodeLength + 5) == '21'
+ ) {
+ serialNoorLotNo = bar.substring(oTcodeLength + 3 + 2, bar.length() - 8);
}
}
}
- if(bar.length() >= oTcodeLength + 3 + 8 && bar.substring(bar.length() - 8,bar.length()-5)=='250'){
- if(bar.substring(bar.length() - 8,bar.length()-5)=='250'){
- tracingCode = bar.substring(bar.length() - 5,bar.length());
+ if (bar.length() >= oTcodeLength + 3 + 8 && bar.substring(bar.length() - 8, bar.length() - 5) == '250') {
+ if (bar.substring(bar.length() - 8, bar.length() - 5) == '250') {
+ tracingCode = bar.substring(bar.length() - 5, bar.length());
Matcher n = Pattern.compile('[0-9]').matcher(tracingCode);
- if(n.find()){
+ if (n.find()) {
String str = '绠$悊缂栫爜涓嶆纭紝璇蜂笌绠$悊鍛樼‘璁ゆ槸鍚﹂敊璇��';
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + bar + ')绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒锛�'));
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.ERROR,
+ '浜у搧BarCode(' + bar + ')绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒锛�'
+ )
+ );
continue;
}
- }else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'浜у搧BarCode(' + bar + ')鐨則racingCode閿欒锛�'));
+ } else {
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.ERROR, '浜у搧BarCode(' + bar + ')鐨則racingCode閿欒锛�')
+ );
continue;
}
}
@@ -2351,43 +3078,42 @@
barcodedetList.add(String.valueOf(expirationDate));
barcodedetList.add(serialNoorLotNo);
barcodedetList.add(tracingCode);
- if(barOtcodeMap.get(bar).containsKey(produ.OT_CODE__c)){
- exitBarCodeMap.put(bar,bar);
-
- if(orderdetailMap.containsKey(produ.Id)){
- consumableInventory.add(new ConsumableorderdetailsInfo(produ,barcodedetList));
- }else{
- consumableInventory.add(new ConsumableorderdetailsInfo(produ,barcodedetList));
- list<String> overOrderBARcodeCunList = new list<String>();
- if(notEqualBARcodeCunMap.containsKey(produ.Id)){
+ if (barOtcodeMap.get(bar).containsKey(produ.OT_CODE__c)) {
+ exitBarCodeMap.put(bar, bar);
+
+ if (orderdetailMap.containsKey(produ.Id)) {
+ consumableInventory.add(new ConsumableorderdetailsInfo(produ, barcodedetList));
+ } else {
+ consumableInventory.add(new ConsumableorderdetailsInfo(produ, barcodedetList));
+ list<String> overOrderBARcodeCunList = new List<String>();
+ if (notEqualBARcodeCunMap.containsKey(produ.Id)) {
overOrderBARcodeCunList = notEqualBARcodeCunMap.get(produ.Id).clone();
overOrderBARcodeCunList.add(bar);
- notEqualBARcodeCunMap.put(produ.Id,overOrderBARcodeCunList);
- }else{
+ notEqualBARcodeCunMap.put(produ.Id, overOrderBARcodeCunList);
+ } else {
overOrderBARcodeCunList.add(bar);
- notEqualBARcodeCunMap.put(produ.Id,overOrderBARcodeCunList);
+ notEqualBARcodeCunMap.put(produ.Id, overOrderBARcodeCunList);
}
- }
-
+ }
}
}
}
}
- for(String bartxt :barCode241List){
- if(!exitBarCodeMap.containsKey(bartxt)){
- if(!errorMap.containsKey(bartxt)){
+ for (String bartxt : barCode241List) {
+ if (!exitBarCodeMap.containsKey(bartxt)) {
+ if (!errorMap.containsKey(bartxt)) {
notInStorelist.add(bartxt);
}
- }
+ }
}
}
//鍒ゆ柇浜у搧鏄惁涓�鑷�
- if(notEqualBARcodeCunMap.size() > 0){
- for(String widget : notEqualBARcodeCunMap.keySet()) {
- if(notEqualBARcodeCunMap.get(widget).size() >0){
+ if (notEqualBARcodeCunMap.size() > 0) {
+ for (String widget : notEqualBARcodeCunMap.keySet()) {
+ if (notEqualBARcodeCunMap.get(widget).size() > 0) {
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '浠ヤ笅barcode浜у搧涓庤璐т骇鍝佷笉涓�鑷淬��'));
- for(String barcodeListTTT : (List<String>)notEqualBARcodeCunMap.get(widget)) {
+ for (String barcodeListTTT : (List<String>) notEqualBARcodeCunMap.get(widget)) {
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, barcodeListTTT));
}
}
@@ -2396,68 +3122,77 @@
}
public String ConfimResult() {
- list<String> overOrderproList = new list<String>();
- list<String> overOrderBARcodeCunList = new list<String>();
- list<String> overOrderBARcodeCunListTest = new list<String>();
+ list<String> overOrderproList = new List<String>();
+ list<String> overOrderBARcodeCunList = new List<String>();
+ list<String> overOrderBARcodeCunListTest = new List<String>();
//overOrderBARcodeCunMap.clear();
- for (ConsumableorderdetailsInfo ass : ConsumableorderdetailsRecords) {
- if(orderWantArriveCunMap.get(ass.esd.Asset_Model_No__c) + orderProductArrivedCunMap.get(ass.esd.Asset_Model_No__c) > orderProductCunMap.get(ass.esd.Asset_Model_No__c)-1){
+ for (ConsumableorderdetailsInfo ass : ConsumableorderdetailsRecords) {
+ if (
+ orderWantArriveCunMap.get(ass.esd.Asset_Model_No__c) + orderProductArrivedCunMap.get(ass.esd.Asset_Model_No__c) >
+ orderProductCunMap.get(ass.esd.Asset_Model_No__c) - 1
+ ) {
// 鑾峰彇瓒呰繃瀹氳揣鏁伴噺鐨勬秷鑰楀搧淇℃伅
- overOrderBARcodeCunList = new list<String>();
+ overOrderBARcodeCunList = new List<String>();
overOrderBARcodeCunList = overOrderBARcodeCunMap.get(ass.esd.Asset_Model_No__c).clone();
overOrderBARcodeCunList.add(ass.esd.Bar_Code__c);
- overOrderBARcodeCunMap.put(ass.esd.Asset_Model_No__c,overOrderBARcodeCunList);
- overOrderCunMap.put(ass.esd.Asset_Model_No__c,overOrderCunMap.get(ass.esd.Asset_Model_No__c)+1);
+ overOrderBARcodeCunMap.put(ass.esd.Asset_Model_No__c, overOrderBARcodeCunList);
+ overOrderCunMap.put(ass.esd.Asset_Model_No__c, overOrderCunMap.get(ass.esd.Asset_Model_No__c) + 1);
cancellationProList.add(ass.esd.Asset_Model_No__c);
- }else if(orderWantArriveCunMap.get(ass.esd.Asset_Model_No__c) + orderProductArrivedCunMap.get(ass.esd.Asset_Model_No__c) == orderProductCunMap.get(ass.esd.Asset_Model_No__c)-1){
+ } else if (
+ orderWantArriveCunMap.get(ass.esd.Asset_Model_No__c) + orderProductArrivedCunMap.get(ass.esd.Asset_Model_No__c) ==
+ orderProductCunMap.get(ass.esd.Asset_Model_No__c) - 1
+ ) {
consumableorderdetailsRecordsUse.add(ass);
cancellationProList.add(ass.esd.Asset_Model_No__c);
- }else{
+ } else {
consumableorderdetailsRecordsUse.add(ass);
}
- orderWantArriveCunMap.put(ass.esd.Asset_Model_No__c,orderWantArriveCunMap.get(ass.esd.Asset_Model_No__c)+1);
+ orderWantArriveCunMap.put(ass.esd.Asset_Model_No__c, orderWantArriveCunMap.get(ass.esd.Asset_Model_No__c) + 1);
}
- for(ConsumableorderdetailsInfo ass : consumableInventory){
+ for (ConsumableorderdetailsInfo ass : consumableInventory) {
if (!orderWantArriveCunMap.containsKey(ass.Prod.Asset_Model_No__c)) {
consumableInventoryUse.add(ass);
continue;
}
- if(orderWantArriveCunMap.get(ass.Prod.Asset_Model_No__c) + orderProductArrivedCunMap.get(ass.Prod.Asset_Model_No__c) > orderProductCunMap.get(ass.Prod.Asset_Model_No__c)-1){
-
+ if (
+ orderWantArriveCunMap.get(ass.Prod.Asset_Model_No__c) + orderProductArrivedCunMap.get(ass.Prod.Asset_Model_No__c) >
+ orderProductCunMap.get(ass.Prod.Asset_Model_No__c) - 1
+ ) {
//鍙栧緱鍘熸湁list
- overOrderBARcodeCunList = new list<String>();
+ overOrderBARcodeCunList = new List<String>();
overOrderBARcodeCunList = overOrderBARcodeCunMap.get(ass.Prod.Asset_Model_No__c).clone();
//鏇存柊list
overOrderBARcodeCunList.add(ass.barCodeNo);
//鏇存柊map
- overOrderBARcodeCunMap.put(ass.Prod.Asset_Model_No__c,overOrderBARcodeCunList);
- overOrderCunMap.put(ass.Prod.Asset_Model_No__c,overOrderCunMap.get(ass.Prod.Asset_Model_No__c)+1);
+ overOrderBARcodeCunMap.put(ass.Prod.Asset_Model_No__c, overOrderBARcodeCunList);
+ overOrderCunMap.put(ass.Prod.Asset_Model_No__c, overOrderCunMap.get(ass.Prod.Asset_Model_No__c) + 1);
cancellationProList.add(ass.Prod.Asset_Model_No__c);
- }else if(orderWantArriveCunMap.get(ass.Prod.Asset_Model_No__c) + orderProductArrivedCunMap.get(ass.Prod.Asset_Model_No__c) == orderProductCunMap.get(ass.Prod.Asset_Model_No__c)-1){
-
+ } else if (
+ orderWantArriveCunMap.get(ass.Prod.Asset_Model_No__c) + orderProductArrivedCunMap.get(ass.Prod.Asset_Model_No__c) ==
+ orderProductCunMap.get(ass.Prod.Asset_Model_No__c) - 1
+ ) {
consumableInventoryUse.add(ass);
cancellationProList.add(ass.Prod.Asset_Model_No__c);
- }else{
+ } else {
consumableInventoryUse.add(ass);
}
- orderWantArriveCunMap.put(ass.Prod.Asset_Model_No__c,orderWantArriveCunMap.get(ass.Prod.Asset_Model_No__c)+1);
+ orderWantArriveCunMap.put(ass.Prod.Asset_Model_No__c, orderWantArriveCunMap.get(ass.Prod.Asset_Model_No__c) + 1);
}
for (Integer i = 0; i < productList.size(); i++) {
- if(overOrderBARcodeCunMap.get(productList[i]).size() > 0){
+ if (overOrderBARcodeCunMap.get(productList[i]).size() > 0) {
// 鑾峰彇瓒呰繃瀹氳揣鏁伴噺鐨勬秷鑰楀搧淇℃伅
overOrderproList.add(productList[i]);
}
}
- if(overOrderproList.size() > 0){
+ if (overOrderproList.size() > 0) {
return '浜у搧' + overOrderproList + '鏈鍒拌揣鏁伴噺鍜屽凡鍒拌揣鏁伴噺宸茬粡瓒呰繃璁㈣揣鏁伴噺!';
- }else{
+ } else {
return '';
}
-
}
- public void confimResultWithoutOrder() {
- /*list<String> overOrderproList = new list<String>();
+ public void confimResultWithoutOrder() {
+ /*list<String> overOrderproList = new list<String>();
list<String> overOrderBARcodeCunList = new list<String>();
orderProductCunMap.clear();
orderProductArrivedCunMap.clear();
@@ -2494,7 +3229,7 @@
}*/
//瑕佸埌璐т骇鍝佹暟閲�
- for (ConsumableorderdetailsInfo ass : ConsumableorderdetailsRecords) {
+ for (ConsumableorderdetailsInfo ass : ConsumableorderdetailsRecords) {
/*if(orderWantArriveCunMap.get(ass.esd.Consumable_order_minor__c + ass.esd.Asset_Model_No__c) + orderProductArrivedCunMap.get(ass.esd.Consumable_order_minor__c + ass.esd.Asset_Model_No__c) > orderProductCunMap.get(ass.esd.Consumable_order_minor__c + ass.esd.Asset_Model_No__c)-1){
// 鑾峰彇瓒呰繃瀹氳揣鏁伴噺鐨勬秷鑰楀搧淇℃伅
overOrderproList.add('浜у搧' + ass.esd.Asset_Model_No__c + '鍦ㄨ鍗�' + ass.esd.Consumable_order_minor__r.Name + '涓秴杩囪璐ф暟閲�!\n');
@@ -2506,23 +3241,23 @@
consumableorderdetailsRecordsUse.add(ass);
orderWantArriveCunMap.put(ass.esd.Consumable_order_minor__c + ass.esd.Asset_Model_No__c,orderWantArriveCunMap.get(ass.esd.Consumable_order_minor__c + ass.esd.Asset_Model_No__c)+1);
}else{*/
- consumableorderdetailsRecordsUse.add(ass);
- }
- /*orderWantArriveCunMap.put(ass.esd.Consumable_order_minor__c + ass.esd.Asset_Model_No__c,orderWantArriveCunMap.get(ass.esd.Consumable_order_minor__c + ass.esd.Asset_Model_No__c)+1);
+ consumableorderdetailsRecordsUse.add(ass);
+ }
+ /*orderWantArriveCunMap.put(ass.esd.Consumable_order_minor__c + ass.esd.Asset_Model_No__c,orderWantArriveCunMap.get(ass.esd.Consumable_order_minor__c + ass.esd.Asset_Model_No__c)+1);
}
return overOrderproList;*/
- }
+ }
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
// 铏氭嫙鐩樼偣鍗曟秷鑰楀搧鏄庣粏1鍒涘缓宸″洖
- public void addInventoryDetails1(List<Consumable_order_details2__c> addList){
+ public void addInventoryDetails1(List<Consumable_order_details2__c> addList) {
Map<String, List<Consumable_order_details2__c>> accountGroupMap = new Map<String, List<Consumable_order_details2__c>>();
- Map<String, Map<Id, Integer>> productMap = new Map<String, Map<Id, Integer>> ();
- List<Id> orderIdList = new List<Id> ();
+ Map<String, Map<Id, Integer>> productMap = new Map<String, Map<Id, Integer>>();
+ List<Id> orderIdList = new List<Id>();
// 浠ョ粡閿�鍟嗗悕灏嗚鐢熸垚鍑哄簱鍗曠殑鏁版嵁鍒嗙粍
for (Consumable_order_details2__c cod : addList) {
- List<Consumable_order_details2__c> accGroupList = new List<Consumable_order_details2__c> ();
- Map<Id, Integer> pNumMap = new Map<Id, Integer> ();
+ List<Consumable_order_details2__c> accGroupList = new List<Consumable_order_details2__c>();
+ Map<Id, Integer> pNumMap = new Map<Id, Integer>();
Integer num = 1;
if (accountGroupMap.containsKey(cod.Dealer_Info_text__c + cod.Arrive_Owner_Work_Location__c)) {
accGroupList = accountGroupMap.get(cod.Dealer_Info_text__c + cod.Arrive_Owner_Work_Location__c);
@@ -2531,16 +3266,20 @@
num = pNumMap.get(cod.Consumable_Product__c) + 1;
}
}
- orderIdList.add(cod.Consumable_Inventory_order__c);
+ orderIdList.add(cod.Consumable_Inventory_order__c);
pNumMap.put(cod.Consumable_Product__c, num);
accGroupList.add(cod);
productMap.put(cod.Dealer_Info_text__c + cod.Arrive_Owner_Work_Location__c, pNumMap);
accountGroupMap.put(cod.Dealer_Info_text__c + cod.Arrive_Owner_Work_Location__c, accGroupList);
- System.debug('======accGroupList'+accGroupList);
+ System.debug('======accGroupList' + accGroupList);
}
-
- System.debug('======accountGroupMap'+accountGroupMap);
- List<Consumable_order__c> orderList = [select Id, Name, Dealer_Info__r.Name, Order_Owner_WorkLocal__c from Consumable_order__c where id in : orderIdList];
+
+ System.debug('======accountGroupMap' + accountGroupMap);
+ List<Consumable_order__c> orderList = [
+ SELECT Id, Name, Dealer_Info__r.Name, Order_Owner_WorkLocal__c
+ FROM Consumable_order__c
+ WHERE id IN :orderIdList
+ ];
// 鐢熸垚鍚勭粡閿�鍟嗗嚭搴撹鍗昄ist
// List<Consumable_order__c> orderList = new List<Consumable_order__c> ();
@@ -2548,19 +3287,19 @@
for (String acc : accountGroupMap.keySet()) {
Consumable_order_details2__c arriveAccount = accountGroupMap.get(acc)[0];
List<Consumable_order_details2__c> prodPriceList = accountGroupMap.get(acc);
- Map<Id, Integer> pNumMap = new Map<Id, Integer> ();
+ Map<Id, Integer> pNumMap = new Map<Id, Integer>();
pNumMap = productMap.get(acc);
- List<Consumable_orderdetails__c> insDetail1 = New List<Consumable_orderdetails__c>();
+ List<Consumable_orderdetails__c> insDetail1 = new List<Consumable_orderdetails__c>();
for (Id id : pNumMap.keySet()) {
Consumable_orderdetails__c ins = new Consumable_orderdetails__c();
-
+
//InsAfterDel.Consumable_order__c = p.id;
ins.Product_Refind__c = pNumMap.get(id);
ins.inventory_sum__c = pNumMap.get(id);
ins.Consumable_Product__c = id;
for (Consumable_order_details2__c pri : prodPriceList) {
if (pri.Consumable_Product__c == id) {
- ins.Intra_Trade_List_RMB__c =pri.Intra_Trade_List_RMB__c;
+ ins.Intra_Trade_List_RMB__c = pri.Intra_Trade_List_RMB__c;
break;
}
}
@@ -2575,11 +3314,11 @@
insDetail1.add(ins);
}
- System.debug('======insDetail1'+insDetail1);
+ System.debug('======insDetail1' + insDetail1);
insDetail1Map.put(acc, insDetail1);
- System.debug('======insDetail1Map'+insDetail1Map);
+ System.debug('======insDetail1Map' + insDetail1Map);
}
- List<Consumable_orderdetails__c> insDetail1List = new List<Consumable_orderdetails__c> ();
+ List<Consumable_orderdetails__c> insDetail1List = new List<Consumable_orderdetails__c>();
for (Consumable_order__c setId : orderList) {
// 鏄庣粏1
List<Consumable_orderdetails__c> d1list = insDetail1Map.get(setId.Dealer_Info__r.Name + setId.Order_Owner_WorkLocal__c);
@@ -2587,24 +3326,23 @@
for (Consumable_orderdetails__c dtl1 : d1list) {
String str = ('000' + i).right(4);
dtl1.Consumable_order__c = setId.Id;
- dtl1.Name = setId.Name + '-'+ str;
+ dtl1.Name = setId.Name + '-' + str;
insDetail1List.add(dtl1);
}
- }
- System.debug('======insDetail1List'+insDetail1List);
+ }
+ System.debug('======insDetail1List' + insDetail1List);
insert insDetail1List;
}
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
-
// 缁忛攢鍟嗙殑涓嶅悓宸ヤ綔鍦拌皟璐ц嚜鍔ㄧ敓鎴愬嚭搴撳崟
- public void addSaleOrderAuto (List<Consumable_order_details2__c> addList) {
+ public void addSaleOrderAuto(List<Consumable_order_details2__c> addList) {
Map<String, List<Consumable_order_details2__c>> accountGroupMap = new Map<String, List<Consumable_order_details2__c>>();
- Map<String, Map<Id, Integer>> productMap = new Map<String, Map<Id, Integer>> ();
+ Map<String, Map<Id, Integer>> productMap = new Map<String, Map<Id, Integer>>();
// 浠ョ粡閿�鍟嗗悕灏嗚鐢熸垚鍑哄簱鍗曠殑鏁版嵁鍒嗙粍
for (Consumable_order_details2__c cod : addList) {
- List<Consumable_order_details2__c> accGroupList = new List<Consumable_order_details2__c> ();
- Map<Id, Integer> pNumMap = new Map<Id, Integer> ();
+ List<Consumable_order_details2__c> accGroupList = new List<Consumable_order_details2__c>();
+ Map<Id, Integer> pNumMap = new Map<Id, Integer>();
Integer num = 1;
if (accountGroupMap.containsKey(cod.Dealer_Info_text__c + cod.Arrive_Owner_Work_Location__c)) {
accGroupList = accountGroupMap.get(cod.Dealer_Info_text__c + cod.Arrive_Owner_Work_Location__c);
@@ -2612,7 +3350,7 @@
if (pNumMap.containsKey(cod.Consumable_Product__c)) {
num = pNumMap.get(cod.Consumable_Product__c) + 1;
}
- }
+ }
pNumMap.put(cod.Consumable_Product__c, num);
accGroupList.add(cod);
productMap.put(cod.Dealer_Info_text__c + cod.Arrive_Owner_Work_Location__c, pNumMap);
@@ -2620,7 +3358,7 @@
}
// 鐢熸垚鍚勭粡閿�鍟嗗嚭搴撹鍗昄ist
- List<Consumable_order__c> orderList = new List<Consumable_order__c> ();
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
Map<String, List<Consumable_orderdetails__c>> insDetail1Map = new Map<String, List<Consumable_orderdetails__c>>();
for (String acc : accountGroupMap.keySet()) {
Consumable_order_details2__c arriveAccount = accountGroupMap.get(acc)[0];
@@ -2635,22 +3373,22 @@
autoOrder.RecordTypeid = System.Label.RT_ConOrder_Shipment;
autoOrder.Outbound_Date__c = Date.today();
autoOrder.Order_date__c = Date.today();
- autoOrder.AutoShipment__c = TRUE;
+ autoOrder.AutoShipment__c = true;
orderList.add(autoOrder);
List<Consumable_order_details2__c> prodPriceList = accountGroupMap.get(acc);
- Map<Id, Integer> pNumMap = new Map<Id, Integer> ();
+ Map<Id, Integer> pNumMap = new Map<Id, Integer>();
pNumMap = productMap.get(acc);
- List<Consumable_orderdetails__c> insDetail1 = New List<Consumable_orderdetails__c>();
+ List<Consumable_orderdetails__c> insDetail1 = new List<Consumable_orderdetails__c>();
for (Id id : pNumMap.keySet()) {
Consumable_orderdetails__c ins = new Consumable_orderdetails__c();
-
+
//InsAfterDel.Consumable_order__c = p.id;
ins.Shipment_Count__c = pNumMap.get(id);
ins.Consumable_Product__c = id;
for (Consumable_order_details2__c pri : prodPriceList) {
if (pri.Consumable_Product__c == id) {
- ins.Intra_Trade_List_RMB__c =pri.Intra_Trade_List_RMB__c;
+ ins.Intra_Trade_List_RMB__c = pri.Intra_Trade_List_RMB__c;
break;
}
}
@@ -2663,23 +3401,23 @@
ins.Used_date__c = Date.today();
ins.OwnerId = arriveAccount.OwnerId;
- insDetail1.add(ins);
- }
- insDetail1Map.put(acc, insDetail1);
- }
- insert orderList;
+ insDetail1.add(ins);
+ }
+ insDetail1Map.put(acc, insDetail1);
+ }
+ insert orderList;
- List<Id> orderIdList = new List<Id> ();
+ List<Id> orderIdList = new List<Id>();
for (Consumable_order__c co : orderList) {
orderIdList.add(co.Id);
}
- orderList = new List<Consumable_order__c> ();
- orderList = [select Id, Name, Dealer_Info__r.Name, Order_Owner_WorkLocal__c from Consumable_order__c where id in : orderIdList];
+ orderList = new List<Consumable_order__c>();
+ orderList = [SELECT Id, Name, Dealer_Info__r.Name, Order_Owner_WorkLocal__c FROM Consumable_order__c WHERE id IN :orderIdList];
// 璁剧疆鏄庣粏1 鍜� 鏄庣粏2 鐨� 璁㈠崟ID
- List<Consumable_orderdetails__c> insDetail1List = new List<Consumable_orderdetails__c> ();
- List<Consumable_order_details2__c> updDetail2List = new List<Consumable_order_details2__c> ();
+ List<Consumable_orderdetails__c> insDetail1List = new List<Consumable_orderdetails__c>();
+ List<Consumable_order_details2__c> updDetail2List = new List<Consumable_order_details2__c>();
for (Consumable_order__c setId : orderList) {
// 鏄庣粏1
List<Consumable_orderdetails__c> d1list = insDetail1Map.get(setId.Dealer_Info__r.Name + setId.Order_Owner_WorkLocal__c);
@@ -2690,35 +3428,33 @@
// str = '0' + str;
// }
dtl1.Consumable_order__c = setId.Id;
- dtl1.Name = setId.Name + '-'+ str;
+ dtl1.Name = setId.Name + '-' + str;
insDetail1List.add(dtl1);
}
- // 鏄庣粏2
- List<Consumable_order_details2__c> d2list = accountGroupMap.get(
- setId.Dealer_Info__r.Name + setId.Order_Owner_WorkLocal__c
- );
- for (Consumable_order_details2__c dtl2 : d2list) {
- dtl2.Send_Date__c = Date.today();
- dtl2.Consumable_Sale_order__c = null;
- dtl2.Consumable_Return_order__c = null;
- dtl2.Consumable_ZS_order__c = setId.Id;
- //dtl2.Delivery_List_RMB__c = null;
- dtl2.Return_date__c = null;
- dtl2.Return_reason__c = null;
- dtl2.Consumable_Shipment_order__c = setId.Id;
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
- dtl2.Transfer_Time__c = 1;
- dtl2.Agency_Transfer__c = true;
- dtl2.Frist_Transfer_Agency__c = dtl2.Dealer_Info_text__c;
- // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
- updDetail2List.add(dtl2);
- }
- }
+ // 鏄庣粏2
+ List<Consumable_order_details2__c> d2list = accountGroupMap.get(setId.Dealer_Info__r.Name + setId.Order_Owner_WorkLocal__c);
+ for (Consumable_order_details2__c dtl2 : d2list) {
+ dtl2.Send_Date__c = Date.today();
+ dtl2.Consumable_Sale_order__c = null;
+ dtl2.Consumable_Return_order__c = null;
+ dtl2.Consumable_ZS_order__c = setId.Id;
+ //dtl2.Delivery_List_RMB__c = null;
+ dtl2.Return_date__c = null;
+ dtl2.Return_reason__c = null;
+ dtl2.Consumable_Shipment_order__c = setId.Id;
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
+ dtl2.Transfer_Time__c = 1;
+ dtl2.Agency_Transfer__c = true;
+ dtl2.Frist_Transfer_Agency__c = dtl2.Dealer_Info_text__c;
+ // 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
+ updDetail2List.add(dtl2);
+ }
+ }
- insert insDetail1List;
- update updDetail2List;
- }
+ insert insDetail1List;
+ update updDetail2List;
+ }
//鍒拌揣纭
public PageReference ArriveGoodsConfim() {
@@ -2726,82 +3462,91 @@
StaticParameter.ConsumableOrderTrigger = true;
//add by rentx 20210618 end CHAN-C3K4ZQ 璺宠繃涓嶅繀瑕佺殑鏌ヨ
cancellationProList = new List<String>();
- List<Consumable_order_details2__c> ins = New List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> ins = new List<Consumable_order_details2__c>();
String resultcheck = '';
List<String> resultcheckWithoutOrder = new List<String>();
Savepoint sp = Database.setSavepoint();
- if(ConsumableorderdetailsRecords.size()<1 && consumableInventory.size()<1){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'涓嶅瓨鍦ㄥ埌璐ф槑缁�'));
+ if (ConsumableorderdetailsRecords.size() < 1 && consumableInventory.size() < 1) {
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '涓嶅瓨鍦ㄥ埌璐ф槑缁�'));
return null;
}
- if(EsetId != null && EsetId != ''){
+ if (EsetId != null && EsetId != '') {
resultcheck = ConfimResult();
- if(resultcheck.length() > 0){
- for(String widget : overOrderBARcodeCunMap.keySet()) {
- if(overOrderBARcodeCunMap.get(widget).size() >0){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '浜у搧' + widget + '鏈鍒拌揣鏁伴噺瓒呰繃' + overOrderBARcodeCunMap.get(widget).size() +'涓璐х殑鏁伴噺銆�'));
- for(String barcodeListTTT : (List<String>)overOrderBARcodeCunMap.get(widget)) {
+ if (resultcheck.length() > 0) {
+ for (String widget : overOrderBARcodeCunMap.keySet()) {
+ if (overOrderBARcodeCunMap.get(widget).size() > 0) {
+ ApexPages.addmessage(
+ new ApexPages.message(
+ ApexPages.severity.INFO,
+ '浜у搧' + widget + '鏈鍒拌揣鏁伴噺瓒呰繃' + overOrderBARcodeCunMap.get(widget).size() + '涓璐х殑鏁伴噺銆�'
+ )
+ );
+ for (String barcodeListTTT : (List<String>) overOrderBARcodeCunMap.get(widget)) {
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, barcodeListTTT));
}
}
}
}
- }else{
+ } else {
confimResultWithoutOrder();
}
- try{
+ try {
Consumable_order__c orderMain = new Consumable_order__c();
- List<Consumable_order_details2__c> orderdetails = New List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> orderdetails = new List<Consumable_order_details2__c>();
//鍒拌揣姝g‘淇℃伅
- orderMain.Name = '*';
+ orderMain.Name = '*';
orderMain.Order_status__c = '鎵瑰噯';
- orderMain.Dealer_Info__c = accountid;
+ orderMain.Dealer_Info__c = accountid;
orderMain.Deliver_date__c = Date.today();
- orderMain.Order_date__c = Date.today();
- orderMain.Order_type__c = '鍒拌揣';
+ orderMain.Order_date__c = Date.today();
+ orderMain.Order_type__c = '鍒拌揣';
orderMain.Order_ProType__c = userPro_Type;
- if(EsetId != null && EsetId != ''){
+ if (EsetId != null && EsetId != '') {
orderMain.Arrive_Order__c = coc.Id;
}
orderMain.RecordTypeid = System.Label.RT_ConOrder_Arrive;
insert orderMain;
- List<Consumable_order__c> consumable_order = [SELECT Name FROM Consumable_order__c WHERE id =:orderMain.id];
+ List<Consumable_order__c> consumable_order = [SELECT Name FROM Consumable_order__c WHERE id = :orderMain.id];
arriveId = orderMain.id;
- Decimal arriveAmount =0;
- for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecordsUse) {
+ Decimal arriveAmount = 0;
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecordsUse) {
Consumable_order_details2__c insDetails = new Consumable_order_details2__c();
- insDetails.Id = ass.esd.Id;
- insDetails.Consumable_Arrived_order__c = orderMain.id;
- insDetails.Arrive_date__c = Date.today();
- insDetails.Bar_Code__c = ass.esd.Bar_Code__c;
- insDetails.OwnerId = UserInfo.getUserId();
+ insDetails.Id = ass.esd.Id;
+ insDetails.Consumable_Arrived_order__c = orderMain.id;
+ insDetails.Arrive_date__c = Date.today();
+ insDetails.Bar_Code__c = ass.esd.Bar_Code__c;
+ insDetails.OwnerId = UserInfo.getUserId();
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
if (orderdetails2trMap.containsKey(ass.esd.Bar_Code__c)) {
insDetails.Transfer_Time__c = ass.esd.Transfer_Time__c == null ? 1 : ass.esd.Transfer_Time__c;
insDetails.Agency_Transfer__c = true;
- insDetails.Frist_Transfer_Agency__c = ass.esd.Frist_Transfer_Agency__c == null ? ass.esd.Dealer_Info_text__c : ass.esd.Frist_Transfer_Agency__c;
+ insDetails.Frist_Transfer_Agency__c = ass.esd.Frist_Transfer_Agency__c == null
+ ? ass.esd.Dealer_Info_text__c
+ : ass.esd.Frist_Transfer_Agency__c;
}
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
-
+
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 start
insDetails.Agencyinfo_fromSAP__c = ass.esd.Agencyinfo_fromSAP__c;
- insDetails.Frist_Storage_Agency__c = ass.esd.Frist_Storage_Agency__c == null ? ass.esd.Dealer_Info_text__c : ass.esd.Frist_Storage_Agency__c;
+ insDetails.Frist_Storage_Agency__c = ass.esd.Frist_Storage_Agency__c == null
+ ? ass.esd.Dealer_Info_text__c
+ : ass.esd.Frist_Storage_Agency__c;
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 end
- arriveAmount += ass.esd.Intra_Trade_List_RMB__c;
+ arriveAmount += ass.esd.Intra_Trade_List_RMB__c;
orderdetails.add(insDetails);
}
Integer i = 1;
- for(ConsumableorderdetailsInfo ass : consumableInventoryUse){
+ for (ConsumableorderdetailsInfo ass : consumableInventoryUse) {
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------2------'));
Consumable_order_details2__c insAfterDel = new Consumable_order_details2__c();
String str = ('000' + i).right(4);
// if(str.length() == 1){
// str = '0' + str;
// }
- insAfterDel.Name = consumable_order[0].Name + '-'+ str;
- insAfterDel.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ insAfterDel.Name = consumable_order[0].Name + '-' + str;
+ insAfterDel.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
// gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
// if(EsetId != null && EsetId != ''){
// insAfterDel.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c;
@@ -2810,62 +3555,65 @@
// }
insAfterDel.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c;
//gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
- insAfterDel.Asset_Model_No__c = ass.Prod.Asset_Model_No__c;
- if(EsetId != null && EsetId != ''){
- insAfterDel.Consumable_order_minor__c = ESetId;
+ insAfterDel.Asset_Model_No__c = ass.Prod.Asset_Model_No__c;
+ if (EsetId != null && EsetId != '') {
+ insAfterDel.Consumable_order_minor__c = ESetId;
}
- insAfterDel.Deliver_date__c = Date.today();
- insAfterDel.Direct_Arrive_Product__c = true;
+ insAfterDel.Deliver_date__c = Date.today();
+ insAfterDel.Direct_Arrive_Product__c = true;
//TODO寰呯‘璁�
- insAfterDel.Sterilization_limit__c = ass.sterilizationlimitDate;
- insAfterDel.Consumable_Product__c = ass.Prod.id;
- insAfterDel.Bar_Code__c = ass.barCodeNo;
- insAfterDel.Used_account__c = accountid;
+ insAfterDel.Sterilization_limit__c = ass.sterilizationlimitDate;
+ insAfterDel.Consumable_Product__c = ass.Prod.id;
+ insAfterDel.Bar_Code__c = ass.barCodeNo;
+ insAfterDel.Used_account__c = accountid;
//TODO寰呯‘璁�
- insAfterDel.SerialLotNo__c = ass.serialNoorLotNo;
- insAfterDel.TracingCode__c = ass.tracingCodeNo;
+ insAfterDel.SerialLotNo__c = ass.serialNoorLotNo;
+ insAfterDel.TracingCode__c = ass.tracingCodeNo;
//insAfterDel.Dealer_Arrive__c = true;
insAfterDel.Consumable_Arrived_order__c = orderMain.id;
- insAfterDel.Arrive_date__c = Date.today();
- insAfterDel.OwnerId = UserInfo.getUserId();
+ insAfterDel.Arrive_date__c = Date.today();
+ insAfterDel.OwnerId = UserInfo.getUserId();
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
if (orderdetails2trMap.containsKey(ass.esd.Bar_Code__c)) {
insAfterDel.Transfer_Time__c = ass.esd.Transfer_Time__c == null ? 1 : ass.esd.Transfer_Time__c;
insAfterDel.Agency_Transfer__c = true;
- insAfterDel.Frist_Transfer_Agency__c = ass.esd.Frist_Transfer_Agency__c == null ? accountName : ass.esd.Frist_Transfer_Agency__c;
+ insAfterDel.Frist_Transfer_Agency__c = ass.esd.Frist_Transfer_Agency__c == null
+ ? accountName
+ : ass.esd.Frist_Transfer_Agency__c;
}
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
-
+
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 start
insAfterDel.Agencyinfo_fromSAP__c = ass.esd.Agencyinfo_fromSAP__c;
- insAfterDel.Frist_Storage_Agency__c = ass.esd.Frist_Storage_Agency__c == null ? accountName : ass.esd.Frist_Storage_Agency__c;
+ insAfterDel.Frist_Storage_Agency__c = ass.esd.Frist_Storage_Agency__c == null
+ ? accountName
+ : ass.esd.Frist_Storage_Agency__c;
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 end
arriveAmount += insAfterDel.Intra_Trade_List_RMB__c;
//add by rentx 2020-10-14 strat
//insAfterDel.ContractNo_text__c = /*ass.esd.ContractNo__c*/;
// tcm start
if (String.isBlank(ass.esd.Consumable_order_minor__r.ContractNo__c)) {
- insAfterDel.ContractNo_text__c= ass.esd.ContractNo_text__c;
- }else {
- insAfterDel.ContractNo_text__c= ass.esd.Consumable_order_minor__r.ContractNo__c;
+ insAfterDel.ContractNo_text__c = ass.esd.ContractNo_text__c;
+ } else {
+ insAfterDel.ContractNo_text__c = ass.esd.Consumable_order_minor__r.ContractNo__c;
}
// tcm end
//add by rentx 2020-10-14 end
i++;
ins.add(insAfterDel);
-
}
orderMain.Arrive_total_amount__c = arriveAmount;
update orderMain;
List<Consumable_order_details2__c> updateconsumableorderdetails2 = new List<Consumable_order_details2__c>();
//鏇存柊鏄庣粏鍙栨秷鏃堕棿 => 鏈埌璐у彇娑堬紝鍒拌揣鑷姩鐢熸垚鍑哄簱娴佺▼
- List<Consumable_order_details2__c> addSaleOrderList = new List<Consumable_order_details2__c> ();
- for(Consumable_order_details2__c Cod : consumableorderdetails2Cancle){
+ List<Consumable_order_details2__c> addSaleOrderList = new List<Consumable_order_details2__c>();
+ for (Consumable_order_details2__c Cod : consumableorderdetails2Cancle) {
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------3------'));
if (Cod.Dealer_Arrive__c) {
- if (Cod.Dealer_Shipment__c == FALSE && Cod.Dealer_Saled__c == FALSE) {
+ if (Cod.Dealer_Shipment__c == false && Cod.Dealer_Saled__c == false) {
addSaleOrderList.add(Cod);
}
} else {
@@ -2875,26 +3623,26 @@
}
}
- if (addSaleOrderList.size() > 0) {
- addSaleOrderAuto(addSaleOrderList);
- }
+ if (addSaleOrderList.size() > 0) {
+ addSaleOrderAuto(addSaleOrderList);
+ }
- if(updateconsumableorderdetails2.size() > 0){
+ if (updateconsumableorderdetails2.size() > 0) {
update updateconsumableorderdetails2;
}
List<Consumable_order_details2__c> insertconsumableorderdetails2 = new List<Consumable_order_details2__c>();
- for(Consumable_order_details2__c Cod2 : consumableorderdetails2Insert){
+ for (Consumable_order_details2__c Cod2 : consumableorderdetails2Insert) {
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------4------'));
String str = ('000' + i).right(4);
// if(str.length() == 1){
// str = '0' + str;
// }
- Cod2.Name = consumable_order[0].Name + '-'+ str;
- Cod2.Consumable_order_minor__c = null;
- Cod2.Deliver_date__c = Date.today();
- Cod2.Used_account__c = accountid;
+ Cod2.Name = consumable_order[0].Name + '-' + str;
+ Cod2.Consumable_order_minor__c = null;
+ Cod2.Deliver_date__c = Date.today();
+ Cod2.Used_account__c = accountid;
Cod2.Consumable_Arrived_order__c = orderMain.id;
- Cod2.Arrive_date__c = Date.today();
+ Cod2.Arrive_date__c = Date.today();
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 start
if (orderdetails2trMap.containsKey(Cod2.Bar_Code__c)) {
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------4++++++' + Cod2.Frist_Storage_Agency__c));
@@ -2903,11 +3651,11 @@
Cod2.Frist_Transfer_Agency__c = Cod2.Frist_Transfer_Agency__c == null ? accountName : Cod2.Frist_Transfer_Agency__c;
}
// 鏇存柊鍊熻皟淇℃伅 add by gzw 2020-0-415 end
-
+
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 start
- Cod2.Agencyinfo_fromSAP__c = Cod2.Agencyinfo_fromSAP__c;
+ Cod2.Agencyinfo_fromSAP__c = Cod2.Agencyinfo_fromSAP__c;
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------4------' + Cod2.Frist_Storage_Agency__c));
- Cod2.Frist_Storage_Agency__c = Cod2.Frist_Storage_Agency__c == null ? accountName : Cod2.Frist_Storage_Agency__c;
+ Cod2.Frist_Storage_Agency__c = Cod2.Frist_Storage_Agency__c == null ? accountName : Cod2.Frist_Storage_Agency__c;
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 end
insertconsumableorderdetails2.add(Cod2);
i++;
@@ -2915,340 +3663,386 @@
// return null;
- if(insertconsumableorderdetails2.size() >0){
+ if (insertconsumableorderdetails2.size() > 0) {
insert insertconsumableorderdetails2;
}
- if(ins.size()>0){
+ if (ins.size() > 0) {
insert ins;
}
- if(orderdetails.size()>0){
+ if (orderdetails.size() > 0) {
ControllerUtil.updateOrderDetailsSatus(orderdetails);
}
//瓒呭嚭鍒拌揣鏁伴噺浜у搧鍙栨秷鏃ユ湡鏇存柊
List<Consumable_order_details2__c> needcanceldet = new List<Consumable_order_details2__c>();
- if(cancellationProList.size() > 0){
- needcanceldet = [SELECT Id,
- Cancellation_Date__c
- FROM Consumable_order_details2__c
- WHERE Asset_Model_No__c in :cancellationProList
- AND Consumable_order_minor__c = :ESetId
- AND Dealer_Arrive__c = FALSE
- AND Cancellation_Date__c = null ];
- if(needcanceldet.size() >0){
- for(Integer a = 0; a < needcanceldet.size(); a++){
+ if (cancellationProList.size() > 0) {
+ needcanceldet = [
+ SELECT Id, Cancellation_Date__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Asset_Model_No__c IN :cancellationProList
+ AND Consumable_order_minor__c = :ESetId
+ AND Dealer_Arrive__c = FALSE
+ AND Cancellation_Date__c = NULL
+ ];
+ if (needcanceldet.size() > 0) {
+ for (Integer a = 0; a < needcanceldet.size(); a++) {
needcanceldet[a].Cancellation_Date__c = Date.today();
needcanceldet[a].Cancellation_Flag__c = true;
}
ControllerUtil.updateOrderDetailsSatus(needcanceldet);
}
}
- List<Consumable_order__c> qs = New List<Consumable_order__c>();
- qs = [SELECT Id,Name,Order_status__c,Dealer_Info__c,Deliver_date__c,ReturnGs_Upload_Date__c,
- Order_Reason__c,Order_date__c,
- Contract_application_decision__c,Order_type__c,Total_num__c,
- OrderNumber_arrived__c,Delivery_detail_count__c,OrderNumber_notarrive__c
- FROM Consumable_order__c
- WHERE Id =:ESetId
- AND Dealer_Info__c = :accountid];
- if (qs.size()>0){
+ List<Consumable_order__c> qs = new List<Consumable_order__c>();
+ qs = [
+ SELECT
+ Id,
+ Name,
+ Order_status__c,
+ Dealer_Info__c,
+ Deliver_date__c,
+ ReturnGs_Upload_Date__c,
+ Order_Reason__c,
+ Order_date__c,
+ Contract_application_decision__c,
+ Order_type__c,
+ Total_num__c,
+ OrderNumber_arrived__c,
+ Delivery_detail_count__c,
+ OrderNumber_notarrive__c
+ FROM Consumable_order__c
+ WHERE Id = :ESetId AND Dealer_Info__c = :accountid
+ ];
+ if (qs.size() > 0) {
coc = qs[0];
}
saveFLGbln = true;
alertMessage = '鍒拌揣瀹屾垚銆�';
// Integer a = 1/0;
- }catch(Exception e){
+ } catch (Exception e) {
Database.rollback(sp);
ApexPages.addMessages(e);
return null;
}
- if(resultcheck.length() > 0){
+ if (resultcheck.length() > 0) {
return null;
- }else if(resultcheckWithoutOrder.size() >0){
+ } else if (resultcheckWithoutOrder.size() > 0) {
return null;
- } else{
+ } else {
return UnabletoEdit();
// return null;
}
}
-
+
// 杩斿搧妫�鏌ワ紝鍚庡洖搴�
- public integer GoodsReturnCheck(){
- List<String> GrListIn = ParseBarCode( barcode );
+ public integer GoodsReturnCheck() {
+ List<String> GrListIn = ParseBarCode(barcode);
GrList = new List<String>();
- Map<String,String> CheckBarcodeResult = new Map<String,String>();
- for( String Str : GrListIn ){
- CheckBarcodeResult.put( str , 'UnFind');
+ Map<String, String> CheckBarcodeResult = new Map<String, String>();
+ for (String Str : GrListIn) {
+ CheckBarcodeResult.put(str, 'UnFind');
}
- List<Consumable_order_details2__c> BarcodeRetrunResult =
- [ SELECT Id,Name,Intra_Trade_List_RMB__c,Asset_Model_No__c,
- Consumable_Product__c,Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,Consumable_Product__r.Asset_Model_No__c,
- Sterilization_limit__c,Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,
- Consumable_order_minor__c,Dealer_Arrive__c,
- Guarantee_period_for_products__c,CFDA_Status__c,
- ProductPacking_list_manual__c,Report_Product_Approbation__c,
- Report_Product_Expiration__c,Box_Piece__c, Rrturn_count__c,
- Product_Type__c
- //add by rentx 2020-10-14 start
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- //add by rentx 2020-10-14 end
- FROM Consumable_order_details2__c
- WHERE ((Dealer_Arrive__c = true
- AND( Dealer_Shipment__c = true
- //AND Consumable_Shipment_order__r.SummonsForDirction__c != '浜掔浉璋冭揣')
- or Dealer_Saled__c = true
- )
- ))
- AND Dealer_Info_text__c = :accountName
- AND Bar_Code__c in :GrListIn
- AND ( not Product_Type__c like :userPro_Typestr)
- AND Dealer_Returned__c = false
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- ORDER BY Box_Piece__c desc,Name ];
- if(BarcodeRetrunResult.size()>0){
+ List<Consumable_order_details2__c> BarcodeRetrunResult = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ Product_Type__c,
+ //add by rentx 2020-10-14 start
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ //add by rentx 2020-10-14 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND (Dealer_Shipment__c = TRUE
+ //AND Consumable_Shipment_order__r.SummonsForDirction__c != '浜掔浉璋冭揣')
+ OR Dealer_Saled__c = TRUE)
+ AND Dealer_Info_text__c = :accountName
+ AND Bar_Code__c IN :GrListIn
+ AND (NOT Product_Type__c LIKE :userPro_Typestr)
+ AND Dealer_Returned__c = FALSE
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ ORDER BY Box_Piece__c DESC, Name
+ ];
+ if (BarcodeRetrunResult.size() > 0) {
for (Integer i = 0; i < BarcodeRetrunResult.size(); i++) {
- if(ErrorIdMap.containsKey(BarcodeRetrunResult[i].Bar_Code__c) || ExistIdMap.containsKey(BarcodeRetrunResult[i].Bar_Code__c)){
+ if (
+ ErrorIdMap.containsKey(BarcodeRetrunResult[i].Bar_Code__c) || ExistIdMap.containsKey(BarcodeRetrunResult[i].Bar_Code__c)
+ ) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
- String str = '浜у搧绫诲瀷['+BarcodeRetrunResult[i].Product_Type__c+']涓庣敤鎴风殑绫诲瀷['+userPro_Type+']涓嶇';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(BarcodeRetrunResult[i],str));
- ErrorIdMap.put(BarcodeRetrunResult[i].Bar_Code__c,BarcodeRetrunResult[i].Bar_Code__c);
+ } else {
+ String str = '浜у搧绫诲瀷[' + BarcodeRetrunResult[i].Product_Type__c + ']涓庣敤鎴风殑绫诲瀷[' + userPro_Type + ']涓嶇';
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(BarcodeRetrunResult[i], str));
+ ErrorIdMap.put(BarcodeRetrunResult[i].Bar_Code__c, BarcodeRetrunResult[i].Bar_Code__c);
}
}
}
AllMap.putAll(ErrorIdMap);
- BarcodeRetrunResult =
- [ SELECT Id,
- Consumable_order_minor__c,
- Deliver_date__c,
- Asset_Model_No__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,
- Name,
- Bar_Code__c,
- Arrive_date__c,
- Dealer_Shipment__c,
- Lose_Flag__c,
- Dealer_Saled__c,
- Return_reason__c,
- Consumable_Shipment_order__c,
- Consumable_Shipment_order__r.Name,
- Send_date__c,
- Consumable_Sale_order__c,
- Consumable_Sale_order__r.Name,
- Used_date__c,
- SerialLotNo__c,
- TracingCode__c,
- Sterilization_limit__c,
- Consumable_ZS_order__c,
- Consumable_ZS_order__r.Name,
- Product_OutDate__c,
- Invoice_Date__c,
- recordtypeid,
- Consumable_Arrived_order__c,
- Box_Piece__c,
- Rrturn_count__c,
- Intra_Trade_List_RMB__c,
- OwnerId,
- SummonsForDirction_det__c,
- Order_Dealer_Info__c,
- HospItal_Name__c,
- Agencyinfo_fromSAP__c,
- Frist_Storage_Agency__c,
- Dealer_Info_text__c,
- Used_account__c,
- Transfer_Time__c,
- Frist_Transfer_Agency__c,
- Arrive_Owner_Work_Location__c,
- Agency_Transfer__c
- //add by rentx 2020-10-14 start
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- //add by rentx 2020-10-14 end
- ,Report_Product_Expiration__c
- ,Intra_Trade_List__c
- FROM Consumable_order_details2__c
- WHERE ((Dealer_Arrive__c = true
- AND( Dealer_Shipment__c = true
- //AND Consumable_Shipment_order__r.SummonsForDirction__c != '浜掔浉璋冭揣')
- or Dealer_Saled__c = true
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- or (Dealer_Shipment__c = false and Dealer_Saled__c = false and Lose_Flag__c = true)
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
- )
- ))
- AND Dealer_Info_text__c = :accountName
- AND Bar_Code__c in :GrListIn
- AND Product_Type__c like :userPro_Typestr
- AND Dealer_Returned__c = false
- AND (Arrive_Owner_Work_Location__c =: userWorkLocation
- OR OwnerId = :System.Label.User_OlympusSystem)
- ORDER BY Box_Piece__c desc,Name ];
- ShowGoodsofReturnList = new List<ConsumableorderdetailsInfo>();
+ BarcodeRetrunResult = [
+ SELECT
+ Id,
+ Consumable_order_minor__c,
+ Deliver_date__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Name,
+ Bar_Code__c,
+ Arrive_date__c,
+ Dealer_Shipment__c,
+ Lose_Flag__c,
+ Dealer_Saled__c,
+ Return_reason__c,
+ Consumable_Shipment_order__c,
+ Consumable_Shipment_order__r.Name,
+ Send_date__c,
+ Consumable_Sale_order__c,
+ Consumable_Sale_order__r.Name,
+ Used_date__c,
+ SerialLotNo__c,
+ TracingCode__c,
+ Sterilization_limit__c,
+ Consumable_ZS_order__c,
+ Consumable_ZS_order__r.Name,
+ Product_OutDate__c,
+ Invoice_Date__c,
+ recordtypeid,
+ Consumable_Arrived_order__c,
+ Box_Piece__c,
+ Rrturn_count__c,
+ Intra_Trade_List_RMB__c,
+ OwnerId,
+ SummonsForDirction_det__c,
+ Order_Dealer_Info__c,
+ HospItal_Name__c,
+ Agencyinfo_fromSAP__c,
+ Frist_Storage_Agency__c,
+ Dealer_Info_text__c,
+ Used_account__c,
+ Transfer_Time__c,
+ Frist_Transfer_Agency__c,
+ Arrive_Owner_Work_Location__c,
+ Agency_Transfer__c,
+ //add by rentx 2020-10-14 start
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c,
+ // tcm end
+ //add by rentx 2020-10-14 end
+ Report_Product_Expiration__c,
+ Intra_Trade_List__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND (Dealer_Shipment__c = TRUE
+ //AND Consumable_Shipment_order__r.SummonsForDirction__c != '浜掔浉璋冭揣')
+ OR Dealer_Saled__c = TRUE
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
+ OR (Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Lose_Flag__c = TRUE))
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
+ AND Dealer_Info_text__c = :accountName
+ AND Bar_Code__c IN :GrListIn
+ AND Product_Type__c LIKE :userPro_Typestr
+ AND Dealer_Returned__c = FALSE
+ AND (Arrive_Owner_Work_Location__c = :userWorkLocation
+ OR OwnerId = :System.Label.User_OlympusSystem)
+ ORDER BY Box_Piece__c DESC, Name
+ ];
+ ShowGoodsofReturnList = new List<ConsumableorderdetailsInfo>();
//杩斿搧鏃秈stinct澶勭悊
- if(ArrType=='ReG'){
+ if (ArrType == 'ReG') {
BarcodeRetrunResult = getDistinctZSOrder(BarcodeRetrunResult);
}
- for( Consumable_order_details2__c codc : BarcodeRetrunResult ){
- if(ErrorIdMap.containsKey(codc.Bar_Code__c) || ExistIdMap.containsKey(codc.Bar_Code__c)){
+ for (Consumable_order_details2__c codc : BarcodeRetrunResult) {
+ if (ErrorIdMap.containsKey(codc.Bar_Code__c) || ExistIdMap.containsKey(codc.Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
-
+ } else {
Matcher n = Pattern.compile('[0-9]').matcher(codc.TracingCode__c);
- if(n.find()){
+ if (n.find()) {
String str = '绠$悊缂栫爜涓湁鏁板瓧锛岃涓庣鐞嗗憳纭鏄惁閿欒銆�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(codc,str));
- ErrorIdMap.put(codc.Bar_Code__c,codc.Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(codc, str));
+ ErrorIdMap.put(codc.Bar_Code__c, codc.Bar_Code__c);
continue;
}
- if( CheckBarcodeResult.containsKey( codc.Bar_Code__c )){
+ if (CheckBarcodeResult.containsKey(codc.Bar_Code__c)) {
GrList.add(codc.Bar_Code__c);
- if( codc.Dealer_Shipment__c == true){
- CheckBarcodeResult.put( codc.Bar_Code__c, '宸插嚭搴�' );
- ShowGoodsofReturnList.add( new ConsumableorderdetailsInfo( codc ) );
+ if (codc.Dealer_Shipment__c == true) {
+ CheckBarcodeResult.put(codc.Bar_Code__c, '宸插嚭搴�');
+ ShowGoodsofReturnList.add(new ConsumableorderdetailsInfo(codc));
}
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
// else{
// CheckBarcodeResult.put( codc.Bar_Code__c, '宸查攢鍞�');
// ShowGoodsofReturnList.add( new ConsumableorderdetailsInfo( codc ) );
// }
- else if( codc.Dealer_Saled__c == true ){
- CheckBarcodeResult.put( codc.Bar_Code__c, '宸查攢鍞�');
- ShowGoodsofReturnList.add( new ConsumableorderdetailsInfo( codc ) );
- }else{
- CheckBarcodeResult.put( codc.Bar_Code__c, '宸蹭涪澶�');
- ShowGoodsofReturnList.add( new ConsumableorderdetailsInfo( codc ) );
+ else if (codc.Dealer_Saled__c == true) {
+ CheckBarcodeResult.put(codc.Bar_Code__c, '宸查攢鍞�');
+ ShowGoodsofReturnList.add(new ConsumableorderdetailsInfo(codc));
+ } else {
+ CheckBarcodeResult.put(codc.Bar_Code__c, '宸蹭涪澶�');
+ ShowGoodsofReturnList.add(new ConsumableorderdetailsInfo(codc));
}
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
- }else{
+ } else {
continue;
}
}
}
- return BarcodeRetrunResult.size();
- }
+ return BarcodeRetrunResult.size();
+ }
// 鍗曚綅涓轰釜鐨凚arcode瀵瑰簲鐨勫嚭搴撳崟
- public integer Getconsumableorderdetails2Nobox(){
+ public integer Getconsumableorderdetails2Nobox() {
consumableorderdetails2Nobox = new List<Consumable_order_details2__c>();
BarcodeCntMap.clear();
- consumableorderdetails2Nobox =
- [ SELECT Id,
- Consumable_order_minor__c,
- Deliver_date__c,
- Asset_Model_No__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,
- Name,
- Bar_Code__c,
- Arrive_date__c,
- Dealer_Shipment__c,
- Dealer_Saled__c,
- Return_reason__c,
- Consumable_Shipment_order__c,
- Send_date__c,
- Consumable_Sale_order__c,
- Used_date__c,
- SerialLotNo__c,
- TracingCode__c,
- Sterilization_limit__c,
- Consumable_ZS_order__c,
- Consumable_ZS_order__r.Name,
- Product_OutDate__c,
- Invoice_Date__c,
- recordtypeid,
- Consumable_Arrived_order__c,
- Box_Piece__c,
- RemoveBox_No__c,
- RemoveBox_date__c,
- Rrturn_count__c,
- Dealer_Info_text__c,
- Arrive_Owner_Work_Location__c,
- Intra_Trade_List_RMB__c
- //add by rentx 2020-10-13 start 杩斿搧鏃� 鏂版暟鎹褰昐AP鍚堝悓鍙�
- ,ContractNo_text__c/*,ContractNo__c*/
- // tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- ,Report_Product_Expiration__c
- //add by rentx 2020-10-13 end
- ,Intra_Trade_List__c
- //gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
- FROM Consumable_order_details2__c
- WHERE
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- // (Dealer_Shipment__c = true or Dealer_Saled__c = true)
- (Dealer_Shipment__c = true or Dealer_Saled__c = true or (Dealer_Shipment__c = false and Dealer_Saled__c = false and Lose_Flag__c = true))
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
- AND Dealer_Info_text__c = :accountName
- AND Bar_Code__c in :noboxBarcodeList
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Dealer_Returned__c = false
- AND Box_Piece__c = '涓�'
- ORDER BY Consumable_ZS_order__c,RemoveBox_No__c];
+ consumableorderdetails2Nobox = [
+ SELECT
+ Id,
+ Consumable_order_minor__c,
+ Deliver_date__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Name,
+ Bar_Code__c,
+ Arrive_date__c,
+ Dealer_Shipment__c,
+ Dealer_Saled__c,
+ Return_reason__c,
+ Consumable_Shipment_order__c,
+ Send_date__c,
+ Consumable_Sale_order__c,
+ Used_date__c,
+ SerialLotNo__c,
+ TracingCode__c,
+ Sterilization_limit__c,
+ Consumable_ZS_order__c,
+ Consumable_ZS_order__r.Name,
+ Product_OutDate__c,
+ Invoice_Date__c,
+ recordtypeid,
+ Consumable_Arrived_order__c,
+ Box_Piece__c,
+ RemoveBox_No__c,
+ RemoveBox_date__c,
+ Rrturn_count__c,
+ Dealer_Info_text__c,
+ Arrive_Owner_Work_Location__c,
+ Intra_Trade_List_RMB__c,
+ //add by rentx 2020-10-13 start 杩斿搧鏃� 鏂版暟鎹褰昐AP鍚堝悓鍙�
+ ContractNo_text__c /*,ContractNo__c*/,
+ // tcm start
+ Consumable_order_minor__r.ContractNo__c,
+ // tcm end
+ Report_Product_Expiration__c,
+ //add by rentx 2020-10-13 end
+ Intra_Trade_List__c
+ //gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
+ FROM Consumable_order_details2__c
+ WHERE
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
+ // (Dealer_Shipment__c = true or Dealer_Saled__c = true)
+ (Dealer_Shipment__c = TRUE
+ OR Dealer_Saled__c = TRUE
+ OR (Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Lose_Flag__c = TRUE))
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
+ AND Dealer_Info_text__c = :accountName
+ AND Bar_Code__c IN :noboxBarcodeList
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Dealer_Returned__c = FALSE
+ AND Box_Piece__c = '涓�'
+ ORDER BY Consumable_ZS_order__c, RemoveBox_No__c
+ ];
- AggregateResult[] results = [SELECT Consumable_ZS_order__c,Bar_Code__c,count(Id) recordCount
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- // AND (Dealer_Shipment__c= true OR Dealer_Saled__c = true)
- AND (Dealer_Shipment__c= true OR Dealer_Saled__c = true or(Dealer_Shipment__c = false and Dealer_Saled__c = false and Lose_Flag__c = true))
- // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
- AND Dealer_Returned__c = false
- AND Bar_Code__c in :noboxBarcodeList
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Box_Piece__c = '涓�'
- AND Dealer_Info_text__c = :accountName
- GROUP BY Consumable_ZS_order__c,Bar_Code__c];
+ AggregateResult[] results = [
+ SELECT Consumable_ZS_order__c, Bar_Code__c, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
+ // AND (Dealer_Shipment__c= true OR Dealer_Saled__c = true)
+ AND (Dealer_Shipment__c = TRUE
+ OR Dealer_Saled__c = TRUE
+ OR (Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Lose_Flag__c = TRUE))
+ // WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
+ AND Dealer_Returned__c = FALSE
+ AND Bar_Code__c IN :noboxBarcodeList
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Box_Piece__c = '涓�'
+ AND Dealer_Info_text__c = :accountName
+ GROUP BY Consumable_ZS_order__c, Bar_Code__c
+ ];
- for(AggregateResult ar: results){
+ for (AggregateResult ar : results) {
String key = '' + ar.get('Consumable_ZS_order__c') + ar.get('Bar_Code__c');
BarcodeCntMap.put(key, Integer.valueOf(ar.get('recordCount')));
}
-
+
return consumableorderdetails2Nobox.size();
}
//distinct
- public List<Consumable_order_details2__c> getDistinctZSOrder(List<Consumable_order_details2__c> duplicates){
- List<Consumable_order_details2__c> distinctOrder = new List<Consumable_order_details2__c>();
-
- for(Consumable_order_details2__c details2 : duplicates){
+ public List<Consumable_order_details2__c> getDistinctZSOrder(List<Consumable_order_details2__c> duplicates) {
+ List<Consumable_order_details2__c> distinctOrder = new List<Consumable_order_details2__c>();
+
+ for (Consumable_order_details2__c details2 : duplicates) {
Boolean found = false;
- for(Consumable_order_details2__c result : distinctOrder){
- if(details2.Consumable_ZS_order__c == result.Consumable_ZS_order__c
- && details2.Bar_Code__c == result.Bar_Code__c){
+ for (Consumable_order_details2__c result : distinctOrder) {
+ if (details2.Consumable_ZS_order__c == result.Consumable_ZS_order__c && details2.Bar_Code__c == result.Bar_Code__c) {
found = true;
break;
}
}
- if(!found){
+ if (!found) {
distinctOrder.add(details2);
- if(details2.Box_Piece__c == '涓�') noboxBarcodeList.add(details2.Bar_Code__c);
- }
+ if (details2.Box_Piece__c == '涓�')
+ noboxBarcodeList.add(details2.Bar_Code__c);
+ }
}
return distinctOrder;
}
- // Update杩斿搧鏄庣粏淇℃伅
- public Pagereference UpdateGoodsOfReturn(){
- if( ShowGoodsofReturnList==null){
+ // Update杩斿搧鏄庣粏淇℃伅
+ public Pagereference UpdateGoodsOfReturn() {
+ if (ShowGoodsofReturnList == null) {
GoodsReturnCheck();
}
Getconsumableorderdetails2Nobox();
@@ -3256,260 +4050,277 @@
Savepoint sp = Database.setSavepoint();
boolean hasReturnGoods = false;
boolean hasLoseGoods = false;
- try{
- if( ShowGoodsofReturnList.size() >0 || consumableInventory.size()>0 ){
-
- Consumable_order__c Return_Order_Sheet = new Consumable_order__c();
- Return_Order_Sheet.Name ='*';
- Return_Order_Sheet.Order_status__c = '鎵瑰噯';
+ try {
+ if (ShowGoodsofReturnList.size() > 0 || consumableInventory.size() > 0) {
+ Consumable_order__c Return_Order_Sheet = new Consumable_order__c();
+ Return_Order_Sheet.Name = '*';
+ Return_Order_Sheet.Order_status__c = '鎵瑰噯';
Return_Order_Sheet.ReturnGs_Uploader_ID__c = UserInfo.getUserId();
Return_Order_Sheet.ReturnGs_Upload_Date__c = Date.today();
- Return_Order_Sheet.Order_type__c = '杩斿搧';
- Return_Order_Sheet.RecordTypeid =System.Label.Dealer_Returned_Label;
- Return_Order_Sheet.Order_ProType__c = userPro_Type;
+ Return_Order_Sheet.Order_type__c = '杩斿搧';
+ Return_Order_Sheet.RecordTypeid = System.Label.Dealer_Returned_Label;
+ Return_Order_Sheet.Order_ProType__c = userPro_Type;
insert Return_Order_Sheet;
return_Order_id = Return_Order_Sheet.id;
- List<Consumable_order__c> consumable_order_ret = [SELECT Name FROM Consumable_order__c WHERE id =:Return_Order_Sheet.id];
-
+ List<Consumable_order__c> consumable_order_ret = [SELECT Name FROM Consumable_order__c WHERE id = :Return_Order_Sheet.id];
+
//2017-07-03 鍒拌揣璁㈠崟
- Consumable_order__c Arrived_Order_Sheet = new Consumable_order__c();
- Arrived_Order_Sheet.Name ='*';
- Arrived_Order_Sheet.Order_status__c = '鎵瑰噯';
- Arrived_Order_Sheet.Order_type__c = '鍒拌揣';
- Arrived_Order_Sheet.Dealer_Info__c =accountid;
- Arrived_Order_Sheet.RecordTypeid =System.Label.RT_ConOrder_Arrive;
- Arrived_Order_Sheet.Order_ProType__c = userPro_Type;
+ Consumable_order__c Arrived_Order_Sheet = new Consumable_order__c();
+ Arrived_Order_Sheet.Name = '*';
+ Arrived_Order_Sheet.Order_status__c = '鎵瑰噯';
+ Arrived_Order_Sheet.Order_type__c = '鍒拌揣';
+ Arrived_Order_Sheet.Dealer_Info__c = accountid;
+ Arrived_Order_Sheet.RecordTypeid = System.Label.RT_ConOrder_Arrive;
+ Arrived_Order_Sheet.Order_ProType__c = userPro_Type;
insert Arrived_Order_Sheet;
- List<Consumable_order__c> consumable_order_arr = [SELECT Name FROM Consumable_order__c WHERE id =:Arrived_Order_Sheet.id];
+ List<Consumable_order__c> consumable_order_arr = [SELECT Name FROM Consumable_order__c WHERE id = :Arrived_Order_Sheet.id];
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
// 铏氭嫙鐩樼偣鍗�
- Consumable_order__c Inventory_Order_Sheet = new Consumable_order__c();
- Inventory_Order_Sheet.Name ='*';
- Inventory_Order_Sheet.Order_status__c = '鎵瑰噯';
+ Consumable_order__c Inventory_Order_Sheet = new Consumable_order__c();
+ Inventory_Order_Sheet.Name = '*';
+ Inventory_Order_Sheet.Order_status__c = '鎵瑰噯';
Inventory_Order_Sheet.ReturnGs_Uploader_ID__c = UserInfo.getUserId();
- Inventory_Order_Sheet.Inventory_date__c = Date.today();
- Inventory_Order_Sheet.Dealer_Info__c =accountid;
+ Inventory_Order_Sheet.Inventory_date__c = Date.today();
+ Inventory_Order_Sheet.Dealer_Info__c = accountid;
Inventory_Order_Sheet.ReturnGs_Upload_Date__c = Date.today();
- Inventory_Order_Sheet.Order_type__c = '鐩樼偣';
- Inventory_Order_Sheet.RecordTypeid = System.Label.RT_ConOrder_Inventory;
- Inventory_Order_Sheet.Order_ProType__c = userPro_Type;
+ Inventory_Order_Sheet.Order_type__c = '鐩樼偣';
+ Inventory_Order_Sheet.RecordTypeid = System.Label.RT_ConOrder_Inventory;
+ Inventory_Order_Sheet.Order_ProType__c = userPro_Type;
insert Inventory_Order_Sheet;
inventory_Order_id = Inventory_Order_Sheet.id;
- List<Consumable_order__c> consumable_order_Inv = [SELECT Name FROM Consumable_order__c WHERE id =:Inventory_Order_Sheet.id];
+ List<Consumable_order__c> consumable_order_Inv = [
+ SELECT Name
+ FROM Consumable_order__c
+ WHERE id = :Inventory_Order_Sheet.id
+ ];
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
- List<Consumable_order_details2__c> codcList = new List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> codcList = new List<Consumable_order_details2__c>();
//鏂拌杩斿搧瀵瑰簲鐨勪骇鍝佹槑缁�
- List<Consumable_order_details2__c> codcorderdetList = new List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> codcorderdetList = new List<Consumable_order_details2__c>();
//杩斿搧鍘熷洜,杩斿搧鏁伴噺妫�鏌�
- for( ConsumableorderdetailsInfo codi : ShowGoodsofReturnList ){
- if (codi.esd.Box_Piece__c =='涓�' && (
- codi.esd.Rrturn_count__c == null ||
- String.valueof(codi.esd.Rrturn_count__c) =='' ||
- codi.esd.Rrturn_count__c <= 0)){
+ for (ConsumableorderdetailsInfo codi : ShowGoodsofReturnList) {
+ if (
+ codi.esd.Box_Piece__c == '涓�' &&
+ (codi.esd.Rrturn_count__c == null ||
+ String.valueof(codi.esd.Rrturn_count__c) == '' ||
+ codi.esd.Rrturn_count__c <= 0)
+ ) {
continue;
}
- if(codi.esd.Return_reason__c==null||codi.esd.Return_reason__c==''){
+ if (codi.esd.Return_reason__c == null || codi.esd.Return_reason__c == '') {
codi.esd.Return_reason__c.addError('璇疯ˉ鍏呰繑鍝佸師鍥�');
return null;
}
-
- if(codi.esd.Box_Piece__c=='涓�' && codi.esd.Rrturn_count__c > 0){
+ if (codi.esd.Box_Piece__c == '涓�' && codi.esd.Rrturn_count__c > 0) {
String key = '' + codi.esd.Consumable_ZS_order__c + codi.esd.Bar_Code__c;
Integer deliverycnt = BarcodeCntMap.get(key);
- if(codi.esd.Rrturn_count__c > deliverycnt){
+ if (codi.esd.Rrturn_count__c > deliverycnt) {
codi.esd.Rrturn_count__c.addError('瓒呭嚭鍑哄簱鏁伴噺');
return null;
- }
+ }
}
}
- Integer tempNo=0;
+ Integer tempNo = 0;
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
List<Consumable_order_details2__c> conOrderDetail2InList = new List<Consumable_order_details2__c>();
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- for( ConsumableorderdetailsInfo codi : ShowGoodsofReturnList ){
+ for (ConsumableorderdetailsInfo codi : ShowGoodsofReturnList) {
Consumable_order_details2__c codcorderdet = new Consumable_order_details2__c();
-
+
//鍗曚綅=涓�
- if (codi.esd.Box_Piece__c =='涓�' && (
- codi.esd.Rrturn_count__c == null ||
- String.valueof(codi.esd.Rrturn_count__c) =='' ||
- codi.esd.Rrturn_count__c <= 0)){
+ if (
+ codi.esd.Box_Piece__c == '涓�' &&
+ (codi.esd.Rrturn_count__c == null ||
+ String.valueof(codi.esd.Rrturn_count__c) == '' ||
+ codi.esd.Rrturn_count__c <= 0)
+ ) {
continue;
}
- if(codi.esd.Box_Piece__c=='涓�' && codi.esd.Rrturn_count__c > 0){
+ if (codi.esd.Box_Piece__c == '涓�' && codi.esd.Rrturn_count__c > 0) {
hasReturnGoods = true;
Integer cnt = 1;
- for(Consumable_order_details2__c codctmp : consumableorderdetails2Nobox ){
- if(codctmp.Consumable_ZS_order__c == codi.esd.Consumable_ZS_order__c && codctmp.Bar_Code__c == codi.esd.Bar_Code__c){
+ for (Consumable_order_details2__c codctmp : consumableorderdetails2Nobox) {
+ if (
+ codctmp.Consumable_ZS_order__c == codi.esd.Consumable_ZS_order__c &&
+ codctmp.Bar_Code__c == codi.esd.Bar_Code__c
+ ) {
Consumable_order_details2__c esd = codctmp;
// esd.Consumable_Return_order__c = Return_Order_Sheet.id;
- esd.Return_reason__c = codi.esd.Return_reason__c;
- esd.Return_date__c = Date.today();
+ esd.Return_reason__c = codi.esd.Return_reason__c;
+ esd.Return_date__c = Date.today();
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
// esd.Return_reason__c = codi.esd.Return_reason__c;
// esd.Return_date__c = Date.today();
// esd.Consumable_Return_order__c = Return_Order_Sheet.id;
- if(codi.esd.Dealer_Saled__c == false && codi.esd.Dealer_Shipment__c == false && codi.esd.Lose_Flag__c == true){
+ if (
+ codi.esd.Dealer_Saled__c == false &&
+ codi.esd.Dealer_Shipment__c == false &&
+ codi.esd.Lose_Flag__c == true
+ ) {
// esd.Lose_Flag__c = false;
esd.Consumable_Inventory_order__c = Inventory_Order_Sheet.id;
conOrderDetail2InList.add(esd);
hasLoseGoods = true;
- }
- else{
+ } else {
// esd.Return_date__c = Date.today();
- esd.Consumable_Return_order__c = Return_Order_Sheet.id;
-
+ esd.Consumable_Return_order__c = Return_Order_Sheet.id;
}
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
- esd.ReturnGs_Uploader_ID__c = UserInfo.getUserId();
-
+ esd.ReturnGs_Uploader_ID__c = UserInfo.getUserId();
+
//淇敼杩斿搧鎵�鏈変汉
- esd.OwnerId = UserInfo.getUserId();
- esd.RecordTypeId = System.Label.RT_ConOrderDetail2_Return;
-
+ esd.OwnerId = UserInfo.getUserId();
+ esd.RecordTypeId = System.Label.RT_ConOrderDetail2_Return;
+
//Consumable_order__c coc = [select name from Consumable_order__c where Id =:Arrived_Order_Sheet.id];
codcorderdet = new Consumable_order_details2__c();
- codcorderdet.Name = consumable_order_arr[0].name + '-' + String.valueOf(++tempNo).leftPad(4,'0');
- codcorderdet.Consumable_order_minor__c = codi.esd.Consumable_order_minor__c;
+ codcorderdet.Name = consumable_order_arr[0].name + '-' + String.valueOf(++tempNo).leftPad(4, '0');
+ codcorderdet.Consumable_order_minor__c = codi.esd.Consumable_order_minor__c;
codcorderdet.Consumable_Arrived_order__c = Arrived_Order_Sheet.id;
//淇敼鍒拌揣鎵�鏈変汉
- codcorderdet.OwnerId = UserInfo.getUserId();
- codcorderdet.Arrive_date__c = Date.today();
- codcorderdet.Consumable_Product__c = codi.esd.Consumable_Product__c;
- codcorderdet.Asset_Model_No__c = codi.esd.Asset_Model_No__c;
- codcorderdet.Bar_Code__c = codi.esd.Bar_Code__c;
- codcorderdet.Deliver_date__c = codi.esd.Deliver_date__c;
- codcorderdet.SerialLotNo__c = codi.esd.SerialLotNo__c;
- codcorderdet.TracingCode__c = codi.esd.TracingCode__c;
- codcorderdet.Sterilization_limit__c = codi.esd.Sterilization_limit__c;
+ codcorderdet.OwnerId = UserInfo.getUserId();
+ codcorderdet.Arrive_date__c = Date.today();
+ codcorderdet.Consumable_Product__c = codi.esd.Consumable_Product__c;
+ codcorderdet.Asset_Model_No__c = codi.esd.Asset_Model_No__c;
+ codcorderdet.Bar_Code__c = codi.esd.Bar_Code__c;
+ codcorderdet.Deliver_date__c = codi.esd.Deliver_date__c;
+ codcorderdet.SerialLotNo__c = codi.esd.SerialLotNo__c;
+ codcorderdet.TracingCode__c = codi.esd.TracingCode__c;
+ codcorderdet.Sterilization_limit__c = codi.esd.Sterilization_limit__c;
//gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
- codcorderdet.Intra_Trade_List_RMB__c = (codi.esd.Intra_Trade_List_RMB__c == null || codi.esd.Intra_Trade_List_RMB__c == 0) ? codi.esd.Intra_Trade_List__c : codi.esd.Intra_Trade_List_RMB__c;
- codcorderdet.RemoveBox_No__c = codctmp.RemoveBox_No__c;
- codcorderdet.RemoveBox_date__c = codctmp.RemoveBox_date__c;
- codcorderdet.Box_Piece__c = codctmp.Box_Piece__c;
+ codcorderdet.Intra_Trade_List_RMB__c = (codi.esd.Intra_Trade_List_RMB__c == null ||
+ codi.esd.Intra_Trade_List_RMB__c == 0)
+ ? codi.esd.Intra_Trade_List__c
+ : codi.esd.Intra_Trade_List_RMB__c;
+ codcorderdet.RemoveBox_No__c = codctmp.RemoveBox_No__c;
+ codcorderdet.RemoveBox_date__c = codctmp.RemoveBox_date__c;
+ codcorderdet.Box_Piece__c = codctmp.Box_Piece__c;
//add by rentx 2020-10-13 start 杩斿搧鏃舵柊鏁版嵁璁板綍SAP鍚堝悓鍙�
// codcorderdet.ContractNo_text__c= codctmp.ContractNo__c;
// tcm start
if (String.isBlank(codctmp.Consumable_order_minor__r.ContractNo__c)) {
- codcorderdet.ContractNo_text__c= codctmp.ContractNo_text__c;
- }else {
- codcorderdet.ContractNo_text__c= codctmp.Consumable_order_minor__r.ContractNo__c;
+ codcorderdet.ContractNo_text__c = codctmp.ContractNo_text__c;
+ } else {
+ codcorderdet.ContractNo_text__c = codctmp.Consumable_order_minor__r.ContractNo__c;
}
// tcm end
//add by rentx 2020-10-13 end 杩斿搧鏃舵柊鏁版嵁璁板綍SAP鍚堝悓鍙�
-
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- if(hasLoseGoods){
+ if (hasLoseGoods) {
codcorderdet.loseInventory__c = true;
}
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
-
+
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 start
// 杩斿搧鏃讹紝鈶犺拷鍔犲�熻皟鍊熷嚭鏂逛俊鎭� 鈶′繚鐣欏�熻皟淇℃伅 鈶繚瀛楽AP鍜岀粡閿�鍟嗛娆″彂璐х粡閿�鍟�
- codcorderdet.Used_account__c = codi.esd.Used_account__c;
- codcorderdet.Transfer_Time__c = codi.esd.Transfer_Time__c;
- codcorderdet.Frist_Transfer_Agency__c = codi.esd.Frist_Transfer_Agency__c;
- codcorderdet.Agency_Transfer__c = codi.esd.Agency_Transfer__c;
+ codcorderdet.Used_account__c = codi.esd.Used_account__c;
+ codcorderdet.Transfer_Time__c = codi.esd.Transfer_Time__c;
+ codcorderdet.Frist_Transfer_Agency__c = codi.esd.Frist_Transfer_Agency__c;
+ codcorderdet.Agency_Transfer__c = codi.esd.Agency_Transfer__c;
- codcorderdet.Agencyinfo_fromSAP__c = codi.esd.Agencyinfo_fromSAP__c;
+ codcorderdet.Agencyinfo_fromSAP__c = codi.esd.Agencyinfo_fromSAP__c;
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------1------' + codi.esd.Frist_Storage_Agency__c));
- codcorderdet.Frist_Storage_Agency__c = codi.esd.Frist_Storage_Agency__c == null ? codi.esd.Dealer_Info_text__c : codi.esd.Frist_Storage_Agency__c;
+ codcorderdet.Frist_Storage_Agency__c = codi.esd.Frist_Storage_Agency__c == null
+ ? codi.esd.Dealer_Info_text__c
+ : codi.esd.Frist_Storage_Agency__c;
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 end
codcorderdetList.add(codcorderdet);
- codcList.add( esd );
+ codcList.add(esd);
cnt++;
- if(cnt > codi.esd.Rrturn_count__c) break;
+ if (cnt > codi.esd.Rrturn_count__c)
+ break;
}
-
}
- }
- else{
+ } else {
hasReturnGoods = true;
//鍗曚綅=鐩�
//changeinvoiceInfo(codi.esd);
//Consumable_order__c coc = [select name from Consumable_order__c where Id =:Arrived_Order_Sheet.id];
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- codi.esd.Return_date__c = Date.today();
+ codi.esd.Return_date__c = Date.today();
// codi.esd.Consumable_Return_order__c = Return_Order_Sheet.id;
- if(codi.esd.Dealer_Saled__c == false && codi.esd.Dealer_Shipment__c == false && codi.esd.Lose_Flag__c == true){
+ if (codi.esd.Dealer_Saled__c == false && codi.esd.Dealer_Shipment__c == false && codi.esd.Lose_Flag__c == true) {
codi.esd.Lose_Flag__c = false;
codi.esd.Return_reason__c = '';
- codi.esd.Consumable_Inventory_order__c = Inventory_Order_Sheet.id;
+ codi.esd.Consumable_Inventory_order__c = Inventory_Order_Sheet.id;
conOrderDetail2InList.add(codi.esd);
hasLoseGoods = true;
- }
- else{
+ } else {
// codi.esd.Return_date__c = Date.today();
- codi.esd.Consumable_Return_order__c = Return_Order_Sheet.id;
-
+ codi.esd.Consumable_Return_order__c = Return_Order_Sheet.id;
}
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
- codi.esd.ReturnGs_Uploader_ID__c = UserInfo.getUserId();
+ codi.esd.ReturnGs_Uploader_ID__c = UserInfo.getUserId();
// codi.esd.Consumable_Return_order__c = Return_Order_Sheet.id;
//淇敼杩斿搧鎵�鏈変汉
- codi.esd.OwnerId = UserInfo.getUserId();
- codi.esd.RecordTypeId = System.Label.RT_ConOrderDetail2_Return;
- codcorderdet.Name = consumable_order_arr[0].name + '-' + String.valueOf(++tempNo).leftPad(4,'0');
- codcorderdet.Consumable_order_minor__c = codi.esd.Consumable_order_minor__c;
+ codi.esd.OwnerId = UserInfo.getUserId();
+ codi.esd.RecordTypeId = System.Label.RT_ConOrderDetail2_Return;
+ codcorderdet.Name = consumable_order_arr[0].name + '-' + String.valueOf(++tempNo).leftPad(4, '0');
+ codcorderdet.Consumable_order_minor__c = codi.esd.Consumable_order_minor__c;
codcorderdet.Consumable_Arrived_order__c = Arrived_Order_Sheet.id;
//淇敼鍒拌揣鎵�鏈変汉
- codcorderdet.OwnerId = UserInfo.getUserId();
- codcorderdet.Arrive_date__c = Date.today();
- codcorderdet.Consumable_Product__c = codi.esd.Consumable_Product__c;
- codcorderdet.Asset_Model_No__c = codi.esd.Asset_Model_No__c;
- codcorderdet.Bar_Code__c = codi.esd.Bar_Code__c;
- codcorderdet.Deliver_date__c = codi.esd.Deliver_date__c;
- codcorderdet.SerialLotNo__c = codi.esd.SerialLotNo__c;
- codcorderdet.TracingCode__c = codi.esd.TracingCode__c;
- codcorderdet.Sterilization_limit__c = codi.esd.Sterilization_limit__c;
+ codcorderdet.OwnerId = UserInfo.getUserId();
+ codcorderdet.Arrive_date__c = Date.today();
+ codcorderdet.Consumable_Product__c = codi.esd.Consumable_Product__c;
+ codcorderdet.Asset_Model_No__c = codi.esd.Asset_Model_No__c;
+ codcorderdet.Bar_Code__c = codi.esd.Bar_Code__c;
+ codcorderdet.Deliver_date__c = codi.esd.Deliver_date__c;
+ codcorderdet.SerialLotNo__c = codi.esd.SerialLotNo__c;
+ codcorderdet.TracingCode__c = codi.esd.TracingCode__c;
+ codcorderdet.Sterilization_limit__c = codi.esd.Sterilization_limit__c;
//gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
- codcorderdet.Intra_Trade_List_RMB__c = (codi.esd.Intra_Trade_List_RMB__c == null || codi.esd.Intra_Trade_List_RMB__c == 0) ? codi.esd.Intra_Trade_List__c : codi.esd.Intra_Trade_List_RMB__c;
+ codcorderdet.Intra_Trade_List_RMB__c = (codi.esd.Intra_Trade_List_RMB__c == null ||
+ codi.esd.Intra_Trade_List_RMB__c == 0)
+ ? codi.esd.Intra_Trade_List__c
+ : codi.esd.Intra_Trade_List_RMB__c;
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
- if(hasLoseGoods){
+ if (hasLoseGoods) {
codcorderdet.loseInventory__c = true;
}
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 start
// 杩斿搧鏃讹紝鈶犺拷鍔犲�熻皟鍊熷嚭鏂逛俊鎭� 鈶′繚鐣欏�熻皟淇℃伅 鈶繚瀛楽AP鍜岀粡閿�鍟嗛娆″彂璐х粡閿�鍟�
- codcorderdet.Used_account__c = codi.esd.Used_account__c;
- codcorderdet.Transfer_Time__c = codi.esd.Transfer_Time__c;
- codcorderdet.Frist_Transfer_Agency__c = codi.esd.Frist_Transfer_Agency__c;
- codcorderdet.Agency_Transfer__c = codi.esd.Agency_Transfer__c;
+ codcorderdet.Used_account__c = codi.esd.Used_account__c;
+ codcorderdet.Transfer_Time__c = codi.esd.Transfer_Time__c;
+ codcorderdet.Frist_Transfer_Agency__c = codi.esd.Frist_Transfer_Agency__c;
+ codcorderdet.Agency_Transfer__c = codi.esd.Agency_Transfer__c;
- codcorderdet.Agencyinfo_fromSAP__c = codi.esd.Agencyinfo_fromSAP__c;
+ codcorderdet.Agencyinfo_fromSAP__c = codi.esd.Agencyinfo_fromSAP__c;
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------2------' + codi.esd.Frist_Storage_Agency__c));
- codcorderdet.Frist_Storage_Agency__c = codi.esd.Frist_Storage_Agency__c == null ? codi.esd.Dealer_Info_text__c : codi.esd.Frist_Storage_Agency__c;
+ codcorderdet.Frist_Storage_Agency__c = codi.esd.Frist_Storage_Agency__c == null
+ ? codi.esd.Dealer_Info_text__c
+ : codi.esd.Frist_Storage_Agency__c;
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 end
//add by rentx 2020-10-13 start 杩斿搧鏃舵柊鏁版嵁璁板綍SAP鍚堝悓鍙�
// codcorderdet.ContractNo_text__c = /*codi.esd.ContractNo__c*/;
// tcm start
if (String.isBlank(codi.esd.Consumable_order_minor__r.ContractNo__c)) {
- codcorderdet.ContractNo_text__c= codi.esd.ContractNo_text__c;
- }else {
- codcorderdet.ContractNo_text__c= codi.esd.Consumable_order_minor__r.ContractNo__c;
+ codcorderdet.ContractNo_text__c = codi.esd.ContractNo_text__c;
+ } else {
+ codcorderdet.ContractNo_text__c = codi.esd.Consumable_order_minor__r.ContractNo__c;
}
// tcm end
//add by rentx 2020-10-13 end 杩斿搧鏃舵柊鏁版嵁璁板綍SAP鍚堝悓鍙�
codcorderdetList.add(codcorderdet);
- codcList.add( codi.esd );
+ codcList.add(codi.esd);
}
}
//鏄庣粏2涓嶅瓨鍦ㄧ殑瀵瑰簲鐨勫埌璐ц鍗曟槑缁� 2017-07-05
Integer i = 1;
//for(ConsumableorderdetailsInfo ass : consumableInventoryUse){
- for(ConsumableorderdetailsInfo ass : consumableInventory){
+ for (ConsumableorderdetailsInfo ass : consumableInventory) {
hasReturnGoods = true;
Consumable_order_details2__c codcorderdetail = new Consumable_order_details2__c();
Consumable_order_details2__c retorddetail = new Consumable_order_details2__c();
@@ -3518,253 +4329,248 @@
// str = '0' + str;
// }
- if(ass.ReturnReason==null || ass.ReturnReason==''){
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'璇疯ˉ鍏呰繑鍝佸師鍥�'));
+ if (ass.ReturnReason == null || ass.ReturnReason == '') {
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '璇疯ˉ鍏呰繑鍝佸師鍥�'));
return null;
}
//鍒拌揣鏄庣粏
- codcorderdetail.Name = consumable_order_arr[0].Name + '-'+ str;
- codcorderdetail.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- codcorderdetail.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c;
+ codcorderdetail.Name = consumable_order_arr[0].Name + '-' + str;
+ codcorderdetail.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ codcorderdetail.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c;
//gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
- codcorderdetail.Asset_Model_No__c = ass.Prod.Asset_Model_No__c;
- codcorderdetail.Direct_Arrive_Product__c = true;
- codcorderdetail.Sterilization_limit__c = ass.sterilizationlimitDate;
- codcorderdetail.Consumable_Product__c = ass.Prod.id;
- codcorderdetail.Bar_Code__c = ass.barCodeNo;
- codcorderdetail.SerialLotNo__c = ass.serialNoorLotNo;
- codcorderdetail.TracingCode__c = ass.tracingCodeNo;
+ codcorderdetail.Asset_Model_No__c = ass.Prod.Asset_Model_No__c;
+ codcorderdetail.Direct_Arrive_Product__c = true;
+ codcorderdetail.Sterilization_limit__c = ass.sterilizationlimitDate;
+ codcorderdetail.Consumable_Product__c = ass.Prod.id;
+ codcorderdetail.Bar_Code__c = ass.barCodeNo;
+ codcorderdetail.SerialLotNo__c = ass.serialNoorLotNo;
+ codcorderdetail.TracingCode__c = ass.tracingCodeNo;
codcorderdetail.Consumable_Arrived_order__c = Arrived_Order_Sheet.id;
- codcorderdetail.Arrive_date__c = Date.today();
+ codcorderdetail.Arrive_date__c = Date.today();
//add by rentx 2020-10-14 start
// codcorderdetail.ContractNo_text__c = /*ass.esd.ContractNo__c*/;
// tcm start
if (String.isBlank(ass.esd.Consumable_order_minor__r.ContractNo__c)) {
- codcorderdetail.ContractNo_text__c= ass.esd.ContractNo_text__c;
- }else {
- codcorderdetail.ContractNo_text__c= ass.esd.Consumable_order_minor__r.ContractNo__c;
+ codcorderdetail.ContractNo_text__c = ass.esd.ContractNo_text__c;
+ } else {
+ codcorderdetail.ContractNo_text__c = ass.esd.Consumable_order_minor__r.ContractNo__c;
}
// tcm end
//add by rentx 2020-10-14 end
- codcorderdetList.add(codcorderdetail);
+ codcorderdetList.add(codcorderdetail);
//杩斿搧鏄庣粏
- retorddetail.Return_reason__c = ass.ReturnReason;
- retorddetail.Return_date__c = Date.today();
- retorddetail.ReturnGs_Uploader_ID__c = UserInfo.getUserId();
+ retorddetail.Return_reason__c = ass.ReturnReason;
+ retorddetail.Return_date__c = Date.today();
+ retorddetail.ReturnGs_Uploader_ID__c = UserInfo.getUserId();
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 start
// if(ass.esd.Dealer_Saled__c == false && ass.esd.Dealer_Shipment__c == false && ass.esd.Lose_Flag__c == true){
// retorddetail.Consumable_Inventory_order__c = Inventory_Order_Sheet.id;
// retorddetail.loseInventory__c = true;
// }
- retorddetail.Consumable_Return_order__c = Return_Order_Sheet.id;
+ retorddetail.Consumable_Return_order__c = Return_Order_Sheet.id;
// WYIN-BLZE48鐩樼偣涓㈠け浜у搧澧炲姞鍏ュ簱鏂瑰紡 update by vivek 2020-03-05 end
-
- retorddetail.Name = consumable_order_ret[0].Name + '-'+ str;
- retorddetail.RecordTypeId = System.Label.RT_ConOrderDetail2_Return;
- retorddetail.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c;
+ retorddetail.Name = consumable_order_ret[0].Name + '-' + str;
+ retorddetail.RecordTypeId = System.Label.RT_ConOrderDetail2_Return;
+ retorddetail.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c;
//gzw 鎵嬪姩鍏ュ簱 榛樿浜у搧鍗曚环 20230307
- retorddetail.Dealer_Info_IF__c = accountid;
- retorddetail.Asset_Model_No__c = ass.Prod.Asset_Model_No__c;
- retorddetail.Direct_Arrive_Product__c = true;
- retorddetail.Sterilization_limit__c = ass.sterilizationlimitDate;
- retorddetail.Consumable_Product__c = ass.Prod.id;
- retorddetail.Bar_Code__c = ass.barCodeNo;
- retorddetail.SerialLotNo__c = ass.serialNoorLotNo;
- retorddetail.TracingCode__c = ass.tracingCodeNo;
- retorddetail.Arrive_date__c = Date.today();
- retorddetail.Deliver_date__c = Date.today();
+ retorddetail.Dealer_Info_IF__c = accountid;
+ retorddetail.Asset_Model_No__c = ass.Prod.Asset_Model_No__c;
+ retorddetail.Direct_Arrive_Product__c = true;
+ retorddetail.Sterilization_limit__c = ass.sterilizationlimitDate;
+ retorddetail.Consumable_Product__c = ass.Prod.id;
+ retorddetail.Bar_Code__c = ass.barCodeNo;
+ retorddetail.SerialLotNo__c = ass.serialNoorLotNo;
+ retorddetail.TracingCode__c = ass.tracingCodeNo;
+ retorddetail.Arrive_date__c = Date.today();
+ retorddetail.Deliver_date__c = Date.today();
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 start
- retorddetail.Frist_Storage_Agency__c = accountName;
+ retorddetail.Frist_Storage_Agency__c = accountName;
// 杩藉姞棣栨鍏ュ簱缁忛攢鍟� add by gzw 2020-04-27 end
//add by rentx 2020-10-14 start
// retorddetail.ContractNo_text__c = /*ass.esd.ContractNo__c*/;
// tcm start
- if (String.isBlank(ass.esd.Consumable_order_minor__r.ContractNo__c)) {
- retorddetail.ContractNo_text__c= ass.esd.ContractNo_text__c;
- }else {
- retorddetail.ContractNo_text__c= ass.esd.Consumable_order_minor__r.ContractNo__c;
- }
+ if (String.isBlank(ass.esd.Consumable_order_minor__r.ContractNo__c)) {
+ retorddetail.ContractNo_text__c = ass.esd.ContractNo_text__c;
+ } else {
+ retorddetail.ContractNo_text__c = ass.esd.Consumable_order_minor__r.ContractNo__c;
+ }
// tcm end
//add by rentx 2020-10-14 end
- codcorderdetList.add(retorddetail);
- i++;
- }
+ codcorderdetList.add(retorddetail);
+ i++;
+ }
- // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------end------'));
- // return null;
+ // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------end------'));
+ // return null;
- if(codcList.size()>0){
- ControllerUtil.updateOrderDetailsSatus( codcList );
+ if (codcList.size() > 0) {
+ ControllerUtil.updateOrderDetailsSatus(codcList);
//insert codcorderdetList;
}
- if (codcorderdetList.size()>0){
- System.debug('codcorderdetList +++++ '+ codcorderdetList);
+ if (codcorderdetList.size() > 0) {
+ System.debug('codcorderdetList +++++ ' + codcorderdetList);
insert codcorderdetList;
}
// WYIN-BPE3T4 铏氭嫙鐩樼偣鍗� update by vivek 2020-05-11 start
- if(conOrderDetail2InList.size() > 0){
+ if (conOrderDetail2InList.size() > 0) {
addInventoryDetails1(conOrderDetail2InList);
}
// WYIN-BPE3T4 铏氭嫙鐩樼偣鍗� update by vivek 2020-05-11 start
- if(hasReturnGoods){
+ if (hasReturnGoods) {
// WYIN-BPE3T4 铏氭嫙鐩樼偣鍗� update by vivek 2020-05-11 start
// return ToReturnGoodsPage();
- if(hasLoseGoods){
+ if (hasLoseGoods) {
return ToInventoryGoodsPage();
// return null;
- }else{
+ } else {
return ToReturnGoodsPage();
// return null;
}
// WYIN-BPE3T4 铏氭嫙鐩樼偣鍗� update by vivek 2020-05-11 start
- }
- else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'娌℃湁闇�瑕佺櫥褰曠殑杩斿搧'));
+ } else {
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '娌℃湁闇�瑕佺櫥褰曠殑杩斿搧'));
return null;
}
-
- }else{
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'娌℃湁闇�瑕佺櫥褰曠殑杩斿搧'));
+ } else {
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '娌℃湁闇�瑕佺櫥褰曠殑杩斿搧'));
return null;
}
- }catch(Exception e){
+ } catch (Exception e) {
Database.rollback(sp);
ApexPages.addMessages(e);
return null;
}
}
- public void makeArrivedSummary(){
+ public void makeArrivedSummary() {
detailsSummary = new List<ConsumableorderdetailsInfo>();
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'consumableInventory ' + consumableInventory));
- try{
+ try {
ConsumableorderdetailsInfo arriveDdetailsSummary = null;
- Map<String,ConsumableorderdetailsInfo> detailsSummaryMap = new Map<String,ConsumableorderdetailsInfo>();
- for(ConsumableorderdetailsInfo ass : ConsumableorderdetailsRecords){
- if(detailsSummaryMap.containsKey(ass.Prod.Id)){
- detailsSummaryMap.get(ass.Prod.Id).arrivedCount ++;
+ Map<String, ConsumableorderdetailsInfo> detailsSummaryMap = new Map<String, ConsumableorderdetailsInfo>();
+ for (ConsumableorderdetailsInfo ass : ConsumableorderdetailsRecords) {
+ if (detailsSummaryMap.containsKey(ass.Prod.Id)) {
+ detailsSummaryMap.get(ass.Prod.Id).arrivedCount++;
detailsSummaryMap.get(ass.Prod.Id).arriveAmount += ass.esd.Intra_Trade_List_RMB__c;
- }else{
+ } else {
arriveDdetailsSummary = new ConsumableorderdetailsInfo(ass.Prod);
arriveDdetailsSummary.arrivedCount = 1;
arriveDdetailsSummary.arriveAmount = ass.esd.Intra_Trade_List_RMB__c;
detailsSummaryMap.put(ass.Prod.Id, arriveDdetailsSummary);
}
}
- for(ConsumableorderdetailsInfo ass : consumableInventory){
- if(detailsSummaryMap.containsKey(ass.Prod.Id)){
- detailsSummaryMap.get(ass.Prod.Id).arrivedCount ++;
- if(EsetId != null && EsetId != ''){
+ for (ConsumableorderdetailsInfo ass : consumableInventory) {
+ if (detailsSummaryMap.containsKey(ass.Prod.Id)) {
+ detailsSummaryMap.get(ass.Prod.Id).arrivedCount++;
+ if (EsetId != null && EsetId != '') {
detailsSummaryMap.get(ass.Prod.Id).arriveAmount += ass.Prod.Intra_Trade_List_RMB__c;
- }else{
+ } else {
detailsSummaryMap.get(ass.Prod.Id).arriveAmount += 0;
}
- }else{
+ } else {
arriveDdetailsSummary = new ConsumableorderdetailsInfo(ass.Prod);
arriveDdetailsSummary.arrivedCount = 1;
- if(EsetId != null && EsetId != ''){
+ if (EsetId != null && EsetId != '') {
arriveDdetailsSummary.arriveAmount = ass.Prod.Intra_Trade_List_RMB__c;
- }else{
+ } else {
arriveDdetailsSummary.arriveAmount = 0;
}
detailsSummaryMap.put(ass.Prod.Id, arriveDdetailsSummary);
}
}
- for(String key : detailsSummaryMap.keySet()){
+ for (String key : detailsSummaryMap.keySet()) {
detailsSummary.add(detailsSummaryMap.get(key));
}
- }catch(Exception e){
+ } catch (Exception e) {
//Database.rollback(sp);
- throw new ControllerUtil.myException('e::'+e + ' linenumber::'+e.getLineNumber());
+ throw new ControllerUtil.myException('e::' + e + ' linenumber::' + e.getLineNumber());
// ApexPages.addMessages(e);
// ApexPages.addMessages(e.getLineNumber() + ' 11111111111111111');
- //return null;
+ //return null;
+ }
}
- }
//璺宠浆鍒拌繑鍝侀〉闈�
- public Pagereference ToReturnGoodsPage(){
- PageReference ref = new Pagereference('/'+return_Order_id);
- ref.setRedirect(true);
- return ref;
- }
-
- // WYIN-BPE3T4 铏氭嫙鐩樼偣鍗� update by vivek 2020-05-11 start
- public Pagereference ToInventoryGoodsPage(){
- PageReference ref = new Pagereference('/'+inventory_Order_id);
- ref.setRedirect(true);
- return ref;
- }
- // WYIN-BPE3T4 铏氭嫙鐩樼偣鍗� update by vivek 2020-05-11 end
-
- // 璺宠浆鍒板埌璐ц鍗曟槑缁�
- public PageReference UnabletoEdit(){
- PageReference ref = new Pagereference('/ArriveGsDetails?EsetId='+arriveId);
+ public Pagereference ToReturnGoodsPage() {
+ PageReference ref = new Pagereference('/' + return_Order_id);
ref.setRedirect(true);
return ref;
}
- public class ConsumableorderdetailsInfo implements Comparable {
- public Consumable_order_details2__c esd { get; set; }
- public Product2__c Prod { get; set; }
- public String ProductName { get; set; }
- //public Boolean canSELECT { get; set; }
- public String barCodeNo { get; set; }
- public Date sterilizationlimitDate { get; set; }
- public String serialNoorLotNo { get; set; }
- public String tracingCodeNo { get; set; }
- public String ReturnReason { get; set; }
- public String oldConsumableCount { get; set; }
- public String ErrorReason { get; set; }
- public boolean canEdit { get; set; }
- public Integer intMark { get; set; }
- public Decimal arriveAmount { get; set; }
- public Decimal arrivedCount { get; set; }
+ // WYIN-BPE3T4 铏氭嫙鐩樼偣鍗� update by vivek 2020-05-11 start
+ public Pagereference ToInventoryGoodsPage() {
+ PageReference ref = new Pagereference('/' + inventory_Order_id);
+ ref.setRedirect(true);
+ return ref;
+ }
+ // WYIN-BPE3T4 铏氭嫙鐩樼偣鍗� update by vivek 2020-05-11 end
- public String ReportProductExpirationDate {get;set;}
- public ConsumableorderdetailsInfo(Consumable_order_details2__c e,string str) {
- esd = e;
- Prod = e.Consumable_Product__r;
+ // 璺宠浆鍒板埌璐ц鍗曟槑缁�
+ public PageReference UnabletoEdit() {
+ PageReference ref = new Pagereference('/ArriveGsDetails?EsetId=' + arriveId);
+ ref.setRedirect(true);
+ return ref;
+ }
+
+ public class ConsumableorderdetailsInfo implements Comparable {
+ public Consumable_order_details2__c esd { get; set; }
+ public Product2__c Prod { get; set; }
+ public String ProductName { get; set; }
+ //public Boolean canSELECT { get; set; }
+ public String barCodeNo { get; set; }
+ public Date sterilizationlimitDate { get; set; }
+ public String serialNoorLotNo { get; set; }
+ public String tracingCodeNo { get; set; }
+ public String ReturnReason { get; set; }
+ public String oldConsumableCount { get; set; }
+ public String ErrorReason { get; set; }
+ public boolean canEdit { get; set; }
+ public Integer intMark { get; set; }
+ public Decimal arriveAmount { get; set; }
+ public Decimal arrivedCount { get; set; }
+
+ public String ReportProductExpirationDate { get; set; }
+ public ConsumableorderdetailsInfo(Consumable_order_details2__c e, string str) {
+ esd = e;
+ Prod = e.Consumable_Product__r;
oldConsumableCount = e.name;
- ErrorReason = str;
+ ErrorReason = str;
intMark = 1;
if (e.Report_Product_Expiration__c != null) {
- ReportProductExpirationDate = e.Report_Product_Expiration__c.format();
+ ReportProductExpirationDate = e.Report_Product_Expiration__c.format();
}
-
}
public ConsumableorderdetailsInfo(Consumable_order_details2__c e) {
canEdit = false;
- if(e.Box_Piece__c=='鐩�'){
+ if (e.Box_Piece__c == '鐩�') {
e.Rrturn_count__c = 1;
canEdit = true;
}
- esd = e;
- Prod = e.Consumable_Product__r;
+ esd = e;
+ Prod = e.Consumable_Product__r;
oldConsumableCount = e.name;
if (e.Report_Product_Expiration__c != null) {
- ReportProductExpirationDate = e.Report_Product_Expiration__c.format();
+ ReportProductExpirationDate = e.Report_Product_Expiration__c.format();
}
-
}
- public ConsumableorderdetailsInfo(Product2__c e,List<String> barinfoL) {
+ public ConsumableorderdetailsInfo(Product2__c e, List<String> barinfoL) {
esd = new Consumable_order_details2__c();
ProductName = e.Name__c;
Prod = e;
barCodeNo = barinfoL[0];
- if(String.isNotBlank(barinfoL[1])){
+ if (String.isNotBlank(barinfoL[1])) {
sterilizationlimitDate = Date.valueOf(barinfoL[1]);
}
serialNoorLotNo = barinfoL[2];
@@ -3772,19 +4578,18 @@
ReturnReason = '';
}
- public ConsumableorderdetailsInfo(Consumable_order_details2__c e,List<String> barinfoL) {
+ public ConsumableorderdetailsInfo(Consumable_order_details2__c e, List<String> barinfoL) {
esd = e;
- Prod = e.Consumable_Product__r;
+ Prod = e.Consumable_Product__r;
barCodeNo = barinfoL[0];
- if(String.isNotBlank(barinfoL[1])){
+ if (String.isNotBlank(barinfoL[1])) {
sterilizationlimitDate = Date.valueOf(barinfoL[1]);
}
serialNoorLotNo = barinfoL[2];
tracingCodeNo = barinfoL[3];
if (e.Report_Product_Expiration__c != null) {
- ReportProductExpirationDate = e.Report_Product_Expiration__c.format();
+ ReportProductExpirationDate = e.Report_Product_Expiration__c.format();
}
-
}
public ConsumableorderdetailsInfo(Product2__c e) {
Prod = e;
diff --git a/force-app/main/default/classes/ArriveGoodsControllerTest.cls b/force-app/main/default/classes/ArriveGoodsControllerTest.cls
index 786dab4..63df10b 100644
--- a/force-app/main/default/classes/ArriveGoodsControllerTest.cls
+++ b/force-app/main/default/classes/ArriveGoodsControllerTest.cls
@@ -1,4059 +1,3549 @@
@isTest
private class ArriveGoodsControllerTest {
- @isTest
- static void myUnitTest() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ //閫夋嫨绛夊緟鍏ュ簱,鍖呮嫭01 鍜�241
+ @isTest
+ static void arriveWithID() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'N3047730', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
+
+ //鍙戣揣鏄庣粏
+ //fahuo
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.TracingCode__c = 'BXJRF';
+ Orderdet1.SerialLotNo__c = '5ZK';
+
+ insert Orderdet1;
+
+ PageReference page = new PageReference('/apex/ArriveGoods?ESetid=' + Order1.Id);
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRA\n241N30477301115120017181000105ZK250BXJRI\n241N30477301115120017181000105ZK250\n01049531702003111115120017181000105ZK250';
+ Controller.SearchPro();
+ // System.assertEquals(1, Controller.ConsumableorderdetailsRecords.size());
+ // System.assertEquals(2, Controller.consumableInventory.size());
+ Controller.ArriveGoodsConfim();
+ List<Consumable_order_details2__c> ins = [
+ SELECT Id, Name
+ FROM Consumable_order_details2__c
+ ];
+ // System.assertEquals(3, ins.size());
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'Test002',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //璁㈠崟
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- // Order1.Dealer_Info__c = myAccount1.id;
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order1.Total_num__c = 3;
- Order1.OrderNumber_arrived__c = 1;
- Order1.Delivery_detail_count__c = 1;
- Order1.Order_ProType__c = 'ET';
- insert Order1;
+ //浜у搧鐩存帴鍏ュ簱,鍖呮嫭01 鍜�241
+ @isTest
+ static void arriveWithoutID() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 40;
- insert Orderdet;
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- //鍙戣揣鏄庣粏
- //鍒拌揣姝g‘淇℃伅
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001002';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Test01';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
- Orderdet1.TracingCode__c = 'BXJRA';
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- //鍙栨秷浜у搧
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001003';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Test01';
- //Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
- Orderdet2.Cancellation_Date__c = Date.today();
- Orderdet2.TracingCode__c = 'BXJRB';
- //閿�鍞骇鍝�
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001004';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Test01';
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
- Orderdet3.Used_date__c = Date.today();
- Orderdet3.Arrive_date__c = Date.today();
- Orderdet3.TracingCode__c = 'BXJRC';
- //Orderdet3.Box_Piece__c = '鐩�';
-
- //鍑哄簱浜у搧
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001005';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Test01';
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
- Orderdet4.Send_Date__c = Date.today();
- Orderdet4.Arrive_date__c = Date.today();
- Orderdet4.TracingCode__c = 'BXJRD';
-
- //宸插埌璐т骇鍝�
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001006';
- Orderdet5.Consumable_order_minor__c = Order1.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Test01';
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
- Orderdet5.Arrive_date__c = Date.today();
- Orderdet5.TracingCode__c = 'BXJRE';
-
- //鍙戣揣鏄庣粏
- //绠$悊缂栫爜鍖呭惈鏁板瓧
- Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
- Orderdet6.Name = 'OCM_01_001002';
- Orderdet6.Consumable_order_minor__c = Order1.Id;
- Orderdet6.Consumable_Product__c = pro1.Id;
- Orderdet6.Asset_Model_No__c = 'Test01';
- Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BX123';
- Orderdet6.TracingCode__c = 'BX123';
-
- //鍙戦敊搴� 鏈埌璐�
- Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
- Orderdets8.Name = 'OCM_01_001011';
- Orderdets8.Consumable_order_minor__c = Order1.Id;
- Orderdets8.Consumable_Product__c = pro1.Id;
- Orderdets8.Asset_Model_No__c = 'Test01';
- Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
- Orderdets8.Box_Piece__c = '鐩�';
- Orderdets8.TracingCode__c = 'BXsys';
-
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet2,
- Orderdet3,
- Orderdet4,
- Orderdet5,
- Orderdet6,
- Orderdets8
- };
-
- List<Consumable_orderdetails__c> cod1 = [
- SELECT Id
- FROM Consumable_orderdetails__c
- WHERE Consumable_order__c = :Order1.Id
- ];
- System.assertEquals(1, cod1.size());
-
- PageReference page = new PageReference(
- '/apex/ArriveGoods?Esetid=' + Order1.Id
- );
-
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '';
- Controller.SearchPro();
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXsys\n01049531702003111115120017181000105ZK250BXsun\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BX111\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BX123';
- Controller.SearchPro();
-
- // System.assertEquals(3, controller.ConsumableorderdetailsRecordsdummy.size()); //tcm
- Controller.ArriveGoodsConfim();
- System.Test.stopTest();
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',ProductCode_Ext__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='N3047731',ProductCode_Ext__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test01', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '';
+ Controller.SearchPro();
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n241N30477311115120017181000105ZK250BXJRA\n241Test021115120017181000105ZK250\n01049531702003111115120017181000105ZK250';
+ Controller.SearchPro();
+ Controller.ArriveGoodsConfim();
+ List<Consumable_order_details2__c> ins = [
+ SELECT Id, Name
+ FROM Consumable_order_details2__c
+ WHERE Bar_Code__c IN ('01049531702003111115120017181000105ZK250BXJRF', '241N30477311115120017181000105ZK250BXJRA')
+ ];
+ // System.assertEquals(2, ins.size());
+ System.Test.stopTest();
+ }
}
- }
- //閫夋嫨绛夊緟鍏ュ簱,鍖呮嫭01 鍜�241
- @isTest
- static void arriveWithID() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ //鏁翠綋鍒拌揣
+ @isTest
+ static void ArriveTest() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ insert new List<Product2__c>{ pro1 };
+ // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id);
+ // insert myAccount1;
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_02_001';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.Dealer_Info__c = myAccount1.Id;
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert Order2;
+ //鍙戦敊搴� 鏈埌璐�
+ Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
+ Orderdets8.Name = 'OCM_01_001011';
+ Orderdets8.Consumable_order_minor__c = Order2.Id;
+ Orderdets8.Consumable_Product__c = pro1.Id;
+ Orderdets8.Asset_Model_No__c = 'Test01';
+ Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
+ Orderdets8.Box_Piece__c = '鐩�';
+ Orderdets8.TracingCode__c = 'BXsys';
+ Orderdets8.SerialLotNo__c = '5ZK';
+ insert Orderdets8;
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.Order_ProType__c = 'ET';
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert Order1;
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
+
+ //鍒拌揣姝g‘淇℃伅
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001002';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet1.Box_Piece__c = '鐩�';
+ Orderdet1.TracingCode__c = 'BXJRA';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ //娌″埌璐�
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001003';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
+ Orderdet2.Box_Piece__c = '鐩�';
+ Orderdet2.TracingCode__c = 'BXJRB';
+ Orderdet2.SerialLotNo__c = '5ZK';
+ //閿�鍞骇鍝�
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001004';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Test01';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet3.Consumable_Sale_order__c = Order1.Id;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.Box_Piece__c = '鐩�';
+ Orderdet3.TracingCode__c = 'BXJRC';
+ Orderdet3.SerialLotNo__c = '5ZK';
+ //Orderdet3.Box_Piece__c = '涓�';
+
+ //鍑哄簱浜у搧
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001005';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Test01';
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.Box_Piece__c = '鐩�';
+ Orderdet4.TracingCode__c = 'BXJRD';
+ Orderdet4.SerialLotNo__c = '5ZK';
+ //Orderdet4.Box_Piece__c = '鐩�';
+ //Orderdet4.Return_date__c = null;
+
+ //宸插埌璐т骇鍝�
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001006';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Test01';
+ Orderdet5.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet5.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
+ Orderdet5.Arrive_date__c = Date.today();
+ Orderdet5.Box_Piece__c = '鐩�';
+ Orderdet5.TracingCode__c = 'BXJRE';
+ Orderdet5.SerialLotNo__c = '5ZK';
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5 };
+
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
+ System.Test.setCurrentPage(page);
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BX111\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BXsys';
+ Controller.SearchPro();
+
+ System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecords[0].esd.Name);
+ // System.assertEquals(2, controller.ConsumableorderdetailsRecordserror.size());
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'N3047730',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'N3047731',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //璁㈠崟
+ //鏁翠綋鍒拌揣
+ @isTest
+ static void ArriveTest1() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order1.Order_ProType__c = 'ET';
- insert Order1;
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- //鍙戣揣鏄庣粏
- //fahuo
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001001';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Test01';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- Orderdet1.TracingCode__c = 'BXJRF';
- Orderdet1.SerialLotNo__c = '5ZK';
+ // // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id);
+ // insert myAccount1;
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_02_001';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.Dealer_Info__c = myAccount1.Id;
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert Order2;
+ //鍙戦敊搴� 鏈埌璐�
+ Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
+ Orderdets8.Name = 'OCM_01_001011';
+ Orderdets8.Consumable_order_minor__c = Order2.Id;
+ Orderdets8.Consumable_Product__c = pro1.Id;
+ Orderdets8.Asset_Model_No__c = 'Test01';
+ Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
+ Orderdets8.Box_Piece__c = '鐩�';
+ Orderdets8.TracingCode__c = 'BXsys';
+ Orderdets8.SerialLotNo__c = '5ZK';
+ insert Orderdets8;
- insert Orderdet1;
+ //system.runAs(myUser_Test){
+ //璁㈠崟
- PageReference page = new PageReference(
- '/apex/ArriveGoods?ESetid=' + Order1.Id
- );
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRA\n241N30477301115120017181000105ZK250BXJRI\n241N30477301115120017181000105ZK250\n01049531702003111115120017181000105ZK250';
- Controller.SearchPro();
- // System.assertEquals(1, Controller.ConsumableorderdetailsRecords.size());
- // System.assertEquals(2, Controller.consumableInventory.size());
- Controller.ArriveGoodsConfim();
- List<Consumable_order_details2__c> ins = [
- SELECT Id, Name
- FROM Consumable_order_details2__c
- ];
- // System.assertEquals(3, ins.size());
- System.Test.stopTest();
- }
- }
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.Order_ProType__c = 'ET';
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert Order1;
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
- //浜у搧鐩存帴鍏ュ簱,鍖呮嫭01 鍜�241
- @isTest
- static void arriveWithoutID() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ //鍒拌揣姝g‘淇℃伅
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001002';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet1.TracingCode__c = 'BXJRA';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ //娌″埌璐�
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001003';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
+ Orderdet2.TracingCode__c = 'BXJRB';
+ Orderdet2.SerialLotNo__c = '5ZK';
+ //閿�鍞骇鍝�
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001004';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Test01';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet3.Consumable_Sale_order__c = Order1.Id;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.TracingCode__c = 'BXJRC';
+ Orderdet3.SerialLotNo__c = '5ZK';
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
+ //鍑哄簱浜у搧
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001005';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Test01';
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.TracingCode__c = 'BXJRD';
+ Orderdet4.SerialLotNo__c = '5ZK';
+ //Orderdet4.Box_Piece__c = '鐩�';
+ //Orderdet4.Return_date__c = null;
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ //宸插埌璐т骇鍝�
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001006';
+ Orderdet5.Consumable_order_minor__c = Order2.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Test01';
+ Orderdet5.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet5.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
+ Orderdet5.Arrive_date__c = Date.today();
+ Orderdet5.Box_Piece__c = '鐩�';
+ Orderdet5.TracingCode__c = 'BXJRE';
+ Orderdet5.SerialLotNo__c = '5ZK';
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5 };
+
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
+ System.Test.setCurrentPage(page);
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BXsun\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BXsys';
+ Controller.SearchPro();
+
+ System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecords[0].esd.Name);
+ // System.assertEquals(1, controller.ConsumableorderdetailsRecordserror.size());
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',ProductCode_Ext__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='N3047731',ProductCode_Ext__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test01',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'N3047731',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '';
- Controller.SearchPro();
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n241N30477311115120017181000105ZK250BXJRA\n241Test021115120017181000105ZK250\n01049531702003111115120017181000105ZK250';
- Controller.SearchPro();
- Controller.ArriveGoodsConfim();
- List<Consumable_order_details2__c> ins = [
- SELECT Id, Name
- FROM Consumable_order_details2__c
- WHERE
- Bar_Code__c IN (
- '01049531702003111115120017181000105ZK250BXJRF',
- '241N30477311115120017181000105ZK250BXJRA'
- )
- ];
- // System.assertEquals(2, ins.size());
- System.Test.stopTest();
- }
- }
- //鏁翠綋鍒拌揣
- @isTest
- static void ArriveTest() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ //杩斿搧
+ @isTest
+ static void productReturn() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Oly_TriggerHandler.bypass('ConsumableAssetHander');
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ //杩斿搧璁㈠崟
+
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_002';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '杩斿搧';
+ Order2.Dealer_Info__c = myAccount1.id;
+ Order2.RecordTypeid = System.Label.Dealer_Returned_Label;
+ insert Order1;
+ insert Order2;
+
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
+
+ //鍙戣揣鏄庣粏
+ //fahuo
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Pro001';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.TracingCode__c = 'BXJRF';
+ //daohuo
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Pro001';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.Arrive_date__c = Date.today();
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
+ Orderdet2.TracingCode__c = 'BXJRF';
+ //sale
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Pro001';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Consumable_Sale_order__c = Order1.Id;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
+ Orderdet3.Box_Piece__c = '鐩�';
+ Orderdet3.TracingCode__c = 'BXJRF';
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Pro001';
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
+ Orderdet4.Box_Piece__c = '涓�';
+ Orderdet4.TracingCode__c = 'BXJRF';
+ //quxiao
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001005';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Pro001';
+ Orderdet5.Cancellation_Date__c = Date.today();
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
+ Orderdet5.Box_Piece__c = '鐩�';
+ Orderdet5.TracingCode__c = 'BXJRF';
+ //fanpin
+ Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
+ Orderdet6.Name = 'OCM_01_001006';
+ Orderdet6.Consumable_order_minor__c = Order1.Id;
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Asset_Model_No__c = 'Pro001';
+ Orderdet6.Consumable_Return_order__c = Order2.Id;
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet6.Box_Piece__c = '涓�';
+ Orderdet6.TracingCode__c = 'BXJRF';
+
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5, Orderdet6 };
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRZ\n01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRI';
+ Controller.SearchPro();
+ //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
+ //System.assertEquals('OCM_01_001003', controller.ShowGoodsofReturnList[0].esd.Name);
+ //System.assertEquals('OCM_01_001004', controller.ShowGoodsofReturnList[1].esd.Name);
+ // System.assertEquals(5, controller.ConsumableorderdetailsRecordserror.size()); //tcm
+ //System.assertEquals('Test01', controller.ConsumableorderdetailsRecordserror[1].Prod.Name__c);
+ //System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecordserror[2].esd.Name);
+ //System.assertEquals('OCM_02_001001', controller.ConsumableorderdetailsRecordserror[3].esd.Name);
+ Controller.GoodsReturnCheck();
+ controller.ShowGoodsofReturnList[0].esd.Return_reason__c = '澶氬彂';
+ controller.ShowGoodsofReturnList[0].esd.Rrturn_count__c = 1;
+ //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
+ Controller.UpdateGoodsOfReturn();
+ Controller.ToReturnGoodsPage();
+ Controller.geterrorsize();
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- insert new List<Product2__c>{ pro1 };
- // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id);
- // insert myAccount1;
- Consumable_order__c Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_02_001';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '璁㈠崟';
- Order2.Dealer_Info__c = myAccount1.Id;
- Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- insert Order2;
- //鍙戦敊搴� 鏈埌璐�
- Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
- Orderdets8.Name = 'OCM_01_001011';
- Orderdets8.Consumable_order_minor__c = Order2.Id;
- Orderdets8.Consumable_Product__c = pro1.Id;
- Orderdets8.Asset_Model_No__c = 'Test01';
- Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
- Orderdets8.Box_Piece__c = '鐩�';
- Orderdets8.TracingCode__c = 'BXsys';
- Orderdets8.SerialLotNo__c = '5ZK';
- insert Orderdets8;
+ //杩斿搧
+ @isTest
+ static void productReturn_new() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.Order_ProType__c = 'ET';
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- insert Order1;
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- //鍒拌揣姝g‘淇℃伅
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001002';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Test01';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
- Orderdet1.Box_Piece__c = '鐩�';
- Orderdet1.TracingCode__c = 'BXJRA';
- Orderdet1.SerialLotNo__c = '5ZK';
- //娌″埌璐�
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001003';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Test01';
- Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
- Orderdet2.Box_Piece__c = '鐩�';
- Orderdet2.TracingCode__c = 'BXJRB';
- Orderdet2.SerialLotNo__c = '5ZK';
- //閿�鍞骇鍝�
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001004';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Test01';
- Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet3.Consumable_Sale_order__c = Order1.Id;
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
- Orderdet3.Used_date__c = Date.today();
- Orderdet3.Arrive_date__c = Date.today();
- Orderdet3.Box_Piece__c = '鐩�';
- Orderdet3.TracingCode__c = 'BXJRC';
- Orderdet3.SerialLotNo__c = '5ZK';
- //Orderdet3.Box_Piece__c = '涓�';
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- //鍑哄簱浜у搧
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001005';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Test01';
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
- Orderdet4.Send_Date__c = Date.today();
- Orderdet4.Arrive_date__c = Date.today();
- Orderdet4.Box_Piece__c = '鐩�';
- Orderdet4.TracingCode__c = 'BXJRD';
- Orderdet4.SerialLotNo__c = '5ZK';
- //Orderdet4.Box_Piece__c = '鐩�';
- //Orderdet4.Return_date__c = null;
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+ //Consumable_order__c coc = [select Dealer_Info__r.name from Consumable_order__c where Id =:Order1.Id];
+ //system.assertEquals('qeee',coc.Dealer_Info__r.name);
- //宸插埌璐т骇鍝�
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001006';
- Orderdet5.Consumable_order_minor__c = Order1.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Test01';
- Orderdet5.Consumable_Arrived_order__c = Order1.Id;
- Orderdet5.Consumable_Shipment_order__c = Order1.Id;
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
- Orderdet5.Arrive_date__c = Date.today();
- Orderdet5.Box_Piece__c = '鐩�';
- Orderdet5.TracingCode__c = 'BXJRE';
- Orderdet5.SerialLotNo__c = '5ZK';
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet2,
- Orderdet3,
- Orderdet4,
- Orderdet5
- };
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_001001';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
- ArriveGoodsController Controller = new ArriveGoodsController();
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
- System.Test.setCurrentPage(page);
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BX111\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BXsys';
- Controller.SearchPro();
+ //鍙戣揣鏄庣粏
+ //fahuo
+ /*Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Pro001';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Box_Piece__c ='鐩�';
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ //daohuo
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Pro001';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Box_Piece__c ='鐩�';
+ Orderdet2.Arrive_date__c = Date.today();
+ //Orderdet2.Send_Date__c = Date.today();
+ //Orderdet2.Used_date__c= Date.today();
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';*/
+ //sale
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Pro001';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet3.Consumable_Sale_order__c = Order1.Id;
+ Orderdet3.Box_Piece__c = '鐩�';
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet3.TracingCode__c = 'BXJRF';
+ Orderdet3.SerialLotNo__c = '5ZK';
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Pro001';
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ Orderdet4.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet4.Box_Piece__c = '涓�';
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
+ Orderdet4.TracingCode__c = 'BXJRN';
+ Orderdet4.SerialLotNo__c = '5ZK';
+ //quxiao
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001005';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Pro001';
+ Orderdet5.Cancellation_Date__c = Date.today();
+ Orderdet5.Cancellation_Flag__c = true;
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
+ Orderdet5.Box_Piece__c = '涓�';
+ Orderdet5.TracingCode__c = 'BXJRZ';
+ Orderdet5.SerialLotNo__c = '5ZK';
+ insert new List<Consumable_order_details2__c>{ Orderdet3, Orderdet4, Orderdet5 };
- System.assertEquals(
- 'OCM_01_001002',
- controller.ConsumableorderdetailsRecords[0].esd.Name
- );
- // System.assertEquals(2, controller.ConsumableorderdetailsRecordserror.size());
- System.Test.stopTest();
- }
- }
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRZ\n01049531702003111115120017181000105ZK250BXJRR';
+ Controller.SearchPro();
+ // System.assertEquals(1, controller.ConsumableorderdetailsRecordserror.size());
+ System.assertEquals(2, controller.ShowGoodsofReturnList.size());
+ controller.ShowGoodsofReturnList[0].esd.Return_reason__c = '澶氬彂';
+ controller.ShowGoodsofReturnList[1].esd.Return_reason__c = '澶氬彂';
+ controller.ShowGoodsofReturnList[0].esd.Rrturn_count__c = 1;
+ Controller.UpdateGoodsOfReturn();
- //鏁翠綋鍒拌揣
- @isTest
- static void ArriveTest1() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ list<String> list1 = new List<String>();
+ list1.add(Controller.barcode = '01234567898');
+ Controller.inventoryEntryNoESetId(list1);
- Oly_TriggerHandler.bypass('ConsumableAssetHander');
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
+ list1.clear();
+ list1.add(Controller.barcode = '012345678901234A67');
+ Controller.inventoryEntryNoESetId(list1);
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ list1.clear();
+ list1.add(Controller.barcode = '0123456789012345117AA01');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '01234567890123456789012349990001');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0123456789012345177AA0000000000001');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0123456789012345177AA1111111111111');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241345');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '2413456');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '24134567');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241345678');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '2413456789');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '24134567890');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241345678901');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901231177890121215678901234');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901231106789012105678901234');
+ Controller.inventoryEntryNoESetId(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901231106789012105625001234');
+ Controller.inventoryEntryNoESetId(list1);
+ System.Test.stopTest();
+ }
}
- // // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'Test002',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id);
- // insert myAccount1;
- Consumable_order__c Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_02_001';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '璁㈠崟';
- Order2.Dealer_Info__c = myAccount1.Id;
- Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- insert Order2;
- //鍙戦敊搴� 鏈埌璐�
- Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
- Orderdets8.Name = 'OCM_01_001011';
- Orderdets8.Consumable_order_minor__c = Order2.Id;
- Orderdets8.Consumable_Product__c = pro1.Id;
- Orderdets8.Asset_Model_No__c = 'Test01';
- Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
- Orderdets8.Box_Piece__c = '鐩�';
- Orderdets8.TracingCode__c = 'BXsys';
- Orderdets8.SerialLotNo__c = '5ZK';
- insert Orderdets8;
+ //鐩存帴鍒拌揣
+ @isTest
+ static void arrivedirect() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- //system.runAs(myUser_Test){
- //璁㈠崟
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.Order_ProType__c = 'ET';
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- insert Order1;
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- //鍒拌揣姝g‘淇℃伅
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001002';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Test01';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
- Orderdet1.TracingCode__c = 'BXJRA';
- Orderdet1.SerialLotNo__c = '5ZK';
- //娌″埌璐�
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001003';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Test01';
- Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
- Orderdet2.TracingCode__c = 'BXJRB';
- Orderdet2.SerialLotNo__c = '5ZK';
- //閿�鍞骇鍝�
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001004';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Test01';
- Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- Orderdet3.Consumable_Sale_order__c = Order1.Id;
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
- Orderdet3.Used_date__c = Date.today();
- Orderdet3.Arrive_date__c = Date.today();
- Orderdet3.TracingCode__c = 'BXJRC';
- Orderdet3.SerialLotNo__c = '5ZK';
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = '2344', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = '82324', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //浜у搧娉ㄥ唽璇�
+ Product_Register__c prc = new Product_Register__c(
+ Name = '鍥芥娉ㄨ繘20162220210',
+ MedPrdClass__c = '3',
+ ValidFrom__c = date.newinstance(2018, 7, 22),
+ ValidTo__c = date.newinstance(2028, 7, 22),
+ RegisterNoClass_Old__c = '6815',
+ RegisterNoClass_New__c = '6815',
+ RegisterNoStatus__c = '鏈夋晥'
+ );
+ insert prc;
+ //鏂版棫鍏崇郴瀵圭収琛�
+ //Product_Register_contrast__c prcc = new Product_Register_contrast__c(
+ // Name = 'Test20181204',
+ // Register_new__c = '314',
+ // Register_old__c = '36815'
+ // );
+ //insert prcc;
+ //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod01
+ Product_Register_Link__c prlc = new Product_Register_Link__c(Product2__c = prod01.Id, Product_Register__c = prc.Id);
+ insert prlc;
+ //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod02
+ Product_Register_Link__c prlc2 = new Product_Register_Link__c(Product2__c = prod02.Id, Product_Register__c = prc.Id);
+ insert prlc2;
+ //璁㈠崟
- //鍑哄簱浜у搧
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001005';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Test01';
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
- Orderdet4.Send_Date__c = Date.today();
- Orderdet4.TracingCode__c = 'BXJRD';
- Orderdet4.SerialLotNo__c = '5ZK';
- //Orderdet4.Box_Piece__c = '鐩�';
- //Orderdet4.Return_date__c = null;
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert Order1;
- //宸插埌璐т骇鍝�
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001006';
- Orderdet5.Consumable_order_minor__c = Order2.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Test01';
- Orderdet5.Consumable_Arrived_order__c = Order1.Id;
- Orderdet5.Consumable_Shipment_order__c = Order1.Id;
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
- Orderdet5.Arrive_date__c = Date.today();
- Orderdet5.Box_Piece__c = '鐩�';
- Orderdet5.TracingCode__c = 'BXJRE';
- Orderdet5.SerialLotNo__c = '5ZK';
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet2,
- Orderdet3,
- Orderdet4,
- Orderdet5
- };
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
- ArriveGoodsController Controller = new ArriveGoodsController();
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
- System.Test.setCurrentPage(page);
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BXsun\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BXsys';
- Controller.SearchPro();
+ //鍙戣揣鏄庣粏
+ //fahuo
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ //daohuo
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
+ //sale
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Test01';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet3.Consumable_Sale_order__c = Order1.Id;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Test01';
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ Orderdet4.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
+ //List<Product2> proList = [select name,Estimation_Entry_Possibility__c from Product2 where id = :prod01.Id];
+ //System.assertEquals('鈼�', proList[0].Estimation_Entry_Possibility__c);
- System.assertEquals(
- 'OCM_01_001002',
- controller.ConsumableorderdetailsRecords[0].esd.Name
- );
- // System.assertEquals(1, controller.ConsumableorderdetailsRecordserror.size());
- System.Test.stopTest();
- }
- }
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4 };
+ PageReference page = new PageReference('/apex/ArriveGoods?Esetid=' + Order1.Id);
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJRN';
+ Controller.SearchPro();
+ //System.assertEquals(1, controller.consumableInventory.size());
- //杩斿搧
- @isTest
- static void productReturn() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
-
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
-
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'Test002',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //璁㈠崟
+ //鐩存帴鍒拌揣
+ @isTest
+ static void arrivedirect241() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order1.Order_ProType__c = 'ET';
- //杩斿搧璁㈠崟
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- Consumable_order__c Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_01_002';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '杩斿搧';
- Order2.Dealer_Info__c = myAccount1.id;
- Order2.RecordTypeid = System.Label.Dealer_Returned_Label;
- insert Order1;
- insert Order2;
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //浜у搧娉ㄥ唽璇�
+ Product_Register__c prc = new Product_Register__c(
+ Name = '鍥芥娉ㄨ繘20162220210',
+ MedPrdClass__c = '3',
+ ValidFrom__c = date.newinstance(2018, 7, 22),
+ ValidTo__c = date.newinstance(2028, 7, 22),
+ RegisterNoClass_Old__c = '6815',
+ RegisterNoClass_New__c = '6815',
+ RegisterNoStatus__c = '鏈夋晥'
+ );
+ insert prc;
+ //鏂版棫鍏崇郴瀵圭収琛�
+ //Product_Register_contrast__c prcc = new Product_Register_contrast__c(
+ // Name = 'Test20181204',
+ // Register_new__c = '314',
+ // Register_old__c = '36815'
+ // );
+ //insert prcc;
+ //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod01
+ Product_Register_Link__c prlc = new Product_Register_Link__c(Product2__c = prod01.Id, Product_Register__c = prc.Id);
+ insert prlc;
+ //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod02
+ Product_Register_Link__c prlc2 = new Product_Register_Link__c(Product2__c = prod02.Id, Product_Register__c = prc.Id);
+ insert prlc2;
+ //璁㈠崟
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert Order1;
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_002';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '鍒拌揣';
+ Order2.Dealer_Info__c = myAccount1.id;
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order2.Deliver_date__c = Date.today();
+ Order2.Order_date__c = Date.today();
+ insert Order2;
+ Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_002';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '杩斿搧';
+ Order2.Dealer_Info__c = myAccount1.id;
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order2.Deliver_date__c = Date.today();
+ Order2.Order_date__c = Date.today();
+ Order2.ReturnGs_Upload_Date__c = Date.today();
+ insert Order2;
- //鍙戣揣鏄庣粏
- //fahuo
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001001';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Pro001';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- Orderdet1.TracingCode__c = 'BXJRF';
- //daohuo
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001002';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Pro001';
- Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet2.IsArrival__c = true;
- Orderdet2.Arrive_date__c = Date.today();
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
- Orderdet2.TracingCode__c = 'BXJRF';
- //sale
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001003';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Pro001';
- Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet3.Arrive_date__c = Date.today();
- Orderdet3.Used_date__c = Date.today();
- Orderdet3.Consumable_Sale_order__c = Order1.Id;
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
- Orderdet3.Box_Piece__c = '鐩�';
- Orderdet3.TracingCode__c = 'BXJRF';
- //鍑哄簱
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001004';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Pro001';
- Orderdet4.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- Orderdet4.Arrive_date__c = Date.today();
- Orderdet4.Send_Date__c = Date.today();
- Orderdet4.Consumable_Shipment_order__c = Order1.Id;
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
- Orderdet4.Box_Piece__c = '涓�';
- Orderdet4.TracingCode__c = 'BXJRF';
- //quxiao
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001005';
- Orderdet5.Consumable_order_minor__c = Order1.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Pro001';
- Orderdet5.Cancellation_Date__c = Date.today();
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
- Orderdet5.Box_Piece__c = '鐩�';
- Orderdet5.TracingCode__c = 'BXJRF';
- //fanpin
- Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
- Orderdet6.Name = 'OCM_01_001006';
- Orderdet6.Consumable_order_minor__c = Order1.Id;
- Orderdet6.Consumable_Product__c = pro1.Id;
- Orderdet6.Asset_Model_No__c = 'Pro001';
- Orderdet6.Consumable_Return_order__c = Order2.Id;
- Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
- Orderdet6.Box_Piece__c = '涓�';
- Orderdet6.TracingCode__c = 'BXJRF';
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet2,
- Orderdet3,
- Orderdet4,
- Orderdet5,
- Orderdet6
- };
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRZ\n01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRI';
- Controller.SearchPro();
- //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
- //System.assertEquals('OCM_01_001003', controller.ShowGoodsofReturnList[0].esd.Name);
- //System.assertEquals('OCM_01_001004', controller.ShowGoodsofReturnList[1].esd.Name);
- // System.assertEquals(5, controller.ConsumableorderdetailsRecordserror.size()); //tcm
- //System.assertEquals('Test01', controller.ConsumableorderdetailsRecordserror[1].Prod.Name__c);
- //System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecordserror[2].esd.Name);
- //System.assertEquals('OCM_02_001001', controller.ConsumableorderdetailsRecordserror[3].esd.Name);
- Controller.GoodsReturnCheck();
- controller.ShowGoodsofReturnList[0].esd.Return_reason__c = '澶氬彂';
- controller.ShowGoodsofReturnList[0].esd.Rrturn_count__c = 1;
- //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
- Controller.UpdateGoodsOfReturn();
- Controller.ToReturnGoodsPage();
- Controller.geterrorsize();
- System.Test.stopTest();
- }
- }
+ //鍙戣揣鏄庣粏
+ //fahuo
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.Rrturn_count__c = 1;
+ Orderdet1.TracingCode__c = '20170808';
+ //daohuo
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order2.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.Consumable_Arrived_order__c = Order2.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
+ Orderdet2.Arrive_date__c = Date.today();
+ Orderdet2.TracingCode__c = '20170808';
- //杩斿搧
- @isTest
- static void productReturn_new() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001002';
+ Orderdet3.Consumable_order_minor__c = Order2.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Test01';
+ Orderdet3.Consumable_Arrived_order__c = Order2.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR2';
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.TracingCode__c = '20170808';
+ //sale
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001003';
+ Orderdet4.Consumable_order_minor__c = Order2.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Test01';
+ Orderdet4.Consumable_Arrived_order__c = Order2.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet4.Consumable_Sale_order__c = Order2.Id;
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR3';
+ Orderdet4.Used_date__c = Date.today();
+ Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001003';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Test01';
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet4.Consumable_Sale_order__c = Order2.Id;
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJ13';
+ Orderdet4.Used_date__c = Date.today();
+ Orderdet4.TracingCode__c = '20170808';
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001003';
+ Orderdet5.Consumable_order_minor__c = Order2.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Test01';
+ Orderdet5.Consumable_Arrived_order__c = Order2.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet5.Consumable_Sale_order__c = Order2.Id;
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
+ Orderdet5.Arrive_date__c = Date.today().addDays(1);
+ Orderdet5.Send_Date__c = null;
+ Orderdet5.Used_date__c = null;
+ Orderdet5.Lose_Flag__c = false;
+ Orderdet5.Return_date__c = null;
+ Orderdet5.Cancellation_Date__c = Date.today().addDays(1);
+ Orderdet5.Box_Piece__c = '鐩�';
+ Orderdet5.TracingCode__c = '20170808';
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
+ Orderdet6.Name = 'OCM_01_001004';
+ Orderdet6.Consumable_order_minor__c = Order1.Id;
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Asset_Model_No__c = 'Test01';
+ Orderdet6.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ Orderdet6.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR4';
+ Orderdet6.Send_Date__c = Date.today();
+ Orderdet6.Return_date__c = null;
+ Orderdet6.Box_Piece__c = '鐩�';
+ Orderdet6.Rrturn_count__c = 1;
+ Orderdet6.TracingCode__c = '20170808';
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ // 鍗曚綅涓轰釜鐨凚arcode瀵瑰簲鐨勫嚭搴撳崟
+ Consumable_order_details2__c Orderdet7 = new Consumable_order_details2__c();
+ Orderdet7.Name = 'OCM_01_001004';
+ Orderdet7.Consumable_order_minor__c = Order1.Id;
+ Orderdet7.Consumable_Product__c = pro1.Id;
+ Orderdet7.Asset_Model_No__c = 'Test01';
+ Orderdet7.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ Orderdet7.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet7.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR1';
+ Orderdet7.Send_Date__c = Date.today();
+ Orderdet7.Box_Piece__c = '涓�';
+ Orderdet7.Used_date__c = Date.today();
+ Orderdet7.Return_date__c = null;
+ Orderdet7.RemoveBox_No__c = 1;
+ Orderdet7.Consumable_ZS_order__c = Order1.Id;
+ Orderdet7.Rrturn_count__c = 1;
+ Orderdet7.TracingCode__c = '20170808';
+
+ Orderdet7 = new Consumable_order_details2__c();
+ Orderdet7.Name = 'OCM_01_001004';
+ Orderdet7.Consumable_order_minor__c = Order1.Id;
+ Orderdet7.Consumable_Product__c = pro1.Id;
+ Orderdet7.Asset_Model_No__c = 'Test01';
+ Orderdet7.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet7.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet7.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR7';
+ Orderdet7.Send_Date__c = Date.today();
+ Orderdet7.Box_Piece__c = '涓�';
+ Orderdet7.Used_date__c = Date.today();
+ Orderdet7.Return_date__c = null;
+ Orderdet7.RemoveBox_No__c = 1;
+ Orderdet7.Consumable_ZS_order__c = Order1.Id;
+ Orderdet7.Rrturn_count__c = 0;
+ Orderdet7.TracingCode__c = '20170808';
+
+ Consumable_order_details2__c Orderdet8 = new Consumable_order_details2__c();
+ Orderdet8.Name = 'OCM_01_001004';
+ Orderdet8.Consumable_order_minor__c = Order1.Id;
+ Orderdet8.Consumable_Product__c = pro1.Id;
+ Orderdet8.Asset_Model_No__c = 'Test01';
+ Orderdet8.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ Orderdet8.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR9';
+ Orderdet8.Send_Date__c = Date.today();
+ Orderdet8.Box_Piece__c = '涓�';
+ Orderdet8.Used_date__c = Date.today();
+ Orderdet8.Return_date__c = null;
+ Orderdet8.RemoveBox_No__c = 1;
+ Orderdet8.Consumable_ZS_order__c = Order1.Id;
+ Orderdet8.Rrturn_count__c = null;
+ Orderdet8.RemoveBox_date__c = Date.today();
+ Orderdet8.Intra_Trade_List_RMB__c = 1;
+ Orderdet8.Sterilization_limit__c = Date.today();
+ Orderdet8.SerialLotNo__c = '11鎵规';
+ Orderdet8.TracingCode__c = '20170808';
+ Orderdet8.Arrive_date__c = Date.today();
+
+ Consumable_order_details2__c Orderdet9 = new Consumable_order_details2__c();
+ Orderdet9.Name = 'OCM_01_001004';
+ Orderdet9.Consumable_order_minor__c = Order1.Id;
+ Orderdet9.Consumable_Product__c = pro1.Id;
+ Orderdet9.Asset_Model_No__c = 'Test01';
+ Orderdet9.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet9.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet9.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet9.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR8';
+ Orderdet9.Send_Date__c = Date.today();
+ Orderdet9.Box_Piece__c = '涓�';
+ Orderdet9.Used_date__c = Date.today();
+ Orderdet9.Return_date__c = null;
+ Orderdet9.Consumable_ZS_order__c = Order1.Id;
+ Orderdet9.Arrive_date__c = Date.today();
+ Orderdet9.Rrturn_count__c = 10;
+ Orderdet9.TracingCode__c = '20170808';
+ Consumable_order_details2__c lose = new Consumable_order_details2__c();
+ lose.Name = 'OCM_01_001004';
+ lose.Consumable_order_minor__c = Order1.Id;
+ lose.Consumable_Product__c = pro1.Id;
+ lose.Asset_Model_No__c = 'Test01';
+ lose.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ lose.Consumable_Shipment_order__c = Order1.Id;
+ lose.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ lose.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR5';
+ lose.Send_Date__c = null;
+ lose.Arrive_date__c = null;
+ lose.Used_date__c = null;
+ lose.Box_Piece__c = '鐩�';
+ lose.TracingCode__c = '20170808';
+ Consumable_order_details2__c lose1 = new Consumable_order_details2__c();
+ lose1.Name = 'OCM_01_001004';
+ lose1.Consumable_order_minor__c = Order1.Id;
+ lose1.Consumable_Product__c = pro1.Id;
+ lose1.Asset_Model_No__c = 'Test01';
+ lose1.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ lose1.Consumable_Shipment_order__c = Order1.Id;
+ lose1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ lose1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR6';
+ lose1.Send_Date__c = null;
+ lose1.Arrive_date__c = Date.today();
+ lose1.Used_date__c = null;
+ lose1.Box_Piece__c = '鐩�';
+ lose1.TracingCode__c = '20170808';
+ Consumable_order_details2__c lose2 = new Consumable_order_details2__c();
+ lose2.Name = 'OCM_01_001004';
+ lose2.Consumable_order_minor__c = Order2.Id;
+ lose2.Consumable_Product__c = pro1.Id;
+ lose2.Asset_Model_No__c = 'Test01';
+ lose2.Consumable_Arrived_order__c = Order2.Id;
+ //Orderdet4.IsArrival__c = true;
+ lose2.Consumable_Shipment_order__c = Order2.Id;
+ lose2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ lose2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR7';
+ lose2.Send_Date__c = null;
+ lose2.Arrive_date__c = Date.today();
+ lose2.Used_date__c = null;
+ lose2.Box_Piece__c = '鐩�';
+ lose2.Intra_Trade_List_RMB__c = 1;
+ lose2.Direct_Arrive_Product__c = true;
+ lose2.Sterilization_limit__c = Date.today();
+ lose2.SerialLotNo__c = '11鎵规';
+ lose2.TracingCode__c = '20170808';
+
+ //List<Product2> proList = [select name,Estimation_Entry_Possibility__c from Product2 where id = :prod01.Id];
+ //System.assertEquals('鈼�', proList[0].Estimation_Entry_Possibility__c);
+
+ insert new List<Consumable_order_details2__c>{
+ Orderdet1,
+ Orderdet2,
+ Orderdet3,
+ Orderdet4,
+ Orderdet5,
+ Orderdet6,
+ Orderdet7,
+ Orderdet8,
+ Orderdet9,
+ lose,
+ lose1,
+ lose2
+ };
+ PageReference page = new PageReference('/apex/ArriveGoods?Esetid=' + Order1.Id);
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJR3\n01049531702003111115120017181000105ZK250BXJ13\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJR2\n01049531702003111115120017181000105ZK250BXJR3\n01049531702003111115120017181000105ZK250BXJR4\n01049531702003111115120017181000105ZK250BXJR1\n01049531702003111115120017181000105ZK250BXJR7\n01049531702003111115120017181000105ZK250BXJR9\n01049531702003111115120017181000105ZK250BXJR8\n01049531702003111115120017181000105ZK250BXJR5\n01049531702003111115120017181000105ZK250BXJR6\n01049531702003111115120017181000105ZK250BXJR7\n01049531702003111115120017181000105ZK250BXAAA\n01049531702003111115120017181000105ZK250BXAAB';
+ Controller.SearchPro();
+ // System.assertEquals(1, controller.consumableInventory.size());
+
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'Test002',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //璁㈠崟
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order1.Order_ProType__c = 'ET';
- insert Order1;
- //Consumable_order__c coc = [select Dealer_Info__r.name from Consumable_order__c where Id =:Order1.Id];
- //system.assertEquals('qeee',coc.Dealer_Info__r.name);
+ //杩斿搧 鏄庣粏2涓嶅瓨鍦ㄧ殑瀵瑰簲鐨勫埌璐ц鍗曟槑缁�
+ @isTest
+ static void productReturn_oldbarcode() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_001001';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- //鍙戣揣鏄庣粏
- //fahuo
- /*Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001001';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Pro001';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Box_Piece__c ='鐩�';
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- //daohuo
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001002';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Pro001';
- Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet2.IsArrival__c = true;
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Box_Piece__c ='鐩�';
- Orderdet2.Arrive_date__c = Date.today();
- //Orderdet2.Send_Date__c = Date.today();
- //Orderdet2.Used_date__c= Date.today();
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';*/
- //sale
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001003';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Pro001';
- Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet3.Consumable_Sale_order__c = Order1.Id;
- Orderdet3.Box_Piece__c = '鐩�';
- Orderdet3.Used_date__c = Date.today();
- Orderdet3.Arrive_date__c = Date.today();
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- Orderdet3.TracingCode__c = 'BXJRF';
- Orderdet3.SerialLotNo__c = '5ZK';
- //鍑哄簱
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001004';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Pro001';
- Orderdet4.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- Orderdet4.Consumable_Shipment_order__c = Order1.Id;
- Orderdet4.Box_Piece__c = '涓�';
- Orderdet4.Send_Date__c = Date.today();
- Orderdet4.Arrive_date__c = Date.today();
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
- Orderdet4.TracingCode__c = 'BXJRN';
- Orderdet4.SerialLotNo__c = '5ZK';
- //quxiao
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001005';
- Orderdet5.Consumable_order_minor__c = Order1.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Pro001';
- Orderdet5.Cancellation_Date__c = Date.today();
- Orderdet5.Cancellation_Flag__c = true;
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
- Orderdet5.Box_Piece__c = '涓�';
- Orderdet5.TracingCode__c = 'BXJRZ';
- Orderdet5.SerialLotNo__c = '5ZK';
- insert new List<Consumable_order_details2__c>{
- Orderdet3,
- Orderdet4,
- Orderdet5
- };
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRZ\n01049531702003111115120017181000105ZK250BXJRR';
- Controller.SearchPro();
- // System.assertEquals(1, controller.ConsumableorderdetailsRecordserror.size());
- System.assertEquals(2, controller.ShowGoodsofReturnList.size());
- controller.ShowGoodsofReturnList[0].esd.Return_reason__c = '澶氬彂';
- controller.ShowGoodsofReturnList[1].esd.Return_reason__c = '澶氬彂';
- controller.ShowGoodsofReturnList[0].esd.Rrturn_count__c = 1;
- Controller.UpdateGoodsOfReturn();
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
- list<String> list1 = new List<String>();
- list1.add(Controller.barcode = '01234567898');
- Controller.inventoryEntryNoESetId(list1);
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- list1.clear();
- list1.add(Controller.barcode = '012345678901234A67');
- Controller.inventoryEntryNoESetId(list1);
+ //杩斿搧璁㈠崟
- list1.clear();
- list1.add(Controller.barcode = '0123456789012345117AA01');
- Controller.inventoryEntryNoESetId(list1);
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_002';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '杩斿搧';
+ Order2.Dealer_Info__c = myAccount1.id;
+ Order2.RecordTypeid = System.Label.Dealer_Returned_Label;
+ insert Order1;
+ insert Order2;
- list1.clear();
- list1.add(Controller.barcode = '01234567890123456789012349990001');
- Controller.inventoryEntryNoESetId(list1);
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
- list1.clear();
- list1.add(Controller.barcode = '0123456789012345177AA0000000000001');
- Controller.inventoryEntryNoESetId(list1);
+ //鍙戣揣鏄庣粏
+ //娌″嚭搴擄紝娌¢攢鍞紝灏辨槸鍦ㄥ簱
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Pro001';
+ Orderdet1.Arrive_date__c = date.today();
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.TracingCode__c = 'BXSYS';
- list1.clear();
- list1.add(Controller.barcode = '0123456789012345177AA1111111111111');
- Controller.inventoryEntryNoESetId(list1);
+ //daohuo
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Pro001';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet2.Arrive_date__c = date.today();
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
+ Orderdet2.TracingCode__c = 'BXSYS';
+ //sale
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Pro001';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet3.Arrive_date__c = date.today();
+ Orderdet3.Used_date__c = date.today();
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
+ Orderdet3.TracingCode__c = 'BXSYS';
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Pro001';
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet4.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet4.Send_Date__c = date.today();
+ Orderdet4.Arrive_date__c = date.today();
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BX222';
+ Orderdet4.TracingCode__c = 'BXSYS';
+ //quxiao
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001005';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Pro001';
+ Orderdet5.Cancellation_Date__c = Date.today();
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
+ Orderdet5.Box_Piece__c = '涓�';
+ Orderdet5.TracingCode__c = 'BXSYS';
+ //fanpin
+ Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
+ Orderdet6.Name = 'OCM_01_001006';
+ Orderdet6.Consumable_order_minor__c = Order1.Id;
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Asset_Model_No__c = 'Pro001';
+ Orderdet6.Consumable_Return_order__c = Order2.Id;
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet6.Box_Piece__c = '涓�';
+ Orderdet6.TracingCode__c = 'BXSYS';
- list1.clear();
- list1.add(Controller.barcode = '241345');
- Controller.inventoryEntryNoESetId(list1);
+ //鍙戣揣鏄庣粏
+ //娌″嚭搴擄紝娌¢攢鍞紝灏辨槸鍦ㄥ簱
+ Consumable_order_details2__c Orderdet7 = new Consumable_order_details2__c();
+ Orderdet7.Name = 'OCM_01_001001';
+ Orderdet7.Consumable_order_minor__c = Order1.Id;
+ Orderdet7.Consumable_Product__c = pro1.Id;
+ Orderdet7.Asset_Model_No__c = 'Pro001';
+ Orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet7.Bar_Code__c = '01049531702003111115120017181000105ZK250BX333';
+ Orderdet7.TracingCode__c = 'BXSYS';
- list1.clear();
- list1.add(Controller.barcode = '2413456');
- Controller.inventoryEntryNoESetId(list1);
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5, Orderdet6, Orderdet7 };
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXAAA\n01049531702003111115120017181000105ZK250BXJRJ\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BX123\n01049531702003111115120017181000105ZK250BX222';
+ Controller.SearchPro();
+ //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
+ //System.assertEquals('OCM_01_001003', controller.ShowGoodsofReturnList[0].esd.Name);
+ //System.assertEquals('OCM_01_001004', controller.ShowGoodsofReturnList[1].esd.Name);
+ //System.assertEquals('Test01', controller.ConsumableorderdetailsRecordserror[0].Prod.Name__c);
+ //System.assertEquals('Test01', controller.ConsumableorderdetailsRecordserror[1].Prod.Name__c);
+ //System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecordserror[2].esd.Name);
+ //System.assertEquals('OCM_02_001001', controller.ConsumableorderdetailsRecordserror[3].esd.Name);
+ // Controller.GoodsReturnCheck();
+ Controller.ArriveGoodsConfim();
+ //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
+ Controller.UpdateGoodsOfReturn();
- list1.clear();
- list1.add(Controller.barcode = '24134567');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241345678');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '2413456789');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '24134567890');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241345678901');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '0112345678901231177890121215678901234');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '0112345678901231106789012105678901234');
- Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '0112345678901231106789012105625001234');
- Controller.inventoryEntryNoESetId(list1);
- System.Test.stopTest();
+ controller.getinventorysize();
+ System.Test.stopTest();
+ }
}
- }
+ @isTest
+ static void barcodecheck() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- //鐩存帴鍒拌揣
- @isTest
- static void arrivedirect() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = '2344', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = '8232', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ list<String> list1 = new List<String>();
+ list1.clear();
+ list1.add(Controller.barcode = '2413456250BBBBA');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241250BBBBZ');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241250');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241250BBB');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '24134567250BBBBB');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241345678250BBBBC');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '2413456789250BBBBD');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '24134567890250BBBBE');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241345678901250BBBBF');
+ Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '2413456789011250BBBBG');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '24134567890111250BBBBH');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901231712300123250BBBBI');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011234567890250BBBBJ');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '01123456789A0123456250BBBBK');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011234567890123411AAAA123250BBBBL');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011234567890123411789012175678901234250BBBBM');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '01123456789012340138901217aaa8001234250BBBBN');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011234567890123456789012104567890250BBBBO');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '01123456789012341778910034567890250BBBBP');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011234567890123417aa910034567890250BBBBQ');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '01123456789012341778911134567890250BBBBR');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011234567890123417789121105678900000250BBBBS');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011234567890123410789121105678900000250BBBBT');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011234567890123411789012171a780012250BBBBU');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901234110890121012789000250BBBBV');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011234567890123417120506105678901234250BBBBW');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901234111202121712050212250BBBBX');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901234111202121712a50212250BBBBY');
+ Controller.inventoryEntry(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901234111202121012050212250BBBBZ');
+ Controller.inventoryEntry(list1);
+ }
}
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ @isTest
+ static void barcodechkeck_2() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = '2344', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = '82324', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //浜у搧娉ㄥ唽璇�
+ Product_Register__c prc = new Product_Register__c(
+ Name = '鍥芥娉ㄨ繘20162220210',
+ MedPrdClass__c = '3',
+ ValidFrom__c = date.newinstance(2018, 7, 22),
+ ValidTo__c = date.newinstance(2028, 7, 22),
+ RegisterNoClass_Old__c = '6815',
+ RegisterNoClass_New__c = '6815',
+ RegisterNoStatus__c = '鏈夋晥'
+ );
+ insert prc;
+ //鏂版棫鍏崇郴瀵圭収琛�
+ //Product_Register_contrast__c prcc = new Product_Register_contrast__c(
+ // Name = 'Test20181204',
+ // Register_new__c = '314',
+ // Register_old__c = '36815'
+ // );
+ //insert prcc;
+ //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod01
+ Product_Register_Link__c prlc = new Product_Register_Link__c(Product2__c = prod01.Id, Product_Register__c = prc.Id);
+ insert prlc;
+ //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod02
+ Product_Register_Link__c prlc2 = new Product_Register_Link__c(Product2__c = prod02.Id, Product_Register__c = prc.Id);
+ insert prlc2;
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
+ System.Test.setCurrentPage(page);
+
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //List<Product2> proList = [select name,Estimation_Entry_Possibility__c from Product2 where id = :prod01.Id];
+ //System.assertEquals('鈼�', proList[0].Estimation_Entry_Possibility__c);
+ List<Product2__c> product2InStore = [
+ SELECT Id, Name, Name__c, Intra_Trade_List_RMB__c, Asset_Model_No__c, OT_CODE__c
+ FROM Product2__c
+ WHERE Estimation_Entry_Possibility__c = '鈼�' AND Pro2_Dealer_Object__c = TRUE AND OT_CODE__c = 'test'
+ ];
+ //System.assertEquals(1, product2InStore.size());
+ list<String> list1 = new List<String>();
+ list1.clear();
+ list1.add(Controller.barcode = '2413456250BBBBA');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241250BBBBZ');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241250');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241250BBZ');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '24134567250BBBBB');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241345678250BBBBC');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '2413452509250BBBBD');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '24125090111250BBBBE');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241325090111250BBBBF');
+ Controller.inventoryEntryNoESetId(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '2413425090111250BBBBG');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '24134525090111250BBBBH');
+ Controller.inventoryEntryNoESetId(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '241test1712345678901234567890250BBBBI');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241test171234500678901234567890250BBBBJ');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241test17120400678901234567890250BBBBK');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241test171204110678901234567890250BBBBL');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241test171204121078901234567890250BBBBM');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241test17120412250BBBBN');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241test101204121078901234567890250BBBBO');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241test1112a4121078901234567890250BBBBP');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '241test111204121778900034567890250BBBBQ');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0111234101204120118901231712a4001234250BBBBR');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011123410120412011890123171204011234250BBBBS');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011test10120412011890123171a04011234250BBBBT');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '0111234101204120118901231012040112342222250BBBBU');
+ Controller.inventoryEntryNoESetId(list1);
+
+ list1.clear();
+ list1.add(Controller.barcode = '011123410120412017120100250AAAAA');
+ Controller.inventoryEntryNoESetId(list1);
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = '2344',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = '82324',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //浜у搧娉ㄥ唽璇�
- Product_Register__c prc = new Product_Register__c(
- Name = '鍥芥娉ㄨ繘20162220210',
- MedPrdClass__c = '3',
- ValidFrom__c = date.newinstance(2018, 7, 22),
- ValidTo__c = date.newinstance(2028, 7, 22),
- RegisterNoClass_Old__c = '6815',
- RegisterNoClass_New__c = '6815',
- RegisterNoStatus__c = '鏈夋晥'
- );
- insert prc;
- //鏂版棫鍏崇郴瀵圭収琛�
- //Product_Register_contrast__c prcc = new Product_Register_contrast__c(
- // Name = 'Test20181204',
- // Register_new__c = '314',
- // Register_old__c = '36815'
- // );
- //insert prcc;
- //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod01
- Product_Register_Link__c prlc = new Product_Register_Link__c(
- Product2__c = prod01.Id,
- Product_Register__c = prc.Id
- );
- insert prlc;
- //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod02
- Product_Register_Link__c prlc2 = new Product_Register_Link__c(
- Product2__c = prod02.Id,
- Product_Register__c = prc.Id
- );
- insert prlc2;
- //璁㈠崟
+ //鑷姩鍑哄簱
+ @isTest
+ static void addSaleOrderAuto() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- insert Order1;
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ insert new List<Product2__c>{ pro1 };
+ // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id);
+ // insert myAccount1;
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_02_001';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.Dealer_Info__c = myAccount1.Id;
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert Order2;
+ //鍙戦敊搴� 宸插埌璐�
+ Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
+ Orderdets8.Name = 'OCM_01_001011';
+ Orderdets8.Consumable_order_minor__c = Order2.Id;
+ Orderdets8.Consumable_Product__c = pro1.Id;
+ Orderdets8.Asset_Model_No__c = 'Test01';
+ Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXSYS';
+ Orderdets8.Box_Piece__c = '鐩�';
+ Orderdets8.Arrive_date__c = Date.today();
+ Orderdets8.TracingCode__c = 'BXSYS';
+ Orderdets8.SerialLotNo__c = '5ZK';
+ insert Orderdets8;
- //鍙戣揣鏄庣粏
- //fahuo
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001001';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Test01';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- //daohuo
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001002';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Test01';
- Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet2.IsArrival__c = true;
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
- //sale
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001003';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Test01';
- Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet3.Consumable_Sale_order__c = Order1.Id;
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
- //鍑哄簱
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001004';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Test01';
- Orderdet4.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- Orderdet4.Consumable_Shipment_order__c = Order1.Id;
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
- //List<Product2> proList = [select name,Estimation_Entry_Possibility__c from Product2 where id = :prod01.Id];
- //System.assertEquals('鈼�', proList[0].Estimation_Entry_Possibility__c);
-
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet2,
- Orderdet3,
- Orderdet4
- };
- PageReference page = new PageReference(
- '/apex/ArriveGoods?Esetid=' + Order1.Id
- );
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJRN';
- Controller.SearchPro();
- //System.assertEquals(1, controller.consumableInventory.size());
-
- System.Test.stopTest();
- }
- }
-
- //鐩存帴鍒拌揣
- @isTest
- static void arrivedirect241() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
-
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
+ System.Test.setCurrentPage(page);
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXSYS';
+ Controller.SearchPro();
+ // System.assertEquals(1, controller.consumableInventory.size());
+ Controller.ArriveGoodsConfim();
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'Test002',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //浜у搧娉ㄥ唽璇�
- Product_Register__c prc = new Product_Register__c(
- Name = '鍥芥娉ㄨ繘20162220210',
- MedPrdClass__c = '3',
- ValidFrom__c = date.newinstance(2018, 7, 22),
- ValidTo__c = date.newinstance(2028, 7, 22),
- RegisterNoClass_Old__c = '6815',
- RegisterNoClass_New__c = '6815',
- RegisterNoStatus__c = '鏈夋晥'
- );
- insert prc;
- //鏂版棫鍏崇郴瀵圭収琛�
- //Product_Register_contrast__c prcc = new Product_Register_contrast__c(
- // Name = 'Test20181204',
- // Register_new__c = '314',
- // Register_old__c = '36815'
- // );
- //insert prcc;
- //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod01
- Product_Register_Link__c prlc = new Product_Register_Link__c(
- Product2__c = prod01.Id,
- Product_Register__c = prc.Id
- );
- insert prlc;
- //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod02
- Product_Register_Link__c prlc2 = new Product_Register_Link__c(
- Product2__c = prod02.Id,
- Product_Register__c = prc.Id
- );
- insert prlc2;
- //璁㈠崟
+ // UPDATE TCM TEST1
+ @isTest
+ static void methodTest1() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- insert Order1;
- Consumable_order__c Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_01_002';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '鍒拌揣';
- Order2.Dealer_Info__c = myAccount1.id;
- Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order2.Deliver_date__c = Date.today();
- Order2.Order_date__c = Date.today();
- insert Order2;
- Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_01_002';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '杩斿搧';
- Order2.Dealer_Info__c = myAccount1.id;
- Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order2.Deliver_date__c = Date.today();
- Order2.Order_date__c = Date.today();
- Order2.ReturnGs_Upload_Date__c = Date.today();
- insert Order2;
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'N3047730', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
- //鍙戣揣鏄庣粏
- //fahuo
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001001';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Test01';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- Orderdet1.Arrive_date__c = Date.today();
- Orderdet1.Rrturn_count__c = 1;
- Orderdet1.TracingCode__c = '20170808';
- //daohuo
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001002';
- Orderdet2.Consumable_order_minor__c = Order2.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Test01';
- Orderdet2.Consumable_Arrived_order__c = Order2.Id;
- //Orderdet2.IsArrival__c = true;
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
- Orderdet2.Arrive_date__c = Date.today();
- Orderdet2.TracingCode__c = '20170808';
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001002';
- Orderdet3.Consumable_order_minor__c = Order2.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Test01';
- Orderdet3.Consumable_Arrived_order__c = Order2.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR2';
- Orderdet3.Used_date__c = Date.today();
- Orderdet3.TracingCode__c = '20170808';
- //sale
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001003';
- Orderdet4.Consumable_order_minor__c = Order2.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Test01';
- Orderdet4.Consumable_Arrived_order__c = Order2.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet4.Consumable_Sale_order__c = Order2.Id;
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR3';
- Orderdet4.Used_date__c = Date.today();
- Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001003';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Test01';
- Orderdet4.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet4.Consumable_Sale_order__c = Order2.Id;
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJ13';
- Orderdet4.Used_date__c = Date.today();
- Orderdet4.TracingCode__c = '20170808';
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001003';
- Orderdet5.Consumable_order_minor__c = Order2.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Test01';
- Orderdet5.Consumable_Arrived_order__c = Order2.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet5.Consumable_Sale_order__c = Order2.Id;
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
- Orderdet5.Arrive_date__c = Date.today().addDays(1);
- Orderdet5.Send_Date__c = null;
- Orderdet5.Used_date__c = null;
- Orderdet5.Lose_Flag__c = false;
- Orderdet5.Return_date__c = null;
- Orderdet5.Cancellation_Date__c = Date.today().addDays(1);
- Orderdet5.Box_Piece__c = '鐩�';
- Orderdet5.TracingCode__c = '20170808';
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
- //鍑哄簱
- Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
- Orderdet6.Name = 'OCM_01_001004';
- Orderdet6.Consumable_order_minor__c = Order1.Id;
- Orderdet6.Consumable_Product__c = pro1.Id;
- Orderdet6.Asset_Model_No__c = 'Test01';
- Orderdet6.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- Orderdet6.Consumable_Shipment_order__c = Order1.Id;
- Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR4';
- Orderdet6.Send_Date__c = Date.today();
- Orderdet6.Return_date__c = null;
- Orderdet6.Box_Piece__c = '鐩�';
- Orderdet6.Rrturn_count__c = 1;
- Orderdet6.TracingCode__c = '20170808';
+ //鍙戣揣鏄庣粏
+ //fahuo
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.Arrive_date__c = Date.today();
+ // Orderdet1.Send_Date__c=Date.today();
+ // Orderdet1.Used_date__c=Date.today();
+ Orderdet1.TracingCode__c = 'BXJRF';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ insert Orderdet1;
- // 鍗曚綅涓轰釜鐨凚arcode瀵瑰簲鐨勫嚭搴撳崟
- Consumable_order_details2__c Orderdet7 = new Consumable_order_details2__c();
- Orderdet7.Name = 'OCM_01_001004';
- Orderdet7.Consumable_order_minor__c = Order1.Id;
- Orderdet7.Consumable_Product__c = pro1.Id;
- Orderdet7.Asset_Model_No__c = 'Test01';
- Orderdet7.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- Orderdet7.Consumable_Shipment_order__c = Order1.Id;
- Orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet7.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR1';
- Orderdet7.Send_Date__c = Date.today();
- Orderdet7.Box_Piece__c = '涓�';
- Orderdet7.Used_date__c = Date.today();
- Orderdet7.Return_date__c = null;
- Orderdet7.RemoveBox_No__c = 1;
- Orderdet7.Consumable_ZS_order__c = Order1.Id;
- Orderdet7.Rrturn_count__c = 1;
- Orderdet7.TracingCode__c = '20170808';
+ //fahuo
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001001';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181234105ZK250BXJRF';
+ Orderdet2.Arrive_date__c = Date.today();
+ Orderdet2.TracingCode__c = 'BXJRF';
+ Orderdet2.SerialLotNo__c = '5ZK';
+ insert Orderdet2;
- Orderdet7 = new Consumable_order_details2__c();
- Orderdet7.Name = 'OCM_01_001004';
- Orderdet7.Consumable_order_minor__c = Order1.Id;
- Orderdet7.Consumable_Product__c = pro1.Id;
- Orderdet7.Asset_Model_No__c = 'Test01';
- Orderdet7.Consumable_Arrived_order__c = Order1.Id;
- Orderdet7.Consumable_Shipment_order__c = Order1.Id;
- Orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet7.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR7';
- Orderdet7.Send_Date__c = Date.today();
- Orderdet7.Box_Piece__c = '涓�';
- Orderdet7.Used_date__c = Date.today();
- Orderdet7.Return_date__c = null;
- Orderdet7.RemoveBox_No__c = 1;
- Orderdet7.Consumable_ZS_order__c = Order1.Id;
- Orderdet7.Rrturn_count__c = 0;
- Orderdet7.TracingCode__c = '20170808';
-
- Consumable_order_details2__c Orderdet8 = new Consumable_order_details2__c();
- Orderdet8.Name = 'OCM_01_001004';
- Orderdet8.Consumable_order_minor__c = Order1.Id;
- Orderdet8.Consumable_Product__c = pro1.Id;
- Orderdet8.Asset_Model_No__c = 'Test01';
- Orderdet8.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- Orderdet8.Consumable_Shipment_order__c = Order1.Id;
- Orderdet8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR9';
- Orderdet8.Send_Date__c = Date.today();
- Orderdet8.Box_Piece__c = '涓�';
- Orderdet8.Used_date__c = Date.today();
- Orderdet8.Return_date__c = null;
- Orderdet8.RemoveBox_No__c = 1;
- Orderdet8.Consumable_ZS_order__c = Order1.Id;
- Orderdet8.Rrturn_count__c = null;
- Orderdet8.RemoveBox_date__c = Date.today();
- Orderdet8.Intra_Trade_List_RMB__c = 1;
- Orderdet8.Sterilization_limit__c = Date.today();
- Orderdet8.SerialLotNo__c = '11鎵规';
- Orderdet8.TracingCode__c = '20170808';
- Orderdet8.Arrive_date__c = Date.today();
-
- Consumable_order_details2__c Orderdet9 = new Consumable_order_details2__c();
- Orderdet9.Name = 'OCM_01_001004';
- Orderdet9.Consumable_order_minor__c = Order1.Id;
- Orderdet9.Consumable_Product__c = pro1.Id;
- Orderdet9.Asset_Model_No__c = 'Test01';
- Orderdet9.Consumable_Arrived_order__c = Order1.Id;
- Orderdet9.Consumable_Shipment_order__c = Order1.Id;
- Orderdet9.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet9.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR8';
- Orderdet9.Send_Date__c = Date.today();
- Orderdet9.Box_Piece__c = '涓�';
- Orderdet9.Used_date__c = Date.today();
- Orderdet9.Return_date__c = null;
- Orderdet9.Consumable_ZS_order__c = Order1.Id;
- Orderdet9.Arrive_date__c = Date.today();
- Orderdet9.Rrturn_count__c = 10;
- Orderdet9.TracingCode__c = '20170808';
- Consumable_order_details2__c lose = new Consumable_order_details2__c();
- lose.Name = 'OCM_01_001004';
- lose.Consumable_order_minor__c = Order1.Id;
- lose.Consumable_Product__c = pro1.Id;
- lose.Asset_Model_No__c = 'Test01';
- lose.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- lose.Consumable_Shipment_order__c = Order1.Id;
- lose.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- lose.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR5';
- lose.Send_Date__c = null;
- lose.Arrive_date__c = null;
- lose.Used_date__c = null;
- lose.Box_Piece__c = '鐩�';
- lose.TracingCode__c = '20170808';
- Consumable_order_details2__c lose1 = new Consumable_order_details2__c();
- lose1.Name = 'OCM_01_001004';
- lose1.Consumable_order_minor__c = Order1.Id;
- lose1.Consumable_Product__c = pro1.Id;
- lose1.Asset_Model_No__c = 'Test01';
- lose1.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- lose1.Consumable_Shipment_order__c = Order1.Id;
- lose1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- lose1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR6';
- lose1.Send_Date__c = null;
- lose1.Arrive_date__c = Date.today();
- lose1.Used_date__c = null;
- lose1.Box_Piece__c = '鐩�';
- lose1.TracingCode__c = '20170808';
- Consumable_order_details2__c lose2 = new Consumable_order_details2__c();
- lose2.Name = 'OCM_01_001004';
- lose2.Consumable_order_minor__c = Order2.Id;
- lose2.Consumable_Product__c = pro1.Id;
- lose2.Asset_Model_No__c = 'Test01';
- lose2.Consumable_Arrived_order__c = Order2.Id;
- //Orderdet4.IsArrival__c = true;
- lose2.Consumable_Shipment_order__c = Order2.Id;
- lose2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- lose2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJR7';
- lose2.Send_Date__c = null;
- lose2.Arrive_date__c = Date.today();
- lose2.Used_date__c = null;
- lose2.Box_Piece__c = '鐩�';
- lose2.Intra_Trade_List_RMB__c = 1;
- lose2.Direct_Arrive_Product__c = true;
- lose2.Sterilization_limit__c = Date.today();
- lose2.SerialLotNo__c = '11鎵规';
- lose2.TracingCode__c = '20170808';
-
- //List<Product2> proList = [select name,Estimation_Entry_Possibility__c from Product2 where id = :prod01.Id];
- //System.assertEquals('鈼�', proList[0].Estimation_Entry_Possibility__c);
-
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet2,
- Orderdet3,
- Orderdet4,
- Orderdet5,
- Orderdet6,
- Orderdet7,
- Orderdet8,
- Orderdet9,
- lose,
- lose1,
- lose2
- };
- PageReference page = new PageReference(
- '/apex/ArriveGoods?Esetid=' + Order1.Id
- );
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
-
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJR3\n01049531702003111115120017181000105ZK250BXJ13\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJR2\n01049531702003111115120017181000105ZK250BXJR3\n01049531702003111115120017181000105ZK250BXJR4\n01049531702003111115120017181000105ZK250BXJR1\n01049531702003111115120017181000105ZK250BXJR7\n01049531702003111115120017181000105ZK250BXJR9\n01049531702003111115120017181000105ZK250BXJR8\n01049531702003111115120017181000105ZK250BXJR5\n01049531702003111115120017181000105ZK250BXJR6\n01049531702003111115120017181000105ZK250BXJR7\n01049531702003111115120017181000105ZK250BXAAA\n01049531702003111115120017181000105ZK250BXAAB';
- Controller.SearchPro();
- // System.assertEquals(1, controller.consumableInventory.size());
-
- System.Test.stopTest();
- }
- }
-
- //杩斿搧 鏄庣粏2涓嶅瓨鍦ㄧ殑瀵瑰簲鐨勫埌璐ц鍗曟槑缁�
- @isTest
- static void productReturn_oldbarcode() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
-
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
-
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ PageReference page = new PageReference('/apex/ArriveGoods?ESetid=' + Order1.Id);
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF';
+ Controller.SearchPro();
+ // System.assertEquals(1, Controller.ConsumableorderdetailsRecords.size());
+ // System.assertEquals(2, Controller.consumableInventory.size());
+ Controller.ArriveGoodsConfim();
+ List<Consumable_order_details2__c> ins = [
+ SELECT Id, Name
+ FROM Consumable_order_details2__c
+ ];
+ // System.assertEquals(3, ins.size());
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'Test002',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //璁㈠崟
+ //杩斿搧
+ @isTest
+ static void methodTest2() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- //杩斿搧璁㈠崟
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+ //Consumable_order__c coc = [select Dealer_Info__r.name from Consumable_order__c where Id =:Order1.Id];
+ //system.assertEquals('qeee',coc.Dealer_Info__r.name);
- Consumable_order__c Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_01_002';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '杩斿搧';
- Order2.Dealer_Info__c = myAccount1.id;
- Order2.RecordTypeid = System.Label.Dealer_Returned_Label;
- insert Order1;
- insert Order2;
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_001001';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ //鍙戣揣鏄庣粏
+ //fahuo
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Pro001';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Box_Piece__c = '鐩�';
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ //daohuo
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Pro001';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Box_Piece__c = '鐩�';
+ Orderdet2.Arrive_date__c = Date.today();
+ //Orderdet2.Send_Date__c = Date.today();
+ //Orderdet2.Used_date__c= Date.today();
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ //sale
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Pro001';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet3.Consumable_Sale_order__c = Order1.Id;
+ Orderdet3.Box_Piece__c = '鐩�';
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet3.TracingCode__c = 'BXJRF';
+ Orderdet3.SerialLotNo__c = '5ZK';
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Pro001';
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ Orderdet4.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet4.Box_Piece__c = '涓�';
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
+ Orderdet4.TracingCode__c = 'BXJRN';
+ Orderdet4.SerialLotNo__c = '5ZK';
+ //quxiao
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001005';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Pro001';
+ Orderdet5.Cancellation_Date__c = Date.today();
+ Orderdet5.Cancellation_Flag__c = true;
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
+ Orderdet5.Box_Piece__c = '涓�';
+ Orderdet5.TracingCode__c = 'BXJRZ';
+ Orderdet5.SerialLotNo__c = '5ZK';
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet3, Orderdet4, Orderdet5 };
- //鍙戣揣鏄庣粏
- //娌″嚭搴擄紝娌¢攢鍞紝灏辨槸鍦ㄥ簱
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001001';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Pro001';
- Orderdet1.Arrive_date__c = date.today();
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- Orderdet1.TracingCode__c = 'BXSYS';
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRZ\n01049531702003111115120017181000105ZK250BXJRR';
+ Controller.SearchPro();
+ System.assertEquals(1, controller.ConsumableorderdetailsRecordserror.size());
+ // System.assertEquals(2, controller.ShowGoodsofReturnList.size());
+ controller.ShowGoodsofReturnList[0].esd.Return_reason__c = '澶氬彂';
+ // controller.ShowGoodsofReturnList[1].esd.Return_reason__c='澶氬彂';
+ // controller.ShowGoodsofReturnList[0].esd.Rrturn_count__c =1;
+ Controller.UpdateGoodsOfReturn();
- //daohuo
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001002';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Pro001';
- Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- Orderdet2.Arrive_date__c = date.today();
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
- Orderdet2.TracingCode__c = 'BXSYS';
- //sale
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001003';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Pro001';
- Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- Orderdet3.Arrive_date__c = date.today();
- Orderdet3.Used_date__c = date.today();
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
- Orderdet3.TracingCode__c = 'BXSYS';
- //鍑哄簱
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001004';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Pro001';
- Orderdet4.Consumable_Arrived_order__c = Order1.Id;
- Orderdet4.Consumable_Shipment_order__c = Order1.Id;
- Orderdet4.Send_Date__c = date.today();
- Orderdet4.Arrive_date__c = date.today();
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BX222';
- Orderdet4.TracingCode__c = 'BXSYS';
- //quxiao
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001005';
- Orderdet5.Consumable_order_minor__c = Order1.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Pro001';
- Orderdet5.Cancellation_Date__c = Date.today();
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
- Orderdet5.Box_Piece__c = '涓�';
- Orderdet5.TracingCode__c = 'BXSYS';
- //fanpin
- Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
- Orderdet6.Name = 'OCM_01_001006';
- Orderdet6.Consumable_order_minor__c = Order1.Id;
- Orderdet6.Consumable_Product__c = pro1.Id;
- Orderdet6.Asset_Model_No__c = 'Pro001';
- Orderdet6.Consumable_Return_order__c = Order2.Id;
- Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
- Orderdet6.Box_Piece__c = '涓�';
- Orderdet6.TracingCode__c = 'BXSYS';
+ list<String> list1 = new List<String>();
+ list1.add(Controller.barcode = '01234567898');
+ Controller.inventoryEntryNoESetId(list1);
- //鍙戣揣鏄庣粏
- //娌″嚭搴擄紝娌¢攢鍞紝灏辨槸鍦ㄥ簱
- Consumable_order_details2__c Orderdet7 = new Consumable_order_details2__c();
- Orderdet7.Name = 'OCM_01_001001';
- Orderdet7.Consumable_order_minor__c = Order1.Id;
- Orderdet7.Consumable_Product__c = pro1.Id;
- Orderdet7.Asset_Model_No__c = 'Pro001';
- Orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet7.Bar_Code__c = '01049531702003111115120017181000105ZK250BX333';
- Orderdet7.TracingCode__c = 'BXSYS';
+ list1.clear();
+ list1.add(Controller.barcode = '012345678901234A67');
+ Controller.inventoryEntryNoESetId(list1);
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet2,
- Orderdet3,
- Orderdet4,
- Orderdet5,
- Orderdet6,
- Orderdet7
- };
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXAAA\n01049531702003111115120017181000105ZK250BXJRJ\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BX123\n01049531702003111115120017181000105ZK250BX222';
- Controller.SearchPro();
- //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
- //System.assertEquals('OCM_01_001003', controller.ShowGoodsofReturnList[0].esd.Name);
- //System.assertEquals('OCM_01_001004', controller.ShowGoodsofReturnList[1].esd.Name);
- //System.assertEquals('Test01', controller.ConsumableorderdetailsRecordserror[0].Prod.Name__c);
- //System.assertEquals('Test01', controller.ConsumableorderdetailsRecordserror[1].Prod.Name__c);
- //System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecordserror[2].esd.Name);
- //System.assertEquals('OCM_02_001001', controller.ConsumableorderdetailsRecordserror[3].esd.Name);
- // Controller.GoodsReturnCheck();
- Controller.ArriveGoodsConfim();
- //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
- Controller.UpdateGoodsOfReturn();
+ list1.clear();
+ list1.add(Controller.barcode = '0123456789012345117AA01');
+ Controller.inventoryEntryNoESetId(list1);
- controller.getinventorysize();
- System.Test.stopTest();
- }
- }
- @isTest
- static void barcodecheck() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ list1.clear();
+ list1.add(Controller.barcode = '01234567890123456789012349990001');
+ Controller.inventoryEntryNoESetId(list1);
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
+ list1.clear();
+ list1.add(Controller.barcode = '0123456789012345177AA0000000000001');
+ Controller.inventoryEntryNoESetId(list1);
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
- }
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = '2344',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = '8232',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- list<String> list1 = new List<String>();
- list1.clear();
- list1.add(Controller.barcode = '2413456250BBBBA');
- Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '0123456789012345177AA1111111111111');
+ Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '241250BBBBZ');
- Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '241345');
+ Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '241250');
- Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '2413456');
+ Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '241250BBB');
- Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '24134567');
+ Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '24134567250BBBBB');
- Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '241345678');
+ Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '241345678250BBBBC');
- Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '2413456789');
+ Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '2413456789250BBBBD');
- Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '24134567890');
+ Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '24134567890250BBBBE');
- Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '241345678901');
+ Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '241345678901250BBBBF');
- Controller.inventoryEntry(list1);
- list1.clear();
- list1.add(Controller.barcode = '2413456789011250BBBBG');
- Controller.inventoryEntry(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901231177890121215678901234');
+ Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '24134567890111250BBBBH');
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '0112345678901231712300123250BBBBI');
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '011234567890250BBBBJ');
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '01123456789A0123456250BBBBK');
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '011234567890123411AAAA123250BBBBL');
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '011234567890123411789012175678901234250BBBBM'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '01123456789012340138901217aaa8001234250BBBBN'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '011234567890123456789012104567890250BBBBO'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '01123456789012341778910034567890250BBBBP'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '011234567890123417aa910034567890250BBBBQ'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '01123456789012341778911134567890250BBBBR'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '011234567890123417789121105678900000250BBBBS'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '011234567890123410789121105678900000250BBBBT'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '011234567890123411789012171a780012250BBBBU'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '0112345678901234110890121012789000250BBBBV'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '011234567890123417120506105678901234250BBBBW'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '0112345678901234111202121712050212250BBBBX'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '0112345678901234111202121712a50212250BBBBY'
- );
- Controller.inventoryEntry(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '0112345678901234111202121012050212250BBBBZ'
- );
- Controller.inventoryEntry(list1);
- }
- }
- @isTest
- static void barcodechkeck_2() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
-
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
-
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
- }
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = '2344',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = '82324',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //浜у搧娉ㄥ唽璇�
- Product_Register__c prc = new Product_Register__c(
- Name = '鍥芥娉ㄨ繘20162220210',
- MedPrdClass__c = '3',
- ValidFrom__c = date.newinstance(2018, 7, 22),
- ValidTo__c = date.newinstance(2028, 7, 22),
- RegisterNoClass_Old__c = '6815',
- RegisterNoClass_New__c = '6815',
- RegisterNoStatus__c = '鏈夋晥'
- );
- insert prc;
- //鏂版棫鍏崇郴瀵圭収琛�
- //Product_Register_contrast__c prcc = new Product_Register_contrast__c(
- // Name = 'Test20181204',
- // Register_new__c = '314',
- // Register_old__c = '36815'
- // );
- //insert prcc;
- //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod01
- Product_Register_Link__c prlc = new Product_Register_Link__c(
- Product2__c = prod01.Id,
- Product_Register__c = prc.Id
- );
- insert prlc;
- //浜у搧-浜у搧娉ㄥ唽璇佸叧绯� prod02
- Product_Register_Link__c prlc2 = new Product_Register_Link__c(
- Product2__c = prod02.Id,
- Product_Register__c = prc.Id
- );
- insert prlc2;
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
- System.Test.setCurrentPage(page);
-
- ArriveGoodsController Controller = new ArriveGoodsController();
- //List<Product2> proList = [select name,Estimation_Entry_Possibility__c from Product2 where id = :prod01.Id];
- //System.assertEquals('鈼�', proList[0].Estimation_Entry_Possibility__c);
- List<Product2__c> product2InStore = [
- SELECT
- Id,
- Name,
- Name__c,
- Intra_Trade_List_RMB__c,
- Asset_Model_No__c,
- OT_CODE__c
- FROM Product2__c
- WHERE
- Estimation_Entry_Possibility__c = '鈼�'
- AND Pro2_Dealer_Object__c = TRUE
- AND OT_CODE__c = 'test'
- ];
- //System.assertEquals(1, product2InStore.size());
- list<String> list1 = new List<String>();
- list1.clear();
- list1.add(Controller.barcode = '2413456250BBBBA');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241250BBBBZ');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241250');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241250BBZ');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '24134567250BBBBB');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241345678250BBBBC');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '2413452509250BBBBD');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '24125090111250BBBBE');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241325090111250BBBBF');
- Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '2413425090111250BBBBG');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '24134525090111250BBBBH');
- Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '241test1712345678901234567890250BBBBI');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241test171234500678901234567890250BBBBJ');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241test17120400678901234567890250BBBBK');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241test171204110678901234567890250BBBBL');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241test171204121078901234567890250BBBBM');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241test17120412250BBBBN');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241test101204121078901234567890250BBBBO');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241test1112a4121078901234567890250BBBBP');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241test111204121778900034567890250BBBBQ');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '0111234101204120118901231712a4001234250BBBBR'
- );
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '011123410120412011890123171204011234250BBBBS'
- );
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '011test10120412011890123171a04011234250BBBBT'
- );
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(
- Controller.barcode = '0111234101204120118901231012040112342222250BBBBU'
- );
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '011123410120412017120100250AAAAA');
- Controller.inventoryEntryNoESetId(list1);
- }
- }
-
- //鑷姩鍑哄簱
- @isTest
- static void addSaleOrderAuto() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
-
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
-
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
- }
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- insert new List<Product2__c>{ pro1 };
- // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id);
- // insert myAccount1;
- Consumable_order__c Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_02_001';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '璁㈠崟';
- Order2.Dealer_Info__c = myAccount1.Id;
- Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- insert Order2;
- //鍙戦敊搴� 宸插埌璐�
- Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
- Orderdets8.Name = 'OCM_01_001011';
- Orderdets8.Consumable_order_minor__c = Order2.Id;
- Orderdets8.Consumable_Product__c = pro1.Id;
- Orderdets8.Asset_Model_No__c = 'Test01';
- Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXSYS';
- Orderdets8.Box_Piece__c = '鐩�';
- Orderdets8.Arrive_date__c = Date.today();
- Orderdets8.TracingCode__c = 'BXSYS';
- Orderdets8.SerialLotNo__c = '5ZK';
- insert Orderdets8;
-
- ArriveGoodsController Controller = new ArriveGoodsController();
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
- System.Test.setCurrentPage(page);
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXSYS';
- Controller.SearchPro();
- // System.assertEquals(1, controller.consumableInventory.size());
- Controller.ArriveGoodsConfim();
- System.Test.stopTest();
- }
- }
-
- // UPDATE TCM TEST1
- @isTest
- static void methodTest1() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
-
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
-
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
- }
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'N3047730',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'N3047731',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //璁㈠崟
-
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order1.Order_ProType__c = 'ET';
- insert Order1;
-
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
-
- //鍙戣揣鏄庣粏
- //fahuo
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001001';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Test01';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- Orderdet1.Arrive_date__c = Date.today();
- // Orderdet1.Send_Date__c=Date.today();
- // Orderdet1.Used_date__c=Date.today();
- Orderdet1.TracingCode__c = 'BXJRF';
- Orderdet1.SerialLotNo__c = '5ZK';
- insert Orderdet1;
-
- //fahuo
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001001';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Test01';
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181234105ZK250BXJRF';
- Orderdet2.Arrive_date__c = Date.today();
- Orderdet2.TracingCode__c = 'BXJRF';
- Orderdet2.SerialLotNo__c = '5ZK';
- insert Orderdet2;
-
- PageReference page = new PageReference(
- '/apex/ArriveGoods?ESetid=' + Order1.Id
- );
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF';
- Controller.SearchPro();
- // System.assertEquals(1, Controller.ConsumableorderdetailsRecords.size());
- // System.assertEquals(2, Controller.consumableInventory.size());
- Controller.ArriveGoodsConfim();
- List<Consumable_order_details2__c> ins = [
- SELECT Id, Name
- FROM Consumable_order_details2__c
- ];
- // System.assertEquals(3, ins.size());
- System.Test.stopTest();
- }
- }
-
- //杩斿搧
- @isTest
- static void methodTest2() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
-
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
-
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
- }
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'Test002',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //璁㈠崟
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order1.Order_ProType__c = 'ET';
- insert Order1;
- //Consumable_order__c coc = [select Dealer_Info__r.name from Consumable_order__c where Id =:Order1.Id];
- //system.assertEquals('qeee',coc.Dealer_Info__r.name);
-
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_001001';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
-
- //鍙戣揣鏄庣粏
- //fahuo
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001001';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Pro001';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Box_Piece__c = '鐩�';
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- //daohuo
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001002';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Pro001';
- Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet2.IsArrival__c = true;
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Box_Piece__c = '鐩�';
- Orderdet2.Arrive_date__c = Date.today();
- //Orderdet2.Send_Date__c = Date.today();
- //Orderdet2.Used_date__c= Date.today();
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- //sale
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001003';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Pro001';
- Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet3.Consumable_Sale_order__c = Order1.Id;
- Orderdet3.Box_Piece__c = '鐩�';
- Orderdet3.Used_date__c = Date.today();
- Orderdet3.Arrive_date__c = Date.today();
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- Orderdet3.TracingCode__c = 'BXJRF';
- Orderdet3.SerialLotNo__c = '5ZK';
- //鍑哄簱
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001004';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Pro001';
- Orderdet4.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- Orderdet4.Consumable_Shipment_order__c = Order1.Id;
- Orderdet4.Box_Piece__c = '涓�';
- Orderdet4.Send_Date__c = Date.today();
- Orderdet4.Arrive_date__c = Date.today();
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
- Orderdet4.TracingCode__c = 'BXJRN';
- Orderdet4.SerialLotNo__c = '5ZK';
- //quxiao
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001005';
- Orderdet5.Consumable_order_minor__c = Order1.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Pro001';
- Orderdet5.Cancellation_Date__c = Date.today();
- Orderdet5.Cancellation_Flag__c = true;
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
- Orderdet5.Box_Piece__c = '涓�';
- Orderdet5.TracingCode__c = 'BXJRZ';
- Orderdet5.SerialLotNo__c = '5ZK';
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet3,
- Orderdet4,
- Orderdet5
- };
-
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRZ\n01049531702003111115120017181000105ZK250BXJRR';
- Controller.SearchPro();
- System.assertEquals(
- 1,
- controller.ConsumableorderdetailsRecordserror.size()
- );
- // System.assertEquals(2, controller.ShowGoodsofReturnList.size());
- controller.ShowGoodsofReturnList[0].esd.Return_reason__c = '澶氬彂';
- // controller.ShowGoodsofReturnList[1].esd.Return_reason__c='澶氬彂';
- // controller.ShowGoodsofReturnList[0].esd.Rrturn_count__c =1;
- Controller.UpdateGoodsOfReturn();
-
- list<String> list1 = new List<String>();
- list1.add(Controller.barcode = '01234567898');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '012345678901234A67');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '0123456789012345117AA01');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '01234567890123456789012349990001');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '0123456789012345177AA0000000000001');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '0123456789012345177AA1111111111111');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241345');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '2413456');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '24134567');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241345678');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '2413456789');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '24134567890');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '241345678901');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '0112345678901231177890121215678901234');
- Controller.inventoryEntryNoESetId(list1);
-
- list1.clear();
- list1.add(Controller.barcode = '0112345678901231106789012105678901234');
- Controller.inventoryEntryNoESetId(list1);
- list1.clear();
- list1.add(Controller.barcode = '0112345678901231106789012105625001234');
- Controller.inventoryEntryNoESetId(list1);
- System.Test.stopTest();
- }
- }
-
- //鏁翠綋鍒拌揣
- @isTest
- static void ArrivejancodeTest() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
-
- Oly_TriggerHandler.bypass('ConsumableAssetHander');
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901231106789012105678901234');
+ Controller.inventoryEntryNoESetId(list1);
+ list1.clear();
+ list1.add(Controller.barcode = '0112345678901231106789012105625001234');
+ Controller.inventoryEntryNoESetId(list1);
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- insert new List<Product2__c>{ pro1 };
- // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id);
- // insert myAccount1;
- Consumable_order__c Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_02_001';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '璁㈠崟';
- Order2.Dealer_Info__c = myAccount1.Id;
- Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- insert Order2;
- //鍙戦敊搴� 鏈埌璐�
- Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
- Orderdets8.Name = 'OCM_01_001011';
- Orderdets8.Consumable_order_minor__c = Order2.Id;
- Orderdets8.Consumable_Product__c = pro1.Id;
- Orderdets8.Asset_Model_No__c = 'Test01';
- Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
- Orderdets8.Box_Piece__c = '鐩�';
- Orderdets8.TracingCode__c = 'BXsys';
- Orderdets8.SerialLotNo__c = '5ZK';
- insert Orderdets8;
+ //鏁翠綋鍒拌揣
+ @isTest
+ static void ArrivejancodeTest() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.Order_ProType__c = 'ET';
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- insert Order1;
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- //鍒拌揣姝g‘淇℃伅
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001002';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Test01';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
- Orderdet1.Box_Piece__c = '鐩�';
- Orderdet1.TracingCode__c = 'BXJRA';
- Orderdet1.SerialLotNo__c = '5ZK';
- //娌″埌璐�
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001003';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Test01';
- Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
- Orderdet2.Box_Piece__c = '鐩�';
- Orderdet2.TracingCode__c = 'BXJRB';
- Orderdet2.SerialLotNo__c = '5ZK';
- //閿�鍞骇鍝�
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001004';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Test01';
- Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet3.Consumable_Sale_order__c = Order1.Id;
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
- Orderdet3.Used_date__c = Date.today();
- Orderdet3.Arrive_date__c = Date.today();
- Orderdet3.Box_Piece__c = '鐩�';
- Orderdet3.TracingCode__c = 'BXJRC';
- Orderdet3.SerialLotNo__c = '5ZK';
- //Orderdet3.Box_Piece__c = '涓�';
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ insert new List<Product2__c>{ pro1 };
+ // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id);
+ // insert myAccount1;
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_02_001';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.Dealer_Info__c = myAccount1.Id;
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert Order2;
+ //鍙戦敊搴� 鏈埌璐�
+ Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
+ Orderdets8.Name = 'OCM_01_001011';
+ Orderdets8.Consumable_order_minor__c = Order2.Id;
+ Orderdets8.Consumable_Product__c = pro1.Id;
+ Orderdets8.Asset_Model_No__c = 'Test01';
+ Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
+ Orderdets8.Box_Piece__c = '鐩�';
+ Orderdets8.TracingCode__c = 'BXsys';
+ Orderdets8.SerialLotNo__c = '5ZK';
+ insert Orderdets8;
- //鍑哄簱浜у搧
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001005';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Test01';
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
- Orderdet4.Send_Date__c = Date.today();
- Orderdet4.Arrive_date__c = Date.today();
- Orderdet4.Box_Piece__c = '鐩�';
- Orderdet4.TracingCode__c = 'BXJRD';
- Orderdet4.SerialLotNo__c = '5ZK';
- //Orderdet4.Box_Piece__c = '鐩�';
- //Orderdet4.Return_date__c = null;
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.Order_ProType__c = 'ET';
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert Order1;
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
- //宸插埌璐т骇鍝�
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001006';
- Orderdet5.Consumable_order_minor__c = Order1.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Test01';
- Orderdet5.Consumable_Arrived_order__c = Order1.Id;
- Orderdet5.Consumable_Shipment_order__c = Order1.Id;
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
- Orderdet5.Arrive_date__c = Date.today();
- Orderdet5.Box_Piece__c = '鐩�';
- Orderdet5.TracingCode__c = 'BXJRE';
- Orderdet5.SerialLotNo__c = '5ZK';
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet2,
- Orderdet3,
- Orderdet4,
- Orderdet5
- };
+ //鍒拌揣姝g‘淇℃伅
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001002';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet1.Box_Piece__c = '鐩�';
+ Orderdet1.TracingCode__c = 'BXJRA';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ //娌″埌璐�
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001003';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
+ Orderdet2.Box_Piece__c = '鐩�';
+ Orderdet2.TracingCode__c = 'BXJRB';
+ Orderdet2.SerialLotNo__c = '5ZK';
+ //閿�鍞骇鍝�
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001004';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Test01';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet3.Consumable_Sale_order__c = Order1.Id;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.Box_Piece__c = '鐩�';
+ Orderdet3.TracingCode__c = 'BXJRC';
+ Orderdet3.SerialLotNo__c = '5ZK';
+ //Orderdet3.Box_Piece__c = '涓�';
- ArriveGoodsController Controller = new ArriveGoodsController();
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
- System.Test.setCurrentPage(page);
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BX111\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BXsys';
- Controller.SearchPro();
+ //鍑哄簱浜у搧
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001005';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Test01';
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.Box_Piece__c = '鐩�';
+ Orderdet4.TracingCode__c = 'BXJRD';
+ Orderdet4.SerialLotNo__c = '5ZK';
+ //Orderdet4.Box_Piece__c = '鐩�';
+ //Orderdet4.Return_date__c = null;
- System.assertEquals(
- 'OCM_01_001002',
- controller.ConsumableorderdetailsRecords[0].esd.Name
- );
- // System.assertEquals(2, controller.ConsumableorderdetailsRecordserror.size());
- System.Test.stopTest();
- }
- }
+ //宸插埌璐т骇鍝�
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001006';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Test01';
+ Orderdet5.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet5.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
+ Orderdet5.Arrive_date__c = Date.today();
+ Orderdet5.Box_Piece__c = '鐩�';
+ Orderdet5.TracingCode__c = 'BXJRE';
+ Orderdet5.SerialLotNo__c = '5ZK';
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5 };
- //鍙戦敊璐� 鍏ュ簱
- @isTest
- static void ArriveotheragencyTest() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
+ System.Test.setCurrentPage(page);
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BX111\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BXsys';
+ Controller.SearchPro();
- Oly_TriggerHandler.bypass('ConsumableAssetHander');
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecords[0].esd.Name);
+ // System.assertEquals(2, controller.ConsumableorderdetailsRecordserror.size());
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- insert new List<Product2__c>{ pro1 };
- Account myAccount3 = new Account(
- name = 'Testaccount003',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert myAccount3;
- Consumable_order__c Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_02_001';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '璁㈠崟';
- Order2.Dealer_Info__c = myAccount3.Id;
- Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order2.Order_ProType__c = 'ET';
- insert Order2;
- //鍙戦敊搴� 鏈埌璐�
- Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
- Orderdets8.Name = 'OCM_01_001011';
- Orderdets8.Consumable_order_minor__c = Order2.Id;
- Orderdets8.Consumable_Product__c = pro1.Id;
- Orderdets8.Asset_Model_No__c = 'Test01';
- Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXSYS';
- Orderdets8.Box_Piece__c = '鐩�';
- Orderdets8.TracingCode__c = 'BXSYS';
- Orderdets8.SerialLotNo__c = '5ZK';
- Orderdets8.ownerid = MyUser_Test.id;
- insert Orderdets8;
+ //鍙戦敊璐� 鍏ュ簱
+ @isTest
+ static void ArriveotheragencyTest() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- //鍙戦敊搴� 宸插埌璐�
- Consumable_order_details2__c Orderdets9 = new Consumable_order_details2__c();
- Orderdets9.Name = 'OCM_01_001012';
- Orderdets9.Consumable_order_minor__c = Order2.Id;
- Orderdets9.Consumable_Product__c = pro1.Id;
- Orderdets9.Asset_Model_No__c = 'Test01';
- Orderdets9.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdets9.Bar_Code__c = '01049531702003111115120017181000105ZK250BXSYQ';
- Orderdets9.Consumable_Arrived_order__c = Order2.Id;
- Orderdets9.Arrive_date__c = Date.today();
- Orderdets9.Box_Piece__c = '鐩�';
- Orderdets9.TracingCode__c = 'BXSYQ';
- Orderdets9.SerialLotNo__c = '5ZK';
- insert Orderdets9;
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- // Consumable_order__c Order1 = new Consumable_order__c();
- // Order1.Name = 'OCM_01_001';
- // Order1.Order_status__c = '鎵瑰噯';
- // Order1.Order_type__c = '璁㈠崟';
- // Order1.Dealer_Info__c = myAccount1.id;
- // Order1.Order_ProType__c = 'ET';
- // Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- // insert Order1;
- // //璁㈠崟鏄庣粏
- // //fahuo
- // Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- // Orderdet.Name = 'OCM_01_00101';
- // Orderdet.Consumable_order__c = Order1.Id;
- // Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- // Orderdet.Consumable_Product__c = pro1.Id;
- // Orderdet.Consumable_count__c = 4;
- // insert Orderdet;
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ insert new List<Product2__c>{ pro1 };
+ Account myAccount3 = new Account(name = 'Testaccount003', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert myAccount3;
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_02_001';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.Dealer_Info__c = myAccount3.Id;
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order2.Order_ProType__c = 'ET';
+ insert Order2;
+ //鍙戦敊搴� 鏈埌璐�
+ Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
+ Orderdets8.Name = 'OCM_01_001011';
+ Orderdets8.Consumable_order_minor__c = Order2.Id;
+ Orderdets8.Consumable_Product__c = pro1.Id;
+ Orderdets8.Asset_Model_No__c = 'Test01';
+ Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXSYS';
+ Orderdets8.Box_Piece__c = '鐩�';
+ Orderdets8.TracingCode__c = 'BXSYS';
+ Orderdets8.SerialLotNo__c = '5ZK';
+ Orderdets8.ownerid = MyUser_Test.id;
+ insert Orderdets8;
- // //鍒拌揣姝g‘淇℃伅
- // Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- // Orderdet1.Name = 'OCM_01_001002';
- // Orderdet1.Consumable_order_minor__c = Order1.Id;
- // Orderdet1.Consumable_Product__c = pro1.Id;
- // Orderdet1.Asset_Model_No__c = 'Test01';
- // Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- // Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
- // Orderdet1.Box_Piece__c = '鐩�';
- // Orderdet1.TracingCode__c = 'BXJRA';
- // Orderdet1.SerialLotNo__c = '5ZK';
- // //娌″埌璐�
- // Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- // Orderdet2.Name = 'OCM_01_001003';
- // Orderdet2.Consumable_order_minor__c = Order1.Id;
- // Orderdet2.Consumable_Product__c = pro1.Id;
- // Orderdet2.Asset_Model_No__c = 'Test01';
- // Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- // Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- // Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
- // Orderdet2.Box_Piece__c = '鐩�';
- // Orderdet2.TracingCode__c = 'BXJRB';
- // Orderdet2.SerialLotNo__c = '5ZK';
- // //閿�鍞骇鍝�
- // Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- // Orderdet3.Name = 'OCM_01_001004';
- // Orderdet3.Consumable_order_minor__c = Order1.Id;
- // Orderdet3.Consumable_Product__c = pro1.Id;
- // Orderdet3.Asset_Model_No__c = 'Test01';
- // Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- // //Orderdet3.IsArrival__c = true;
- // Orderdet3.Consumable_Sale_order__c = Order1.Id;
- // Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- // Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
- // Orderdet3.Used_date__c = Date.today();
- // Orderdet3.Arrive_date__c = Date.today();
- // Orderdet3.Box_Piece__c = '鐩�';
- // Orderdet3.TracingCode__c = 'BXJRC';
- // Orderdet3.SerialLotNo__c = '5ZK';
- // //Orderdet3.Box_Piece__c = '涓�';
+ //鍙戦敊搴� 宸插埌璐�
+ Consumable_order_details2__c Orderdets9 = new Consumable_order_details2__c();
+ Orderdets9.Name = 'OCM_01_001012';
+ Orderdets9.Consumable_order_minor__c = Order2.Id;
+ Orderdets9.Consumable_Product__c = pro1.Id;
+ Orderdets9.Asset_Model_No__c = 'Test01';
+ Orderdets9.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets9.Bar_Code__c = '01049531702003111115120017181000105ZK250BXSYQ';
+ Orderdets9.Consumable_Arrived_order__c = Order2.Id;
+ Orderdets9.Arrive_date__c = Date.today();
+ Orderdets9.Box_Piece__c = '鐩�';
+ Orderdets9.TracingCode__c = 'BXSYQ';
+ Orderdets9.SerialLotNo__c = '5ZK';
+ insert Orderdets9;
- // //鍑哄簱浜у搧
- // Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- // Orderdet4.Name = 'OCM_01_001005';
- // Orderdet4.Consumable_order_minor__c = Order1.Id;
- // Orderdet4.Consumable_Product__c = pro1.Id;
- // Orderdet4.Asset_Model_No__c = 'Test01';
- // Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- // Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
- // Orderdet4.Send_Date__c = Date.today();
- // Orderdet4.Arrive_date__c = Date.today();
- // Orderdet4.Box_Piece__c = '鐩�';
- // Orderdet4.TracingCode__c = 'BXJRD';
- // Orderdet4.SerialLotNo__c = '5ZK';
- // //Orderdet4.Box_Piece__c = '鐩�';
- // //Orderdet4.Return_date__c = null;
+ // Consumable_order__c Order1 = new Consumable_order__c();
+ // Order1.Name = 'OCM_01_001';
+ // Order1.Order_status__c = '鎵瑰噯';
+ // Order1.Order_type__c = '璁㈠崟';
+ // Order1.Dealer_Info__c = myAccount1.id;
+ // Order1.Order_ProType__c = 'ET';
+ // Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ // insert Order1;
+ // //璁㈠崟鏄庣粏
+ // //fahuo
+ // Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ // Orderdet.Name = 'OCM_01_00101';
+ // Orderdet.Consumable_order__c = Order1.Id;
+ // Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ // Orderdet.Consumable_Product__c = pro1.Id;
+ // Orderdet.Consumable_count__c = 4;
+ // insert Orderdet;
- // //宸插埌璐т骇鍝�
- // Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- // Orderdet5.Name = 'OCM_01_001006';
- // Orderdet5.Consumable_order_minor__c = Order1.Id;
- // Orderdet5.Consumable_Product__c = pro1.Id;
- // Orderdet5.Asset_Model_No__c = 'Test01';
- // Orderdet5.Consumable_Arrived_order__c = Order1.Id;
- // Orderdet5.Consumable_Shipment_order__c = Order1.Id;
- // Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- // Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
- // Orderdet5.Arrive_date__c = Date.today();
- // Orderdet5.Box_Piece__c = '鐩�';
- // Orderdet5.TracingCode__c = 'BXJRE';
- // Orderdet5.SerialLotNo__c = '5ZK';
- // insert new Consumable_order_details2__c[] {Orderdet1, Orderdet2,Orderdet3,Orderdet4,Orderdet5};
+ // //鍒拌揣姝g‘淇℃伅
+ // Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ // Orderdet1.Name = 'OCM_01_001002';
+ // Orderdet1.Consumable_order_minor__c = Order1.Id;
+ // Orderdet1.Consumable_Product__c = pro1.Id;
+ // Orderdet1.Asset_Model_No__c = 'Test01';
+ // Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ // Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ // Orderdet1.Box_Piece__c = '鐩�';
+ // Orderdet1.TracingCode__c = 'BXJRA';
+ // Orderdet1.SerialLotNo__c = '5ZK';
+ // //娌″埌璐�
+ // Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ // Orderdet2.Name = 'OCM_01_001003';
+ // Orderdet2.Consumable_order_minor__c = Order1.Id;
+ // Orderdet2.Consumable_Product__c = pro1.Id;
+ // Orderdet2.Asset_Model_No__c = 'Test01';
+ // Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ // Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ // Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
+ // Orderdet2.Box_Piece__c = '鐩�';
+ // Orderdet2.TracingCode__c = 'BXJRB';
+ // Orderdet2.SerialLotNo__c = '5ZK';
+ // //閿�鍞骇鍝�
+ // Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ // Orderdet3.Name = 'OCM_01_001004';
+ // Orderdet3.Consumable_order_minor__c = Order1.Id;
+ // Orderdet3.Consumable_Product__c = pro1.Id;
+ // Orderdet3.Asset_Model_No__c = 'Test01';
+ // Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ // //Orderdet3.IsArrival__c = true;
+ // Orderdet3.Consumable_Sale_order__c = Order1.Id;
+ // Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ // Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
+ // Orderdet3.Used_date__c = Date.today();
+ // Orderdet3.Arrive_date__c = Date.today();
+ // Orderdet3.Box_Piece__c = '鐩�';
+ // Orderdet3.TracingCode__c = 'BXJRC';
+ // Orderdet3.SerialLotNo__c = '5ZK';
+ // //Orderdet3.Box_Piece__c = '涓�';
- ArriveGoodsController Controller = new ArriveGoodsController();
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
- System.Test.setCurrentPage(page);
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXSYS\n01049531702003111115120017181000105ZK250BXSYQ';
- Controller.SearchPro();
- Controller.ArriveGoodsConfim();
+ // //鍑哄簱浜у搧
+ // Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ // Orderdet4.Name = 'OCM_01_001005';
+ // Orderdet4.Consumable_order_minor__c = Order1.Id;
+ // Orderdet4.Consumable_Product__c = pro1.Id;
+ // Orderdet4.Asset_Model_No__c = 'Test01';
+ // Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ // Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
+ // Orderdet4.Send_Date__c = Date.today();
+ // Orderdet4.Arrive_date__c = Date.today();
+ // Orderdet4.Box_Piece__c = '鐩�';
+ // Orderdet4.TracingCode__c = 'BXJRD';
+ // Orderdet4.SerialLotNo__c = '5ZK';
+ // //Orderdet4.Box_Piece__c = '鐩�';
+ // //Orderdet4.Return_date__c = null;
- // System.assertEquals(2, controller.ConsumableorderdetailsRecordserror.size());
- System.Test.stopTest();
- }
- }
+ // //宸插埌璐т骇鍝�
+ // Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ // Orderdet5.Name = 'OCM_01_001006';
+ // Orderdet5.Consumable_order_minor__c = Order1.Id;
+ // Orderdet5.Consumable_Product__c = pro1.Id;
+ // Orderdet5.Asset_Model_No__c = 'Test01';
+ // Orderdet5.Consumable_Arrived_order__c = Order1.Id;
+ // Orderdet5.Consumable_Shipment_order__c = Order1.Id;
+ // Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ // Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
+ // Orderdet5.Arrive_date__c = Date.today();
+ // Orderdet5.Box_Piece__c = '鐩�';
+ // Orderdet5.TracingCode__c = 'BXJRE';
+ // Orderdet5.SerialLotNo__c = '5ZK';
+ // insert new Consumable_order_details2__c[] {Orderdet1, Orderdet2,Orderdet3,Orderdet4,Orderdet5};
- //杩斿搧
- @isTest
- static void addInventoryDetails1() {
- // // TO DO: implement unit test
- List<RecordType> rectCo = [
- SELECT Id
- FROM RecordType
- WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
- ];
- if (rectCo.size() == 0) {
- return;
- }
- // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
- Profile prof = [
- SELECT Id
- FROM Profile
- WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
- ];
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
+ System.Test.setCurrentPage(page);
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXSYS\n01049531702003111115120017181000105ZK250BXSYQ';
+ Controller.SearchPro();
+ Controller.ArriveGoodsConfim();
- Account myAccount2 = new Account(
- name = 'Testaccount002',
- Dealer_discount__c = 20,
- RecordTypeId = rectCo[0].Id,
- AgentCode_Ext__c = '9999900'
- );
- Account myAccount1 = new Account(
- name = 'Testaccount001',
- Dealer_discount__c = 30,
- RecordTypeId = rectCo[0].Id
- );
- insert new List<account>{ myAccount1, myAccount2 };
-
- Contact core = new Contact(
- email = 'jplumber@salesforce.com',
- firstname = 'Joe',
- lastname = 'Plumber',
- accountid = myAccount1.id
- );
- insert core;
- user MyUser_Test = new User(
- ContactId = core.id,
- Alias = 'newUser',
- Email = 'newuser@testorg.com',
- EmailEncodingKey = 'UTF-8',
- LastName = 'TestUser',
- LanguageLocaleKey = 'zh_CN',
- LocaleSidKey = 'zh_CN',
- ProfileId = prof.Id,
- TimeZoneSidKey = 'Asia/Shanghai',
- UserName = 'testUser@testorg.com',
- UserPro_Type__c = 'ET'
- );
- System.runAs(new User(Id = UserInfo.getUserId())) {
- insert MyUser_Test;
+ // System.assertEquals(2, controller.ConsumableorderdetailsRecordserror.size());
+ System.Test.stopTest();
+ }
}
- // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
- // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
- // insert new Product2[] {prod01,prod02};
- System.runAs(MyUser_Test) {
- Product2 prod01 = new Product2(
- Name = 'Test01',
- ProductCode = 'Test01',
- Asset_Model_No__c = 'Test01',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200311',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- Product2 prod02 = new Product2(
- Name = 'Test02',
- ProductCode = 'Test02',
- Asset_Model_No__c = 'Test02',
- SFDA_Status__c = '鏈夊姽',
- JANCODE__c = '04953170200312',
- Dealer_special_Object__c = true,
- Manual_Entry__c = false
- );
- insert new List<Product2>{ prod01, prod02 };
- Product2__c pro1 = new Product2__c(
- Name = 'Pro001',
- OT_CODE_Text__c = 'Test001',
- Product2__c = prod01.Id
- );
- Product2__c pro2 = new Product2__c(
- Name = 'Pro002',
- OT_CODE_Text__c = 'Test002',
- Product2__c = prod02.Id
- );
- insert new List<Product2__c>{ pro1, pro2 };
- //璁㈠崟
- Oly_TriggerHandler.bypass('ConsumableAssetHander');
- Consumable_order__c Order1 = new Consumable_order__c();
- Order1.Name = 'OCM_01_001';
- Order1.Order_status__c = '鎵瑰噯';
- Order1.Order_type__c = '璁㈠崟';
- Order1.Dealer_Info__c = myAccount1.id;
- Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
- Order1.Order_ProType__c = 'ET';
- //杩斿搧璁㈠崟
+ //杩斿搧
+ @isTest
+ static void addInventoryDetails1() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
- Consumable_order__c Order2 = new Consumable_order__c();
- Order2.Name = 'OCM_01_002';
- Order2.Order_status__c = '鎵瑰噯';
- Order2.Order_type__c = '杩斿搧';
- Order2.Dealer_Info__c = myAccount1.id;
- Order2.RecordTypeid = System.Label.Dealer_Returned_Label;
- insert Order1;
- insert Order2;
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
- //璁㈠崟鏄庣粏
- //fahuo
- Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
- Orderdet.Name = 'OCM_01_00101';
- Orderdet.Consumable_order__c = Order1.Id;
- Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
- Orderdet.Consumable_Product__c = pro1.Id;
- Orderdet.Consumable_count__c = 4;
- insert Orderdet;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
- //鍙戣揣鏄庣粏
- //fahuo
- Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
- Orderdet1.Name = 'OCM_01_001001';
- Orderdet1.Consumable_order_minor__c = Order1.Id;
- Orderdet1.Consumable_Product__c = pro1.Id;
- Orderdet1.Asset_Model_No__c = 'Pro001';
- Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
- Orderdet1.TracingCode__c = 'BXJRF';
- //daohuo
- Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
- Orderdet2.Name = 'OCM_01_001002';
- Orderdet2.Consumable_order_minor__c = Order1.Id;
- Orderdet2.Consumable_Product__c = pro1.Id;
- Orderdet2.Asset_Model_No__c = 'Pro001';
- Orderdet2.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet2.IsArrival__c = true;
- Orderdet2.Arrive_date__c = Date.today();
- Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
- Orderdet2.TracingCode__c = 'BXJRF';
- //sale
- Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
- Orderdet3.Name = 'OCM_01_001003';
- Orderdet3.Consumable_order_minor__c = Order1.Id;
- Orderdet3.Consumable_Product__c = pro1.Id;
- Orderdet3.Asset_Model_No__c = 'Pro001';
- Orderdet3.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet3.IsArrival__c = true;
- Orderdet3.Arrive_date__c = Date.today();
- Orderdet3.Used_date__c = Date.today();
- Orderdet3.Consumable_Sale_order__c = Order1.Id;
- Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
- Orderdet3.Box_Piece__c = '鐩�';
- Orderdet3.TracingCode__c = 'BXJRF';
- //鍑哄簱
- Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
- Orderdet4.Name = 'OCM_01_001004';
- Orderdet4.Consumable_order_minor__c = Order1.Id;
- Orderdet4.Consumable_Product__c = pro1.Id;
- Orderdet4.Asset_Model_No__c = 'Pro001';
- Orderdet4.Consumable_Arrived_order__c = Order1.Id;
- //Orderdet4.IsArrival__c = true;
- Orderdet4.Arrive_date__c = Date.today();
- Orderdet4.Send_Date__c = Date.today();
- Orderdet4.Consumable_Shipment_order__c = Order1.Id;
- Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
- Orderdet4.Box_Piece__c = '涓�';
- Orderdet4.TracingCode__c = 'BXJRF';
- //quxiao
- Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
- Orderdet5.Name = 'OCM_01_001005';
- Orderdet5.Consumable_order_minor__c = Order1.Id;
- Orderdet5.Consumable_Product__c = pro1.Id;
- Orderdet5.Asset_Model_No__c = 'Pro001';
- Orderdet5.Cancellation_Date__c = Date.today();
- Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
- Orderdet5.Box_Piece__c = '鐩�';
- Orderdet5.TracingCode__c = 'BXJRF';
- //fanpin
- Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
- Orderdet6.Name = 'OCM_01_001006';
- Orderdet6.Consumable_order_minor__c = Order1.Id;
- Orderdet6.Consumable_Product__c = pro1.Id;
- Orderdet6.Asset_Model_No__c = 'Pro001';
- Orderdet6.Consumable_Return_order__c = Order2.Id;
- Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
- Orderdet6.Box_Piece__c = '涓�';
- Orderdet6.TracingCode__c = 'BXJRF';
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ //杩斿搧璁㈠崟
- // 涓㈠け
- Consumable_order_details2__c Orderdet7 = new Consumable_order_details2__c();
- Orderdet7.Name = 'OCM_01_001002';
- Orderdet7.Consumable_order_minor__c = Order1.Id;
- Orderdet7.Consumable_Product__c = pro1.Id;
- Orderdet7.Asset_Model_No__c = 'Pro001';
- Orderdet7.Consumable_Arrived_order__c = Order1.Id;
- Orderdet7.Lose_Flag__c = true;
- Orderdet7.Arrive_date__c = Date.today();
- Orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
- Orderdet7.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJQT';
- Orderdet7.Box_Piece__c = '涓�';
- Orderdet7.TracingCode__c = 'BXJQT';
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_002';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '杩斿搧';
+ Order2.Dealer_Info__c = myAccount1.id;
+ Order2.RecordTypeid = System.Label.Dealer_Returned_Label;
+ insert Order1;
+ insert Order2;
- insert new List<Consumable_order_details2__c>{
- Orderdet1,
- Orderdet2,
- Orderdet3,
- Orderdet4,
- Orderdet5,
- Orderdet6,
- Orderdet7
- };
- PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
- System.Test.setCurrentPage(page);
- ArriveGoodsController Controller = new ArriveGoodsController();
- //鍒濆鍖栨祴璇�
- System.Test.startTest();
- Controller.init();
- //鎺掑簭
- Controller.barcode = '01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRZ\n01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJQT';
- Controller.SearchPro();
- //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
- //System.assertEquals('OCM_01_001003', controller.ShowGoodsofReturnList[0].esd.Name);
- //System.assertEquals('OCM_01_001004', controller.ShowGoodsofReturnList[1].esd.Name);
- // System.assertEquals(5, controller.ConsumableorderdetailsRecordserror.size()); //tcm
- //System.assertEquals('Test01', controller.ConsumableorderdetailsRecordserror[1].Prod.Name__c);
- //System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecordserror[2].esd.Name);
- //System.assertEquals('OCM_02_001001', controller.ConsumableorderdetailsRecordserror[3].esd.Name);
- // Controller.GoodsReturnCheck();
- controller.ShowGoodsofReturnList[0].esd.Return_reason__c = '澶氬彂';
- controller.ShowGoodsofReturnList[0].esd.Rrturn_count__c = 1;
- //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
- Controller.UpdateGoodsOfReturn();
- Controller.ToReturnGoodsPage();
- Controller.geterrorsize();
- System.Test.stopTest();
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
+
+ //鍙戣揣鏄庣粏
+ //fahuo
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Pro001';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.TracingCode__c = 'BXJRF';
+ //daohuo
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Pro001';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.Arrive_date__c = Date.today();
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
+ Orderdet2.TracingCode__c = 'BXJRF';
+ //sale
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Pro001';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Consumable_Sale_order__c = Order1.Id;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
+ Orderdet3.Box_Piece__c = '鐩�';
+ Orderdet3.TracingCode__c = 'BXJRF';
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Pro001';
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRN';
+ Orderdet4.Box_Piece__c = '涓�';
+ Orderdet4.TracingCode__c = 'BXJRF';
+ //quxiao
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001005';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Pro001';
+ Orderdet5.Cancellation_Date__c = Date.today();
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
+ Orderdet5.Box_Piece__c = '鐩�';
+ Orderdet5.TracingCode__c = 'BXJRF';
+ //fanpin
+ Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
+ Orderdet6.Name = 'OCM_01_001006';
+ Orderdet6.Consumable_order_minor__c = Order1.Id;
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Asset_Model_No__c = 'Pro001';
+ Orderdet6.Consumable_Return_order__c = Order2.Id;
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet6.Box_Piece__c = '涓�';
+ Orderdet6.TracingCode__c = 'BXJRF';
+
+ // 涓㈠け
+ Consumable_order_details2__c Orderdet7 = new Consumable_order_details2__c();
+ Orderdet7.Name = 'OCM_01_001002';
+ Orderdet7.Consumable_order_minor__c = Order1.Id;
+ Orderdet7.Consumable_Product__c = pro1.Id;
+ Orderdet7.Asset_Model_No__c = 'Pro001';
+ Orderdet7.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet7.Lose_Flag__c = true;
+ Orderdet7.Arrive_date__c = Date.today();
+ Orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet7.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJQT';
+ Orderdet7.Box_Piece__c = '涓�';
+ Orderdet7.TracingCode__c = 'BXJQT';
+
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5, Orderdet6, Orderdet7 };
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=ReG');
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJRN\n01049531702003111115120017181000105ZK250BXJRZ\n01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXJRI\n01049531702003111115120017181000105ZK250BXJQT';
+ Controller.SearchPro();
+ //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
+ //System.assertEquals('OCM_01_001003', controller.ShowGoodsofReturnList[0].esd.Name);
+ //System.assertEquals('OCM_01_001004', controller.ShowGoodsofReturnList[1].esd.Name);
+ // System.assertEquals(5, controller.ConsumableorderdetailsRecordserror.size()); //tcm
+ //System.assertEquals('Test01', controller.ConsumableorderdetailsRecordserror[1].Prod.Name__c);
+ //System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecordserror[2].esd.Name);
+ //System.assertEquals('OCM_02_001001', controller.ConsumableorderdetailsRecordserror[3].esd.Name);
+ // Controller.GoodsReturnCheck();
+ controller.ShowGoodsofReturnList[0].esd.Return_reason__c = '澶氬彂';
+ controller.ShowGoodsofReturnList[0].esd.Rrturn_count__c = 1;
+ //System.assertEquals(1, controller.ShowGoodsofReturnList.size());
+ Controller.UpdateGoodsOfReturn();
+ Controller.ToReturnGoodsPage();
+ Controller.geterrorsize();
+ System.Test.stopTest();
+ }
}
- }
+
+ @isTest
+ static void makeRecordsVieweTest() {
+ Integer count = 1001;
+ List<ArriveGoodsController.ConsumableorderdetailsInfo> conList = new List<ArriveGoodsController.ConsumableorderdetailsInfo>();
+ for (Integer i = 0; i < 1001; i++) {
+ conList.add(new ArriveGoodsController.ConsumableorderdetailsInfo());
+ }
+ ArriveGoodsController arr = new ArriveGoodsController();
+ arr.makeRecordsView(conList);
+ ArriveGoodsController arr1 = new ArriveGoodsController('', '');
+ }
+
+ @isTest
+ static void compareToTest() {
+ ArriveGoodsController.ConsumableorderdetailsInfo c1 = new ArriveGoodsController.ConsumableorderdetailsInfo();
+ ArriveGoodsController.ConsumableorderdetailsInfo c2 = new ArriveGoodsController.ConsumableorderdetailsInfo();
+ c1.compareTo(c2);
+ }
+
+ @isTest
+ static void searchProTest1() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'N3047730', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.Cancellation_Date__c = null;
+ Orderdet1.TracingCode__c = 'BXJRF';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ insert Orderdet1;
+ System.debug('Orderdet1:' + Orderdet1);
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001001';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181234105ZK250BXJRF';
+ Orderdet1.Cancellation_Date__c = null;
+ Orderdet2.TracingCode__c = 'BXJRF';
+ Orderdet2.SerialLotNo__c = '5ZK';
+ insert Orderdet2;
+
+ PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr');
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ System.Test.startTest();
+ Controller.init();
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF';
+ Controller.SearchPro();
+ Controller.ArriveGoodsConfim();
+ List<Consumable_order_details2__c> ins = [
+ SELECT Id, Name
+ FROM Consumable_order_details2__c
+ ];
+ System.Test.stopTest();
+ }
+ }
}
diff --git a/force-app/main/default/classes/ArriveGoodsControllerTestV2.cls b/force-app/main/default/classes/ArriveGoodsControllerTestV2.cls
new file mode 100644
index 0000000..01d3945
--- /dev/null
+++ b/force-app/main/default/classes/ArriveGoodsControllerTestV2.cls
@@ -0,0 +1,207 @@
+@isTest
+public class ArriveGoodsControllerTestV2 {
+ @isTest
+ static void myUnitTest() {
+ // // TO DO: implement unit test
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ // Order1.Dealer_Info__c = myAccount1.id;
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Total_num__c = 3;
+ Order1.OrderNumber_arrived__c = 1;
+ Order1.Delivery_detail_count__c = 1;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 40;
+ insert Orderdet;
+
+ //鍙戣揣鏄庣粏
+ //鍒拌揣姝g‘淇℃伅
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001002';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet1.TracingCode__c = 'BXJRA';
+
+ //鍙栨秷浜у搧
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001003';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ //Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
+ Orderdet2.Cancellation_Date__c = Date.today();
+ Orderdet2.TracingCode__c = 'BXJRB';
+ //閿�鍞骇鍝�
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001004';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Test01';
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.TracingCode__c = 'BXJRC';
+ //Orderdet3.Box_Piece__c = '鐩�';
+
+ //鍑哄簱浜у搧
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001005';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Test01';
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.TracingCode__c = 'BXJRD';
+
+ //宸插埌璐т骇鍝�
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001006';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Test01';
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
+ Orderdet5.Arrive_date__c = Date.today();
+ Orderdet5.TracingCode__c = 'BXJRE';
+
+ //鍙戣揣鏄庣粏
+ //绠$悊缂栫爜鍖呭惈鏁板瓧
+ Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
+ Orderdet6.Name = 'OCM_01_001002';
+ Orderdet6.Consumable_order_minor__c = Order1.Id;
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Asset_Model_No__c = 'Test01';
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BX123';
+ Orderdet6.TracingCode__c = 'BX123';
+
+ //鍙戦敊搴� 鏈埌璐�
+ Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
+ Orderdets8.Name = 'OCM_01_001011';
+ Orderdets8.Consumable_order_minor__c = Order1.Id;
+ Orderdets8.Consumable_Product__c = pro1.Id;
+ Orderdets8.Asset_Model_No__c = 'Test01';
+ Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
+ Orderdets8.Box_Piece__c = '鐩�';
+ Orderdets8.TracingCode__c = 'BXsys';
+
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5, Orderdet6, Orderdets8 };
+
+ List<Consumable_orderdetails__c> cod1 = [
+ SELECT Id
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c = :Order1.Id
+ ];
+ System.assertEquals(1, cod1.size());
+
+ PageReference page = new PageReference('/apex/ArriveGoods?Esetid=' + Order1.Id);
+
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ Controller.init();
+ //鎺掑簭
+ Controller.barcode = '';
+ Controller.SearchPro();
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXsys\n01049531702003111115120017181000105ZK250BXsun\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BX111\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BX123';
+ Controller.SearchPro();
+
+ // System.assertEquals(3, controller.ConsumableorderdetailsRecordsdummy.size()); //tcm
+ Controller.ArriveGoodsConfim();
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/ArriveGoodsControllerTestV2.cls-meta.xml b/force-app/main/default/classes/ArriveGoodsControllerTestV2.cls-meta.xml
new file mode 100644
index 0000000..133fce1
--- /dev/null
+++ b/force-app/main/default/classes/ArriveGoodsControllerTestV2.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>58.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/AssetHandler.cls b/force-app/main/default/classes/AssetHandler.cls
index 7d9e01b..a60f746 100644
--- a/force-app/main/default/classes/AssetHandler.cls
+++ b/force-app/main/default/classes/AssetHandler.cls
@@ -1,19 +1,23 @@
public without sharing class AssetHandler extends Oly_TriggerHandler {
-
- public static Map<String , List<Rental_Apply_Equipment_Set_Detail__c>> queueRaesdMap;
+ public static Map<String, List<Rental_Apply_Equipment_Set_Detail__c>> queueRaesdMap;
private Map<Id, Asset> newMap;
private Map<Id, Asset> oldMap;
private List<Asset> newList;
private List<Asset> oldList;
- @TestVisible private static Set<String> testTargetDepts;
- @TestVisible private static Id Account_Asset_Id;
- public static Boolean disabled = false;
+ private static final Map<String, Schema.RecordTypeInfo> DEVELOPERNAMEMAP = Schema.SObjectType.Asset.getRecordTypeInfosByDeveloperName(); // 20230306 ljh add
+ @TestVisible
+ private static Set<String> testTargetDepts;
+ @TestVisible
+ private static Id Account_Asset_Id;
+ public static Boolean disabled = false;
public AssetHandler() {
this.newMap = (Map<Id, Asset>) Trigger.newMap;
this.oldMap = (Map<Id, Asset>) Trigger.oldMap;
this.newList = (List<Asset>) Trigger.new;
this.oldList = (List<Asset>) Trigger.old;
+
+ Integer i = 0;
}
protected override void beforeInsert() {
@@ -23,21 +27,28 @@
//绗竴娆′笉鍔犲彉鏇寸殑鏃跺�欎笉鐭ラ亾绗竴娆℃槸澶氬皯
updateChangeQuantityReason();
+
+ workflowCode();
}
protected override void beforeUpdate() {
- if(!disabled){
+ if (!disabled) {
beforeSetValue();
//鍔ㄦ�佹洿鏂� Asset鐨� AccountId鐨� Logic
beforeSetAccountId();
updateChangeQuantityReason();
+ // 20230309 gzw 浼樺寲 娉ㄩ噴浠g爜
+
// 铏氭嫙缁翠慨淇濅慨鍚堝悓淇濅慨寮�濮嬬粨鏉熸棩鏈熸洿鏂�
- updateMaintenance_Contract_Asset();
+ // updateMaintenance_Contract_Asset();
+
+ // 20230309 gzw 浼樺寲 娉ㄩ噴浠g爜
updateRentalCount();
+
+ workflowCode();
}
-
}
protected override void afterInsert() {
@@ -46,7 +57,7 @@
}
protected override void afterUpdate() {
- if(!disabled){
+ if (!disabled) {
mainAssetUpdateed_OneToOneRecord();
// 宸茬粡鏀硅繘 Must_Input_ChangeQuantityReason 鐨� valida before鍙互瀹屾垚 ChangeQuantityReason__c = ''
////鍏ュ姏瑕忓墖銇倛銇c仸before銈儶銈€仹銇嶃伨銇涖倱,
@@ -63,19 +74,453 @@
updateMaintenance_Contract_Asset();
}
}
+
+ //20230309 sx 淇濇湁璁惧workflow浠g爜鍖� start
+ private void workflowCode() {
+ /*List<Id> accIds = new List<Id>();
+ List<Id> productIds = new List<Id>();
+ List<Id> hospitalIds = new List<Id>();
+ for(Asset nObj : newList) {
+ accIds.add(nObj.Account.Id);
+ productIds.add(nObj.Product2.Id);
+ hospitalIds.add(nObj.Hospital__c);
+ }
+
+ //鏌ユ壘瀹㈡埛List
+ Map<Id, Account> accMap = new Map<Id, Account>([SELECT Id, Name, Management_Code__c from Account where Id in :accIds]);
+ Map<Id, Product2> productMap = new Map<Id, Product2>([SELECT Id, Name, RecordTypeId, RecordType.Name, Serial_Lot_No__c ,ProductCode from Product2 where Id in :productIds]);
+ Map<Id, Account> hosMap = new Map<Id, Account>([SELECT Id, Name, RecordType.Name from Account where id in :hospitalIds]);
+
+ Map<Id, Account> acc_assMap = new Map<Id, Account>();
+ Map<Id, Product2> pro_proMap = new Map<Id, Product2>();
+ Map<Id, Account> hos_assMap = new Map<Id, Account>();
+ for(Asset nObj : newList){
+ if(accMap.containsKey(nObj.Account.Id)) {
+ acc_assMap.put(nObj.Id, accMap.get(nObj.Account.Id));
+ }
+ if(productMap.containsKey(nObj.Product2.Id)) {
+ pro_proMap.put(nObj.Id, productMap.get(nObj.Product2.Id));
+ }
+ if(hosMap.containsKey(nObj.Hospital__c)) {
+ hos_assMap.put(nObj.Id, hosMap.get(nObj.Id));
+ }
+ }*/
+ Date today = Date.today();
+
+ for (Asset nObj : newList) {
+ //淇濇湁璁惧HPID鏂囨湰鍖�
+ nObj.Asset_Year_Txt__c = nObj.Asset_Year__c;
+ nObj.HP_ID_Text__c = nObj.HP_Id__c;
+ nObj.Gurantee_End_day1__c = nObj.Gurantee_End_day__c;
+
+ //瑕嗙洊璁惧鐨勫彲閫夊璞℃枃鏈寲
+ if (Trigger.isInsert || (Trigger.isUpdate && nObj.Posting_Date__c != oldMap.get(nObj.Id).Posting_Date__c)) {
+ if (String.isBlank(nObj.IF_Coverage_Target_Asset__c) || '0'.equals(nObj.IF_Coverage_Target_Asset__c)) {
+ nObj.IF_Coverage_Target_Asset__c = nObj.IF_Coverage_Target_Asset_FF__c + '';
+ }
+
+ if (nObj.IF_Coverage_Target_Asset_FF__c == 3 && nObj.FY23_Asset_Age__c == null) {
+ nObj.FY23_Asset_Age__c = 0;
+ }
+ }
+
+ //甯傚満瀵瑰簲褰曞叆鏃堕棿鑷姩褰曞叆
+ if (
+ (Trigger.isInsert && nObj.Market_Product_Category__c != null) ||
+ (Trigger.isUpdate &&
+ nObj.Market_Product_Category__c != oldMap.get(nObj.Id).Market_Product_Category__c &&
+ nObj.Market_Product_Category__c != null)
+ ) {
+ nObj.Marketing_Input_Date__c = today;
+ }
+
+ /*//寰呮姤搴熷彉鏇翠负浣跨敤涓�
+ if(nObj.RecordType.Name == '澶囧搧'
+ && nObj.Manage_type__c == '涓綋绠$悊'
+ && nObj.Quantity > 0 && nObj.Status == '寰呮姤搴�'
+ && ( (nObj.Abandoned_RealThing__c == null && nObj.Abandoned_Inventory__c == null) || (nObj.Abandoned_RealThing__c + nObj.Abandoned_Inventory__c) == 0)
+ && acc_assMap.get(nObj.Id).Management_Code__c != System.Label.Account_Asset_FJZ) {
+ nObj.Status = '浣跨敤涓�';
+ nObj.Tobe_Discarded_Date__c = null;
+ }*/
+
+ /*//AssetMarkUpdate
+ if(Trigger.isUpdate && nObj.IF_Information_From__c == false && nObj.AssetMark__c == null) {
+ if(pro_proMap.containsKey(nObj.Id)){
+ if(pro_proMap.get(nObj.Id).RecordType.Name == '绔炲搧-涓绘満' ) {
+ nObj.AssetMark__c = '绔炲搧涓绘満';
+ }else if(pro_proMap.get(nObj.Id).RecordType.Name == '绔炲搧-鑰楁潗') {
+ nObj.AssetMark__c = '绔炲搧鑰楁潗';
+ }else if(pro_proMap.get(nObj.Id).Serial_Lot_No__c == 'S/N tracing') {
+ nObj.AssetMark__c = '涓绘満';
+ }
+ }
+ else {
+ nObj.AssetMark__c = '鑰楁潗';
+ }
+ }*/
+
+ /*//AssetName=ProductName
+ if(nObj.Name.equals('*') || (nObj.Product2.Id != null && nObj.Product2 != oldMap.get(nObj.Id).Product2)) {
+ nObj.Name = pro_proMap.get(nObj.Id).Name;
+ }*/
+
+ //AssetTextCopy
+ if (Trigger.isInsert || (Trigger.isUpdate && nObj.Product2 != oldMap.get(nObj.Id).Product2)) {
+ nObj.BSSCategory_Text__c = nObj.BSSCategory__c;
+ nObj.Brand_Name_Text__c = nObj.Brand_Name__c;
+ nObj.Category2_Text__c = nObj.Category2__c;
+ nObj.Category3_Text__c = nObj.Category3__c;
+ nObj.Category4_Text__c = nObj.Category4__c;
+ nObj.Category5_Text__c = nObj.Category5__c;
+ }
+
+ //CIC瀹夎鐘舵�佺‘璁ゆ棩
+ if (nObj.CIC_call_back_check__c && nObj.CIC_call_back_confirm_day__c == null) {
+ nObj.CIC_call_back_confirm_day__c = today;
+ }
+
+ //Equipment_Last_confirmed_day
+ if (
+ (Trigger.isInsert &&
+ (nObj.Status != null ||
+ nObj.Installation_Site__c != null ||
+ nObj.Final_Examination_Date__c != null ||
+ nObj.Hospital_Manage_Number__c != null)) ||
+ (Trigger.isUpdate &&
+ (nObj.Status != oldMap.get(nObj.Id).Status ||
+ nObj.Installation_Site__c != oldMap.get(nObj.Id).Installation_Site__c ||
+ nObj.Final_Examination_Date__c != oldMap.get(nObj.Id).Final_Examination_Date__c ||
+ nObj.Hospital_Manage_Number__c != oldMap.get(nObj.Id).Hospital_Manage_Number__c))
+ ) {
+ nObj.Equipment_Last_checking_day__c = today;
+ }
+
+ /*//Product_Code+Serial_No
+ if(Trigger.isUpdate && nObj.IsCompetitorProduct == false && nObj.Manage_type__c != '鏁伴噺绠$悊' && nObj.AssetMark__c != '鑰楁潗' && nObj.Loaner_accsessary__c != true && nObj.unknow_serial_NO_product__c != false) {
+ if(nObj.Product2.Id == null) {
+ nObj.Product_Serial_No__c = nObj.Id;
+ }else {
+ nObj.Product_Serial_No__c = pro_proMap.get(nObj.Id).ProductCode + ' ' + nObj.SerialNumber;
+ if(nObj.Delete_Flag__c){
+ nObj.Product_Serial_No__c += ':' + acc_assMap.get(nObj.Id).Management_Code__c;
+ }
+ }
+ }*/
+
+ //Product_Code+Serial_No Clear
+ if (
+ (Trigger.isInsert && nObj.IsCompetitorProduct) ||
+ (Trigger.isUpdate &&
+ nObj.IsCompetitorProduct &&
+ !oldMap.get(nObj.Id).IsCompetitorProduct)
+ ) {
+ nObj.Product_Serial_No__c = '';
+ }
+
+ /*//Product_Code+Serial_No+Salesdepartment
+ if(Trigger.isUpdate && nObj.IsCompetitorProduct == false && nObj.Manage_type__c == '鏁伴噺绠$悊' && nObj.AssetMark__c == '鑰楁潗' && nObj.Loaner_accsessary__c == true && nObj.unknow_serial_NO_product__c == false) {
+ if(nObj.Product2.Id == null) {
+ nObj.Product_Serial_No__c = nObj.Id;
+ }else {
+ nObj.Product_Serial_No__c = pro_proMap.get(nObj.Id).ProductCode + ' ' + nObj.SerialNumber + ':' + nObj.Salesdepartment__c.subString(0,nObj.Salesdepartment__c.indexOf(':'));
+ if(nObj.Delete_Flag__c){
+ nObj.Product_Serial_No__c += ':' + acc_assMap.get(nObj.Id).Management_Code__c;
+ }
+ }
+ }*/
+
+ /*//Product_Code+Serial_No UnkownSerial
+ if(Trigger.isUpdate && nObj.unknow_serial_NO_product__c == true) {
+ nObj.SerialNumber = nObj.serial_past__c;
+ if(nObj.Product2.Id == null) {
+ nObj.Product_Serial_No__c = nObj.Id;
+ }else {
+ nObj.Product_Serial_No__c = pro_proMap.get(nObj.Id).ProductCode + ':' + nObj.serial_past__c;
+ if(nObj.Delete_Flag__c){
+ nObj.Product_Serial_No__c += ':' + acc_assMap.get(nObj.Id).Management_Code__c;
+ }
+ }
+ }*/
+
+ //鏇存柊澶囧搧璧勪骇绠$悊璐熻矗鏈儴閫夐」
+ if (
+ (Trigger.isInsert && nObj.Internal_demo_incharge_demo__c != null) ||
+ (Trigger.isUpdate && nObj.Internal_demo_incharge_demo__c != oldMap.get(nObj.Id).Internal_demo_incharge_demo__c)
+ ) {
+ nObj.Internal_demo_incharge_demo_text__c = nObj.Internal_demo_incharge_demo__c;
+ }
+
+ /*//鑷姩鏇存柊璧勪骇鎵�灞�(鍖婚櫌璧勪骇)
+ if(Trigger.isUpdate && nObj.RecordType.Name == '鍖婚櫌淇濇湁璁惧' && hos_assMap.containskey(nObj.Id) && hos_assMap.get(nObj.Id).RecordType.Name == '鐥呴櫌' && acc_assMap.get(nObj.Id).Id == '00110000015Bx0h' ) {
+ nObj.Asset_Owner__c = '鍖婚櫌璧勪骇';
+ }*/
+
+ /*//鑷姩鏇存柊璧勪骇鎵�灞�(濂ユ灄宸存柉)
+ if(nObj.RecordType.Name == '鍖婚櫌淇濇湁璁惧' || (acc_assMap.containskey(nObj.Id) && acc_assMap.get(nObj.Id).Id == '00110000015Bx0h')) {
+ nObj.Asset_Owner__c = '濂ユ灄宸存柉';
+ }*/
+
+ /*//鑷姩鏇存柊璧勪骇鎵�灞�(缁忛攢鍟嗚祫浜�)
+ if(nObj.RecordType.Name == '鍖婚櫌淇濇湁璁惧' && (acc_assMap.containskey(nObj.Id) && hos_assMap.get(nObj.Id).RecordType.Name == '璨╁2搴�')) {
+ nObj.Asset_Owner__c = '缁忛攢鍟嗚祫浜�';
+ }*/
+
+ //鎵嬪姩鍒涘缓鐨勮�楁潗淇℃伅淇敼
+ if (nObj.RecordTypeId == '01210000000kOPM' && nObj.Information_From__c == '鎵嬪姩杈撳叆' && nObj.AssetMark__c == '鑰楁潗') {
+ nObj.Guarantee_period_for_products__c = nObj.Posting_Date__c;
+ nObj.InstallDate = nObj.Posting_Date__c;
+ }
+
+ //鍑鸿揣鏃ヨ嚜鍔ㄨ祴鍊�
+ if (Trigger.isInsert && nObj.Information_From__c == '鎵嬪姩杈撳叆') {
+ nObj.Posting_Date__c = Date.newInstance(1900, 1, 1);
+ }
+
+ //鏂伴�昏緫淇濅慨鏈熼檺瀵瑰簲
+ if (nObj.New_logic_data__c) {
+ nObj.Guarantee_period_for_products__c = nObj.Guarantee_period_formula__c;
+ }
+
+ //鎴愭湰涓績鏇存柊缂栫爜Update
+ if (
+ (Trigger.isInsert && nObj.Internal_cost_center_cd__c != null) ||
+ (Trigger.isUpdate && nObj.Internal_cost_center_cd__c != oldMap.get(nObj.Id).Internal_cost_center_cd__c)
+ ) {
+ nObj.Internal_demo_incharge_demo_text__c = nObj.Internal_cost_center_formula__c;
+ }
+
+ //鎴愭湰涓績鏇存柊閫夐」Update
+ if (
+ (Trigger.isInsert && nObj.Internal_cost_center__c != null) ||
+ (Trigger.isUpdate && nObj.Internal_cost_center__c != oldMap.get(nObj.Id).Internal_cost_center__c)
+ ) {
+ nObj.Internal_cost_center_text__c = nObj.Internal_cost_center__c;
+ }
+
+ //寰呮姤搴熸棩鐧诲綍
+ if (
+ Trigger.isUpdate &&
+ nObj.Fixture_Status__c != oldMap.get(nObj.Id).Fixture_Status__c &&
+ nObj.Fixture_Status__c != '搴熷純' &&
+ (nObj.Abandoned_RealThing__c > 0 ||
+ nObj.Abandoned_Inventory__c > 0) &&
+ nObj.Manage_type__c == '涓綋绠$悊'
+ ) {
+ nObj.Status = '寰呮姤搴�';
+ nObj.Tobe_Discarded_Date__c = today;
+ }
+
+ //閫�璐ц浆澶囧搧DEL缃瓼ALSE
+ if (
+ Trigger.isUpdate &&
+ ((nObj.RecordType != oldMap.get(nObj.Id).RecordType && nObj.RecordTypeId == '01210000000kOPR') ||
+ (nObj.AccountId != oldMap.get(nObj.Id).AccountId &&
+ nObj.AccountId == '0011000000VAiwz')) &&
+ nObj.Delete_Flag__c
+ ) {
+ nObj.Delete_Flag__c = false;
+ }
+
+ //杩芥函璁惧鑰楁潗Mark鏇存柊
+ if ('杩芥函绯荤粺'.equals(nObj.Information_From__c) && String.isBlank(nObj.AssetMark__c)) {
+ nObj.AssetMark__c = '鑰楁潗';
+ }
+
+ //绱嶅叆鍟嗗搧鐘舵厠澶夋洿锛堜娇鐢ㄤ腑锛�
+ if (
+ (Trigger.isInsert && nObj.Status == '浣跨敤涓�') ||
+ (Trigger.isUpdate &&
+ nObj.Status != oldMap.get(nObj.Id).Status &&
+ nObj.Status == '浣跨敤涓�')
+ ) {
+ nObj.Status_Busy_Date__c = today;
+ }
+
+ //绱嶅叆鍟嗗搧鐘舵厠澶夋洿锛堝粌妫勶級
+ if (
+ (Trigger.isInsert && nObj.Status == '寤冩') ||
+ (Trigger.isUpdate &&
+ nObj.Status != oldMap.get(nObj.Id).Status &&
+ nObj.Status == '寤冩')
+ ) {
+ nObj.Discarded_Date__c = today;
+ nObj.Quantity = 0;
+ nObj.Abandoned_Inventory__c = null;
+ nObj.Abandoned_RealThing__c = null;
+ nObj.ChangeQuantityReason__c = '搴熷純';
+ }
+
+ //绱嶅叆鍟嗗搧鐘舵厠澶夋洿锛堜笉鏄庯級
+ if (
+ (Trigger.isInsert && nObj.Status == '涓嶆槑') ||
+ (Trigger.isUpdate &&
+ nObj.Status != oldMap.get(nObj.Id).Status &&
+ nObj.Status == '涓嶆槑')
+ ) {
+ nObj.Indistinctness_Date__c = today;
+ }
+
+ //绱嶅叆鍟嗗搧鐘舵厠澶夋洿锛堟湭浣跨敤锛�
+ if (
+ (Trigger.isInsert && nObj.Status == '鏈娇鐢�') ||
+ (Trigger.isUpdate &&
+ nObj.Status != oldMap.get(nObj.Id).Status &&
+ nObj.Status == '鏈娇鐢�')
+ ) {
+ nObj.Unused_Date__c = today;
+ }
+
+ /*//绱嶅搧纰鸿獚鏇搞伄瑷虹檪绉戙偝銉笺儔_銈汇儍銉�
+ if(!(nObj.Product2.Id != null && nObj.IsCompetitorProduct == false && nObj.InstallDate != null) && nObj.Install_Account_Code__c == null) {
+ nObj.Install_Account_Code__c = acc_assMap.get(nObj.Id).Management_Code__c;
+ nObj.Install_Account_Name__c = acc_assMap.get(nObj.Id).Name;
+ nObj.Install_Hospital_Name__c = hos_assMap.get(nObj.Id).Name;
+ nObj.Install_Hospital_code__c = hos_assMap.get(nObj.Id).Management_Code__c;
+ }*/
+
+ //鐥呴櫌绠$悊鐣彿澶夋洿鏃�
+ if (
+ (Trigger.isInsert && nObj.Hospital_Manage_Number__c != null) ||
+ (Trigger.isUpdate && nObj.Hospital_Manage_Number__c != oldMap.get(nObj.Id).Hospital_Manage_Number__c)
+ ) {
+ nObj.Hospital_Manage_Number_Change_Date__c = today;
+ }
+
+ //鏇存柊-2娆″墠鐐规鏃�
+ if (Trigger.isUpdate && nObj.Final_Examination_Date__c != oldMap.get(nObj.Id).Final_Examination_Date__c) {
+ nObj.X2_second_past_inspection__c = oldMap.get(nObj.Id).Final_Examination_Date__c;
+ }
+
+ // 鏂囨湰鍖� 澶氬勾淇濅慨鏈熻嚦
+ nObj.Extend_Gurantee_DateTo_Text__c = nObj.Extend_Gurantee_DateTo__c;
+
+ // 淇濅慨澶╂暟宸ヤ綔娴�
+ if (
+ Trigger.isInsert ||
+ (Trigger.isUpdate &&
+ (nObj.Guarantee_period_for_products__c != oldMap.get(nObj.Id).Guarantee_period_for_products__c ||
+ nObj.InstallDate__c != oldMap.get(nObj.Id).InstallDate__c ||
+ nObj.ChangeWarrantyStartDate__c != oldMap.get(nObj.Id).ChangeWarrantyStartDate__c))
+ ) {
+ nObj.GuaranteePeriod__c = nObj.guarantee_period__c;
+ }
+
+ // 鏈夊畨瑁呮棩锛屾洿鏂扮姸鎬佸埌锛讳娇鐢ㄤ腑锛�
+ if (
+ (Trigger.isInsert && nObj.InstallDate != null) ||
+ (Trigger.isUpdate &&
+ nObj.InstallDate != null &&
+ nObj.InstallDate != oldMap.get(nObj.Id).InstallDate)
+ ) {
+ nObj.Status_Busy_Date__c = today;
+ nObj.Status = '浣跨敤涓�';
+ }
+
+ // 澶囧搧鍐嶉��璐ц浆DEL缃甌RUE
+ if (nObj.AccountId == '00110000015Bx0h' && nObj.RecordTypeId == '01210000000kOPM' && !nObj.Delete_Flag__c) {
+ nObj.Delete_Flag__c = true;
+ }
+
+ // 璁惧畾澶囧搧鎵�灞炲叕鍙革紙涓婃捣锛塅romVBA
+ if (
+ (Trigger.isInsert && nObj.CompanyCodeOfEquipment_txt__c == '5112') ||
+ (Trigger.isUpdate &&
+ nObj.CompanyCodeOfEquipment_txt__c != oldMap.get(nObj.Id).CompanyCodeOfEquipment_txt__c &&
+ nObj.CompanyCodeOfEquipment_txt__c == '5112')
+ ) {
+ nObj.CompanyOfEquipment__c = '涓婃捣';
+ }
+
+ // 璁惧畾澶囧搧鎵�灞炲叕鍙革紙娌堥槼锛塅romVBA
+ if (
+ (Trigger.isInsert && nObj.CompanyCodeOfEquipment_txt__c == '5114') ||
+ (Trigger.isUpdate &&
+ nObj.CompanyCodeOfEquipment_txt__c != oldMap.get(nObj.Id).CompanyCodeOfEquipment_txt__c &&
+ nObj.CompanyCodeOfEquipment_txt__c == '5114')
+ ) {
+ nObj.CompanyOfEquipment__c = '娌堥槼';
+ }
+
+ // 璁惧畾澶囧搧鎵�灞炲叕鍙革紙鍖椾含锛塅romVBA
+ if (
+ (Trigger.isInsert && nObj.CompanyCodeOfEquipment_txt__c == '5111') ||
+ (Trigger.isUpdate &&
+ nObj.CompanyCodeOfEquipment_txt__c != oldMap.get(nObj.Id).CompanyCodeOfEquipment_txt__c &&
+ nObj.CompanyCodeOfEquipment_txt__c == '5111')
+ ) {
+ nObj.CompanyOfEquipment__c = '鍖椾含';
+ }
+
+ // 璁惧畾澶囧搧鎵�灞炲叕鍙革紙骞垮窞锛塅romVBA
+ if (
+ (Trigger.isInsert && nObj.CompanyCodeOfEquipment_txt__c == '5113') ||
+ (Trigger.isUpdate &&
+ nObj.CompanyCodeOfEquipment_txt__c != oldMap.get(nObj.Id).CompanyCodeOfEquipment_txt__c &&
+ nObj.CompanyCodeOfEquipment_txt__c == '5113')
+ ) {
+ nObj.CompanyOfEquipment__c = '骞垮窞';
+ }
+ }
+ }
+ //20230309 sx 淇濇湁璁惧workflow浠g爜鍖� end
+
// 鍊熷嚭鏄庣粏鏇存柊鍊熷嚭_鍒嗛厤_鏁�(Sys)鍜屽凡鍊熷嚭鏁�(Sys)
private void updateRentalCount() {
Set<Id> idSet = new Set<Id>();
- for(Id assId : this.newMap.keySet()) {
- if(this.newMap.get(assId).AssetManageConfirm__c &&
- this.newMap.get(assId).Account_Management_Code__c != System.Label.Account_Asset_FJZ ) {
+ for (Id assId : this.newMap.keySet()) {
+ if (
+ this.newMap.get(assId).AssetManageConfirm__c &&
+ this.newMap.get(assId).Account_Management_Code__c != System.Label.Account_Asset_FJZ
+ ) {
idSet.add(assId);
this.newMap.get(assId).Out_of_wh_Sys__c = 0;
this.newMap.get(assId).Rental_Count_Sys__c = 0;
}
}
- if(!idSet.isEmpty()) {
- for (Rental_Apply_Equipment_Set_Detail__c raesd : [
+ if (!idSet.isEmpty()) {
+ // 澶囧搧鎬ц兘浼樺寲鏀逛慨 20230312 by lc Start
+ List<AggregateResult> raesdTempList2 = [
+ SELECT COUNT(Id) num, Asset__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ //澶囧搧鍙戣揣鎶ラ敊瀵瑰簲 20230413 by lc Start
+ //WHERE Detail_Finish__c = false
+ WHERE
+ Detail_Not_Finish_Text__c = TRUE
+ //澶囧搧鍙戣揣鎶ラ敊瀵瑰簲 20230413 by lc End
+ AND Asset__c IN :idSet
+ AND Shippment_loaner_time2__c != NULL
+ GROUP BY Asset__c
+ ];
+ if (raesdTempList2 != null && raesdTempList2.size() > 0) {
+ for (AggregateResult ar : raesdTempList2) {
+ String assetId = String.valueOf(ar.get('Asset__c'));
+ Integer tempNum = Integer.valueOf(ar.get('num'));
+ this.newMap.get(assetId).Rental_Count_Sys__c += tempNum;
+ }
+ }
+
+ List<AggregateResult> raesdTempList1 = [
+ SELECT COUNT(Id) num, Asset__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ //澶囧搧鍙戣揣鎶ラ敊瀵瑰簲 20230413 by lc Start
+ //WHERE Detail_Finish__c = false
+ WHERE
+ Detail_Not_Finish_Text__c = TRUE
+ //澶囧搧鍙戣揣鎶ラ敊瀵瑰簲 20230413 by lc End
+ AND Asset__c IN :idSet
+ GROUP BY Asset__c
+ ];
+ if (raesdTempList1 != null && raesdTempList1.size() > 0) {
+ for (AggregateResult ar : raesdTempList1) {
+ String assetId = String.valueOf(ar.get('Asset__c'));
+ Integer tempNum = Integer.valueOf(ar.get('num'));
+ this.newMap.get(assetId).Out_of_wh_Sys__c += tempNum;
+ idSet.remove(assetId);
+ }
+ }
+
+ /*for (Rental_Apply_Equipment_Set_Detail__c raesd : [
SELECT Id, Shippment_loaner_time2__c, Asset__c
FROM Rental_Apply_Equipment_Set_Detail__c
WHERE Detail_Finish__c = false
@@ -86,52 +531,63 @@
this.newMap.get(raesd.Asset__c).Rental_Count_Sys__c += 1;
}
idSet.remove(raesd.Asset__c);
- }
- if(!idSet.isEmpty()) {
+ }*/
+ // 澶囧搧鎬ц兘浼樺寲鏀逛慨 20230312 by lc End
+
+ if (!idSet.isEmpty()) {
// 娌℃湁瀛楁鍙互瀹屽叏鍑嗙‘鍦板尯鍒嗗鍝佽澶囦笌鑰楁潗璁惧锛屽彧濂芥妸澶囧搧閲屾病鍑虹幇杩囩殑璁惧褰撴垚鑰楁潗鏉ユ煡
for (Consum_Apply_Equipment_Set_Detail__c caesd : [
- SELECT Id, Shippment_loaner_time2__c, Asset__c
- FROM Consum_Apply_Equipment_Set_Detail__c
- WHERE Detail_Finish__c = false
- AND Asset__c IN :idSet
+ SELECT Id, Shippment_loaner_time2__c, Asset__c
+ FROM Consum_Apply_Equipment_Set_Detail__c
+ WHERE Detail_Finish__c = FALSE AND Asset__c IN :idSet
]) {
this.newMap.get(caesd.Asset__c).Out_of_wh_Sys__c += 1;
- if(caesd.Shippment_loaner_time2__c != null) {
+ if (caesd.Shippment_loaner_time2__c != null) {
this.newMap.get(caesd.Asset__c).Rental_Count_Sys__c += 1;
}
}
}
-
}
}
//澶氬勾淇濅慨 start
- private void updateMaintenance_Contract_Asset(){
+ private void updateMaintenance_Contract_Asset() {
StaticParameter.EscapeMaintenanceContractAfterUpdateTrigger = true;
Set<id> AssetIDSet = new Set<id>();
- for(Asset tempAsset : newList){
- if(String.isNotBlank(tempAsset.warrantyType__c)){
+ for (Asset tempAsset : newList) {
+ // 20230306 ljh update start
+ Id Shipment = DEVELOPERNAMEMAP.get('Shipment').getRecordTypeId();
+ // if(String.isNotBlank(tempAsset.warrantyType__c)){
+ if (String.isNotBlank(tempAsset.warrantyType__c) && Shipment != tempAsset.RecordTypeId) {
+ // 20230306 ljh update end
AssetIDSet.add(tempAsset.id);
}
}
- if(AssetIDSet.size() > 0 ){
- list<Maintenance_Contract_Asset__c> MCAList =
- [select id,startDateGurantee__c,
- startDateGurantee_Text__c,endDateGurantee__c,
- endDateGurantee_Text__c,Return_Flag__c,ChangeAcc_flag__c,
- Maintenance_Price_Amount__c,Maintenance_Price_Amount_text__c,
- GuaranteePrice_Amount__c,GuaranteePrice_Amount_text__c
- from Maintenance_Contract_Asset__c
- where Asset__c in : AssetIDSet
- and Maintenance_Contract__r.RecordType.DeveloperName = 'VM_Contract'
- ];
- if(MCAList.size() > 0){
- list<Maintenance_Contract_Asset__c> UpdateMcaList =
- new list<Maintenance_Contract_Asset__c> ();
- for(Maintenance_Contract_Asset__c tempMCA : MCAList ){
- if(tempMCA.startDateGurantee__c != tempMCA.startDateGurantee_Text__c
- || tempMCA.endDateGurantee__c != tempMCA.endDateGurantee_Text__c
- || tempMCA.Maintenance_Price_Amount__c != tempMCA.Maintenance_Price_Amount_Text__c
- || tempMCA.GuaranteePrice_Amount__c != tempMCA.GuaranteePrice_Amount_text__c){
+ if (AssetIDSet.size() > 0) {
+ list<Maintenance_Contract_Asset__c> MCAList = [
+ SELECT
+ id,
+ startDateGurantee__c,
+ startDateGurantee_Text__c,
+ endDateGurantee__c,
+ endDateGurantee_Text__c,
+ Return_Flag__c,
+ ChangeAcc_flag__c,
+ Maintenance_Price_Amount__c,
+ Maintenance_Price_Amount_text__c,
+ GuaranteePrice_Amount__c,
+ GuaranteePrice_Amount_text__c
+ FROM Maintenance_Contract_Asset__c
+ WHERE Asset__c IN :AssetIDSet AND Maintenance_Contract__r.RecordType.DeveloperName = 'VM_Contract'
+ ];
+ if (MCAList.size() > 0) {
+ list<Maintenance_Contract_Asset__c> UpdateMcaList = new List<Maintenance_Contract_Asset__c>();
+ for (Maintenance_Contract_Asset__c tempMCA : MCAList) {
+ if (
+ tempMCA.startDateGurantee__c != tempMCA.startDateGurantee_Text__c ||
+ tempMCA.endDateGurantee__c != tempMCA.endDateGurantee_Text__c ||
+ tempMCA.Maintenance_Price_Amount__c != tempMCA.Maintenance_Price_Amount_Text__c ||
+ tempMCA.GuaranteePrice_Amount__c != tempMCA.GuaranteePrice_Amount_text__c
+ ) {
UpdateMcaList.add(tempMCA);
}
}
@@ -152,21 +608,23 @@
if (Trigger.isInsert) {
nObj.Last_Reserve_RAES_Detail__c = null;
nObj.Last_Reserve_TAES_Detail__c = null;
- nObj.Pre_Reserve_RAES_Detail__c = null;
- nObj.Pre_Reserve_TAES_Detail__c = null;
- nObj.Fixture_OneToOne_Link__c = null;
+ nObj.Pre_Reserve_RAES_Detail__c = null;
+ nObj.Pre_Reserve_TAES_Detail__c = null;
+ nObj.Fixture_OneToOne_Link__c = null;
}
if (Trigger.isUpdate) {
Asset oObj = oldMap.get(nObj.Id);
- if (oObj.Last_Reserve_RAES_Detail__c != null && nObj.Last_Reserve_RAES_Detail__c == null
- && oObj.Last_Reserve_RAES_Detail_Flag__c == true) {
+ if (
+ oObj.Last_Reserve_RAES_Detail__c != null &&
+ nObj.Last_Reserve_RAES_Detail__c == null &&
+ oObj.Last_Reserve_RAES_Detail_Flag__c == true
+ ) {
nObj.Pre_Reserve_RAES_Detail__c = oObj.Last_Reserve_RAES_Detail__c;
}
- if (oObj.Last_Reserve_TAES_Detail__c != null && nObj.Last_Reserve_TAES_Detail__c == null
- // TODO 鐢变簬__r瓒�20锛屽瓧娈靛缓涓嶅嚭鏉�
- // && oObj.Last_Reserve_TAES_Detail_Flag__c == true
- ) {
+ if (oObj.Last_Reserve_TAES_Detail__c != null && nObj.Last_Reserve_TAES_Detail__c == null) {
+ // TODO 鐢变簬__r瓒�20锛屽瓧娈靛缓涓嶅嚭鏉�
+ // && oObj.Last_Reserve_TAES_Detail_Flag__c == true
nObj.Pre_Reserve_TAES_Detail__c = oObj.Last_Reserve_TAES_Detail__c;
}
}
@@ -174,17 +632,22 @@
// 蹇呫仛鏈�寰屻仹缃亸
nObj.Fixture_Status2_text__c = nObj.Fixture_Status2__c;
nObj.Fixture_Status3_text__c = nObj.Fixture_Status3__c;
- nObj.BTreeIndexKey__c = nObj.Asset_Owner__c
- + ':' + nObj.Asset_loaner_category__c
- + ':' + String.valueOf(nobj.Freeze_sign_Abandoned_Flag__c)
- + ':' + String.valueOf(nObj.Delete_Flag__c)
- + ':' + String.valueOf(nObj.AssetManageConfirm__c);
+ nObj.BTreeIndexKey__c =
+ nObj.Asset_Owner__c +
+ ':' +
+ nObj.Asset_loaner_category__c +
+ ':' +
+ String.valueOf(nobj.Freeze_sign_Abandoned_Flag__c) +
+ ':' +
+ String.valueOf(nObj.Delete_Flag__c) +
+ ':' +
+ String.valueOf(nObj.AssetManageConfirm__c);
if (nObj.Status == FixtureUtil.assetStatusMap.get(FixtureUtil.AssetStatus.Dai_Fei_Qi.ordinal())) {
nObj.Freeze_sign__c = false;
}
// gzw CHAN-CCR6MW 銆愬鎵樸�戙�愪繚鏈夎澶囥�戜繚鏈夎澶囧彂璐ф棩閫昏緫 start
- if(Trigger.isInsert && nObj.Posting_Date__c == null){
+ if (Trigger.isInsert && nObj.Posting_Date__c == null) {
nObj.Posting_Date__c = Date.newInstance(1900, 1, 1);
}
// gzw CHAN-CCR6MW 銆愬鎵樸�戙�愪繚鏈夎澶囥�戜繚鏈夎澶囧彂璐ф棩閫昏緫 end
@@ -206,8 +669,10 @@
String nAbandoned_Inventory = nObj.Abandoned_Inventory__c == null ? '' : String.valueOf(nObj.Abandoned_Inventory__c);
if ((oQuantity != nQuantity && String.isNotBlank(nObj.ChangeQuantityReason__c)) || Trigger.isInsert) {
String rs = nObj.ChangeQuantityReason__c;
- nObj.ChangeQuantityHistory__c = String.format(System.Label.ChangeQuantityHistory,
- new String[]{oQuantity, nQuantity, rs});
+ nObj.ChangeQuantityHistory__c = String.format(
+ System.Label.ChangeQuantityHistory,
+ new List<String>{ oQuantity, nQuantity, rs }
+ );
// before閲岄潰鍏ョ珛瑙勫垯杩囦笉浜嗘敼鍒�
// 宸茬粡鏀硅繘 Must_Input_ChangeQuantityReason 鐨� valida before鍙互瀹屾垚 ChangeQuantityReason__c = ''
// nObj.ChangeQuantityReason__c = '';
@@ -215,25 +680,26 @@
if (oAbandoned_Inventory != nAbandoned_Inventory || Trigger.isInsert) {
String rs = nObj.Giveup_Return__c;
- nObj.ChangeAbandoned_InventoryHistory__c = String.format(System.Label.ChangeAbandoned_InventoryHistory,
- new String[]{oAbandoned_Inventory, nAbandoned_Inventory, rs});
+ nObj.ChangeAbandoned_InventoryHistory__c = String.format(
+ System.Label.ChangeAbandoned_InventoryHistory,
+ new List<String>{ oAbandoned_Inventory, nAbandoned_Inventory, rs }
+ );
}
}
}
//// 銇嬨仾銈夈仛 afterUpdate
private void cleanChangeQuantityReason() {
- // TODO 鏇存柊鑷繁table 鍘熷垯闇�瑕丼tatic鐨凜lass鍙橀噺(鍥犱负浼氭湁澶嶆暟鐨凪ethod鍘绘洿鏂拌嚜宸辩殑)
- List<Asset> assList = new List<Asset>();
- for (Asset nObj : newList) {
- if (String.isBlank(nObj.ChangeQuantityReason__c) == false) {
- assList.add(new Asset(Id = nObj.Id,
- ChangeQuantityReason__c = ''));
- }
- }
- if (!assList.isEmpty()) {
- update assList;
- }
+ // TODO 鏇存柊鑷繁table 鍘熷垯闇�瑕丼tatic鐨凜lass鍙橀噺(鍥犱负浼氭湁澶嶆暟鐨凪ethod鍘绘洿鏂拌嚜宸辩殑)
+ List<Asset> assList = new List<Asset>();
+ for (Asset nObj : newList) {
+ if (String.isBlank(nObj.ChangeQuantityReason__c) == false) {
+ assList.add(new Asset(Id = nObj.Id, ChangeQuantityReason__c = ''));
+ }
+ }
+ if (!assList.isEmpty()) {
+ update assList;
+ }
}
// afterUpdate
@@ -242,9 +708,7 @@
List<Asset> assList = new List<Asset>();
for (Asset nObj : newList) {
if (String.isBlank(nObj.Giveup_Return__c) == false) {
- assList.add(new Asset(
- Id = nObj.Id,
- Giveup_Return__c = ''));
+ assList.add(new Asset(Id = nObj.Id, Giveup_Return__c = ''));
}
}
if (!assList.isEmpty()) {
@@ -273,8 +737,13 @@
}
if (!aSetIdSet.isEmpty()) {
List<Fixture_OneToOne_Link__c> oneToOneList = [
- SELECT Id FROM Fixture_OneToOne_Link__c WHERE Main_Asset__c IN :aSetIdSet];
- if (!oneToOneList.isEmpty()) { update oneToOneList; }
+ SELECT Id
+ FROM Fixture_OneToOne_Link__c
+ WHERE Main_Asset__c IN :aSetIdSet
+ ];
+ if (!oneToOneList.isEmpty()) {
+ update oneToOneList;
+ }
}
}
@@ -291,7 +760,7 @@
// 銇嬨仾銈夈仛 after
private void queueRedistribution() {
if (queueRaesdMap == null) {
- queueRaesdMap = new Map<String , List<Rental_Apply_Equipment_Set_Detail__c>>();
+ queueRaesdMap = new Map<String, List<Rental_Apply_Equipment_Set_Detail__c>>();
}
Map<String, Set<Id>> modelNoAssetIdMap = new Map<String, Set<Id>>();
Set<Id> raesdIdSet = new Set<Id>();
@@ -299,12 +768,13 @@
String whkey = '';
for (Asset nObj : newList) {
//ToDo鐝惧湪鎺掗槦銇с亶銈嬨伄銇富浣撱仩銇戙仾銇仹锛屼粖寰屼釜浣撶鐞嗐伄闄勫睘鍝併倐鎺掗槦銇с亶銈嬨伄鍫村悎銇屻亗銇c仧銈夈亾銇甀F銇躲倱銈掔洿銇欏繀瑕併亴銇傘倞銇俱仚
- if (!(nObj.Loaner_accsessary__c == false
- && nObj.Asset_Owner__c == 'Olympus'
- && nObj.Equipment_Type__c != '妫�娴嬬敤澶囧搧'
- && nObj.Delete_Flag__c == False
- && nObj.You_Xiao_Ku_Cun__c > 0
- && nObj.Freeze_sign_Abandoned_Flag__c == False)
+ if (
+ !(nObj.Loaner_accsessary__c == false &&
+ nObj.Asset_Owner__c == 'Olympus' &&
+ nObj.Equipment_Type__c != '妫�娴嬬敤澶囧搧' &&
+ nObj.Delete_Flag__c == false &&
+ nObj.You_Xiao_Ku_Cun__c > 0 &&
+ nObj.Freeze_sign_Abandoned_Flag__c == false)
) {
continue;
}
@@ -325,7 +795,6 @@
key += nObj.Product_category__c;
}
-
System.debug(LoggingLevel.INFO, '*** key: ' + key);
//鏈夋柊鐨凙sset鐨勬椂鍊� 鏆傚畾鍒嗛厤
// You_Xiao_Ku_Cun__c > 0 鍦ㄤ笂闈㈠凡缁忓仛浜嗗垽鏂�
@@ -349,22 +818,27 @@
// You_Xiao_Ku_Cun__c > 0 鍦ㄤ笂闈㈠凡缁忓仛浜嗗垽鏂�
else {
Asset oObj = oldMap.get(nObj.Id);
- if (nObj.Loaner_accsessary__c == false && String.isBlank(nObj.Last_Reserve_RAES_Detail__c)
- && (nObj.Last_Reserve_RAES_Detail__c != oObj.Last_Reserve_RAES_Detail__c
- || (nObj.Asset_Owner__c != oObj.Asset_Owner__c && nObj.Asset_Owner__c == 'Olympus')
- //澶囧搧瀛樻斁鍦� OLY_OCM-722 鎭㈠瀛樻斁鍦扮殑鏉′欢
- || (nObj.Internal_asset_location__c != oObj.Internal_asset_location__c)
- //澶囧搧鍒嗙被骞朵笖涓嶆槸 妫�娴嬬敤澶囧搧
- || (nObj.Equipment_Type__c != oObj.Equipment_Type__c && nObj.Equipment_Type__c != '妫�娴嬬敤澶囧搧')
- //閿�鍞湰閮�
- || (nObj.Salesdepartment__c != oObj.Salesdepartment__c)
- //浜у搧鍒嗙被(GI/SP)
- || (nObj.Product_category__c != oObj.Product_category__c)
- //澶囧搧閰嶅鏄庣粏鍨嬪彿
- || (nObj.Fixture_Model_No_F__c != oObj.Fixture_Model_No_F__c)
- || (nObj.Delete_Flag__c != oObj.Delete_Flag__c && nObj.Delete_Flag__c == true)
- || (nObj.Freeze_sign_Abandoned_Flag__c != oObj.Freeze_sign_Abandoned_Flag__c && nObj.Freeze_sign_Abandoned_Flag__c == false)
- )
+ if (
+ nObj.Loaner_accsessary__c == false &&
+ String.isBlank(nObj.Last_Reserve_RAES_Detail__c) &&
+ (nObj.Last_Reserve_RAES_Detail__c != oObj.Last_Reserve_RAES_Detail__c ||
+ (nObj.Asset_Owner__c != oObj.Asset_Owner__c &&
+ nObj.Asset_Owner__c == 'Olympus') ||
+ //澶囧搧瀛樻斁鍦� OLY_OCM-722 鎭㈠瀛樻斁鍦扮殑鏉′欢
+ (nObj.Internal_asset_location__c != oObj.Internal_asset_location__c) ||
+ //澶囧搧鍒嗙被骞朵笖涓嶆槸 妫�娴嬬敤澶囧搧
+ (nObj.Equipment_Type__c != oObj.Equipment_Type__c &&
+ nObj.Equipment_Type__c != '妫�娴嬬敤澶囧搧') ||
+ //閿�鍞湰閮�
+ (nObj.Salesdepartment__c != oObj.Salesdepartment__c) ||
+ //浜у搧鍒嗙被(GI/SP)
+ (nObj.Product_category__c != oObj.Product_category__c) ||
+ //澶囧搧閰嶅鏄庣粏鍨嬪彿
+ (nObj.Fixture_Model_No_F__c != oObj.Fixture_Model_No_F__c) ||
+ (nObj.Delete_Flag__c != oObj.Delete_Flag__c &&
+ nObj.Delete_Flag__c == true) ||
+ (nObj.Freeze_sign_Abandoned_Flag__c != oObj.Freeze_sign_Abandoned_Flag__c &&
+ nObj.Freeze_sign_Abandoned_Flag__c == false))
) {
if (String.isBlank(nObj.Fixture_Model_No_F__c) == false) {
if (modelNoAssetIdMap.containsKey(key) == false) {
@@ -386,34 +860,45 @@
List<String> keyList = new List<String>();
keyList.addAll(modelNoAssetIdMap.keySet());
System.debug(LoggingLevel.INFO, '*** keyList: ' + keyList);
- List<Rental_Apply_Sequence__c> targetSequence = [SELECT Id,Apply_Set_Detail__c,
- Apply_Set_Detail_ExternalKey__c,
- Demo_Purpose2__c, Equipment_Type__c, ExternalKey__c,
- Fixture_Model_No__c,
- Internal_asset_location__c, Invalid_Flag__c,
- Product_category__c,
- Rental_Apply__c,Series_No__c,
- Series_Unequal_Queue_Flag__c, Salesdepartment__c
- FROM Rental_Apply_Sequence__c
- WHERE Series_No__c > 0 AND Invalid_Flag__c =false
- AND Apply_Set_Detail__c NOT IN:raesdIdSet
- AND ExternalKey__c IN:keyList
- AND Apply_Set_Detail__r.Cancel_Select__c = false
- ORDER BY Series_No__c ];
+ List<Rental_Apply_Sequence__c> targetSequence = [
+ SELECT
+ Id,
+ Apply_Set_Detail__c,
+ Apply_Set_Detail_ExternalKey__c,
+ Demo_Purpose2__c,
+ Equipment_Type__c,
+ ExternalKey__c,
+ Fixture_Model_No__c,
+ Internal_asset_location__c,
+ Invalid_Flag__c,
+ Product_category__c,
+ Rental_Apply__c,
+ Series_No__c,
+ Series_Unequal_Queue_Flag__c,
+ Salesdepartment__c
+ FROM Rental_Apply_Sequence__c
+ WHERE
+ Series_No__c > 0
+ AND Invalid_Flag__c = FALSE
+ AND Apply_Set_Detail__c NOT IN :raesdIdSet
+ AND ExternalKey__c IN :keyList
+ AND Apply_Set_Detail__r.Cancel_Select__c = FALSE
+ ORDER BY Series_No__c
+ ];
System.debug(LoggingLevel.INFO, '*** targetSequence: ' + targetSequence);
- Map<String,List<Rental_Apply_Sequence__c>> sequenceMap = new Map<String,List<Rental_Apply_Sequence__c>>();
- for(Rental_Apply_Sequence__c sequeuece:targetSequence){
- if(!sequenceMap.containsKey(sequeuece.Externalkey__c)){
- sequenceMap.put(sequeuece.Externalkey__c,new List<Rental_Apply_Sequence__c>());
+ Map<String, List<Rental_Apply_Sequence__c>> sequenceMap = new Map<String, List<Rental_Apply_Sequence__c>>();
+ for (Rental_Apply_Sequence__c sequeuece : targetSequence) {
+ if (!sequenceMap.containsKey(sequeuece.Externalkey__c)) {
+ sequenceMap.put(sequeuece.Externalkey__c, new List<Rental_Apply_Sequence__c>());
}
sequenceMap.get(sequeuece.Externalkey__c).add(sequeuece);
}
- Map<String,Rental_Apply_Equipment_Set_Detail__c> updateMap = new Map<String,Rental_Apply_Equipment_Set_Detail__c>();
- for(String key:sequenceMap.keySet()){
- for(Rental_Apply_Sequence__c sequeuece:sequenceMap.get(key)){
- if(!updateMap.containsKey(sequeuece.Apply_Set_Detail__c)){
+ Map<String, Rental_Apply_Equipment_Set_Detail__c> updateMap = new Map<String, Rental_Apply_Equipment_Set_Detail__c>();
+ for (String key : sequenceMap.keySet()) {
+ for (Rental_Apply_Sequence__c sequeuece : sequenceMap.get(key)) {
+ if (!updateMap.containsKey(sequeuece.Apply_Set_Detail__c)) {
System.debug(LoggingLevel.INFO, '*** modelNoAssetIdMap: ' + JSON.serialize(modelNoAssetIdMap));
- if(modelNoAssetIdMap.containsKey(key)){
+ if (modelNoAssetIdMap.containsKey(key)) {
List<Id> assIdList = new List<Id>();
assIdList.addAll(modelNoAssetIdMap.get(key));
String assIdbk = assIdList.get(0);
@@ -421,9 +906,8 @@
raesd.Id = sequeuece.Apply_Set_Detail__c;
raesd.Asset__c = assIdbk;
System.debug('raesd.Asset__c' + raesd.Asset__c);
- raesd.Queue_Number__c = 0; // 鏆傚畾鍒嗛厤
- updateMap.put(raesd.Id,raesd);
-
+ raesd.Queue_Number__c = 0; // 鏆傚畾鍒嗛厤
+ updateMap.put(raesd.Id, raesd);
modelNoAssetIdMap.get(key).remove(assIdbk);
if (modelNoAssetIdMap.get(key).isEmpty()) {
@@ -432,15 +916,13 @@
System.debug(LoggingLevel.INFO, '*** modelNoAssetIdMap: ' + JSON.serialize(modelNoAssetIdMap));
}
}
-
}
-
}
System.debug(LoggingLevel.INFO, '*** updateMap.values(): ' + JSON.serialize(updateMap.values()));
update updateMap.values();
- // Fixture_Model_No_F__c 銈掕銈嬨亾銇ㄣ亴銇с亶銇亜銆併儑銉笺偪銇屻亰銇娿亜銇仹銆�
- // Fixture_Set_Detail__r.Fixture_Model_No_F__c 銈掋伩銈嬨亱 Fixture_Model_No_text__c 銈掋伩銈嬨亱
+ // Fixture_Model_No_F__c 銈掕銈嬨亾銇ㄣ亴銇с亶銇亜銆併儑銉笺偪銇屻亰銇娿亜銇仹銆�
+ // Fixture_Set_Detail__r.Fixture_Model_No_F__c 銈掋伩銈嬨亱 Fixture_Model_No_text__c 銈掋伩銈嬨亱
// whkey += ' (';
// whkey += ' ((Fixture_Set_Detail__c != null and Fixture_Set_Detail__r.Product2__r.Fixture_Model_No_T__c =\'' + String.escapeSingleQuotes(nObj.Fixture_Model_No_F__c) + '\')';
// whkey += ' OR Fixture_Model_No_text__c =\'' + String.escapeSingleQuotes(nObj.Fixture_Model_No_F__c) + '\'';
@@ -467,13 +949,9 @@
// whkey += wher + ' ) OR';
// }
-
-
// if (String.isNotBlank(whkey)) {
// whkey = '( ' + whkey.removeEnd('OR') + ')';
// }
-
-
// String soql = 'SELECT Fixture_Model_No_F__c, Substitute_flag__c, Asset__c,'
// + ' Queue_Number__c, Fixture_Model_No_text__c, Salesdepartment_before__c,'
@@ -572,15 +1050,17 @@
private void checkOneToOneLink() {
Set<Id> otoIds = new Set<Id>(); // 寰呭垹闄ink鐨処d
Set<Id> assetIds = new Set<Id>();
- Set<String> centers = new Set<String> {'鍖椾含 澶囧搧涓績', '涓婃捣 澶囧搧涓績', '骞垮窞 澶囧搧涓績'};
+ Set<String> centers = new Set<String>{ '鍖椾含 澶囧搧涓績', '涓婃捣 澶囧搧涓績', '骞垮窞 澶囧搧涓績' };
for (Asset nObj : newList) {
//寰呭簾寮冿紝搴熷純锛屽拰鏁伴噺0鐨勫鍝侀渶瑕佹柇寮�涓�瀵逛竴link 锛堢洰鍓嶅彧澶勭悊涓綋绠$悊鐨勶級
- if ((nObj.Fixture_Status__c == FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Fei_Qi.ordinal())
- || nObj.Fixture_Status__c == FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Dai_Fei_Qi.ordinal())
- || nObj.Quantity == 0) && nObj.Manage_type__c == FixtureUtil.managetypeMap.get(FixtureUtil.Managetype.Ge_Ti_Guan_Li)){
+ if (
+ (nObj.Fixture_Status__c == FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Fei_Qi.ordinal()) ||
+ nObj.Fixture_Status__c == FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Dai_Fei_Qi.ordinal()) ||
+ nObj.Quantity == 0) && nObj.Manage_type__c == FixtureUtil.managetypeMap.get(FixtureUtil.Managetype.Ge_Ti_Guan_Li)
+ ) {
//鏄竴瀵逛竴涓讳綋鎴栬�呮槸涓�瀵逛竴涓綋闄勫睘鍝�
if (nObj.Main_OneToOne__c == true || nObj.Fixture_OneToOne_Link__c <> null) {
- if(centers.contains(nObj.Internal_asset_location__c)) {
+ if (centers.contains(nObj.Internal_asset_location__c)) {
assetIds.add(nObj.Id);
}
}
@@ -588,13 +1068,14 @@
}
if (assetIds.size() > 0) {
- Map<Id, Fixture_OneToOne_Link__c> linkMap = new Map<Id, Fixture_OneToOne_Link__c>([
- SELECT Id
- FROM Fixture_OneToOne_Link__c
- WHERE Main_Asset__c in :assetIds
- OR Accessory_Asset__c IN: assetIds
- ]);
- if(!linkMap.isEmpty()){
+ Map<Id, Fixture_OneToOne_Link__c> linkMap = new Map<Id, Fixture_OneToOne_Link__c>(
+ [
+ SELECT Id
+ FROM Fixture_OneToOne_Link__c
+ WHERE Main_Asset__c IN :assetIds OR Accessory_Asset__c IN :assetIds
+ ]
+ );
+ if (!linkMap.isEmpty()) {
delete linkMap.values();
}
}
@@ -612,8 +1093,15 @@
* - 娌℃湁鎵剧殑璇�, 涓嶆洿鏂癆ccountId, 鑷姩鍋� Account, Group, ApexShare
*/
private void beforeSetAccountId() {
- Set<String> targetDepts = new Set<String> {'1.鍗庡寳钀ヤ笟鏈儴','2.涓滃寳钀ヤ笟鏈儴','3.瑗垮寳钀ヤ笟鏈儴','4.鍗庝笢钀ヤ笟鏈儴','5.鍗庡崡钀ヤ笟鏈儴','6.瑗垮崡钀ヤ笟鏈儴'};
- Set<String> targetCenters = new Set<String> {'鍖椾含 澶囧搧涓績', '涓婃捣 澶囧搧涓績', '骞垮窞 澶囧搧涓績'};
+ Set<String> targetDepts = new Set<String>{
+ '1.鍗庡寳钀ヤ笟鏈儴',
+ '2.涓滃寳钀ヤ笟鏈儴',
+ '3.瑗垮寳钀ヤ笟鏈儴',
+ '4.鍗庝笢钀ヤ笟鏈儴',
+ '5.鍗庡崡钀ヤ笟鏈儴',
+ '6.瑗垮崡钀ヤ笟鏈儴'
+ };
+ Set<String> targetCenters = new Set<String>{ '鍖椾含 澶囧搧涓績', '涓婃捣 澶囧搧涓績', '骞垮窞 澶囧搧涓績' };
if (Test.isRunningTest() && testTargetDepts != null) {
targetDepts = testTargetDepts;
}
@@ -627,39 +1115,42 @@
Asset oObj = (null == this.oldMap) ? null : this.oldMap.get(nObj.Id);
// 浣滄垚, 纭瀛楁鏈夋病鏈夊彉鍖�
- if (Trigger.isInsert
- || (oObj != null
- && (oObj.RecordTypeId != nObj.RecordTypeId
- || oObj.Asset_loaner_category__c != nObj.Asset_loaner_category__c
- || oObj.AssetManageConfirm__c != nObj.AssetManageConfirm__c
- || oObj.Internal_asset_location__c != nObj.Internal_asset_location__c
- || oObj.Salesdepartment__c != nObj.Salesdepartment__c
- || oObj.OlympusAccShareName__c != nObj.OlympusAccShareName__c
- )
- && (targetCenters.contains(nObj.Internal_asset_location__c)
- || targetProvs.containsKey(nObj.Internal_asset_location__c)
- )
- && !nObj.TransferToOther__c
- )
+ if (
+ Trigger.isInsert ||
+ (oObj != null &&
+ (oObj.RecordTypeId != nObj.RecordTypeId ||
+ oObj.Asset_loaner_category__c != nObj.Asset_loaner_category__c ||
+ oObj.AssetManageConfirm__c != nObj.AssetManageConfirm__c ||
+ oObj.Internal_asset_location__c != nObj.Internal_asset_location__c ||
+ oObj.Salesdepartment__c != nObj.Salesdepartment__c ||
+ oObj.OlympusAccShareName__c != nObj.OlympusAccShareName__c) &&
+ (targetCenters.contains(nObj.Internal_asset_location__c) || targetProvs.containsKey(nObj.Internal_asset_location__c)) &&
+ !nObj.TransferToOther__c)
) {
// 鏄笉鏄鍝佺殑纭
- if (System.Label.Asset_RecordType == nObj.RecordTypeId
- && true == nObj.AssetManageConfirm__c
- && nObj.Asset_loaner_category__c != '鑰楁潗'
+ if (
+ System.Label.Asset_RecordType == nObj.RecordTypeId &&
+ true == nObj.AssetManageConfirm__c &&
+ nObj.Asset_loaner_category__c != '鑰楁潗'
) {
// 鍔炰簨澶勫鍝� 鈫� 鍔ㄦ�佽瀹� Asset.AccountId 鐨勫璞�
- if (targetProvs.containsKey(nObj.Internal_asset_location__c)
- && targetDepts.contains(nObj.Salesdepartment__c)
- ) {
- String accShareName = '澶囧搧鍏变韩_'
- + targetProvs.get(nObj.Internal_asset_location__c) + '_' + nObj.Salesdepartment__c.right(6);
+ if (targetProvs.containsKey(nObj.Internal_asset_location__c) && targetDepts.contains(nObj.Salesdepartment__c)) {
+ String accShareName =
+ '澶囧搧鍏变韩_' +
+ targetProvs.get(nObj.Internal_asset_location__c) +
+ '_' +
+ nObj.Salesdepartment__c.right(6);
nObj.OlympusAccShareName__c = accShareName;
assetAccShareNameMap.put(nObj, accShareName);
- }
- else {
+ } else {
if (AssetHandler.Account_Asset_Id == null) {
// Static 鍙細鎵ц涓�閬�
- AssetHandler.Account_Asset_Id = [SELECT Id FROM Account WHERE AgentCode_Ext__c =: System.Label.Account_Asset].Id;
+ AssetHandler.Account_Asset_Id = [
+ SELECT Id
+ FROM Account
+ WHERE AgentCode_Ext__c = :System.Label.Account_Asset
+ ]
+ .Id;
}
nObj.OlympusAccShareName__c = '';
nObj.AccountId = AssetHandler.Account_Asset_Id;
@@ -675,11 +1166,11 @@
Set<String> insertAccShareNameSet = new Set<String>();
if (assetAccShareNameMap.size() > 0) {
Map<String, Id> accShareId = new Map<String, Id>();
- for (Account accShare : [SELECT Id
- , Department_Name__c
- FROM Account
- WHERE RecordTypeId =: System.Label.Department_OTH
- AND Department_Name__c IN: assetAccShareNameMap.values()]) {
+ for (Account accShare : [
+ SELECT Id, Department_Name__c
+ FROM Account
+ WHERE RecordTypeId = :System.Label.Department_OTH AND Department_Name__c IN :assetAccShareNameMap.values()
+ ]) {
accShareId.put(accShare.Department_Name__c, accShare.Id);
}
@@ -690,15 +1181,14 @@
if (accShareId.containsKey(accShareName)) {
// 鎵惧埌 Account 璁惧畾 AccountId, "Olympus绀惧唴 鍏朵粬 澶囧搧" => "Olympus绀惧唴 鍏朵粬 澶囧搧鍏变韩_XXX"
nObj.AccountId = accShareId.get(accShareName);
- }
- else {
+ } else {
// 鎵句笉鍒� AccountId, 鏂板缓 Account, Group, ApexShare
insertAccShareNameSet.add(accShareName);
}
}
}
if (insertAccShareNameSet.size() > 0) {
- // AssetHandler.futureInsertAccShare(JSON.serialize(insertAccShareNameSet), execNow);
+ // AssetHandler.futureInsertAccShare(JSON.serialize(insertAccShareNameSet), execNow);
System.enqueueJob(new MyQueueableClass(JSON.serialize(insertAccShareNameSet), execNow));
}
}
@@ -709,24 +1199,29 @@
*/
private static void insertAccShare(String insertAccShareNameJson, Datetime execNow) {
Set<String> insertAccShareNameSet = (Set<String>) JSON.deserialize(insertAccShareNameJson, Set<String>.class);
- if (insertAccShareNameSet.isEmpty()) { return; }
+ if (insertAccShareNameSet.isEmpty()) {
+ return;
+ }
// Olympus绀惧唴 鍏朵粬
List<Account> olympusAccount_OtherDC;
try {
- olympusAccount_OtherDC = [SELECT Id, ParentId
- FROM Account
- WHERE Parent.AgentCode_Ext__c = '9999999' AND Department_Class_Name__c = '鍏朵粬'
- FOR Update];
+ olympusAccount_OtherDC = [
+ SELECT Id, ParentId
+ FROM Account
+ WHERE Parent.AgentCode_Ext__c = '9999999' AND Department_Class_Name__c = '鍏朵粬'
+ FOR UPDATE
+ ];
} catch (Exception e) {
System.enqueueJob(new MyQueueableClass(insertAccShareNameJson, execNow));
return;
}
- List<Account> isInsertedList = [SELECT Id, Department_Name__c
- FROM Account
- WHERE ParentId =: olympusAccount_OtherDC[0].Id
- AND Department_Name__c IN: insertAccShareNameSet];
+ List<Account> isInsertedList = [
+ SELECT Id, Department_Name__c
+ FROM Account
+ WHERE ParentId = :olympusAccount_OtherDC[0].Id AND Department_Name__c IN :insertAccShareNameSet
+ ];
if (isInsertedList.size() > 0) {
Map<String, Account> insertedAccount = new Map<String, Account>();
for (Account insertedAcc : isInsertedList) {
@@ -737,27 +1232,31 @@
AssetHandler.updateAssetAccount(insertedAccount, execNow);
}
-
if (insertAccShareNameSet.size() > 0) {
Map<String, Account> insertAccount = new Map<String, Account>();
for (String accShareName : insertAccShareNameSet) {
- insertAccount.put(accShareName, new Account(
- Name = '*',
- Hospital__c = olympusAccount_OtherDC[0].ParentId,
- ParentId = olympusAccount_OtherDC[0].Id,
- Department_Class__c = olympusAccount_OtherDC[0].Id,
- Other_dept_category__c = '鍏朵粬绉戝',
- Department_Name__c = accShareName,
- OwnerId = System.Label.Batch_User_Id,
- RecordTypeId = System.Label.Department_OTH
- ));
+ insertAccount.put(
+ accShareName,
+ new Account(
+ Name = '*',
+ Hospital__c = olympusAccount_OtherDC[0].ParentId,
+ ParentId = olympusAccount_OtherDC[0].Id,
+ Department_Class__c = olympusAccount_OtherDC[0].Id,
+ Other_dept_category__c = '鍏朵粬绉戝',
+ Department_Name__c = accShareName,
+ OwnerId = System.Label.Batch_User_Id,
+ RecordTypeId = System.Label.Department_OTH
+ )
+ );
}
AssetHandler.insertAccGrantShare(insertAccount, execNow);
}
}
private static void insertAccGrantShare(Map<String, Account> insertAccountMap, Datetime execNow) {
- if (insertAccountMap.isEmpty()) { return; }
+ if (insertAccountMap.isEmpty()) {
+ return;
+ }
Set<String> accShareNameSet = insertAccountMap.keySet();
// insert Account鐨勬椂鍊�, 璺宠繃 NFM001
// OLY_OCM-1230 闇�瑕佹墽琛孨FM001Trigger
@@ -767,13 +1266,15 @@
Map<String, Group> insertGroup = new Map<String, Group>();
Map<String, Group> groupNameMap = new Map<String, Group>();
for (String accShareName : accShareNameSet) {
- insertGroup.put(accShareName, new Group(
- Name = accShareName
- ));
+ insertGroup.put(accShareName, new Group(Name = accShareName));
}
// Check 鏈夋病鏈� Group
- for (Group grp : [SELECT Id, Name FROM Group WHERE Type = 'Regular' AND Name IN: accShareNameSet]) {
+ for (Group grp : [
+ SELECT Id, Name
+ FROM Group
+ WHERE Type = 'Regular' AND Name IN :accShareNameSet
+ ]) {
// 宸茬粡鏈塆roup 鐨勮瘽 涓嶇敤 insert
insertGroup.remove(grp.Name);
groupNameMap.put(grp.Name, grp);
@@ -787,12 +1288,14 @@
// 璧� Account 鍏变韩鏉冮檺
List<AccountShare> insertShareList = new List<AccountShare>();
for (String accShareName : accShareNameSet) {
- insertShareList.add(new AccountShare(
+ insertShareList.add(
+ new AccountShare(
UserOrGroupId = groupNameMap.get(accShareName).Id,
AccountId = insertAccountMap.get(accShareName).Id,
AccountAccessLevel = 'Edit',
OpportunityAccessLevel = 'None'
- ));
+ )
+ );
}
insert insertShareList;
// Update Asset.AccountId
@@ -800,15 +1303,17 @@
}
private static void updateAssetAccount(Map<String, Account> accShareNameAccountMap, Datetime execNow) {
- if (accShareNameAccountMap.isEmpty()) { return; }
+ if (accShareNameAccountMap.isEmpty()) {
+ return;
+ }
Set<String> accShareNameSet = accShareNameAccountMap.keySet();
List<Asset> updAssetAccount = new List<Asset>();
- for (Asset nObj : [SELECT Id, OlympusAccShareName__c, AccountId
- FROM Asset
- WHERE OlympusAccShareSameFlag__c = '0'
- AND OlympusAccShareName__c IN: accShareNameSet
- AND LastModifiedDate >=: execNow]) {
+ for (Asset nObj : [
+ SELECT Id, OlympusAccShareName__c, AccountId
+ FROM Asset
+ WHERE OlympusAccShareSameFlag__c = '0' AND OlympusAccShareName__c IN :accShareNameSet AND LastModifiedDate >= :execNow
+ ]) {
nObj.AccountId = accShareNameAccountMap.get(nObj.OlympusAccShareName__c).Id;
updAssetAccount.add(nObj);
}
@@ -829,4 +1334,4 @@
AssetHandler.insertAccShare(insertAccShareNameJson, execNow);
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/AssetHandler.cls-meta.xml b/force-app/main/default/classes/AssetHandler.cls-meta.xml
index d219ea1..bdcee66 100644
--- a/force-app/main/default/classes/AssetHandler.cls-meta.xml
+++ b/force-app/main/default/classes/AssetHandler.cls-meta.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" ?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>35.0</apiVersion>
+ <apiVersion>50.0</apiVersion>
<status>Active</status>
</ApexClass>
diff --git a/force-app/main/default/classes/Batch_FixAttachmentToFiles.cls b/force-app/main/default/classes/Batch_FixAttachmentToFiles.cls
new file mode 100644
index 0000000..1d917ed
--- /dev/null
+++ b/force-app/main/default/classes/Batch_FixAttachmentToFiles.cls
@@ -0,0 +1,96 @@
+global without sharing class Batch_FixAttachmentToFiles implements Database.Batchable<sObject> {
+ // Id batchJobId = Database.executeBatch(new Batch_FixAttachmentToFiles('Consumable_order__c',Datetime.newInstance(2023, 1, 1, 8, 0, 0),Datetime.newInstance(2024, 1, 1, 8, 0, 0)),2000);
+ private Datetime creStartDate = null;
+ private Datetime creEndDate = null;
+ private String objectApiName = null;
+ private Set<String> parentIds = new Set<String>(); //Add by Li Jun 20230703
+ public Batch_FixAttachmentToFiles(String objectType, Datetime startTime, Datetime endTime) {
+ creStartDate = startTime;
+ creEndDate = endTime;
+ objectApiName = objectType;
+ }
+ //Add by Li Jun 20230703 Start
+ public Batch_FixAttachmentToFiles(Set<String> parentIds) {
+ this.parentIds = parentIds;
+ }
+ //Add by Li Jun 20230703 End
+ global Database.QueryLocator start(Database.BatchableContext BC) {
+ String queryObject = 'SELECT Id, Name, OwnerId, ParentId, Parent.Name, Parent.Type, Body, CreatedDate, CreatedById FROM Attachment WHERE Parent.Type =:objectApiName AND CreatedDate >=:creStartDate AND CreatedDate <:creEndDate Order by CreatedDate ASC';
+ if (parentIds.size() > 0) {
+ queryObject = 'SELECT Id, Name, OwnerId, ParentId, Parent.Name, Parent.Type, Body, CreatedDate, CreatedById FROM Attachment WHERE ParentId in:parentIds';
+ }
+ return Database.getQueryLocator(queryObject);
+ }
+
+ global void execute(Database.BatchableContext BC, List<Attachment> scope) {
+ List<ContentVersion> insertContents = new List<ContentVersion>();
+ Map<string, id> nameParentMaps = new Map<string, id>();
+ Set<String> attachmentIds = new Set<String>();
+ for (Attachment att : scope) {
+ nameParentMaps.put(att.Name, att.ParentId);
+ attachmentIds.add(att.Id);
+ ContentVersion cVersion = new ContentVersion();
+ cVersion.ContentLocation = 'S'; //S-Document is in Salesforce. E-Document is outside of Salesforce. L-Document is on a Social Netork.
+ cVersion.PathOnClient = att.Name; //File name with extention
+ cVersion.Origin = 'C'; //C-Content Origin. H-Chatter Origin.
+ cVersion.Title = att.Name; //Name of the file
+ cVersion.VersionData = att.Body; //File content
+ insertContents.add(cVersion);
+ }
+ if (insertContents.isEmpty()) {
+ return;
+ }
+ //Insert insertContents;
+ List<Database.SaveResult> saveResultsContents = Database.insert(insertContents, false);
+ insertLog(saveResultsContents, attachmentIds);
+ set<Id> contentIds = new Set<Id>();
+ for (ContentVersion cv : insertContents) {
+ contentIds.add(cv.id);
+ }
+ List<ContentVersion> conDocuments = [
+ SELECT ContentDocumentId, Title
+ FROM ContentVersion
+ WHERE Id IN :contentIds
+ ];
+ List<ContentDocumentLink> insertDocLinks = new List<ContentDocumentLink>();
+ for (ContentVersion cv : conDocuments) {
+ ContentDocumentLink cDocLink = new ContentDocumentLink();
+ cDocLink.ContentDocumentId = cv.ContentDocumentId; //Add ContentDocumentId
+ cDocLink.LinkedEntityId = nameParentMaps.get(cv.Title); //Add attachment parentId
+ cDocLink.ShareType = 'V'; //V - Viewer permission. C - Collaborator permission. I - Inferred permission.
+ cDocLink.Visibility = 'AllUsers';
+ insertDocLinks.add(cDocLink);
+ }
+ //Insert insertDocLinks;
+ List<Database.SaveResult> saveResultsLinks = Database.insert(insertDocLinks, false);
+ insertLog(saveResultsLinks, attachmentIds);
+ }
+
+ global void insertLog(List<Database.SaveResult> saveResults, Set<String> attachmentIds) {
+ Transaction_Log__c traLog = new Transaction_Log__c();
+ List<Map<String, String>> logMapList = new List<Map<String, String>>();
+ for (Database.SaveResult result : saveResults) {
+ String recordId = result.getId();
+ if (!result.isSuccess()) {
+ for (Database.Error error : result.getErrors()) {
+ Map<String, String> logMap = new Map<String, String>();
+ String errorMsg = error.getMessage();
+ logMap.put('recordId', recordId);
+ logMap.put('errorMsg', errorMsg);
+ logMapList.add(logMap);
+ }
+ }
+ }
+ if (logMapList.size() > 0) {
+ Map<String, String> attachmentIdMap = new Map<String, String>();
+ attachmentIdMap.put('attachmentIds', JSON.serialize(attachmentIds));
+ logMapList.add(attachmentIdMap);
+ traLog.Response__c = JSON.serialize(logMapList);
+ traLog.Module__c = 'Attachment COnvert Transaction ';
+ insert traLog;
+ }
+ }
+
+ global void finish(Database.BatchableContext BC) {
+ }
+}
diff --git a/force-app/main/default/classes/Batch_FixAttachmentToFiles.cls-meta.xml b/force-app/main/default/classes/Batch_FixAttachmentToFiles.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/Batch_FixAttachmentToFiles.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/Batch_FixAttachmentToFilesTest.cls b/force-app/main/default/classes/Batch_FixAttachmentToFilesTest.cls
new file mode 100644
index 0000000..938de55
--- /dev/null
+++ b/force-app/main/default/classes/Batch_FixAttachmentToFilesTest.cls
@@ -0,0 +1,52 @@
+@isTest(SeeAllData=true)
+private class Batch_FixAttachmentToFilesTest {
+ @isTest(SeeAllData=true)
+ static void testInit() {
+ String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ Account accountItem1 = new Account(Name = 'Testaccount001', RecordTypeId = rectCo);
+ insert accountItem1;
+
+ Consumable_order__c consOrder = new Consumable_order__c();
+ consOrder.Name = 'test01';
+ consOrder.Order_status__c = '鎵瑰噯';
+ consOrder.Deliver_date__c = Date.today();
+ consOrder.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ consOrder.Order_type__c = '璁㈠崟';
+ consOrder.Order_ProType__c = 'ENG';
+ consOrder.Dealer_Info__c = accountItem1.Id;
+ consOrder.Delivery_detail_count__c = 5;
+ insert consOrder;
+
+ List<Attachment> attachList = new List<Attachment>();
+ Attachment attach = new Attachment();
+ attach.Name = 'A-65224941-20200923--1.docx';
+ Blob bodyBlob = Blob.valueOf('Unit Test Attachment Body');
+ attach.body = bodyBlob;
+ attach.ParentId = consOrder.Id;
+ attachList.add(attach);
+ insert attachList;
+
+ Set<String> Id = new Set<String>();
+ String objectType;
+ Datetime creStartDate;
+ Datetime creEndDate;
+
+ List<Attachment> attachmentList = [
+ SELECT Id, Name, OwnerId, ParentId, Parent.Name, Parent.Type, Body, CreatedDate, CreatedById
+ FROM Attachment
+ WHERE Id = :attachList[0].Id
+ ORDER BY CreatedDate ASC
+ LIMIT 1
+ ];
+ for (Attachment att : attachmentList) {
+ Id.add(att.ParentId);
+ objectType = att.Parent.Name;
+ creStartDate = att.CreatedDate;
+ creEndDate = att.CreatedDate.addDays(1);
+ }
+ System.Test.startTest();
+ Database.executeBatch(new Batch_FixAttachmentToFiles(objectType, creStartDate, creEndDate), 1);
+ Database.executeBatch(new Batch_FixAttachmentToFiles(Id), 1);
+ System.Test.stopTest();
+ }
+}
diff --git a/force-app/main/default/classes/Batch_FixAttachmentToFilesTest.cls-meta.xml b/force-app/main/default/classes/Batch_FixAttachmentToFilesTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/Batch_FixAttachmentToFilesTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/ContactTriggerHandler.cls b/force-app/main/default/classes/ContactTriggerHandler.cls
index cb33adc..56f50cc 100644
--- a/force-app/main/default/classes/ContactTriggerHandler.cls
+++ b/force-app/main/default/classes/ContactTriggerHandler.cls
@@ -2,20 +2,21 @@
* Select Id From Contact Where RecordTypeId = '01210000000QfWdAAK' and Strategic_dept_Class__c != null
*/
public without sharing class ContactTriggerHandler extends Oly_TriggerHandler {
- private Map < Id, Contact > newMap;
- private Map < Id, Contact > oldMap;
- private List < Contact > newList;
- private List < Contact > oldList;
+ private Map<Id, Contact> newMap;
+ private Map<Id, Contact> oldMap;
+ private List<Contact> newList;
+ private List<Contact> oldList;
private Id AgencyId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId(); // 20220830 ljh LLIU-CHR8FF add
-
+
public ContactTriggerHandler() {
- this.newMap = (Map < Id, Contact > ) Trigger.newMap;
- this.oldMap = (Map < Id, Contact > ) Trigger.oldMap;
- this.newList = (List < Contact > ) Trigger.new;
- this.oldList = (List < Contact > ) Trigger.old;
+ this.newMap = (Map<Id, Contact>) Trigger.newMap;
+ this.oldMap = (Map<Id, Contact>) Trigger.oldMap;
+ this.newList = (List<Contact>) Trigger.new;
+ this.oldList = (List<Contact>) Trigger.old;
}
protected override void beforeInsert() {
- if(Test.isRunningTest()||UserInfo.getUserId()!=System.Label.ByPassTrigger){ //Add by Li Jun for PIPL 20220331
+ if (Test.isRunningTest() || UserInfo.getUserId() != System.Label.ByPassTrigger) {
+ //Add by Li Jun for PIPL 20220331
mobileNumberVerification();
}
}
@@ -24,7 +25,7 @@
syncToAgencyContact();
updateDealerNum();
sendToComPlat();
- updateChargeState();// 20220830 ljh LLIU-CHR8FF
+ updateChargeState(); // 20220830 ljh LLIU-CHR8FF
}
protected override void afterUpdate() {
@@ -40,7 +41,6 @@
mobileNumberVerification();
}
-
protected override void afterDelete() {
syncToAgencyContactDelete();
updateDealerNum();
@@ -53,15 +53,13 @@
* 鏍规嵁鏈嶅姟鎶�甯堝~鍐欐儏鍐垫洿鏂板鎴蜂汉鍛樹笂鐨勫紑灞曞伐浣滃瓧娈�
*/
private void UpdateProcessingWork() {
- for (Contact temContact: newList) {
+ for (Contact temContact : newList) {
if (System.label.UpdateServiceHistory.equals('true')) {
-
string ProcessingWork = '';
string ProcessingWorkWithoutNumber = '';
if (temContact.ServiceBookInput__c != 0) {
ProcessingWork += '缁翠慨濮旀墭涔﹀~鍐�' + temContact.ServiceBookInput__c + '娆�';
ProcessingWorkWithoutNumber += '缁翠慨濮旀墭涔﹀~鍐�';
-
}
if (temContact.InspectTime__c != 0) {
if (String.isBlank(ProcessingWork)) {
@@ -70,7 +68,6 @@
} else {
ProcessingWork += '锛岀偣妫�' + temContact.InspectTime__c + '娆�';
ProcessingWorkWithoutNumber += '锛岀偣妫�';
-
}
}
if (temContact.InspectEquipmentTime__c != 0) {
@@ -81,7 +78,6 @@
ProcessingWork += '锛岀偣妫�璁惧' + temContact.InspectEquipmentTime__c + '涓�';
ProcessingWorkWithoutNumber += '锛岀偣妫�璁惧';
}
-
}
if (temContact.VisitTime__c != 0) {
if (String.isBlank(ProcessingWork)) {
@@ -91,7 +87,6 @@
ProcessingWork += '锛屼笂闂�' + temContact.VisitTime__c + '娆�';
ProcessingWorkWithoutNumber += '锛屼笂闂�';
}
-
}
if (temContact.pollingTime__c != 0) {
if (String.isBlank(ProcessingWork)) {
@@ -101,7 +96,6 @@
ProcessingWork += '锛屽贰妫�' + temContact.pollingTime__c + '娆�';
ProcessingWorkWithoutNumber += '锛屽贰妫�';
}
-
}
if (temContact.TeachingTime__c != 0) {
if (String.isBlank(ProcessingWork)) {
@@ -118,43 +112,38 @@
//}
temContact.ProcessingWork__c = ProcessingWork;
temContact.ProcessingWorkWithoutNumber__c = ProcessingWorkWithoutNumber;
-
-
}
}
-
}
// 鏈嶅姟鎶�甯� 2018/12/24 end
private void syncToAgencyContact() {
System.debug('enter syncToAgencyContact');
- Map < Id, Agency_Contact__c > targetContactMap = new Map < Id, Agency_Contact__c > ();
- Map < Id, Contact > ContactMap = new Map < Id, Contact > ();
- for (Contact nObj: newList) {
- if (nObj.RecordTypeId == '01210000000QfWdAAK' // Doctor
- &&
+ Map<Id, Agency_Contact__c> targetContactMap = new Map<Id, Agency_Contact__c>();
+ Map<Id, Contact> ContactMap = new Map<Id, Contact>();
+ for (Contact nObj : newList) {
+ if (
+ nObj.RecordTypeId ==
+ '01210000000QfWdAAK' && // Doctor
String.isBlank(nObj.Strategic_dept_Class__c) == false
) {
- if (Trigger.isInsert ||
- (Trigger.isUpdate
- // && (
- // oldMap.get(nObj.Id).LastName != nObj.LastName
- // || oldMap.get(nObj.Id).FirstName != nObj.FirstName
- // || oldMap.get(nObj.Id).Strategic_dept_Class__c != nObj.Strategic_dept_Class__c
- // || oldMap.get(nObj.Id).Type__c != nObj.Type__c
- // || oldMap.get(nObj.Id).Doctor_Division1__c != nObj.Doctor_Division1__c
- // )
- )
- ) {
+ if (Trigger.isInsert || (Trigger.isUpdate)) {
+ // && (
+ // oldMap.get(nObj.Id).LastName != nObj.LastName
+ // || oldMap.get(nObj.Id).FirstName != nObj.FirstName
+ // || oldMap.get(nObj.Id).Strategic_dept_Class__c != nObj.Strategic_dept_Class__c
+ // || oldMap.get(nObj.Id).Type__c != nObj.Type__c
+ // || oldMap.get(nObj.Id).Doctor_Division1__c != nObj.Doctor_Division1__c
+ // )
//Agency_Contact__c acObj = new Agency_Contact__c(Agency_ID__c = '000000000000000', Contact__c = nObj.Id, ContactId18__c = nObj.Id, Agency_Hospital__c = null, Name = nObj.LastName + ((String.isBlank(nObj.FirstName) == false) ? ' ' + nObj.FirstName : ''), Department_Class__c = nObj.Strategic_dept_Class__c, Type__c = nObj.Type__c, Doctor_Division1__c = nObj.Doctor_Division1__c);
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-27 鍘绘帀Encrypted start
Agency_Contact__c acObj = new Agency_Contact__c(
- Agency_ID__c = '000000000000000',
- Contact__c = nObj.Id,
- ContactId18__c = nObj.Id,
- Agency_Hospital__c = null,
+ Agency_ID__c = '000000000000000',
+ Contact__c = nObj.Id,
+ ContactId18__c = nObj.Id,
+ Agency_Hospital__c = null,
Name = nObj.LastName,
//Name_Encrypted__c = nObj.LastName_Encrypted__c,
- Department_Class__c = nObj.Strategic_dept_Class__c,
+ Department_Class__c = nObj.Strategic_dept_Class__c,
Type__c = nObj.Type__c,
//Type_Encrypted__c = nObj.Type_Encrypted__c,
Doctor_Division1__c = nObj.Doctor_Division1__c
@@ -169,22 +158,22 @@
if (targetContactMap.size() > 0) {
List<Agency_Contact__c> temp = targetContactMap.values();
upsert temp ContactId18__c;
- system.debug('temp='+temp);
- EncryptInsert(temp,ContactMap);
+ system.debug('temp=' + temp);
+ EncryptInsert(temp, ContactMap);
}
}
-
- static void EncryptInsert(List<Agency_Contact__c> aclist,Map < Id, Contact > ContactMap){
- if(!(system.isFuture() || system.isBatch())){
+
+ static void EncryptInsert(List<Agency_Contact__c> aclist, Map<Id, Contact> ContactMap) {
+ if (!(system.isFuture() || system.isBatch())) {
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-27 start
//AwsServiceTool2.EncryptPushFuture(Json.serialize(aclist), 'Agency_Contact__c');
- Map<String,PIHelper.PIIntegration> staticResource = new Map<String,PIHelper.PIIntegration>();
- staticResource.put('Contact',PIHelper.getPIIntegrationInfo('Contact'));
- staticResource.put('Agency_Contact__c',PIHelper.getPIIntegrationInfo('Agency_Contact__c'));
- Map<String, Map<String, PI_Field_Policy_Detail__c>> mmsp = new Map<String, Map<String,PI_Field_Policy_Detail__c>>();
+ Map<String, PIHelper.PIIntegration> staticResource = new Map<String, PIHelper.PIIntegration>();
+ staticResource.put('Contact', PIHelper.getPIIntegrationInfo('Contact'));
+ staticResource.put('Agency_Contact__c', PIHelper.getPIIntegrationInfo('Agency_Contact__c'));
+ Map<String, Map<String, PI_Field_Policy_Detail__c>> mmsp = new Map<String, Map<String, PI_Field_Policy_Detail__c>>();
for (String key : staticResource.keySet()) {
- mmsp.put(key, new Map<String,PI_Field_Policy_Detail__c>());
+ mmsp.put(key, new Map<String, PI_Field_Policy_Detail__c>());
for (PI_Field_Policy_Detail__c detail : staticResource.get(key).PIDetails) {
mmsp.get(key).put(detail.SF_Field_API_Name__c, detail);
}
@@ -192,13 +181,13 @@
System.debug('mmsp = ' + mmsp);
List<AWSServiceTool2V2.EncryptPushRequestBody> EncryptPushList = new List<AWSServiceTool2V2.EncryptPushRequestBody>();
- for(Agency_Contact__c ac : aclist){
+ for (Agency_Contact__c ac : aclist) {
AWSServiceTool2V2.EncryptPushRequestBody EncryptPush = new AWSServiceTool2V2.EncryptPushRequestBody();
- EncryptPush.dataId = ac.AWS_Data_Id__c != null ?ac.AWS_Data_Id__c:'';
+ EncryptPush.dataId = ac.AWS_Data_Id__c != null ? ac.AWS_Data_Id__c : '';
EncryptPush.sfRecordId = ac.Id;
EncryptPush.fieldsMapping = new Map<String, List<AWSServiceTool2V2.EncryptPushRes>>();
List<AWSServiceTool2V2.EncryptPushRes> resList = new List<AWSServiceTool2V2.EncryptPushRes>();
- AWSServiceTool2V2.EncryptPushRes res= new AWSServiceTool2V2.EncryptPushRes();
+ AWSServiceTool2V2.EncryptPushRes res = new AWSServiceTool2V2.EncryptPushRes();
res.isQueryDb = true;
res.value = '';
res.table = staticResource.get('Contact').awsTableName;
@@ -207,7 +196,7 @@
resList.add(res);
List<AWSServiceTool2V2.EncryptPushRes> resList2 = new List<AWSServiceTool2V2.EncryptPushRes>();
- AWSServiceTool2V2.EncryptPushRes res2= new AWSServiceTool2V2.EncryptPushRes();
+ AWSServiceTool2V2.EncryptPushRes res2 = new AWSServiceTool2V2.EncryptPushRes();
res2.isQueryDb = true;
res2.value = '';
res2.table = staticResource.get('Contact').awsTableName;
@@ -216,7 +205,7 @@
resList2.add(res2);
List<AWSServiceTool2V2.EncryptPushRes> resList3 = new List<AWSServiceTool2V2.EncryptPushRes>();
- AWSServiceTool2V2.EncryptPushRes res3= new AWSServiceTool2V2.EncryptPushRes();
+ AWSServiceTool2V2.EncryptPushRes res3 = new AWSServiceTool2V2.EncryptPushRes();
res3.isQueryDb = true;
res3.value = '';
res3.table = staticResource.get('Contact').awsTableName;
@@ -224,7 +213,7 @@
res3.field = mmsp.get('Contact').get('Doctor_Division1__c').AWS_Field_API__c;
resList3.add(res3);
- System.debug('Agency_Contact__c Name = ' +mmsp.get('Agency_Contact__c').get('Name').AWS_Field_API__c);
+ System.debug('Agency_Contact__c Name = ' + mmsp.get('Agency_Contact__c').get('Name').AWS_Field_API__c);
System.debug('resList = ' + resList);
EncryptPush.fieldsMapping.put(mmsp.get('Agency_Contact__c').get('Name').AWS_Field_API__c, resList);
EncryptPush.fieldsMapping.put(mmsp.get('Agency_Contact__c').get('Type__c').AWS_Field_API__c, resList2);
@@ -235,27 +224,29 @@
System.debug('EncryptPushListsfRecordId = ' + JSON.serialize(EncryptPushList[0].sfRecordId));
System.debug('EncryptPushListfieldsMapping = ' + JSON.serialize(EncryptPushList[0].fieldsMapping));
System.debug('EncryptPushList = ' + JSON.serialize(EncryptPushList));
- if(!Test.isRunningTest())
- AwsServiceTool2V2.EncryptPushFutureV2(Json.serialize(EncryptPushList),Json.serialize(aclist), 'Agency_Contact__c');
+ if (!Test.isRunningTest())
+ AwsServiceTool2V2.EncryptPushFutureV2(Json.serialize(EncryptPushList), Json.serialize(aclist), 'Agency_Contact__c');
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-27 end
- }else{
+ } else {
//Add By Li Jun for sync agency contact to aws 20220424 start
- if(!Test.isRunningTest()){
+ if (!Test.isRunningTest()) {
System.debug('ContactMap = ' + ContactMap);
- SyncAccountContactToAWS.assignOnceOneMinuteLater(aclist,ContactMap);
+ SyncAccountContactToAWS.assignOnceOneMinuteLater(aclist, ContactMap);
}
//Add By Li Jun for sync agency contact to aws 20220424 end
}
}
private void syncToAgencyContactDelete() {
- List < Id > cIdList = new List < Id > ();
- for (Contact oObj: oldList) {
+ List<Id> cIdList = new List<Id>();
+ for (Contact oObj : oldList) {
cIdList.add(oObj.Id);
}
if (cIdList.size() > 0) {
- List < Agency_Contact__c > acList = [Select Id From Agency_Contact__c
- Where Contact__c =: null and Agency_ID__c = '000000000000000'
+ List<Agency_Contact__c> acList = [
+ SELECT Id
+ FROM Agency_Contact__c
+ WHERE Contact__c = :null AND Agency_ID__c = '000000000000000'
];
if (acList.size() > 0) {
delete acList;
@@ -265,27 +256,30 @@
//鏇存柊缁忛攢鍟嗙敤鎴蜂汉鏁板瓧娈� 绮剧悽鎶�鏈� pk 2021-08-26 start
private void updateDealerNum() {
- Set < Id > accountSet = new Set < Id > ();
- Map < Id, Account > acMap = new Map < Id, Account > ();
+ Set<Id> accountSet = new Set<Id>();
+ Map<Id, Account> acMap = new Map<Id, Account>();
if (Trigger.isUpdate) {
- for (Contact contactnew: newList) {
- if (contactnew.Agency_User__c != oldMap.get(contactnew.Id).Agency_User__c || (System.Label.onlyUpdate == '1' && UserInfo.getUserId() == '00510000005sEEMAA2')) {
+ for (Contact contactnew : newList) {
+ if (
+ contactnew.Agency_User__c != oldMap.get(contactnew.Id).Agency_User__c ||
+ (System.Label.onlyUpdate == '1' &&
+ UserInfo.getUserId() == '00510000005sEEMAA2')
+ ) {
accountSet.add(contactnew.AccountId);
}
}
}
if (Trigger.isInsert) {
- for (Contact contactnew: newList) {
+ for (Contact contactnew : newList) {
if (contactnew.Agency_User__c) {
accountSet.add(contactnew.AccountId);
}
}
}
-
if (Trigger.isDelete) {
- for (Contact contactold: oldList) {
+ for (Contact contactold : oldList) {
if (contactold.Agency_User__c) {
accountSet.add(contactold.AccountId);
}
@@ -293,10 +287,13 @@
}
if (accountSet.size() > 0) {
- List < AggregateResult > contactList = [select count(id) ctn, AccountId accid from Contact where Agency_User__c = true and AccountId =: accountSet and RecordTypeId = '01210000000QfWi'
- group by AccountId
+ List<AggregateResult> contactList = [
+ SELECT count(id) ctn, AccountId accid
+ FROM Contact
+ WHERE Agency_User__c = TRUE AND AccountId = :accountSet AND RecordTypeId = '01210000000QfWi'
+ GROUP BY AccountId
];
- for (AggregateResult ar: contactList) {
+ for (AggregateResult ar : contactList) {
String accid = (String) ar.get('accid');
Account account = new Account();
account.id = accid;
@@ -304,7 +301,7 @@
acMap.put(accid, account);
}
- for (Id accountId: accountSet) {
+ for (Id accountId : accountSet) {
if (!acMap.containsKey(accountId)) {
Account account = new Account();
account.id = accountId;
@@ -317,17 +314,14 @@
update acMap.values();
}
}
-
-
}
//鏇存柊缁忛攢鍟嗙敤鎴蜂汉鏁板瓧娈� 绮剧悽鎶�鏈� pk 2021-08-26 end
-
+
//zhj 鏂版柟妗堟敼閫� 灏嗘墜鏈哄彿鍘婚噸鍙婂叾楠岃瘉瑙勫垯绉诲姩鍒癆WS鍜屽墠绔� start
// 鎵嬫満鍙峰幓閲嶅強瑙勫垯楠岃瘉 鍙婃柊澧炲鎴蜂汉鍛橀噸鍚嶉獙璇�
- public void mobileNumberVerification(){
-
+ public void mobileNumberVerification() {
// Pattern pattern = Pattern.compile('^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$');
- Map<String, Map<String,Contact>> accountContactMap = new Map<String, Map<String,Contact>>();
+ Map<String, Map<String, Contact>> accountContactMap = new Map<String, Map<String, Contact>>();
Set<Id> accountIdSet = new Set<Id>();
//鐢ㄦ埛瀵硅薄涓婃壘瀵瑰簲鐨勮仈绯讳汉
// List<User> userList=[select ID,ContactID from User where ContactID != null];
@@ -339,19 +333,23 @@
// }
//鏌ユ壘鑱旂郴浜哄璞′笂瀵瑰簲鐨勬湁鏁堝鎴凤紱鍖婚櫌鐩存帴浣跨敤鏈夋晥/鏃犳晥瀛楁銆佺粡閿�鍟嗕娇鐢ㄦ湁鏁�/鏃犳晥鍏紡瀛楁
List<String> accIdList = new List<String>();
- Map<String,String> accMap= new Map<String,String>();
- for (Contact contact1: newList) {
+ Map<String, String> accMap = new Map<String, String>();
+ for (Contact contact1 : newList) {
accIdList.add(contact1.AccountId);
}
- if (accIdList.size()>0){
- List<Account> accList=[select ID,Is_Active__c,Is_Active_Formula__c from Account where ID in:accIdList];
- if(accList.size()>0){
- for(Account acc:accList){
- if (String.isNotBlank(acc.Is_Active__c)){
+ if (accIdList.size() > 0) {
+ List<Account> accList = [
+ SELECT ID, Is_Active__c, Is_Active_Formula__c
+ FROM Account
+ WHERE ID IN :accIdList
+ ];
+ if (accList.size() > 0) {
+ for (Account acc : accList) {
+ if (String.isNotBlank(acc.Is_Active__c)) {
accMap.put(acc.Id, acc.Is_Active__c);
continue;
}
- if (String.isNotBlank(acc.Is_Active_Formula__c)){
+ if (String.isNotBlank(acc.Is_Active_Formula__c)) {
accMap.put(acc.Id, acc.Is_Active_Formula__c);
}
}
@@ -362,23 +360,25 @@
ID AgencyRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
for (Contact contactnew : newList) {
// 鎵嬫満鍙锋湁鍊煎苟涓旇仈绯讳汉鏈夋晥锛岃仈绯讳汉鐨勫鎴锋湁鏁堬紝杩涜鎵嬫満鍙风爜楠岃瘉
- if (('鏈夋晥'.equals(contactnew.Isactive__c) || '鏈夊姽'.equals(contactnew.Isactive__c))
- && ('鏈夊姽'.equals(accMap.get(contactnew.AccountId)) || '鏈夋晥'.equals(accMap.get(contactnew.AccountId)))) {
+ if (
+ ('鏈夋晥'.equals(contactnew.Isactive__c) || '鏈夊姽'.equals(contactnew.Isactive__c)) &&
+ ('鏈夊姽'.equals(accMap.get(contactnew.AccountId)) || '鏈夋晥'.equals(accMap.get(contactnew.AccountId)))
+ ) {
// 缁忛攢鍟嗗鎴蜂汉鍛樹笉杩涜鎵嬫満鍙锋牎楠� thh 20220517 start
- if(AgencyRecordTypeId.equals(contactnew.RecordTypeId)){
- if(String.isNotBlank(contactnew.MobilePhone)){
+ if (AgencyRecordTypeId.equals(contactnew.RecordTypeId)) {
+ if (String.isNotBlank(contactnew.MobilePhone)) {
// Matcher isMobilePhone = pattern.matcher(contactnew.MobilePhone);
// if (isMobilePhone.matches()) {
contactnew.UniqueNumber__c = contactnew.MobilePhone;
// } else {
- // 鎵嬫満鍙峰敮涓�瀛楁娓呯┖
- // contactnew.UniqueNumber__c = null;
+ // 鎵嬫満鍙峰敮涓�瀛楁娓呯┖
+ // contactnew.UniqueNumber__c = null;
// }
} else {
contactnew.UniqueNumber__c = null;
}
- // 缁忛攢鍟嗗鎴蜂汉鍛樹笉杩涜鎵嬫満鍙锋牎楠� thh 20220517 end
- }
+ // 缁忛攢鍟嗗鎴蜂汉鍛樹笉杩涜鎵嬫満鍙锋牎楠� thh 20220517 end
+ }
// else if(DoctorRecordTypeId.equals(contactnew.RecordTypeId)){
// if(String.isNotBlank(contactnew.MobilePhone_Encrypted__c)){
// contactnew.UniqueNumber__c = contactnew.MobilePhone_Encrypted__c;
@@ -389,9 +389,9 @@
}
// if (Trigger.isInsert) {
// if(DoctorRecordTypeId.equals(contactnew.RecordTypeId)){
- // accountIdSet.add(contactnew.AccountId);
+ // accountIdSet.add(contactnew.AccountId);
// }
- // }
+ // }
}
//鎵嬫満鍙峰敮涓�鏍¢獙-鍖婚櫌涓嬫柊寤哄鎴蜂汉鍛樻牎楠屼娇鐢ㄥ姞瀵嗘墜鏈哄彿,缁忛攢鍟嗕娇鐢ㄦ櫘閫氭墜鏈哄彿 thh 20220328 end
// 鏂板鍖婚櫌鑱旂郴浜烘椂
@@ -401,14 +401,14 @@
// contactList = [SELECT Id,AccountId,FullName__c,LastName,FirstName,Account.Name,CManageCode__c,IsFromSPO__c,
// LastName_Encrypted__c// 20220314 PI鏀归�� by Bright
// , MobilePhone_Encrypted__c // 閫氳繃濮撳悕+鎵嬫満鍙峰垽鏂汉鍛樻槸鍚﹂噸澶� thh 20220518
- // FROM Contact
+ // FROM Contact
// WHERE IsFromSPO__c = false AND AccountId IN:accountIdSet];
// }
// if(Trigger.isUpdate){
// contactList = [SELECT Id,AccountId,FullName__c,LastName,FirstName,Account.Name,CManageCode__c,IsFromSPO__c,
// LastName_Encrypted__c// 20220314 PI鏀归�� by Bright
// , MobilePhone_Encrypted__c // 閫氳繃濮撳悕+鎵嬫満鍙峰垽鏂汉鍛樻槸鍚﹂噸澶� thh 20220518
- // FROM Contact
+ // FROM Contact
// WHERE IsFromSPO__c = false AND AccountId IN:accountIdSet AND Id Not IN: oldMap.keyset()];
// }
// System.debug('contactList:' + contactList);
@@ -417,12 +417,12 @@
// // 閫氳繃濮撳悕+鎵嬫満鍙峰垽鏂汉鍛樻槸鍚﹂噸澶� thh 20220518 start
// // String lastNameStr = String.isNotBlank(contact.LastName) ? contact.LastName:'';
// // String firstNameStr = String.isNotBlank(contact.FirstName) ? contact.FirstName:'';
- // // String contactFullName = lastNameStr + firstNameStr + MobilePhoneStr;
+ // // String contactFullName = lastNameStr + firstNameStr + MobilePhoneStr;
// String contactFullName = contact.LastName_Encrypted__c + contact.MobilePhone_Encrypted__c;// 20220314 PI鏀归�� by Bright
// // 閫氳繃濮撳悕+鎵嬫満鍙峰垽鏂汉鍛樻槸鍚﹂噸澶� thh 20220518 end
// if(string.isBlank(contactFullName)){
// continue;
- // }
+ // }
// String accountId = String.valueOf(contact.AccountId).SubString(0,15);
// Map<String,Contact> contactFullNameMap = new Map<String,Contact>();
// if (accountContactMap.containsKey(accountId)) {
@@ -435,8 +435,8 @@
// }
// for (Contact contactnew: newList) {
- // if(AgencyRecordTypeId.equals(contactnew.RecordTypeId) || (Trigger.isUpdate && !oldMap.isEmpty() && oldMap.get(contactnew.Id) != null
- // && String.isBlank(oldMap.get(contactnew.Id).MobilePhone_Encrypted__c)
+ // if(AgencyRecordTypeId.equals(contactnew.RecordTypeId) || (Trigger.isUpdate && !oldMap.isEmpty() && oldMap.get(contactnew.Id) != null
+ // && String.isBlank(oldMap.get(contactnew.Id).MobilePhone_Encrypted__c)
// && String.isBlank(contactnew.MobilePhone_Encrypted__c))){
// continue;
// }
@@ -455,59 +455,63 @@
// // 璺宠繃娴嬭瘯绋嬪簭 鍜� SPO閫氳繃203鎺ュ彛鍒涘缓鐨勮仈绯讳汉
// if (!(Test.isRunningTest() || contactnew.IsFromSPO__c)) {
// // if(Trigger.isInsert) {
- // contactnew.LastName.addError('瀹㈡埛 [ '+accountName+ ' ],宸插瓨鍦ㄧ浉鍚屽悕瀛楃殑鑱旂郴浜� 浜哄憳绠$悊缂栫爜 ['+cManageCode+' ] 锛屼笉鑳介噸澶嶅垱寤猴紝璇蜂簡瑙�');
- // // }
+ // contactnew.LastName.addError('瀹㈡埛 [ '+accountName+ ' ],宸插瓨鍦ㄧ浉鍚屽悕瀛楃殑鑱旂郴浜� 浜哄憳绠$悊缂栫爜 ['+cManageCode+' ] 锛屼笉鑳介噸澶嶅垱寤猴紝璇蜂簡瑙�');
+ // // }
// // 瀹㈡埛浜哄憳鍒犻櫎鎵嬫満鍙锋椂,杩涜鍒ゆ柇鏄惁瀛樺湪鍚屽悕涓旀墜鏈哄彿涓虹┖鐨勫鎴蜂汉鍛� thh 20220523 start
// // if(Trigger.isUpdate && !UserInfo.getUserId().equals(System.Label.interfaceUserID)) {
// // if (String.isNotBlank(oldMap.get(contactnew.Id).MobilePhone_Encrypted__c) && String.isBlank(contactnew.MobilePhone_Encrypted__c)){
// // contactnew.LastName.addError('鐩稿悓鍚嶅瓧鐨勮仈绯讳汉 浜哄憳绠$悊缂栫爜 ['+cManageCode+' ] 鎵嬫満鍙蜂负绌哄凡缁忓瓨鍦紝涓嶈兘閲嶅鍒涘缓锛岃浜嗚В');
- // // }
+ // // }
// // if (oldMap.get(contactnew.Id).CManageCode__c != contactnew.CManageCode__c){
- // // contactnew.LastName.addError('瀹㈡埛 [ '+accountName+ ' ],宸插瓨鍦ㄧ浉鍚屽悕瀛楃殑鑱旂郴浜� 浜哄憳绠$悊缂栫爜 ['+cManageCode+' ] 锛屼笉鑳介噸澶嶅垱寤猴紝璇蜂簡瑙�');
+ // // contactnew.LastName.addError('瀹㈡埛 [ '+accountName+ ' ],宸插瓨鍦ㄧ浉鍚屽悕瀛楃殑鑱旂郴浜� 浜哄憳绠$悊缂栫爜 ['+cManageCode+' ] 锛屼笉鑳介噸澶嶅垱寤猴紝璇蜂簡瑙�');
// // }
// // }
// // 瀹㈡埛浜哄憳鍒犻櫎鎵嬫満鍙锋椂,杩涜鍒ゆ柇鏄惁瀛樺湪鍚屽悕涓旀墜鏈哄彿涓虹┖鐨勫鎴蜂汉鍛� thh 20220523 end
- // }
+ // }
// }
// }
// }
}
//zhj 鏂版柟妗堟敼閫� 灏嗘墜鏈哄彿鍘婚噸鍙婂叾楠岃瘉瑙勫垯绉诲姩鍒癆WS鍜屽墠绔� end
- public static Map<Id,Id> NFM606_IdMap = new Map<Id,Id>();
+ public static Map<Id, Id> NFM606_IdMap = new Map<Id, Id>();
// 606鎺ュ彛璋冪敤闂淇 thh 20220330 start
private void sendToComPlat() {
List<Id> contactIdList = new List<Id>();
List<String> interfaceUserUpsertContact = new List<String>();
- for (Contact local: newList) {
+ for (Contact local : newList) {
Contact old = null;
if (Trigger.isUpdate) {
old = oldMap.get(local.Id);
}
- if (Trigger.isInsert
- || old.LastName != local.LastName
- || old.FirstName != local.FirstName
- || old.Email != local.Email //銉°兗銉� Email
- || old.MobilePhone != local.MobilePhone //鎵嬫満鍙风爜 Mobile_Phone__c
- || old.Employee_No_manual__c != local.Employee_No_manual__c //鍛樺伐鍙风爜 Employee_No__c
- || old.Work_Location_manual__c != local.Work_Location_manual__c //宸ヤ綔鍦� Work_Location__c
- || old.Post_picklist__c != local.Post_picklist__c //鑱屼綅 post__c
- || old.Job_Category_picklist__c != local.Job_Category_picklist__c //鑱岀 Job_Category__c
- || old.Hire_date_text__c != local.Hire_date_text__c //鍏ヨ亴鏃� Hire_date__c
- || old.Gender_text__c != local.Gender_text__c //鎬у埆 Gender__c
- || old.dept__c != local.dept__c //鏈儴 dept__c
- || old.Pregnant_Rest__c != local.Pregnant_Rest__c // 鏄惁浜у亣 Pregnant_Rest__c
- || old.Stay_or_not__c != local.Stay_or_not__c // 鍦ㄨ亴/绂昏亴 Stay_or_not__c
- //|| old.Salesdepartment_Text__c != local.Salesdepartment_Text__c // 閿�鍞湰閮� Salesdepartment__c
- || old.AccountId != local.AccountId//瀹㈡埛浜哄憳鎹㈠鎴�
- || old.Isactive__c != local.Isactive__c//鐘舵�佸彉鏇�
- || old.ServicePlatformCode__c != local.ServicePlatformCode__c//鏈嶅姟骞冲彴缂栫爜
- || old.UnifiedI_Contact_ID__c != local.UnifiedI_Contact_ID__c//鏅烘収鍖荤枟缂栫爜
- || old.ContactType__c != local.ContactType__c//浜哄憳绫诲瀷
- || (old.ChargeState__c != local.ChargeState__c && local.RecordTypeId == AgencyId)//璐熻矗鐪� // 20220830 ljh LLIU-CHR8FF add
- ) {
+ if (
+ Trigger.isInsert ||
+ old.LastName != local.LastName ||
+ old.FirstName != local.FirstName ||
+ old.Email != local.Email || //銉°兗銉� Email
+ old.MobilePhone != local.MobilePhone || //鎵嬫満鍙风爜 Mobile_Phone__c
+ old.Employee_No_manual__c != local.Employee_No_manual__c || //鍛樺伐鍙风爜 Employee_No__c
+ old.Work_Location_manual__c != local.Work_Location_manual__c || //宸ヤ綔鍦� Work_Location__c
+ old.Post_picklist__c != local.Post_picklist__c || //鑱屼綅 post__c
+ old.Job_Category_picklist__c != local.Job_Category_picklist__c || //鑱岀 Job_Category__c
+ old.Hire_date_text__c != local.Hire_date_text__c || //鍏ヨ亴鏃� Hire_date__c
+ old.Gender_text__c != local.Gender_text__c || //鎬у埆 Gender__c
+ old.dept__c != local.dept__c || //鏈儴 dept__c
+ old.Pregnant_Rest__c != local.Pregnant_Rest__c || // 鏄惁浜у亣 Pregnant_Rest__c
+ old.Stay_or_not__c != local.Stay_or_not__c || // 鍦ㄨ亴/绂昏亴 Stay_or_not__c
+ //|| old.Salesdepartment_Text__c != local.Salesdepartment_Text__c // 閿�鍞湰閮� Salesdepartment__c
+ old.AccountId != local.AccountId || //瀹㈡埛浜哄憳鎹㈠鎴�
+ old.Isactive__c != local.Isactive__c || //鐘舵�佸彉鏇�
+ old.ServicePlatformCode__c != local.ServicePlatformCode__c || //鏈嶅姟骞冲彴缂栫爜
+ old.UnifiedI_Contact_ID__c != local.UnifiedI_Contact_ID__c || //鏅烘収鍖荤枟缂栫爜
+ old.ContactType__c != local.ContactType__c || //浜哄憳绫诲瀷
+ (old.ChargeState__c != local.ChargeState__c &&
+ local.RecordTypeId == AgencyId) //璐熻矗鐪� // 20220830 ljh LLIU-CHR8FF add
+ ) {
//鑾峰彇瀹㈡埛浜哄憳鐨勮褰曠被鍨婭D thh 20220330 start
- ID InternalStaffRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Internal_staff').getRecordTypeId();
+ ID InternalStaffRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName()
+ .get('Internal_staff')
+ .getRecordTypeId();
ID DoctorRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Doctor').getRecordTypeId();
ID AgencyRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
//鑾峰彇瀹㈡埛浜哄憳鐨勮褰曠被鍨婭D thh 20220330 end
@@ -516,11 +520,11 @@
// gzw 20220824 bugfix start
// if (!local.IsFromSPO__c && !InternalStaffRecordTypeId.equals(local.RecordTypeId)) {
if (!InternalStaffRecordTypeId.equals(local.RecordTypeId)) {
- // gzw 20220824 bugfix end
+ // gzw 20220824 bugfix end
// 鍖婚櫌 瀹㈡埛浜哄憳 缁熶竴骞冲彴缂栫爜鏈夊�� 鍙戦�� PO
if (DoctorRecordTypeId.equals(local.RecordTypeId) && String.isNotBlank(local.UnifiedI_Contact_ID__c)) {
if (!NFM606_IdMap.containsKey(local.Id)) {
- if(UserInfo.getUserId().equals(System.Label.interfaceUserID)){
+ if (UserInfo.getUserId().equals(System.Label.interfaceUserID)) {
interfaceUserUpsertContact.add(local.Id);
} else {
contactIdList.add(local.Id);
@@ -531,7 +535,7 @@
// 缁忛攢鍟� 瀹㈡埛浜哄憳 鎵嬫満鍙风爜鏈夊�� 鍙戦�� PO
if (AgencyRecordTypeId.equals(local.RecordTypeId) && String.isNotBlank(local.MobilePhone)) {
if (!NFM606_IdMap.containsKey(local.Id)) {
- if(UserInfo.getUserId().equals(System.Label.interfaceUserID)){
+ if (UserInfo.getUserId().equals(System.Label.interfaceUserID)) {
interfaceUserUpsertContact.add(local.Id);
} else {
contactIdList.add(local.Id);
@@ -540,41 +544,41 @@
}
}
}
-
}
}
//606鏍囪
- if(!System.Test.isRunningTest()){
+ if (!System.Test.isRunningTest()) {
// NFM606Controller.executeNotFuture('', contactIdList);
if (contactIdList.size() > 0) {
// NFM606Controller.callout('', contactIdList);
- //娣诲姞future 鍒ゆ柇 add for pipl sushanhu 20220317 start
+ //娣诲姞future 鍒ゆ柇 add for pipl sushanhu 20220317 start
// if (!(System.isFuture()||System.isBatch())) {
NFM606Controller.callout('', contactIdList);
+
// } else{
- // NFM606Controller.executeNotFuture('', contactIdList);
+ // NFM606Controller.executeNotFuture('', contactIdList);
// }
- //娣诲姞future 鍒ゆ柇 add for pipl sushanhu 20220317 end
+ //娣诲姞future 鍒ゆ柇 add for pipl sushanhu 20220317 end
}
if (interfaceUserUpsertContact.size() > 0) {
NFM606Controller.executeNotFuture('', interfaceUserUpsertContact);
//娣诲姞future 鍒ゆ柇 add for pipl sushanhu 20220316 start
// if (!(System.isFuture()||System.isBatch())) {
- // NFM606Controller.executeNotFuture('', interfaceUserUpsertContact);
+ // NFM606Controller.executeNotFuture('', interfaceUserUpsertContact);
// }
- //娣诲姞future 鍒ゆ柇 add for pipl sushanhu 20220316 end
+ //娣诲姞future 鍒ゆ柇 add for pipl sushanhu 20220316 end
}
- }
+ }
}
// 606鎺ュ彛璋冪敤闂淇 thh 20220330 end
// 20220830 ljh LLIU-CHR8FF add start
- private void updateChargeState(){
+ private void updateChargeState() {
List<Contact> contactL = new List<Contact>();
for (Contact nObj : newList) {
- if(nObj.RecordTypeId == AgencyId && String.isBlank(nObj.ChargeState__c)){
+ if (nObj.RecordTypeId == AgencyId && String.isBlank(nObj.ChargeState__c)) {
Contact cnew = new Contact();
cnew.Id = nObj.Id;
- cnew.ChargeState__c = nObj.ChargeState_F__c;
+ cnew.ChargeState__c = nObj.ChargeState_F__c;
contactL.add(cnew);
}
}
@@ -583,6 +587,4 @@
}
}
// 20220830 ljh LLIU-CHR8FF add end
-
-
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/DealerInquiryModifyStateController.cls b/force-app/main/default/classes/DealerInquiryModifyStateController.cls
index f65c671..d46bcca 100644
--- a/force-app/main/default/classes/DealerInquiryModifyStateController.cls
+++ b/force-app/main/default/classes/DealerInquiryModifyStateController.cls
@@ -1,23 +1,23 @@
public with sharing class DealerInquiryModifyStateController {
public List<OpportunityInfo> oppRecords { get; set; }
// 銉氥兗銈搞儸銈ゃ偄銈︺儓銇儏鍫便倰鍙栧緱
- private Map<String, Map<String, String>> editLayoutItemRWMap = New Map<String, Map<String, String>>();
+ private Map<String, Map<String, String>> editLayoutItemRWMap = new Map<String, Map<String, String>>();
// private Map<String, Map<String, String>> editLayoutItemRWMapRt = null;
public List<OpportunityInfo> OPPORTList { get; set; }
/*****************妞滅储鐢�******************/
/*******************妫�绱㈠睘鎬у��*******************/
- public String accSearch { get; set; }//缁忛攢鍟嗗尰闄�
- public String aooSearch { get; set; }//鎷呭綋浜�
+ public String accSearch { get; set; } //缁忛攢鍟嗗尰闄�
+ public String aooSearch { get; set; } //鎷呭綋浜�
public String numtext1 { get; set; } //鏁版嵁瀛楁01
- public String numtext { get; set; }//鏁版嵁瀛楁03
+ public String numtext { get; set; } //鏁版嵁瀛楁03
public String numtext2 { get; set; } //鏁版嵁瀛楁02
public String timetext1 { get; set; } //鏃ユ湡01
public String timetext2 { get; set; } //鏃ユ湡02
public Agency_Opportunity__c tmpAO { get; set; } //妫�绱㈡棩鏈熺敤
public Agency_Opportunity__c tmpBO { get; set; } //妫�绱㈡棩鏈熺敤
- public String limits { get; set; }//鏃ユ湡03
+ public String limits { get; set; } //鏃ユ湡03
public List<SelectOption> dateOpts { get; private set; }
public List<SelectOption> textOpts { get; private set; }
@@ -34,24 +34,28 @@
public String preSortKey { get; set; }
public Boolean sortOrderAsc { get; set; }
public String[] sortOrder { get; set; }
- public String[] columus = new String[] {'Id'};
+ public String[] columus = new List<String>{ 'Id' };
public String[] selColumus = null;
- public Set<String> columusSet = new Set<String> {'Id'};
+ public Set<String> columusSet = new Set<String>{ 'Id' };
// 椤圭洰set 瀛楁鏍囩
public List<String> titleLeft { get; private set; }
public List<String> titleRight { get; private set; }
// 椤圭洰set 瀛楁鍚�
- public List<List<String>> columnsLeftApi { get; private set; } // 鍙傜収闋呯洰鐢�
- public List<List<String>> columnsRightApi { get; private set; } // 鍙傜収闋呯洰鐢�
- public List<String> columnLeftCss { get; private set; } // css 鐢�
- public List<String> columnRightCss { get; private set; } // css 鐢�
- public Map<String, String> columnLeftRW { get; private set; } // r,w,wm鐢�
- public Map<String, String> columnRightRW { get; private set; } // r,w,wm鐢�
+ public List<List<String>> columnsLeftApi { get; private set; } // 鍙傜収闋呯洰鐢�
+ public List<List<String>> columnsRightApi { get; private set; } // 鍙傜収闋呯洰鐢�
+ public List<String> columnLeftCss { get; private set; } // css 鐢�
+ public List<String> columnRightCss { get; private set; } // css 鐢�
+ public Map<String, String> columnLeftRW { get; private set; } // r,w,wm鐢�
+ public Map<String, String> columnRightRW { get; private set; } // r,w,wm鐢�
private String strColumus;
private String strRtColumus;
- @TestVisible private String accTypeForSort = null;
+ //add by Link 2023-6-2
+ public String remindMsg { get; set; }
+
+ @TestVisible
+ private String accTypeForSort = null;
private static Integer oppLimit = 500;
public DealerInquiryModifyStateController() {
@@ -79,7 +83,7 @@
textOpts.add(new SelectOption('Oly_Inquiry_Stage__c', 'Oly璇环闃舵'));
//绮剧悽绉戞妧 zxk 2021-08-25 end
textOpts.add(new SelectOption('Hospital_City_Master__c', '甯�'));
-
+
// textOpts.add(new SelectOption('Agency_Hospital__r.Hospital__r.Salesdepartment_HP__c', '閿�鍞湰閮�'));
// textOpts.add(new SelectOption('Agency_Hospital__r.Hospital__r.State_Master__r.Name', '鐪�'));
// textOpts.add(new SelectOption('Agency_Hospital__r.Hospital__r.City_Master__r.Name', '甯�'));
@@ -124,6 +128,7 @@
}
public PageReference init() {
+ remindMsg = '';
PartnerSoapSforceCom.Soap soap = new PartnerSoapSforceCom.Soap();
soap.SessionHeader = new PartnerSoapSforceCom.SessionHeader_element();
soap.SessionHeader.sessionId = UserInfo.getSessionId();
@@ -155,7 +160,7 @@
layoutItem.layoutComponents.add(layoutComponent);
// return dlr;
} else {
- dlr = soap.describeLayout('Agency_Opportunity__c', null, null);
+ dlr = soap.describeLayout('Agency_Opportunity__c', null, null);
// dlr = soap.describeLayout('asdas', null, null);
}
@@ -173,8 +178,11 @@
for (PartnerSoapSforceCom.DescribeLayoutSection section : layout.editLayoutSections) {
for (PartnerSoapSforceCom.DescribeLayoutRow row : section.layoutRows) {
for (PartnerSoapSforceCom.DescribeLayoutItem item : row.layoutItems) {
- if (item.layoutComponents != null && item.layoutComponents.size() > 0
- && String.isBlank(item.layoutComponents[0].value) == false) {
+ if (
+ item.layoutComponents != null &&
+ item.layoutComponents.size() > 0 &&
+ String.isBlank(item.layoutComponents[0].value) == false
+ ) {
rtnInner.put(item.layoutComponents[0].value, 'r');
if (item.editableForUpdate) {
rtnInner.put(item.layoutComponents[0].value, 'w');
@@ -195,9 +203,10 @@
return null;
}
//鐢ㄤ簬鑾峰彇缁忛攢鍟嗚浠峰瓧娈甸泦鍜岃浠峰瓧娈甸泦浠ュ強鐩稿簲鐨勮鍐欐潈闄�
- @TestVisible private void setLayoutRWInfo() {
+ @TestVisible
+ private void setLayoutRWInfo() {
if (this.sortOrder == null) {
- selColumus = new String[] {};
+ selColumus = new List<String>{};
strColumus = '';
ID accRecordTypeId = accTypeForSort;
@@ -276,14 +285,14 @@
strRtColumus = strRtColumus + ',' + s;
}
columnRightCss.add(s.replace('.', '_'));
-
}
strColumus = String.join(columus, ',');
System.debug('======-======-======strColumus' + strColumus);
System.debug('======-======-======strRtColumus' + strRtColumus);
this.sortOrderAsc = true;
- this.sortOrder = new String[selColumus.size()];
- for (Integer i = 0; i < selColumus.size(); i++) this.sortOrder[i] = '銆�';
+ this.sortOrder = new List<String>(selColumus.size());
+ for (Integer i = 0; i < selColumus.size(); i++)
+ this.sortOrder[i] = '銆�';
}
}
//鐢ㄤ簬鎷兼帴SOQL璇彞 鏍规嵁涓嶅悓妫�绱㈡潯浠舵嫾鎺ヤ笉鍚孲OQL璇彞銆�
@@ -305,14 +314,17 @@
// System.debug('pppqqq333'+querySoql);
// AND Ownerid in ( '+querySoql+')'
- String soql = 'SELECT Change_To_Opportunity__r.Id , Agency_Hospital__r.Name , Product_Category1__r.Name , Product_Category2__r.Name , Product_Category3__r.Name , Agency_Person__r.Name , Agency__r.Name , Change_To_Opportunity__r.Name ,' +
- strColumus + ',' + strRtColumus +
- ' FROM Agency_Opportunity__c WHERE recordType.DeveloperName = \'Opportunity\' ';
+ String soql =
+ 'SELECT Change_To_Opportunity__r.Id , Agency_Hospital__r.Name , Product_Category1__r.Name , Product_Category2__r.Name , Product_Category3__r.Name , Agency_Person__r.Name , Agency__r.Name , Change_To_Opportunity__r.Name ,' +
+ strColumus +
+ ',' +
+ strRtColumus +
+ ' FROM Agency_Opportunity__c WHERE recordType.DeveloperName = \'Opportunity\' ';
//鏁版嵁瀛楁锛氱粡閿�鍟嗗尰闄� +SOQL
if (!String.isBlank(accSearch)) {
accSearch = accSearch.trim();
// soql += 'AND Agency__r.Name ' + ' LIKE \'%' + accSearch + '%\' ';
- soql += 'AND Agency_Hospital__r.Name ' + ' LIKE \'%' + accSearch + '%\' ';
+ soql += 'AND Agency_Hospital__r.Name ' + ' LIKE \'%' + accSearch + '%\' ';
}
//鏁版嵁瀛楁锛氭媴褰撲汉 +SOQL
if (!String.isBlank(aooSearch)) {
@@ -323,7 +335,7 @@
//鏁版嵁瀛楁锛�03 鎵嬪姩濉啓椤� 鍑嗗璋冪敤makeTextSql锛�
if (!String.isBlank(numtext)) {
String newNumtext = numtext.trim();
- String str = makeTextSql(numtext1, numtext2, newNumtext);
+ String str = makeTextSql(numtext1, numtext2, newNumtext);
soql += str;
System.debug('+++++++++++++=============++++++++++++++++++' + soql);
}
@@ -333,9 +345,21 @@
soql += ' order by LastModifiedDate desc limit ' + Integer.valueOf(limits);
} else {
if (Integer.valueOf(this.sortKey) <= titleLeft.size() + 7) {
- soql += ' order by ' + this.selColumus[Integer.valueOf(this.sortKey)] + ' ' + (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last') + ' limit ' + Integer.valueOf(limits);
+ soql +=
+ ' order by ' +
+ this.selColumus[Integer.valueOf(this.sortKey)] +
+ ' ' +
+ (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last') +
+ ' limit ' +
+ Integer.valueOf(limits);
} else {
- soql += ' order by Change_To_Opportunity__r.' + this.selColumus[Integer.valueOf(this.sortKey)] + ' ' + (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last') + ' limit ' + Integer.valueOf(limits);
+ soql +=
+ ' order by Change_To_Opportunity__r.' +
+ this.selColumus[Integer.valueOf(this.sortKey)] +
+ ' ' +
+ (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last') +
+ ' limit ' +
+ Integer.valueOf(limits);
}
}
system.debug(soql);
@@ -343,7 +367,7 @@
// System.debug('pppqqq111'+userlist1);
List<Agency_Opportunity__c> InfoList = Database.query(soql);
- System.debug('+++++++-------------------'+InfoList);
+ System.debug('+++++++-------------------' + InfoList);
// List<Agency_Opportunity__c> InfoList = ControllerUtil.DatabaseQuery(soql);
// System.debug('InfoList[0].Change_To_Opportunity_T__c'+InfoList[0].Change_To_Opportunity_T__c);
@@ -359,7 +383,6 @@
str = '\'' + agc.Change_To_Opportunity__r.Id + '\'';
} else if (agc.Change_To_Opportunity__r.Id != null) {
str += ',\'' + agc.Change_To_Opportunity__r.Id + '\'';
-
}
}
for (Agency_Opportunity__c info : InfoList) {
@@ -372,14 +395,24 @@
//鏄剧ず鎻愮ず鎿嶄綔淇℃伅
if (String.isBlank(this.saveType) && String.isBlank(this.sortKey)) {
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '鍙栧緱鏈�杩戠殑 ' + oppCount + ' 鏉℃暟鎹�'));
+ //add by Link 2023-6-2
+ remindMsg = '鍙栧緱鏈�杩戠殑 ' + oppCount + ' 鏉℃暟鎹�';
} else if (!String.isBlank(this.sortKey)) {
if (oppCount > oppLimit) {
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '鏁版嵁瓒呰繃' + oppLimit + '浠讹紝鍙樉绀哄墠' + oppLimit + '浠�'));
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.INFO, '鏁版嵁瓒呰繃' + oppLimit + '浠讹紝鍙樉绀哄墠' + oppLimit + '浠�')
+ );
+ //add by Link 2023-6-2
+ remindMsg = '鏁版嵁瓒呰繃' + oppLimit + '浠讹紝鍙樉绀哄墠' + oppLimit + '浠�';
} else {
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '鍏辨湁 ' + oppCount + ' 鏉℃暟鎹�'));
+ //add by Link 2023-6-2
+ remindMsg = '鍏辨湁 ' + oppCount + ' 鏉℃暟鎹�';
}
} else {
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '鍏辨湁 ' + oppCount + ' 鏉℃暟鎹�'));
+ //add by Link 2023-6-2
+ remindMsg = '鍏辨湁 ' + oppCount + ' 鏉℃暟鎹�';
}
}
//妫�绱㈡潯浠讹細鏁版嵁瀛楁1锛屾暟鎹瓧娈�2锛屾暟鎹瓧娈�3鍧囨弧瓒宠繘鍏ユ鏂规硶 鍒ゆ柇澶氱鎯呭喌
@@ -395,7 +428,6 @@
String cSql = '';
soql += ' AND (';
for (Integer icount = 0; icount < vals.size(); icount++) {
-
//绮剧悽绉戞妧 zxk 2021-08-25 start
String val = vals[icount];
if (equalOpts == 'contains') {
@@ -412,10 +444,8 @@
soql += ' AND ';
}
}
-
}
//绮剧悽绉戞妧 zxk 2021-08-25 end
-
// String val = vals[icount];
// cSql = this.makeTextSqlStr(textOpts, equalOpts, val);
@@ -459,7 +489,6 @@
else if (equalOpts == '=' || equalOpts == '<>') {
soql += 'AND ' + textOpts + equalOpts + '\'' + numtext + '\'';
}
-
//绮剧悽绉戞妧 zxk 2021-08-25 start
//璧峰瀛楃
else if (equalOpts == 'starts with' && numtext.contains(' ')) {
@@ -468,15 +497,13 @@
for (Integer icount = 0; icount < vals.size(); icount++) {
String val = vals[icount];
if (equalOpts == 'starts with') {
- soql += ' ' + textOpts + ' LIKE \'%' + val + '%\'' ;
+ soql += ' ' + textOpts + ' LIKE \'%' + val + '%\'';
if (icount < vals.size() - 1) {
soql += ' OR ';
-
}
}
}
soql += ')';
-
}
//绮剧悽绉戞妧 zxk 2021-08-25 end
@@ -497,22 +524,23 @@
return soql;
}
//妫�绱㈡潯浠讹細鏁版嵁瀛楁1锛屾暟鎹瓧娈�2锛屾暟鎹瓧娈�3鍧囨弧瓒筹紝骞朵笖杩涘叆makeTextSql锛堬級涔嬪悗锛屽唴鍚暟鎹瓧娈靛寘鍚绉嶆椂杩涘叆姝ゆ柟娉曘��
- @TestVisible private String makeTextSqlStr(String textOpts, String equalOpts, String val) {
+ @TestVisible
+ private String makeTextSqlStr(String textOpts, String equalOpts, String val) {
String soql = '';
if (!String.isBlank(textOpts)) {
String tmpVal = val;
if (!String.isBlank(tmpVal)) {
if (equalOpts == 'contains' || equalOpts == 'notcontains') {
if (equalOpts == 'contains') {
- soql += ' ' + textOpts + ' LIKE \'%' + val + '%\'' ;
+ soql += ' ' + textOpts + ' LIKE \'%' + val + '%\'';
} else if (equalOpts == 'notcontains') {
- soql += ' ( NOT ' + textOpts + ' LIKE \'%' + val + '%\' ) ' ;
+ soql += ' ( NOT ' + textOpts + ' LIKE \'%' + val + '%\' ) ';
}
} else if (equalOpts == '=' || equalOpts == '<>') {
if (equalOpts == '=') {
- soql += ' AND ' + textOpts + ' = ' + val ;
+ soql += ' AND ' + textOpts + ' = ' + val;
} else if (equalOpts == '<>') {
- soql += ' AND ' + textOpts + ' <> ' + val ;
+ soql += ' AND ' + textOpts + ' <> ' + val;
}
}
} else {
@@ -551,7 +579,6 @@
if (oi.changeFlg == '1') {
oi.changeFlg = '0';
updTarget.add(oi.AgcOpp);
-
}
// if (oi.changeFlgRt == '1' && oi.opp.id != null) {
// oi.changeFlgRt = '0';
@@ -559,13 +586,15 @@
// }
}
if (updTarget.size() > 0) {
- system.debug('updTarget.size:' + updTarget.size() );
+ system.debug('updTarget.size:' + updTarget.size());
update updTarget;
}
// if (updOpps.size() > 0) {
// update updOpps;
// }
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '淇濆瓨瀹屼簡'));
+ //add by Link 2023-6-2
+ remindMsg = '淇濆瓨瀹屼簡';
} catch (Exception e) {
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '璇风‘瀹氱瀹ゅ垎绫诲拰浜у搧鍖哄垎鐨勫叧绯�'));
}
@@ -627,4 +656,4 @@
AgcOpp = record;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/DealerInquiryModifyStateControllerTest.cls b/force-app/main/default/classes/DealerInquiryModifyStateControllerTest.cls
index 9832e45..0ad62f6 100644
--- a/force-app/main/default/classes/DealerInquiryModifyStateControllerTest.cls
+++ b/force-app/main/default/classes/DealerInquiryModifyStateControllerTest.cls
@@ -1,51 +1,64 @@
@isTest
private class DealerInquiryModifyStateControllerTest {
- @TestSetup static void init() {
- List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
+ @TestSetup
+ static void init() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
if (rectCo.size() == 0) {
return;
}
- List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'];
+ List<RecordType> rectSct = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'
+ ];
if (rectSct.size() == 0) {
return;
}
- List<RecordType> rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '瑷虹檪绉� 娑堝寲绉�'];
+ List<RecordType> rectDpt = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '瑷虹檪绉� 娑堝寲绉�'
+ ];
if (rectDpt.size() == 0) {
return;
}
// 銉嗐偣銉堛儑銉笺偪
-
+
Account company = new Account();
company.RecordTypeId = rectCo[0].Id;
- company.Name = 'NFM007TestCompany';
+ company.Name = 'NFM007TestCompany';
insert company;
Account section = new Account();
section.RecordTypeId = rectSct[0].Id;
- section.Name = '*';
+ section.Name = '*';
section.Department_Class_Label__c = '娑堝寲绉�';
- section.ParentId = company.Id;
+ section.ParentId = company.Id;
section.Hospital_Department_Class__c = company.Id;
insert section;
// Test.startTest();
Account depart = new Account();
depart.RecordTypeId = rectDpt[0].Id;
- depart.Name = '*';
- depart.Department_Name__c = 'NFM007TestDepart';
- depart.ParentId = section.Id;
+ depart.Name = '*';
+ depart.Department_Name__c = 'NFM007TestDepart';
+ depart.ParentId = section.Id;
depart.Department_Class__c = section.Id;
- depart.Hospital__c = company.Id;
+ depart.Hospital__c = company.Id;
insert depart;
Opportunity opp = new Opportunity();
- opp.AccountId = depart.Id;
+ opp.AccountId = depart.Id;
opp.Department_Class__c = section.Id;
- opp.Hospital__c = company.Id;
- opp.SAP_Send_OK__c = false;
- opp.Name = 'GZ-SP-NFM007_1';
- opp.Trade__c = '鍐呰部';
- opp.StageName = '寮曞悎';
- opp.CloseDate = date.newinstance(2022, 11, 30);
+ opp.Hospital__c = company.Id;
+ opp.SAP_Send_OK__c = false;
+ opp.Name = 'GZ-SP-NFM007_1';
+ opp.Trade__c = '鍐呰部';
+ opp.StageName = '寮曞悎';
+ opp.CloseDate = Date.today();
opp.Stock_apply_status__c = '鐢宠涓�';
insert opp;
Test.startTest();
@@ -60,17 +73,16 @@
contact1.LastName = 'test1鍖婚櫌';
contact1.Agency_User__c = true;
insert contact1;
- List<Contact> contactlist = [select Id, FirstName
- from Contact
- ];
+ List<Contact> contactlist = [
+ SELECT Id, FirstName
+ FROM Contact
+ ];
System.assertEquals('璨换鑰�', contactlist[0].FirstName);
-
-
//
User user = new User();
- Profile p = [select Id from Profile where Name = '901_缁忛攢鍟嗘椿鍔ㄧ郴缁�'];
+ Profile p = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗘椿鍔ㄧ郴缁�'];
user.ProfileId = p.Id;
user.ContactId = contact1.Id;
user.FirstName = '銉︺兗銈躲兗';
@@ -84,9 +96,14 @@
user.Alias = '銉嗐儲';
user.CommunityNickname = '銉嗐偣銉堛儲銉笺偠銉�';
user.SalesManager__c = UserInfo.getUserId();
-
- insert user;
- List<user> users = [select Id, Name, LastName, FirstName from User where LastName = '銉嗐偣銉�'];
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert user;
+ }
+ List<user> users = [
+ SELECT Id, Name, LastName, FirstName
+ FROM User
+ WHERE LastName = '銉嗐偣銉�'
+ ];
//
Agency_Hospital_Link__c agency_hospital_link = new Agency_Hospital_Link__c();
@@ -99,9 +116,14 @@
//
//System.assertEquals('銉嗐偣銉�',users[0].LastName);
- System.assertEquals('銉︺兗銈躲兗', users[0].FirstName );
+ System.assertEquals('銉︺兗銈躲兗', users[0].FirstName);
- Id rtId = [select Id, DeveloperName from RecordType where IsActive = true and SobjectType = 'Agency_Opportunity__c' and DeveloperName = 'Opportunity'].Id;
+ Id rtId = [
+ SELECT Id, DeveloperName
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Agency_Opportunity__c' AND DeveloperName = 'Opportunity'
+ ]
+ .Id;
// Schema.SobjectType.Agency_Opportunity__c.getRecordTypeInfosByName().get('璇环').getRecordTypeId();
Agency_opportunity__c agency_opportunity = new Agency_opportunity__c();
agency_opportunity.RecordTypeId = rtId;
@@ -112,25 +134,22 @@
agency_opportunity.StageName__c = '杩樻病鐢宠棰勭畻';
agency_opportunity.OwnerId = user.Id;
agency_opportunity.Change_To_Opportunity_T__c = '::CF-HQ290I';
- agency_opportunity.Sales_Manager__c =UserInfo.getUserId();
+ agency_opportunity.Sales_Manager__c = UserInfo.getUserId();
insert agency_opportunity;
Test.stopTest();
-
}
static testMethod void myUnitTest_SortKey() {
- Test.startTest();
+ Test.startTest();
Test.setMock(WebServiceMock.class, new NFMTest_Mock());
Test.stopTest();
PageReference page = new PageReference('/apex/DealerInquiryModifyState');
System.Test.setCurrentPage(page);
-
// 鍒濆鍖栨祴璇�
DealerInquiryModifyStateController controller = new DealerInquiryModifyStateController();
-
-
+
controller.init();
//System.assertEquals(1, controller.oppRecords.size());楠岃瘉棰勬湡鍊煎拰缁撴灉鍊兼纭��
// 鎺掑簭娴嬭瘯
@@ -145,7 +164,7 @@
// Test.stopTest();
}
static testMethod void myUnitTest_AccSearchAndAoosearch() {
- Test.startTest();
+ Test.startTest();
Test.setMock(WebServiceMock.class, new NFMTest_Mock());
Test.stopTest();
PageReference page = new PageReference('/apex/DealerInquiryModifyState');
@@ -153,7 +172,7 @@
DealerInquiryModifyStateController controller = new DealerInquiryModifyStateController();
// 鍒濆鍖栨祴璇�
// Test.startTest();
-
+
controller.init();
//鏂囨湰杈撳叆妗嗘绱�
//1:缁忛攢鍟嗗尰闄�
@@ -342,8 +361,7 @@
controller.chick();
controller.tmpBO.MaxActivityDate__c = date.valueOf('2018-02-09');
controller.chick();
- Test.stopTest();
-
+ Test.stopTest();
}
static testMethod void myUnitTestTime02() {
PageReference page = new PageReference('/apex/DealerInquiryModifyState');
@@ -378,7 +396,6 @@
controller.tmpBO.MaxActivityDate__c = date.valueOf('2018-02-09');
controller.chick();
Test.stopTest();
-
}
static testMethod void myUnitTestTimeSave() {
PageReference page = new PageReference('/apex/DealerInquiryModifyState');
@@ -417,4 +434,4 @@
controller.init();
Test.stopTest();
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/EquipmentSetShippmentReceived3Controller.cls b/force-app/main/default/classes/EquipmentSetShippmentReceived3Controller.cls
index ae50a30..cb07732 100644
--- a/force-app/main/default/classes/EquipmentSetShippmentReceived3Controller.cls
+++ b/force-app/main/default/classes/EquipmentSetShippmentReceived3Controller.cls
@@ -5,17 +5,17 @@
public Rental_Apply_Equipment_Set__c es { get; set; }
public List<EsdInfo> esdList { get; set; }
public Boolean saveBtnDisabled { get; private set; }
- public boolean ReturnRefuse {get;private set;}
- public String ErrorMessage {get; set;}
+ public boolean ReturnRefuse { get; private set; }
+ public String ErrorMessage { get; set; }
// public String CDSFinished {get;set;}
// public boolean LostFlg {get;set;}
public String Step_status { get; private set; }
public Boolean needCDS { get; private set; }
public Boolean done_flg { get; set; }
- public String Raid {get;set;}
- public String ApplyId {get;set;}
- public String CheckedId {get;set;}
- public String UnCheckedId {get;set;}
+ public String Raid { get; set; }
+ public String ApplyId { get; set; }
+ public String CheckedId { get; set; }
+ public String UnCheckedId { get; set; }
private String Id;
public Integer getEsdListSize() {
@@ -23,7 +23,7 @@
}
public EquipmentSetShippmentReceived3Controller() {
-// Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
+ // Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
Id = ApexPages.currentPage().getParameters().get('id');
if (Step_status == null) {
Step_status = ApexPages.currentPage().getParameters().get('step');
@@ -32,20 +32,23 @@
}
public PageReference searchSlip() {
- Map<String,boolean> esdIdMap = new Map<String,boolean>();
+ Map<String, boolean> esdIdMap = new Map<String, boolean>();
for (EsdInfo esd : esdList) {
if (!esd.hasSended)
- esdIdMap.put(esd.rec.Id, esd.isChecked);
+ esdIdMap.put(esd.rec.Id, esd.isChecked);
}
- String qryString = 'select Combine_Pack__c, Name, Id, DeliveryCompany_SlipNo__c,DeliveryType__c,Distributor_method__c,DeliveryCompany__c,Wh_Staff__c '
- + 'from FixtureDeliverySlip__c '
- + 'where Name =\''+ slip.Name +'\' and DeliveryType__c = \'鍙戣揣\'';
+ String qryString =
+ 'select Combine_Pack__c, Name, Id, DeliveryCompany_SlipNo__c,DeliveryType__c,Distributor_method__c,DeliveryCompany__c,Wh_Staff__c ' +
+ 'from FixtureDeliverySlip__c ' +
+ 'where Name =\'' +
+ slip.Name +
+ '\' and DeliveryType__c = \'鍙戣揣\'';
if (String.isNotBlank(slip.Distributor_method__c)) {
- qryString += ' and Distributor_method__c = \''+ slip.Distributor_method__c +'\'';
+ qryString += ' and Distributor_method__c = \'' + slip.Distributor_method__c + '\'';
}
if (String.isNotBlank(slip.DeliveryCompany__c)) {
- qryString += ' and DeliveryCompany__c = \''+ slip.DeliveryCompany__c +'\'';
+ qryString += ' and DeliveryCompany__c = \'' + slip.DeliveryCompany__c + '\'';
}
List<FixtureDeliverySlip__c> slipList = Database.query(qryString);
@@ -56,15 +59,57 @@
}
slip = slipList[0];
- List<Rental_Apply_Equipment_Set_Detail__c> eList = [select Rental_Apply__c, Rental_Apply__r.Shippment_ng_num__c, Rental_Apply__r.Pre_inspection_ng_num__c, SerialNumber_F__c, Rental_Apply_Equipment_Set__r.Inspection_not_finish__c, Fixture_Name_F__c, Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c,
- Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c,
- Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c,
- Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
- Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c
- from Rental_Apply_Equipment_Set_Detail__c
- where (DeliverySlip__c = :slip.Id or Id in :esdIdMap.keySet())
- and Cancel_Select__c = False and Return_DeliverySlip__c = null
- order by Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, Rental_Apply_Equipment_Set__r.Name, Rental_Apply_Equipment_Set__c, Name];
+ List<Rental_Apply_Equipment_Set_Detail__c> eList = [
+ SELECT
+ Rental_Apply__c,
+ Rental_Apply__r.Shippment_ng_num__c,
+ Rental_Apply__r.Pre_inspection_ng_num__c,
+ SerialNumber_F__c,
+ Rental_Apply_Equipment_Set__r.Inspection_not_finish__c,
+ Fixture_Name_F__c,
+ Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name,
+ Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name,
+ Rental_Apply_Equipment_Set__r.Name,
+ Pre_inspection_time__c,
+ StockDown__c,
+ StockDown_time__c,
+ Id,
+ Name,
+ Asset__c,
+ Asset__r.Name,
+ Asset__r.SerialNumber,
+ Asset__r.Product_Serial_No__c,
+ Asset__r.Remark__c,
+ Asset__r.ImageAsset__c,
+ Asset__r.ImageSerial__c,
+ Asset__r.ImageAssetUploadedTime__c,
+ Asset__r.ImageSerialUploadedTime__c,
+ Loaner_CDS_Info__c,
+ Inspection_result__c,
+ Check_lost_Item__c,
+ Pre_disinfection__c,
+ Water_leacage_check__c,
+ Inspection_result_after__c,
+ Arrival_in_wh__c,
+ Asset__r.Pre_Reserve_RAES_Detail__c,
+ Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
+ Inspection_result_after_ng__c,
+ Inspection_result_ng__c,
+ Lost_item_giveup__c,
+ CDS_complete__c,
+ Loaner_accsessary__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE
+ (DeliverySlip__c = :slip.Id
+ OR Id IN :esdIdMap.keySet())
+ AND Cancel_Select__c = FALSE
+ AND Return_DeliverySlip__c = NULL
+ ORDER BY
+ Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name,
+ Rental_Apply_Equipment_Set__r.Name,
+ Rental_Apply_Equipment_Set__c,
+ Name
+ ];
esdList.clear();
for (Rental_Apply_Equipment_Set_Detail__c esd : eList) {
@@ -85,11 +130,21 @@
List<String> ids = ApplyId.split(',');
Set<String> checkedIds = new Set<String>(CheckedId.split(':'));
CheckedId = null;
- List<Rental_Apply_Equipment_Set__c> esList = [select Rental_Apply__r.Name, First_RAESD_Model_No_F__c, First_RAESD__r.SerialNumber_F__c, First_RAESD__r.Loaner_asset_no__c, Rental_Apply__c, Id, RAES_Status__c, Name, Shippment_loaner_time2__c
- from Rental_Apply_Equipment_Set__c
- where (Rental_Apply__r.Name in :ids or Id in :ids)
- AND Cancel_Select__c = False
- order by Rental_Apply__r.Name, Id];
+ List<Rental_Apply_Equipment_Set__c> esList = [
+ SELECT
+ Rental_Apply__r.Name,
+ First_RAESD_Model_No_F__c,
+ First_RAESD__r.SerialNumber_F__c,
+ First_RAESD__r.Loaner_asset_no__c,
+ Rental_Apply__c,
+ Id,
+ RAES_Status__c,
+ Name,
+ Shippment_loaner_time2__c
+ FROM Rental_Apply_Equipment_Set__c
+ WHERE (Rental_Apply__r.Name IN :ids OR Id IN :ids) AND Cancel_Select__c = FALSE
+ ORDER BY Rental_Apply__r.Name, Id
+ ];
Set<Id> esIds = new Set<Id>();
Set<Id> esdIds = new Set<Id>();
Set<Id> applySet = new Set<Id>();
@@ -102,15 +157,55 @@
esdIds.add(raesd.rec.Id);
}
List<Rental_Apply_Equipment_Set_Detail__c> eList = [
- select Rental_Apply__c, Rental_Apply__r.Shippment_ng_num__c, Rental_Apply__r.Pre_inspection_ng_num__c, SerialNumber_F__c, Rental_Apply_Equipment_Set__r.Inspection_not_finish__c, Fixture_Name_F__c, Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c,
- Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c,
- Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c,
- Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
- Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c
- from Rental_Apply_Equipment_Set_Detail__c
- where Rental_Apply_Equipment_Set__c in :esIds and DeliverySlip__c = null and Return_DeliverySlip__c = null //and Inspection_result__c <> null and Shipment_request_time2__c <> null
- and Cancel_Select__c = False
- order by Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, Rental_Apply_Equipment_Set__r.Name, Rental_Apply_Equipment_Set__c, Name
+ SELECT
+ Rental_Apply__c,
+ Rental_Apply__r.Shippment_ng_num__c,
+ Rental_Apply__r.Pre_inspection_ng_num__c,
+ SerialNumber_F__c,
+ Rental_Apply_Equipment_Set__r.Inspection_not_finish__c,
+ Fixture_Name_F__c,
+ Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name,
+ Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name,
+ Rental_Apply_Equipment_Set__r.Name,
+ Pre_inspection_time__c,
+ StockDown__c,
+ StockDown_time__c,
+ Id,
+ Name,
+ Asset__c,
+ Asset__r.Name,
+ Asset__r.SerialNumber,
+ Asset__r.Product_Serial_No__c,
+ Asset__r.Remark__c,
+ Asset__r.ImageAsset__c,
+ Asset__r.ImageSerial__c,
+ Asset__r.ImageAssetUploadedTime__c,
+ Asset__r.ImageSerialUploadedTime__c,
+ Loaner_CDS_Info__c,
+ Inspection_result__c,
+ Check_lost_Item__c,
+ Pre_disinfection__c,
+ Water_leacage_check__c,
+ Inspection_result_after__c,
+ Arrival_in_wh__c,
+ Asset__r.Pre_Reserve_RAES_Detail__c,
+ Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
+ Inspection_result_after_ng__c,
+ Inspection_result_ng__c,
+ Lost_item_giveup__c,
+ CDS_complete__c,
+ Loaner_accsessary__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE
+ Rental_Apply_Equipment_Set__c IN :esIds
+ AND DeliverySlip__c = NULL
+ AND Return_DeliverySlip__c = NULL //and Inspection_result__c <> null and Shipment_request_time2__c <> null
+ AND Cancel_Select__c = FALSE
+ ORDER BY
+ Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name,
+ Rental_Apply_Equipment_Set__r.Name,
+ Rental_Apply_Equipment_Set__c,
+ Name
];
//esdList.clear();
for (Rental_Apply_Equipment_Set_Detail__c esd : eList) {
@@ -123,7 +218,7 @@
for (EsdInfo raesd : esdList) {
if (checkedIds.contains(raesd.rec.Rental_Apply_Equipment_Set__c)) {
raesd.isChecked = true;
- system.debug('========4esdList='+JSON.serialize(raesd));
+ system.debug('========4esdList=' + JSON.serialize(raesd));
}
}
return null;
@@ -140,33 +235,43 @@
ReturnRefuse = true;
ErrorMessage = '';
if (Id != null) {
- system.debug('==================='+Id);
+ system.debug('===================' + Id);
// 褰撳墠User
String userid = Userinfo.getUserId();
- User user = [select Id,Name from User where Id = :userid];
+ User user = [SELECT Id, Name FROM User WHERE Id = :userid];
List<Rental_Apply_Equipment_Set__c> esList;
List<String> ids = Id.split(',');
- esList = [select Rental_Apply__r.Name, First_RAESD_Model_No_F__c, First_RAESD__r.SerialNumber_F__c, First_RAESD__r.Loaner_asset_no__c, Rental_Apply__c, Id, RAES_Status__c, Name, Shippment_loaner_time2__c
- from Rental_Apply_Equipment_Set__c
- where (Rental_Apply__r.Name in :ids or Id in:ids)
- AND Cancel_Select__c = False
- order by Rental_Apply__r.Name, Id];
- // if (Step_status == '杩藉姞') {
+ esList = [
+ SELECT
+ Rental_Apply__r.Name,
+ First_RAESD_Model_No_F__c,
+ First_RAESD__r.SerialNumber_F__c,
+ First_RAESD__r.Loaner_asset_no__c,
+ Rental_Apply__c,
+ Id,
+ RAES_Status__c,
+ Name,
+ Shippment_loaner_time2__c
+ FROM Rental_Apply_Equipment_Set__c
+ WHERE (Rental_Apply__r.Name IN :ids OR Id IN :ids) AND Cancel_Select__c = FALSE
+ ORDER BY Rental_Apply__r.Name, Id
+ ];
+ // if (Step_status == '杩藉姞') {
//} else {
// // 澶囧搧set
- // esList = [select Rental_Apply__r.Name, First_RAESD_Model_No_F__c, First_RAESD__r.SerialNumber_F__c, First_RAESD__r.Loaner_asset_no__c, Rental_Apply__c, Id, RAES_Status__c, Name, Shippment_loaner_time__c
- // from Rental_Apply_Equipment_Set__c
- // where (Rental_Apply__r.Name = :Id or Id = :Id)
- // AND Cancel_Select__c = False
- // ];
+ // esList = [select Rental_Apply__r.Name, First_RAESD_Model_No_F__c, First_RAESD__r.SerialNumber_F__c, First_RAESD__r.Loaner_asset_no__c, Rental_Apply__c, Id, RAES_Status__c, Name, Shippment_loaner_time__c
+ // from Rental_Apply_Equipment_Set__c
+ // where (Rental_Apply__r.Name = :Id or Id = :Id)
+ // AND Cancel_Select__c = False
+ // ];
//}
//if (Step_status == '鏄庣粏') {
- slip.Wh_Staff__c = userid;
- slip.DeliveryType__c = '鍙戣揣';
+ slip.Wh_Staff__c = userid;
+ slip.DeliveryType__c = '鍙戣揣';
//}
- //List<Fixture_Set__c> esList = [select Id, Name, CDS_staff__c, Shippment_loaner_time__c, Received_loaner_time__c,
+ //List<Fixture_Set__c> esList = [select Id, Name, CDS_staff__c, Shippment_loaner_time__c, Received_loaner_time__c,
// delivery_company__c, Return_to_wh_staff__c, Return_to_wh_staff__r.Name, Fedex_number__c, Distributor_method__c,
// Return_delivery_company__c,Return_wh_chenk_staff__c, Received_confirmation_staff__c, Received_confirmation_staff__r.Name, Return_Fedex_number__c, Return_Distributor_method__c,
// Arrival_wh_time2__c, Asset_return_time__c,
@@ -211,21 +316,60 @@
// system.debug('All::::'+Rac.repair__c);
// system.debug('All::::'+Ra_c.RAES_Status__c);
// 鏈暘鏆備笉涓婄嚎璇ュ姛鑳斤紝鍚敤鍚庝笉鑳藉叆搴撴搷浣滄劅瑙変笉瀵�
-
-
}
// 澶囧搧set鏄庣粏
List<Rental_Apply_Equipment_Set_Detail__c> eList = [
- select Rental_Apply__c, Rental_Apply__r.Shippment_ng_num__c, Rental_Apply__r.Pre_inspection_ng_num__c, SerialNumber_F__c, Rental_Apply_Equipment_Set__r.Inspection_not_finish__c, Fixture_Name_F__c, Rental_Apply_Equipment_Set__r.RAES_Status__c, Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c,
- Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c,
- Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c,
- Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
- Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c
- from Rental_Apply_Equipment_Set_Detail__c
- where Rental_Apply_Equipment_Set__c in :esIds and DeliverySlip__c = null and Return_DeliverySlip__c = null//and Shipment_request_time__c <> null
- and Cancel_Select__c = False
- order by Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, Rental_Apply_Equipment_Set__r.Name, Rental_Apply_Equipment_Set__c, Name
+ SELECT
+ Rental_Apply__c,
+ Rental_Apply__r.Shippment_ng_num__c,
+ Rental_Apply__r.Pre_inspection_ng_num__c,
+ SerialNumber_F__c,
+ Rental_Apply_Equipment_Set__r.Inspection_not_finish__c,
+ Fixture_Name_F__c,
+ Rental_Apply_Equipment_Set__r.RAES_Status__c,
+ Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name,
+ Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name,
+ Rental_Apply_Equipment_Set__r.Name,
+ Pre_inspection_time__c,
+ StockDown__c,
+ StockDown_time__c,
+ Id,
+ Name,
+ Asset__c,
+ Asset__r.Name,
+ Asset__r.SerialNumber,
+ Asset__r.Product_Serial_No__c,
+ Asset__r.Remark__c,
+ Asset__r.ImageAsset__c,
+ Asset__r.ImageSerial__c,
+ Asset__r.ImageAssetUploadedTime__c,
+ Asset__r.ImageSerialUploadedTime__c,
+ Loaner_CDS_Info__c,
+ Inspection_result__c,
+ Check_lost_Item__c,
+ Pre_disinfection__c,
+ Water_leacage_check__c,
+ Inspection_result_after__c,
+ Arrival_in_wh__c,
+ Asset__r.Pre_Reserve_RAES_Detail__c,
+ Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
+ Inspection_result_after_ng__c,
+ Inspection_result_ng__c,
+ Lost_item_giveup__c,
+ CDS_complete__c,
+ Loaner_accsessary__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE
+ Rental_Apply_Equipment_Set__c IN :esIds
+ AND DeliverySlip__c = NULL
+ AND Return_DeliverySlip__c = NULL //and Shipment_request_time__c <> null
+ AND Cancel_Select__c = FALSE
+ ORDER BY
+ Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name,
+ Rental_Apply_Equipment_Set__r.Name,
+ Rental_Apply_Equipment_Set__c,
+ Name
];
//Set<Id> lockId = new Set<Id>();
//for (Rental_Apply_Equipment_Set_Detail__c esd : eList) {
@@ -266,8 +410,8 @@
// Step 鍒囥倞鏇裤亪銉溿偪銉炽�佸彂璐у墠-妫�娴�
public PageReference ShippmentDetail() {
- system.debug('========cid='+CheckedId);
- system.debug('========esd='+esdList.size());
+ system.debug('========cid=' + CheckedId);
+ system.debug('========esd=' + esdList.size());
Step_status = '鏄庣粏';
//slip.Wh_Staff__c = Userinfo.getUserId();
//slip.DeliveryType__c = '鍙戣揣';
@@ -288,12 +432,14 @@
allcount.put(esd.rec.Rental_Apply__c, Integer.valueOf(esd.rec.Rental_Apply__r.Shippment_ng_num__c));
}
}
- system.debug('========shipcount='+JSON.serialize(shipcount));
- system.debug('========shipcount='+JSON.serialize(allcount));
+ system.debug('========shipcount=' + JSON.serialize(shipcount));
+ system.debug('========shipcount=' + JSON.serialize(allcount));
for (String raid : allcount.keySet()) {
if (allcount.get(raid) > shipcount.get(raid).size()) {
Step_status = '杩藉姞';
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '鐢宠鍗曞唴瀛樺湪鏈嬀閫夌殑閰嶅锛岃鍕鹃�夊叏閮ㄩ厤濂楁垨鍒嗗壊鐢宠鍗�!'));
+ ApexPages.addmessage(
+ new ApexPages.message(ApexPages.severity.Error, '鐢宠鍗曞唴瀛樺湪鏈嬀閫夌殑閰嶅锛岃鍕鹃�夊叏閮ㄩ厤濂楁垨鍒嗗壊鐢宠鍗�!')
+ );
}
}
}
@@ -306,7 +452,7 @@
// Step 鍒囥倞鏇裤亪銉溿偪銉炽�佸彂璐�-鍙戣揣杩愯緭鍗曞彿 绛�
public PageReference ShippmentAdd() {
Step_status = '杩藉姞';
- system.debug('========2esdList='+JSON.serialize(esdList));
+ system.debug('========2esdList=' + JSON.serialize(esdList));
//return new PageReference('/apex/EquipmentSetShippmentReceived3?id=' + this.Id + '&step=' + this.Step_status);
return null;
}
@@ -334,31 +480,39 @@
// 淇濆瓨鎸夐挳
public PageReference save() {
-
List<String> raids = Raid.split(':');
//妫�鏌ユ槸鍚﹀彲浠ョ户缁�
- List<Rental_Apply__c> RaTarList = [select Id,Name,Campaign__c,Repair__c,next_action__c
- ,QIS_number__r.ReplaceDeliveryDate__c,demo_purpose2__c
- ,Follow_UP_Opp__r.Shipping_Finished_Day_Func__c
- ,Campaign__r.Status
- ,Campaign__r.IF_Approved__c
- ,Campaign__r.Meeting_Approved_No__c // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
- ,Campaign__r.Approved_Status__c // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
- ,repair__r.Return_Without_Repair_Date__c
- ,Repair__r.Repair_Final_Inspection_Date__c
- ,Repair__r.Repair_Shipped_Date__c
- from Rental_Apply__c
- where id in :raids];//20210602 ljh update 澧炲姞鏌ヨName SFDC-C3LBNL
+ List<Rental_Apply__c> RaTarList = [
+ SELECT
+ Id,
+ Name,
+ Campaign__c,
+ Repair__c,
+ next_action__c,
+ QIS_number__r.ReplaceDeliveryDate__c,
+ demo_purpose2__c,
+ Follow_UP_Opp__r.Shipping_Finished_Day_Func__c,
+ Campaign__r.Status,
+ Campaign__r.IF_Approved__c,
+ Campaign__r.Meeting_Approved_No__c, // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
+ Campaign__r.Approved_Status__c, // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
+ repair__r.Return_Without_Repair_Date__c,
+ Repair__r.Repair_Final_Inspection_Date__c,
+ AccDealerBlacklist__c, //璐告槗鍚堣 you
+ //,EquipmentGuaranteeFlg__c//璐告槗鍚堣 you
+ Repair__r.Repair_Shipped_Date__c
+ FROM Rental_Apply__c
+ WHERE id IN :raids
+ ]; //20210602 ljh update 澧炲姞鏌ヨName SFDC-C3LBNL
// add lc 20220927 SFDC-CJ48VE 澶囧搧棰勮鍑哄簱鏃ラ�昏緫璋冩暣 start
Map<Id, String> rentalApplyNameMap = new Map<Id, String>();
List<Rental_Apply_Equipment_Set__c> RAESRecords = [
- SELECT Id,Rental_Apply__c,Rental_Apply__r.Name
- FROM Rental_Apply_Equipment_Set__c
- WHERE Rental_Apply__c in :raids
- AND Cancel_Select__c = False
- AND Rental_Start_Date__c <> :Date.today()
- ORDER BY Rental_Apply__c];
+ SELECT Id, Rental_Apply__c, Rental_Apply__r.Name
+ FROM Rental_Apply_Equipment_Set__c
+ WHERE Rental_Apply__c IN :raids AND Cancel_Select__c = FALSE AND Rental_Start_Date__c != :Date.today()
+ ORDER BY Rental_Apply__c
+ ];
for (Rental_Apply_Equipment_Set__c RAES : RAESRecords) {
if (rentalApplyNameMap.isEmpty() || !rentalApplyNameMap.containsKey(RAES.Rental_Apply__c)) {
@@ -374,63 +528,75 @@
String message2 = '';
String message3 = '';
String message = '';
- String message4 = '';//1822 yc 20211025 宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩涓嶈兘鍑哄簱
- String message5 = '';//1822 yc 20211108 绱㈣禂QIS鐩殑锛孮IS宸叉湁鏂板搧鍙戣揣鏃ヤ笉鑳藉嚭搴�
+ String message4 = ''; //1822 yc 20211025 宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩涓嶈兘鍑哄簱
+ String message5 = ''; //1822 yc 20211108 绱㈣禂QIS鐩殑锛孮IS宸叉湁鏂板搧鍙戣揣鏃ヤ笉鑳藉嚭搴�
String message6 = '';
- String message7 = '';// 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀� end
- String message8 = '';//add lc 20220927 SFDC-CJ48VE 澶囧搧棰勮鍑哄簱鏃ラ�昏緫璋冩暣
+ String message7 = ''; // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀� end
+ String message8 = ''; //add lc 20220927 SFDC-CJ48VE 澶囧搧棰勮鍑哄簱鏃ラ�昏緫璋冩暣
+ String message9 = ''; //璐告槗鍚堣 you
// 瑕佸垽鏂喅瑁佺姸鎬佷笉鑳芥槸鑽夌/椹冲洖/缁堟鐢宠/鍙栨秷/鍒犻櫎
List<String> statusList = System.Label.StatusProcessState.split(',');
Map<Id, Rental_Apply__c> RaMap = new Map<Id, Rental_Apply__c>();
for (Rental_Apply__c RaTar : RaTarList) {
// 20230215 ljh DB202301265636 瀛︿細鍙栨秷鐢宠涔熸嫤鎴� start
// if( RaTar.Campaign__r.Status == '鍙栨秷'){
- if( RaTar.Campaign__r.Status == '鍙栨秷' || RaTar.Campaign__r.Status == '鍙栨秷鐢宠涓�'){
- // 20230215 ljh DB202301265636 瀛︿細鍙栨秷鐢宠涔熸嫤鎴� end
+ //璐告槗鍚堣 you
+ // && RaTar.EquipmentGuaranteeFlg__c==false
+ if (System.Label.TradeComplianceStatusFlagBP == 'true' && RaTar.AccDealerBlacklist__c == '1') {
+ errorFlag = true;
+ message9 += RaTar.Name + '銆�';
+ } else if (RaTar.Campaign__r.Status == '鍙栨秷' || RaTar.Campaign__r.Status == '鍙栨秷鐢宠涓�') {
+ // 20230215 ljh DB202301265636 瀛︿細鍙栨秷鐢宠涔熸嫤鎴� end
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '瀛︿細宸插彇娑堬紝涓嶈兘缁х画鎿嶄綔浜�'));
// return null;
errorFlag = true;
- message0 += RaTar.Name+'銆�';
- }else if(RaTar.Repair__r.Repair_Final_Inspection_Date__c!=null){
- // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '瀛樺湪淇悊鏈�缁堟娴嬫棩锛屼笉鑳界户缁簡'));
+ message0 += RaTar.Name + '銆�';
+ } else if (RaTar.Repair__r.Repair_Final_Inspection_Date__c != null) {
+ // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '瀛樺湪淇悊鏈�缁堟娴嬫棩锛屼笉鑳界户缁簡'));
// return null;
errorFlag = true;
- message1 += RaTar.Name+'銆�';
- }else if(RaTar.repair__r.Return_Without_Repair_Date__c!=null&&RaTar.repair__c!=null ){
-
+ message1 += RaTar.Name + '銆�';
+ } else if (RaTar.repair__r.Return_Without_Repair_Date__c != null && RaTar.repair__c != null) {
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '鏈慨鐞嗗綊杩樻棩涓嶄负绌猴紝涓嶈兘鍑哄簱'));
// return null;
errorFlag = true;
- message2 += RaTar.Name+'銆�';
- }else if(RaTar.Repair__r.Repair_Shipped_Date__c!=null){
-
+ message2 += RaTar.Name + '銆�';
+ } else if (RaTar.Repair__r.Repair_Shipped_Date__c != null) {
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '瀛樺湪RC淇悊杩旈�佹棩锛屼笉鑳界户缁簡'));
// return null;
errorFlag = true;
- message3 += RaTar.Name+'銆�';
+ message3 += RaTar.Name + '銆�';
}
//1822 yc 20211025 宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩涓嶈兘鍑哄簱 start
- else if(RaTar.demo_purpose2__c=='宸茶喘寰呰揣' && RaTar.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c!= null){
+ else if (RaTar.demo_purpose2__c == '宸茶喘寰呰揣' && RaTar.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c != null) {
errorFlag = true;
- message4 += RaTar.Name+'銆�';
- }else if(RaTar.demo_purpose2__c=='绱㈣禂QIS' && RaTar.next_action__c=='鏃犲伩鏇存崲' && RaTar.QIS_number__r.ReplaceDeliveryDate__c!= null){
+ message4 += RaTar.Name + '銆�';
+ } else if (
+ RaTar.demo_purpose2__c == '绱㈣禂QIS' &&
+ RaTar.next_action__c == '鏃犲伩鏇存崲' &&
+ RaTar.QIS_number__r.ReplaceDeliveryDate__c != null
+ ) {
errorFlag = true;
- message5 += RaTar.Name+'銆�';
+ message5 += RaTar.Name + '銆�';
}
//1822 yc 20211025 宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩涓嶈兘鍑哄簱 end
// 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀� start
// else if (!campMap.isEmpty() && campMap.containsKey(RaTar.Campaign__c) && campMap.get(RaTar.Campaign__c).IF_Approved__c){
- // if (String.isBlank(campMap.get(RaTar.Campaign__c).Meeting_Approved_No__c)
+ // if (String.isBlank(campMap.get(RaTar.Campaign__c).Meeting_Approved_No__c)
// || String.isBlank(campMap.get(RaTar.Campaign__c).Meeting_Approved_No__r.MeetingApprovedNo__c)) {
// errorFlag = true;
// message6 = RaTar.Name + '銆�';
// }
// }
- else if(RaTar.Campaign__c!= null && RaTar.Campaign__r.IF_Approved__c && RaTar.Campaign__r.Meeting_Approved_No__c == null) {
+ else if (RaTar.Campaign__c != null && RaTar.Campaign__r.IF_Approved__c && RaTar.Campaign__r.Meeting_Approved_No__c == null) {
errorFlag = true;
message6 += RaTar.Name + '銆�';
- }
- else if(RaTar.Campaign__c!= null && RaTar.Campaign__r.IF_Approved__c && RaTar.Campaign__r.Meeting_Approved_No__c != null && statusList.contains(RaTar.Campaign__r.Approved_Status__c)) {
+ } else if (
+ RaTar.Campaign__c != null &&
+ RaTar.Campaign__r.IF_Approved__c &&
+ RaTar.Campaign__r.Meeting_Approved_No__c != null &&
+ statusList.contains(RaTar.Campaign__r.Approved_Status__c)
+ ) {
errorFlag = true;
message7 += RaTar.Name + '銆�';
}
@@ -447,46 +613,50 @@
}
// add lc 20220927 SFDC-CJ48VE 澶囧搧棰勮鍑哄簱鏃ラ�昏緫璋冩暣 end
- if(errorFlag){
- if(String.isNotBlank(message0)){
+ if (errorFlag) {
+ if (String.isNotBlank(message0)) {
// 20230215 ljh DB202301265636 瀛︿細鍙栨秷鐢宠涔熸嫤鎴� start
// message += '鍗曞彿NO.'+message0.removeEnd('銆�')+'瀛︿細宸插彇娑堬紝涓嶈兘缁х画鎿嶄綔浜�';
- message += '鍗曞彿NO.'+message0.removeEnd('銆�')+'瀛︿細宸插彇娑堟垨鑰呭彇娑堢敵璇蜂腑锛屼笉鑳界户缁搷浣滀簡';
+ message += '鍗曞彿NO.' + message0.removeEnd('銆�') + '瀛︿細宸插彇娑堟垨鑰呭彇娑堢敵璇蜂腑锛屼笉鑳界户缁搷浣滀簡';
// 20230215 ljh DB202301265636 瀛︿細鍙栨秷鐢宠涔熸嫤鎴� start
}
- if(String.isNotBlank(message1)){
- message += '鍗曞彿NO.'+message1.removeEnd('銆�')+'瀛樺湪淇悊鏈�缁堟娴嬫棩锛屼笉鑳界户缁簡';
+ if (String.isNotBlank(message1)) {
+ message += '鍗曞彿NO.' + message1.removeEnd('銆�') + '瀛樺湪淇悊鏈�缁堟娴嬫棩锛屼笉鑳界户缁簡';
}
- if(String.isNotBlank(message2)){
- message += '鍗曞彿NO.'+message2.removeEnd('銆�')+'鏈慨鐞嗗綊杩樻棩涓嶄负绌猴紝涓嶈兘鍑哄簱';
+ if (String.isNotBlank(message2)) {
+ message += '鍗曞彿NO.' + message2.removeEnd('銆�') + '鏈慨鐞嗗綊杩樻棩涓嶄负绌猴紝涓嶈兘鍑哄簱';
}
- if(String.isNotBlank(message3)){
- message += '鍗曞彿NO.'+message3.removeEnd('銆�')+'瀛樺湪RC淇悊杩旈�佹棩锛屼笉鑳界户缁簡';
+ if (String.isNotBlank(message3)) {
+ message += '鍗曞彿NO.' + message3.removeEnd('銆�') + '瀛樺湪RC淇悊杩旈�佹棩锛屼笉鑳界户缁簡';
}
//1822 yc 20211025 宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩涓嶈兘鍑哄簱 start
- if(String.isNotBlank(message4)){
- message += '鍗曞彿NO.'+message4.removeEnd('銆�')+'宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩锛屼笉鑳界户缁簡';
+ if (String.isNotBlank(message4)) {
+ message += '鍗曞彿NO.' + message4.removeEnd('銆�') + '宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩锛屼笉鑳界户缁簡';
}
- if(String.isNotBlank(message5)){
- message += '鍗曞彿NO.'+message5.removeEnd('銆�')+'绱㈣禂QIS鐩殑锛孮IS宸叉湁鏂板搧鍙戣揣鏃ワ紝涓嶈兘缁х画浜�';
+ if (String.isNotBlank(message5)) {
+ message += '鍗曞彿NO.' + message5.removeEnd('銆�') + '绱㈣禂QIS鐩殑锛孮IS宸叉湁鏂板搧鍙戣揣鏃ワ紝涓嶈兘缁х画浜�';
}
//1822 yc 20211025 宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩涓嶈兘鍑哄簱 end
- if(String.isNotBlank(message6)){
- message += '鍗曞彿No.'+ message6.removeEnd('銆�')+ '宸茬敵璇峰喅瑁佷絾鍐宠缂栫爜涓虹┖';
+ if (String.isNotBlank(message6)) {
+ message += '鍗曞彿No.' + message6.removeEnd('銆�') + '宸茬敵璇峰喅瑁佷絾鍐宠缂栫爜涓虹┖';
}
// 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀� add start
- if(String.isNotBlank(message7)){
- message += '鍗曞彿No.'+ message7.removeEnd('銆�')+ '宸茬敵璇峰喅瑁佷絾鍐宠鐘舵�佷笉绗﹀悎鏉′欢';
+ if (String.isNotBlank(message7)) {
+ message += '鍗曞彿No.' + message7.removeEnd('銆�') + '宸茬敵璇峰喅瑁佷絾鍐宠鐘舵�佷笉绗﹀悎鏉′欢';
}
// 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀� add end
// add lc 20220927 SFDC-CJ48VE 澶囧搧棰勮鍑哄簱鏃ラ�昏緫璋冩暣 start
- if(String.isNotBlank(message8)){
- message += '鍗曞彿No.'+ message8.removeEnd('銆�')+ '鐨勫鍝侀璁″嚭璐ф棩搴旇绛変簬浠婂ぉ锛屽惁鍒欎笉鑳藉彂璐�';
+ if (String.isNotBlank(message8)) {
+ message += '鍗曞彿No.' + message8.removeEnd('銆�') + '鐨勫鍝侀璁″嚭璐ф棩搴旇绛変簬浠婂ぉ锛屽惁鍒欎笉鑳藉彂璐�';
}
// add lc 20220927 SFDC-CJ48VE 澶囧搧棰勮鍑哄簱鏃ラ�昏緫璋冩暣 end
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,message));
+ if (String.isNotBlank(message9)) {
+ message += '鍗曞彿No.' + message9.removeEnd('銆�') + System.Label.IFTradeComplianceAlertBP;
+ }
+
+ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, message));
return null;
}
//20210604 ljh update SFDC-C3LBNL end
@@ -508,21 +678,60 @@
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '鏈�夋嫨澶囧搧set锛屼笉鑳藉垱寤哄彂璐у崟'));
return null;
}
- eList = [select Rental_Apply__c, Rental_Apply__r.Shippment_ng_num__c, Rental_Apply__r.Pre_inspection_ng_num__c, Rental_Apply_Equipment_Set__r.Inspection_not_finish__c, Fixture_Name_F__c, Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c,
- Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c,
- Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c,
- Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
- Rental_Apply__r.Request_approval_time__c , Add_Request_approval_time__c ,ApplyToShipmentWorkTime__c, //20220309 ljh SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀�
- Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c,Key_product__c
- from Rental_Apply_Equipment_Set_Detail__c where Id in :eSet for update];
+ eList = [
+ SELECT
+ Rental_Apply__c,
+ Rental_Apply__r.Shippment_ng_num__c,
+ Rental_Apply__r.Pre_inspection_ng_num__c,
+ Rental_Apply_Equipment_Set__r.Inspection_not_finish__c,
+ Fixture_Name_F__c,
+ Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name,
+ Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name,
+ Rental_Apply_Equipment_Set__r.Name,
+ Pre_inspection_time__c,
+ StockDown__c,
+ StockDown_time__c,
+ Id,
+ Name,
+ Asset__c,
+ Asset__r.Name,
+ Asset__r.SerialNumber,
+ Asset__r.Product_Serial_No__c,
+ Asset__r.Remark__c,
+ Asset__r.ImageAsset__c,
+ Asset__r.ImageSerial__c,
+ Asset__r.ImageAssetUploadedTime__c,
+ Asset__r.ImageSerialUploadedTime__c,
+ Loaner_CDS_Info__c,
+ Inspection_result__c,
+ Check_lost_Item__c,
+ Pre_disinfection__c,
+ Water_leacage_check__c,
+ Inspection_result_after__c,
+ Arrival_in_wh__c,
+ Asset__r.Pre_Reserve_RAES_Detail__c,
+ Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
+ Rental_Apply__r.Request_approval_time__c,
+ Add_Request_approval_time__c,
+ ApplyToShipmentWorkTime__c, //20220309 ljh SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀�
+ Inspection_result_after_ng__c,
+ Inspection_result_ng__c,
+ Lost_item_giveup__c,
+ CDS_complete__c,
+ Loaner_accsessary__c,
+ Key_product__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE Id IN :eSet
+ FOR UPDATE
+ ];
Boolean needSaveSet = false;
Boolean needSaveDetail = false;
Boolean needDeliverySlip = false;
//wangweipeng 鏄惁鏄噸鐐逛骇鍝� 2021/08/30 start
- Map<String,boolean> keyPointProduct = new Map<String,boolean>();
+ Map<String, boolean> keyPointProduct = new Map<String, boolean>();
//wangweipeng 鏄惁鏄噸鐐逛骇鍝� 2021/08/30 end
Set<Id> astForLock = new Set<Id>();
- Map<Datetime, List<Rental_Apply_Equipment_Set_Detail__c>> approvalMap = new Map<Datetime, List<Rental_Apply_Equipment_Set_Detail__c>>();// 20220315 ljh SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀�
+ Map<Datetime, List<Rental_Apply_Equipment_Set_Detail__c>> approvalMap = new Map<Datetime, List<Rental_Apply_Equipment_Set_Detail__c>>(); // 20220315 ljh SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀�
for (Rental_Apply_Equipment_Set_Detail__c esd : eList) {
if (esd.Inspection_result__c <> null && esd.StockDown__c == false) {
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '澶囧搧set鏈笅鏋讹紝涓嶈兘濉啓鍙戣揣鍓嶆鏌ョ粨鏋�'));
@@ -530,33 +739,37 @@
}
//wangweipeng 鏄惁鏄噸鐐逛骇鍝� 2021/08/30 start
//璁板綍褰撳墠鍊熷嚭澶囧搧鐨勯厤濂楁槑缁嗛噷闈㈡槸鍚︽椂閲嶇偣浜у搧锛屾敞鎰忥細鍙鏈変竴涓槸閲嶇偣浜у搧锛岄偅涔堟鍊熷嚭澶囧搧灏辨槸閲嶇偣浜у搧
- if(esd.Key_product__c != null && esd.Key_product__c != ''){
- if(!(keyPointProduct.containsKey(esd.Rental_Apply__c)) || keyPointProduct.get(esd.Rental_Apply__c) == false){
- keyPointProduct.put(esd.Rental_Apply__c,true);
+ if (esd.Key_product__c != null && esd.Key_product__c != '') {
+ if (!(keyPointProduct.containsKey(esd.Rental_Apply__c)) || keyPointProduct.get(esd.Rental_Apply__c) == false) {
+ keyPointProduct.put(esd.Rental_Apply__c, true);
}
- }else{
- if(keyPointProduct.get(esd.Rental_Apply__c) == null){
- keyPointProduct.put(esd.Rental_Apply__c,false);
+ } else {
+ if (keyPointProduct.get(esd.Rental_Apply__c) == null) {
+ keyPointProduct.put(esd.Rental_Apply__c, false);
}
}
//wangweipeng 鏄惁鏄噸鐐逛骇鍝� 2021/08/30 end
astForLock.add(esd.Asset__c);
// 20220315 ljh SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀� start
- Datetime keyDt = esd.Add_Request_approval_time__c != null?esd.Add_Request_approval_time__c:esd.Rental_Apply__r.Request_approval_time__c;
+ Datetime keyDt = esd.Add_Request_approval_time__c != null
+ ? esd.Add_Request_approval_time__c
+ : esd.Rental_Apply__r.Request_approval_time__c;
List<Rental_Apply_Equipment_Set_Detail__c> tempRaesdL;
- if(approvalMap.containsKey(keyDt)){
+ if (approvalMap.containsKey(keyDt)) {
tempRaesdL = approvalMap.get(keyDt);
- }else{
+ } else {
tempRaesdL = new List<Rental_Apply_Equipment_Set_Detail__c>();
}
- tempRaesdL.add(esd);
- approvalMap.put(keyDt,tempRaesdL);
+ tempRaesdL.add(esd);
+ approvalMap.put(keyDt, tempRaesdL);
// 20220315 ljh SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀� end
}
- List<Asset> astLock = [select Id
- from Asset
- where id in :astForLock
- for update];
+ List<Asset> astLock = [
+ SELECT Id
+ FROM Asset
+ WHERE id IN :astForLock
+ FOR UPDATE
+ ];
if (Step_status == '鏄庣粏') {
needDeliverySlip = true;
//if (slip.Id == null) {
@@ -564,18 +777,37 @@
// slip.Shippment_loaner_time__c = Datetime.now();
//}
if (slip.Id != null) {
- slip = [select Combine_Pack__c, Name, Id, DeliveryCompany_SlipNo__c,DeliveryType__c,Distributor_method__c,DeliveryCompany__c,Wh_Staff__c
- from FixtureDeliverySlip__c
- where Id =:slip.Id for update];
+ slip = [
+ SELECT
+ Combine_Pack__c,
+ Name,
+ Id,
+ DeliveryCompany_SlipNo__c,
+ DeliveryType__c,
+ Distributor_method__c,
+ DeliveryCompany__c,
+ Wh_Staff__c
+ FROM FixtureDeliverySlip__c
+ WHERE Id = :slip.Id
+ FOR UPDATE
+ ];
}
slip.Shippment_loaner_time__c = Datetime.now();
needSaveDetail = true;
}
- List<Rental_Apply__c> raList = [select Id, DeliverySlip__c, Campaign__c
- , Campaign__r.IF_Approved__c // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
- , Campaign__r.Meeting_Approved_No__r.Name // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
- , Campaign__r.Approved_Status__c // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
- from Rental_Apply__c where Id in :raSet];
+ List<Rental_Apply__c> raList = [
+ SELECT
+ Id,
+ DeliverySlip__c,
+ Campaign__c,
+ Campaign__r.IF_Approved__c, // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
+ Campaign__r.Meeting_Approved_No__r.Name, // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
+ Campaign__r.Approved_Status__c, // 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀�
+ Hospital__r.TradeComplianceStatus__c, //璐告槗鍚堣 you
+ Outbound_TradeStatus__c //璐告槗鍚堣 you
+ FROM Rental_Apply__c
+ WHERE Id IN :raSet
+ ];
Savepoint sp = Database.setSavepoint();
try {
//if (needSaveSet) ControllerUtil.upRAdEquipmentSet(es);
@@ -583,34 +815,35 @@
FixtureUtil.withoutUpsertObjects(new List<FixtureDeliverySlip__c>{ slip });
//ControllerUtil.updRADeliverySlipDetail(slip);
// 20220315 ljh SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀� start
- map<String,Decimal> ApplyToShipmentMap = new map<String,Decimal>();
- if(approvalMap.size() > 0 ){
+ map<String, Decimal> ApplyToShipmentMap = new Map<String, Decimal>();
+ if (approvalMap.size() > 0) {
// dtList[0] 绗竴涓氨鏄渶灏忔椂闂�
List<Datetime> dtList = new List<Datetime>(approvalMap.keySet());
- Date startDateSOQL = date.newinstance(dtList[0].year(), dtList[0].month(), dtList[0].day());
- List<OlympusCalendar__c> ocList = [SELECT Id, Date__c,IsWorkDay__c
- FROM OlympusCalendar__c
- WHERE Date__c >= :startDateSOQL
- AND Date__c <= :Date.today()
- ORDER BY Date__c ASC];
- Map<Date,String> ocMap = new Map<Date,String>();
- for(OlympusCalendar__c oc:ocList){
+ Date startDateSOQL = date.newinstance(dtList[0].year(), dtList[0].month(), dtList[0].day());
+ List<OlympusCalendar__c> ocList = [
+ SELECT Id, Date__c, IsWorkDay__c
+ FROM OlympusCalendar__c
+ WHERE Date__c >= :startDateSOQL AND Date__c <= :Date.today()
+ ORDER BY Date__c ASC
+ ];
+ Map<Date, String> ocMap = new Map<Date, String>();
+ for (OlympusCalendar__c oc : ocList) {
String IsWorkDay = oc.IsWorkDay__c.format();
- ocMap.put(oc.Date__c,IsWorkDay);
+ ocMap.put(oc.Date__c, IsWorkDay);
}
- for(Datetime dt:dtList){
+ for (Datetime dt : dtList) {
Boolean startFlag = false;
Boolean endFlag = false;
Datetime startTime = dt;
- Date startDate = Date.newInstance(startTime.year(),startTime.month(),startTime.day());
+ Date startDate = Date.newInstance(startTime.year(), startTime.month(), startTime.day());
Datetime endTime = Datetime.now();
Date endDate = Date.today();
- // 瀹℃壒鏃堕棿鏄潪濂ユ灄宸存柉宸ヤ綔鏃�
+ // 瀹℃壒鏃堕棿鏄潪濂ユ灄宸存柉宸ヤ綔鏃�
// if(ocList[0].IsWorkDay__c == 0){
- if(ocMap.get(startDate) == '0'){
- for(OlympusCalendar__c oc:ocList){
- if(startDate < oc.Date__c && oc.IsWorkDay__c == 1){
- startTime = Datetime.newInstance(oc.Date__c.year(),oc.Date__c.month(),oc.Date__c.day(),0,0,0);
+ if (ocMap.get(startDate) == '0') {
+ for (OlympusCalendar__c oc : ocList) {
+ if (startDate < oc.Date__c && oc.IsWorkDay__c == 1) {
+ startTime = Datetime.newInstance(oc.Date__c.year(), oc.Date__c.month(), oc.Date__c.day(), 0, 0, 0);
startDate = oc.Date__c;
startFlag = true;
break;
@@ -618,10 +851,17 @@
}
}
// 鍙戣揣鏃堕棿鏄潪濂ユ灄宸存柉宸ヤ綔鏃�
- if(ocList[ocList.size() - 1].IsWorkDay__c == 0){
- for(Integer i = ocList.size() - 1; i >= 0;i--){
- if(ocList[i].IsWorkDay__c == 1){
- endTime = Datetime.newInstance(ocList[i].Date__c.addDays(1).year(),ocList[i].Date__c.addDays(1).month(),ocList[i].Date__c.addDays(1).day(),0,0,0);
+ if (ocList[ocList.size() - 1].IsWorkDay__c == 0) {
+ for (Integer i = ocList.size() - 1; i >= 0; i--) {
+ if (ocList[i].IsWorkDay__c == 1) {
+ endTime = Datetime.newInstance(
+ ocList[i].Date__c.addDays(1).year(),
+ ocList[i].Date__c.addDays(1).month(),
+ ocList[i].Date__c.addDays(1).day(),
+ 0,
+ 0,
+ 0
+ );
endDate = ocList[i].Date__c.addDays(1);
endFlag = true;
break;
@@ -629,26 +869,26 @@
}
}
Decimal timeDifLast;
- if(ocList[0].IsWorkDay__c == 0 && ocList[ocList.size() - 1].IsWorkDay__c == 0 && !startFlag && !endFlag){
+ if (ocList[0].IsWorkDay__c == 0 && ocList[ocList.size() - 1].IsWorkDay__c == 0 && !startFlag && !endFlag) {
timeDifLast = 0;
- }else{
+ } else {
Long startL = startTime.getTime();
Long tendL = endTime.getTime();
- Long timeDif = tendL - startL;
- Decimal time11 = timeDif*1.00;
- Decimal time12 = 24*3600*1000*1.00;
- timeDifLast = time11/time12;
+ Long timeDif = tendL - startL;
+ Decimal time11 = timeDif * 1.00;
+ Decimal time12 = 24 * 3600 * 1000 * 1.00;
+ timeDifLast = time11 / time12;
Integer tempWeek = 0;
- for(OlympusCalendar__c oc:ocList){
- if(oc.IsWorkDay__c == 0 && startDate < oc.Date__c && oc.Date__c < endDate){
+ for (OlympusCalendar__c oc : ocList) {
+ if (oc.IsWorkDay__c == 0 && startDate < oc.Date__c && oc.Date__c < endDate) {
tempWeek++;
}
}
timeDifLast = timeDifLast - tempWeek;
}
// dtestLast 鍥涜垗浜斿叆 淇濈暀1浣嶅皬鏁�
- for(Rental_Apply_Equipment_Set_Detail__c raesd00:approvalMap.get(dt)){
- ApplyToShipmentMap.put(raesd00.Id,timeDifLast.setScale(1));
+ for (Rental_Apply_Equipment_Set_Detail__c raesd00 : approvalMap.get(dt)) {
+ ApplyToShipmentMap.put(raesd00.Id, timeDifLast.setScale(1));
}
}
}
@@ -656,7 +896,7 @@
for (Rental_Apply_Equipment_Set_Detail__c esd : eList) {
esd.DeliverySlip__c = slip.Id;
// 20220315 ljh SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀� start
- if(ApplyToShipmentMap.containsKey(esd.Id)){
+ if (ApplyToShipmentMap.containsKey(esd.Id)) {
esd.ApplyToShipmentWorkTime__c = ApplyToShipmentMap.get(esd.Id);
}
// 20220315 ljh SFDC-CC6CLJ phase5涓婄嚎璇鹃131 鎻愪氦鐢宠鍒板鍝佸嚭搴撴椂闀� end
@@ -667,14 +907,14 @@
//wangweipeng 鏄惁鏄噸鐐逛骇鍝� 2021/08/30 start
ra.Is_keyPoint_Product__c = keyPointProduct.get(ra.Id);
//wangweipeng 鏄惁鏄噸鐐逛骇鍝� 2021/08/30 start
-
+ ra.Outbound_TradeStatus__c = ra.Hospital__r.TradeComplianceStatus__c; //璐告槗鍚堣 you
// 20220315 ljh obpm澶囧搧鍐宠鐘舵�佺浉鍏充慨鏀� update start
//20220217 sx add 澶囧搧鍊熷嚭鐢宠-鍐宠鎺у埗 No.4 鍑哄簱鎴愬姛鏃讹紝鎶婃鏃剁偣鐨勫喅瑁佺紪鍙峰拰鍐宠鐘舵�佸啓鍒板喅瑁佺紪鍙凤紙鍑哄簱锛夊拰鍐宠鐘舵�侊紙鍑哄簱锛変笂
// if (!campMap.isEmpty() && campMap.containsKey(ra.Campaign__c) && campMap.get(ra.Campaign__c).IF_Approved__c){
// ra.ApprovedNo_Delivery__c = campMap.get(ra.Campaign__c).Meeting_Approved_No__r.MeetingApprovedNo__c;
// ra.Approved_State_Delivery__c = campMap.get(ra.Campaign__c).Meeting_Approved_No__r.ProcessState__c;
// }
- if (ra.Campaign__c != null&& ra.Campaign__r.IF_Approved__c && ra.Campaign__r.Meeting_Approved_No__r.Name != null){
+ if (ra.Campaign__c != null && ra.Campaign__r.IF_Approved__c && ra.Campaign__r.Meeting_Approved_No__r.Name != null) {
ra.ApprovedNo_Delivery__c = ra.Campaign__r.Meeting_Approved_No__r.Name;
ra.Approved_State_Delivery__c = ra.Campaign__r.Approved_Status__c;
}
@@ -683,6 +923,9 @@
}
//if (needSaveDetail) ControllerUtil.updRAEquipmentSetDetail(eList);
if (needSaveDetail) {
+ // 澶囧搧浼樺寲杩藉姞 20230518 lc Start
+ RentalApplyEquipmentSetDetailHandler.skipUpdateAgain = true;
+ // 澶囧搧浼樺寲杩藉姞 20230518 lc End
FixtureUtil.withoutUpsertObjects(eList);
FixtureUtil.withoutUpsertObjects(raList);
}
@@ -718,7 +961,10 @@
this.isChecked = checked;
this.hasSended = false;
- if (rec.Asset__r.Pre_Reserve_RAES_Detail__c != null && rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c != null) {
+ if (
+ rec.Asset__r.Pre_Reserve_RAES_Detail__c != null &&
+ rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c != null
+ ) {
this.quickCheck = Datetime.now() < rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c + 30 ? true : false;
} else {
this.quickCheck = false;
@@ -736,4 +982,4 @@
this(rec, false);
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LayoutDescriberHelper.cls b/force-app/main/default/classes/LayoutDescriberHelper.cls
index ec17bad..5b32b04 100644
--- a/force-app/main/default/classes/LayoutDescriberHelper.cls
+++ b/force-app/main/default/classes/LayoutDescriberHelper.cls
@@ -3,141 +3,144 @@
* Created Date: 01/19/2022
* Purpose: Utility class for describe layouts
* Test Class: LayoutDescriberHelper_Test
- * History:
+ * History:
* 01/19/2022 - Bubba Li - Initial Code.
- *
+ *
* */
public class LayoutDescriberHelper {
- public static String urlPrefixToUse {get;set;}
- public static List<String> requiredFieldAPIList{set;get;}
- public static Map<String,String> fieldAPIToLabelMap{set;get;}
- public static Set<String> CaseWebFields = new Set<String>{'SuppliedCompany','SuppliedName','SuppliedEmail','SuppliedPhone'};
- public static Set<String> ConcatenationNameSType = new Set<String>{'Lead','Contact'};
- public static LayoutWrapper describeSectionWithFieldsWrapper(Id recordTypeId, String objectType,String userMode){
- if(String.isEmpty(recordTypeId)){
+ public static String urlPrefixToUse { get; set; }
+ public static List<String> requiredFieldAPIList { get; set; }
+ public static Map<String, String> fieldAPIToLabelMap { get; set; }
+ public static Set<String> CaseWebFields = new Set<String>{ 'SuppliedCompany', 'SuppliedName', 'SuppliedEmail', 'SuppliedPhone' };
+ public static Set<String> ConcatenationNameSType = new Set<String>{ 'Lead', 'Contact' };
+ public static LayoutWrapper describeSectionWithFieldsWrapper(Id recordTypeId, String objectType, String userMode) {
+ if (String.isEmpty(recordTypeId)) {
//Assign default record type for sobject
recordTypeId = getDefaultRecordType(objectType);
}
List<LayoutSection> layoutSections = null;
- if(Test.isRunningTest()){
- layoutSections = (List<LayoutSection>)Json.deserialize('[{"useHeader":true,"name":"Information","layoutFields":[{"isRequired":false,"isPlaceHolder":false,"fieldType":"reference","fieldLabel":"Owner","fieldAPI":"OwnerId","editableField":false,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"鏂囦欢鍚�","fieldAPI":"FileName__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"picklist","fieldLabel":"Currency","fieldAPI":"CurrencyIsoCode","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"棰勮閾炬帴","fieldAPI":"ViewLink__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":true,"fieldType":"","fieldLabel":"","fieldAPI":"","editableField":false,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"涓嬭浇閾炬帴","fieldAPI":"DownloadLink__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":true,"fieldType":"","fieldLabel":"","fieldAPI":"","editableField":false,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"鐖剁骇鐩綍","fieldAPI":"ParentRecordId__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":true,"fieldType":"","fieldLabel":"","fieldAPI":"","editableField":false,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"AWS File Key","fieldAPI":"AWS_File_Key__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":true,"fieldType":"","fieldLabel":"","fieldAPI":"","editableField":false,"defaultValue":null}],"columns":2,"allowCollapse":false}]', List<LayoutSection>.class);
- }else{
- layoutSections = describeSectionWithFields(recordTypeId,objectType,userMode);
+ if (Test.isRunningTest()) {
+ layoutSections = (List<LayoutSection>) Json.deserialize(
+ '[{"useHeader":true,"name":"Information","layoutFields":[{"isRequired":false,"isPlaceHolder":false,"fieldType":"reference","fieldLabel":"Owner","fieldAPI":"OwnerId","editableField":false,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"鏂囦欢鍚�","fieldAPI":"FileName__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"picklist","fieldLabel":"Currency","fieldAPI":"CurrencyIsoCode","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"棰勮閾炬帴","fieldAPI":"ViewLink__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":true,"fieldType":"","fieldLabel":"","fieldAPI":"","editableField":false,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"涓嬭浇閾炬帴","fieldAPI":"DownloadLink__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":true,"fieldType":"","fieldLabel":"","fieldAPI":"","editableField":false,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"鐖剁骇鐩綍","fieldAPI":"ParentRecordId__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":true,"fieldType":"","fieldLabel":"","fieldAPI":"","editableField":false,"defaultValue":null},{"isRequired":false,"isPlaceHolder":false,"fieldType":"string","fieldLabel":"AWS File Key","fieldAPI":"AWS_File_Key__c","editableField":true,"defaultValue":null},{"isRequired":false,"isPlaceHolder":true,"fieldType":"","fieldLabel":"","fieldAPI":"","editableField":false,"defaultValue":null}],"columns":2,"allowCollapse":false}]',
+ List<LayoutSection>.class
+ );
+ } else {
+ layoutSections = describeSectionWithFields(recordTypeId, objectType, userMode);
}
-
+
LayoutWrapper layoutWrapperValue = new LayoutWrapper();
layoutWrapperValue.layoutSections = layoutSections;
layoutWrapperValue.requiredFieldAPIList = requiredFieldAPIList;
layoutWrapperValue.fieldAPIToLabelMap = fieldAPIToLabelMap;
- system.debug('required API List:'+JSON.serialize(layoutWrapperValue));
+ system.debug('required API List:' + JSON.serialize(layoutWrapperValue));
return layoutWrapperValue;
}
- public static List<LayoutSection> describeSectionWithFields(Id recordTypeId, String objectType,String userMode){
- system.debug('record type id ===>'+ recordTypeId+' object type===>'+objectType + ' userMode===>'+userMode);
+ public static List<LayoutSection> describeSectionWithFields(Id recordTypeId, String objectType, String userMode) {
+ system.debug('record type id ===>' + recordTypeId + ' object type===>' + objectType + ' userMode===>' + userMode);
List<LayoutSection> layoutSections;
- Map<String,List<LayoutField>> layoutFields;
+ Map<String, List<LayoutField>> layoutFields;
requiredFieldAPIList = new List<String>();
- fieldAPIToLabelMap = new Map<String,String>();
+ fieldAPIToLabelMap = new Map<String, String>();
layoutSections = new List<LayoutSection>();
- String theRespBody = getLayoutSchema(recordTypeId, objectType,userMode);
+ String theRespBody = getLayoutSchema(recordTypeId, objectType, userMode);
Map<String, Object> layoutSection = (Map<String, Object>) JSON.deserializeUntyped(theRespBody);
- Map<String,object> m = new Map<String,object>();
- if(String.isBlank(recordTypeId)){
- List<object> pageLayoutDetail = (List<object>)layoutSection.get('layouts');
- System.debug('Page Layout Section Detail:'+JSON.serialize(pageLayoutDetail[0]));
- m = (Map<String,object>) pageLayoutDetail[0];
- }else{
+ Map<String, object> m = new Map<String, object>();
+ if (String.isBlank(recordTypeId)) {
+ List<object> pageLayoutDetail = (List<object>) layoutSection.get('layouts');
+ System.debug('Page Layout Section Detail:' + JSON.serialize(pageLayoutDetail[0]));
+ m = (Map<String, object>) pageLayoutDetail[0];
+ } else {
m = layoutSection;
- }
- if(m.containsKey('editLayoutSections')){
- List<object > targetLayout = (List<object>) m.get('editLayoutSections');
- for(object sectionObject: targetLayout){
- Map<String,object> section = (Map<String,object>) sectionObject;
- String sectionH = (String)section.get('heading');
- boolean useH = (boolean)section.get('useHeading');
- integer columns = (integer)section.get('columns');
- boolean useCollapse = (boolean)section.get('useCollapsibleSection');
+ }
+ if (m.containsKey('editLayoutSections')) {
+ List<object> targetLayout = (List<object>) m.get('editLayoutSections');
+ for (object sectionObject : targetLayout) {
+ Map<String, object> section = (Map<String, object>) sectionObject;
+ String sectionH = (String) section.get('heading');
+ boolean useH = (boolean) section.get('useHeading');
+ integer columns = (integer) section.get('columns');
+ boolean useCollapse = (boolean) section.get('useCollapsibleSection');
LayoutSection ls = new LayoutSection();
ls.Name = sectionH;
ls.useHeader = useH;
ls.columns = columns;
ls.allowCollapse = useCollapse;
- ls.layoutFields = new List<LayoutField>();
+ ls.layoutFields = new List<LayoutField>();
layoutSections.add(ls);
- List<object> layoutRows = (List<object>) section.get('layoutRows');
- system.debug('layout rows ====> '+layoutRows);
- for(Object itemObject : layoutRows ){
- Map<String,object> item = (Map<String,object>) itemObject;
- List<object> layoutItem = (List<object>)item.get('layoutItems');
- boolean priorFieldLayoutAdded = true;//initially true
- for(object fieldItemObject : layoutItem){
- Map<String, object> fields = (Map<String,object>) fieldItemObject;
+ List<object> layoutRows = (List<object>) section.get('layoutRows');
+ system.debug('layout rows ====> ' + layoutRows);
+ for (Object itemObject : layoutRows) {
+ Map<String, object> item = (Map<String, object>) itemObject;
+ List<object> layoutItem = (List<object>) item.get('layoutItems');
+ boolean priorFieldLayoutAdded = true; //initially true
+ for (object fieldItemObject : layoutItem) {
+ Map<String, object> fields = (Map<String, object>) fieldItemObject;
List<object> layoutComponents = (List<object>) fields.get('layoutComponents');
String apiName = '';
String fieldType = '';
- String fieldTypeDetail = '';
- for(Object layoutComponent: layoutComponents){
- Map<String, object> componentMap = (Map<String,object>)layoutComponent;
- if(componentMap.containsKey('value')){
+ String fieldTypeDetail = '';
+ for (Object layoutComponent : layoutComponents) {
+ Map<String, object> componentMap = (Map<String, object>) layoutComponent;
+ if (componentMap.containsKey('value')) {
apiName = (String) componentMap.get('value');
}
-
- if(componentMap.containsKey('type')){
+
+ if (componentMap.containsKey('type')) {
fieldType = (String) componentMap.get('type');
}
-
- if(componentMap.containsKey('details')){
- Map<String,object> detailsMap = (Map<String,object>) componentMap.get('details');
- boolean calculatedField = (boolean)detailsMap.get('calculated');
- boolean autoNumberField = (boolean)detailsMap.get('autoNumber');
- if(calculatedField || autoNumberField){
+
+ if (componentMap.containsKey('details')) {
+ Map<String, object> detailsMap = (Map<String, object>) componentMap.get('details');
+ boolean calculatedField = (boolean) detailsMap.get('calculated');
+ boolean autoNumberField = (boolean) detailsMap.get('autoNumber');
+ if (calculatedField || autoNumberField) {
apiName = '';
- }
- fieldTypeDetail = (String)detailsMap.get('type');
+ }
+ fieldTypeDetail = (String) detailsMap.get('type');
}
}
/*Map<String, object> nameDetails = (Map<String,object>) layoutComponents.get('Name');*/
- String fieldLabel = (String) fields.get('label');
- boolean placeholderF = (boolean) fields.get('placeholder');
- boolean isEditable = (boolean) fields.get('editableForUpdate')||(boolean)fields.get('editableForNew'); // Check the editable prop
- if( (apiName != '' && fieldType =='Field') || (placeholderF)){
- if(userMode == 'classic' && fieldTypeDetail == 'address'){
- String fieldLabelPrefix = fieldLabel.split(' ')[0] == 'Address'?'':fieldLabel.split(' ')[0];
- List<String> addressDetail = new List<String>{'Country','PostalCode','State','City','Street'};
- for(String addressType:addressDetail){
+ String fieldLabel = (String) fields.get('label');
+ boolean placeholderF = (boolean) fields.get('placeholder');
+ boolean isEditable = (boolean) fields.get('editableForUpdate') || (boolean) fields.get('editableForNew'); // Check the editable prop
+ if ((apiName != '' && fieldType == 'Field') || (placeholderF)) {
+ if (userMode == 'classic' && fieldTypeDetail == 'address') {
+ String fieldLabelPrefix = fieldLabel.split(' ')[0] == 'Address' ? '' : fieldLabel.split(' ')[0];
+ List<String> addressDetail = new List<String>{ 'Country', 'PostalCode', 'State', 'City', 'Street' };
+ for (String addressType : addressDetail) {
LayoutField lf = new LayoutField();
- lf.isRequired = (Boolean)fields.get('required');
+ lf.isRequired = (Boolean) fields.get('required');
lf.isPlaceHolder = placeholderF;
lf.editableField = isEditable;
- lf.fieldAPI = fieldLabelPrefix+addressType;
-
- lf.fieldLabel = fieldLabelPrefix+' '+addressType;
- lf.fieldType = 'string';
- if(ls.Name != '' || layoutSections.size() == 1){
+ lf.fieldAPI = fieldLabelPrefix + addressType;
+
+ lf.fieldLabel = fieldLabelPrefix + ' ' + addressType;
+ lf.fieldType = 'string';
+ if (ls.Name != '' || layoutSections.size() == 1) {
ls.layoutFields.add(lf);
- }else if(layoutSections.size() - 2 >= 0){
- layoutSections.get(layoutSections.size() - 2).layoutFields.add(lf);
+ } else if (layoutSections.size() - 2 >= 0) {
+ layoutSections.get(layoutSections.size() - 2).layoutFields.add(lf);
}
- if(lf.isRequired){
- system.debug(lf.fieldAPI+' is required');
+ if (lf.isRequired) {
+ system.debug(lf.fieldAPI + ' is required');
requiredFieldAPIList.add(lf.fieldAPI);
}
- if(string.isBlank(lf.fieldAPI)){
+ if (string.isBlank(lf.fieldAPI)) {
system.debug('==================================2');
continue;
- }else{
- fieldAPIToLabelMap.put(lf.fieldAPI,lf.fieldLabel);
+ } else {
+ fieldAPIToLabelMap.put(lf.fieldAPI, lf.fieldLabel);
}
}
continue;
}
- if(userMode == 'classic' && apiName == 'Name' && ConcatenationNameSType.contains(objectType)){
- List<String> nameDetail = new List<String>{'Salutation','LastName'};
- for(String nameField:nameDetail){
+ if (userMode == 'classic' && apiName == 'Name' && ConcatenationNameSType.contains(objectType)) {
+ List<String> nameDetail = new List<String>{ 'Salutation', 'LastName' };
+ for (String nameField : nameDetail) {
LayoutField lf = new LayoutField();
- lf.isRequired = (Boolean)fields.get('required');
- if(nameField == 'Salutation'){
+ lf.isRequired = (Boolean) fields.get('required');
+ if (nameField == 'Salutation') {
lf.isRequired = false;
}
lf.isPlaceHolder = placeholderF;
@@ -145,867 +148,146 @@
lf.fieldAPI = nameField;
lf.fieldLabel = nameField;
lf.fieldType = 'string';
- if(ls.Name != '' || layoutSections.size() == 1){
+ if (ls.Name != '' || layoutSections.size() == 1) {
ls.layoutFields.add(lf);
- }else if(layoutSections.size() - 2 >= 0){
- layoutSections.get(layoutSections.size() - 2).layoutFields.add(lf);
+ } else if (layoutSections.size() - 2 >= 0) {
+ layoutSections.get(layoutSections.size() - 2).layoutFields.add(lf);
}
- if(lf.isRequired){
- system.debug(lf.fieldAPI+' is required');
+ if (lf.isRequired) {
+ system.debug(lf.fieldAPI + ' is required');
requiredFieldAPIList.add(lf.fieldAPI);
- }
- if(string.isBlank(lf.fieldAPI)){
+ }
+ if (string.isBlank(lf.fieldAPI)) {
system.debug('==================================3');
continue;
- }else{
- fieldAPIToLabelMap.put(lf.fieldAPI,lf.fieldLabel);
+ } else {
+ fieldAPIToLabelMap.put(lf.fieldAPI, lf.fieldLabel);
}
}
continue;
}
- if(objectType == 'Case' && CaseWebFields.contains(apiName)){
+ if (objectType == 'Case' && CaseWebFields.contains(apiName)) {
continue;
}
LayoutField lf = new LayoutField();
- lf.isRequired = (Boolean)fields.get('required');
- lf.isPlaceHolder = placeholderF;
+ lf.isRequired = (Boolean) fields.get('required');
+ lf.isPlaceHolder = placeholderF;
lf.editableField = isEditable;
lf.fieldAPI = apiName;
lf.fieldLabel = fieldLabel;
lf.fieldType = fieldTypeDetail;
- if(ls.Name != '' || layoutSections.size() == 1){
+ if (ls.Name != '' || layoutSections.size() == 1) {
ls.layoutFields.add(lf);
- }else if(layoutSections.size() - 2 >= 0){
+ } else if (layoutSections.size() - 2 >= 0) {
layoutSections.get(layoutSections.size() - 2).layoutFields.add(lf);
}
- if(lf.isRequired){
- system.debug(lf.fieldAPI+' is required');
+ if (lf.isRequired) {
+ system.debug(lf.fieldAPI + ' is required');
requiredFieldAPIList.add(lf.fieldAPI);
}
- if(string.isBlank(lf.fieldAPI)){
+ if (string.isBlank(lf.fieldAPI)) {
system.debug('==================================1');
continue;
- }else{
- fieldAPIToLabelMap.put(lf.fieldAPI,lf.fieldLabel);
+ } else {
+ fieldAPIToLabelMap.put(lf.fieldAPI, lf.fieldLabel);
}
-
+
priorFieldLayoutAdded = true;
- }else
+ } else
priorFieldLayoutAdded = false;
- }
+ }
}
- if(layoutSections.get(layoutSections.size() -1).layoutFields.size() <= 0) {
+ if (layoutSections.get(layoutSections.size() - 1).layoutFields.size() <= 0) {
layoutSections.remove(layoutSections.size() - 1);
- }
+ }
}
}
- System.debug('Layout Section Result:'+JSon.serialize(layoutSections));
- system.debug('required API List:'+JSON.serialize(requiredFieldAPIList));
+ System.debug('Layout Section Result:' + JSon.serialize(layoutSections));
+ system.debug('required API List:' + JSON.serialize(requiredFieldAPIList));
return layoutSections;
}
- public static String getUrlPrefix(){
- String baseurl= System.URL.getOrgDomainUrl().getHost();
- system.debug('original url ===>'+ baseurl);
+ public static String getUrlPrefix() {
+ String baseurl = System.URL.getOrgDomainUrl().getHost();
+ system.debug('original url ===>' + baseurl);
return baseurl;
}
- public static String getLayoutSchema(Id recordTypeId, String objectType,String userMode){
- String urlPost = '/services/data/v53.0/sobjects/'+objectType+'/describe/layouts/';
- if(String.isNotEmpty(recordTypeId) && String.isNotBlank(recordTypeId)){
+ public static String getLayoutSchema(Id recordTypeId, String objectType, String userMode) {
+ String urlPost = '/services/data/v53.0/sobjects/' + objectType + '/describe/layouts/';
+ if (String.isNotEmpty(recordTypeId) && String.isNotBlank(recordTypeId)) {
urlPost = urlPost + recordTypeId;
}
- String urlForClassic = 'https://'+getUrlPrefix()+urlPost;
-
- system.debug('URL Post:'+urlForClassic);
+ String urlForClassic = 'https://' + getUrlPrefix() + urlPost;
+
+ system.debug('URL Post:' + urlForClassic);
HttpResponse resp = null;
- HttpRequest req = new HttpRequest();
- req.setMethod('GET');
- if(userMode =='lightning'){
- req.setEndPoint('callout:SF_Rest_API'+urlPost);
- system.debug('callout:SF_Rest_API'+urlPost);
- }else if(userMode == 'classic'){
- req.setEndpoint(urlForClassic);
+ HttpRequest req = new HttpRequest();
+ req.setMethod('GET');
+ if (userMode == 'lightning') {
+ req.setEndPoint('callout:SF_Rest_API' + urlPost);
+ system.debug('callout:SF_Rest_API' + urlPost);
+ } else if (userMode == 'classic') {
+ req.setEndpoint(urlForClassic);
req.setHeader('Authorization', 'Bearer ' + UserInfo.getsessionid());
- }
- Http client = new Http();
+ }
+ Http client = new Http();
resp = client.send(req);
- system.debug('Schema Body:'+JSON.serialize(resp.getBody()));
+ system.debug('Schema Body:' + JSON.serialize(resp.getBody()));
return resp.getBody();
}
- public static Id getDefaultRecordType(String ObjectName) {
+ public static Id getDefaultRecordType(String ObjectName) {
Map<String, Schema.SObjectType> GlobalDescribeMap = Schema.getGlobalDescribe();
Schema.SObjectType obj = GlobalDescribeMap.get(ObjectName);
Schema.DescribeSObjectResult describeResult = obj.getDescribe();
List<Schema.RecordTypeInfo> rtInfos = describeResult.getRecordTypeInfos();
- for(Schema.RecordTypeInfo rtInfo : rtInfos) {
- if(rtInfo.DefaultRecordTypeMapping) {
- return rtInfo.getRecordTypeId();
+ for (Schema.RecordTypeInfo rtInfo : rtInfos) {
+ if (rtInfo.DefaultRecordTypeMapping) {
+ return rtInfo.getRecordTypeId();
}
}
return null;
}
- public class LayoutWrapper{
- @AuraEnabled public List<LayoutSection> layoutSections{set;get;}
- @AuraEnabled public List<String> requiredFieldAPIList{set;get;}
- @AuraEnabled public Map<String,String> fieldAPIToLabelMap{set;get;}
+ public class LayoutWrapper {
+ @AuraEnabled
+ public List<LayoutSection> layoutSections { get; set; }
+ @AuraEnabled
+ public List<String> requiredFieldAPIList { get; set; }
+ @AuraEnabled
+ public Map<String, String> fieldAPIToLabelMap { get; set; }
}
- public class LayoutSection{
- @AuraEnabled public boolean useHeader {get;set;}
- @AuraEnabled public String name {get;set;}
- @AuraEnabled public boolean allowCollapse {get;set;}
- @AuraEnabled public integer columns {get;set;}
- @AuraEnabled public List<LayoutField> layoutFields {get;set;}
+ public class LayoutSection {
+ @AuraEnabled
+ public boolean useHeader { get; set; }
+ @AuraEnabled
+ public String name { get; set; }
+ @AuraEnabled
+ public boolean allowCollapse { get; set; }
+ @AuraEnabled
+ public integer columns { get; set; }
+ @AuraEnabled
+ public List<LayoutField> layoutFields { get; set; }
}
-
- public class LayoutField{
- @AuraEnabled public String fieldAPI {get;set;}
- @AuraEnabled public String fieldLabel{set;get;}
- @AuraEnabled public String fieldType{set;get;}
- @AuraEnabled public boolean editableField {get;set;}
- @AuraEnabled public boolean isRequired {get; set;}
- @AuraEnabled public boolean isPlaceHolder {get;set;}
- @AuraEnabled public String defaultValue{set;get;}
- }
-public static Integer ControllerUtil() {
-Integer i = 0;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-i++;
-return i;
-}
-}
\ No newline at end of file
+ public class LayoutField {
+ @AuraEnabled
+ public String fieldAPI { get; set; }
+ @AuraEnabled
+ public String fieldLabel { get; set; }
+ @AuraEnabled
+ public String fieldType { get; set; }
+ @AuraEnabled
+ public boolean editableField { get; set; }
+ @AuraEnabled
+ public boolean isRequired { get; set; }
+ @AuraEnabled
+ public boolean isPlaceHolder { get; set; }
+ @AuraEnabled
+ public String defaultValue { get; set; }
+ }
+ public static Integer ControllerUtil() {
+ Integer i = 0;
+
+ return i;
+ }
+}
diff --git a/force-app/main/default/classes/LayoutDescriberHelperTest.cls b/force-app/main/default/classes/LayoutDescriberHelperTest.cls
index 2915d9a..6d776ea 100644
--- a/force-app/main/default/classes/LayoutDescriberHelperTest.cls
+++ b/force-app/main/default/classes/LayoutDescriberHelperTest.cls
@@ -1,90 +1,102 @@
@isTest
private class LayoutDescriberHelperTest {
static testMethod void testMethod1() {
- String userMode = 'classic';//classic lightning
- String objectType = 'Contact';
- String recordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Doctor').getRecordTypeId();
+ String userMode = 'classic'; //classic lightning
+ String objectType = 'Contact';
+ String recordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Doctor').getRecordTypeId();
+ System.debug('record type id ===>' + recordTypeId + ' object type===>' + objectType + ' userMode===>' + userMode);
+ boolean useHeader = false;
+ String baseurl = System.URL.getOrgDomainUrl().getHost();
+ Map<String, object> detailsMap = new Map<String, object>();
+ Map<String, object> detailsMap2 = new Map<String, object>();
+ Map<String, object> detailsMap3 = new Map<String, object>();
+ detailsMap.put('calculated', true);
+ detailsMap.put('autoNumber', false);
+ detailsMap.put('type', 'address');
+ detailsMap2.put('calculated', false);
+ detailsMap2.put('autoNumber', false);
+ detailsMap2.put('type', 'repair');
+ detailsMap3.put('calculated', false);
+ detailsMap3.put('autoNumber', false);
+ detailsMap3.put('type', 'repair');
+ String fieldTypeDetail = (String) detailsMap.get('type');
- Map<String,object> detailsMap = new Map<String,object>();
- Map<String,object> detailsMap2 = new Map<String,object>();
- Map<String,object> detailsMap3 = new Map<String,object>();
- detailsMap.put('calculated',true);
- detailsMap.put('autoNumber',false);
- detailsMap.put('type','address');
- detailsMap2.put('calculated',false);
- detailsMap2.put('autoNumber',false);
- detailsMap2.put('type','repair');
- detailsMap3.put('calculated',false);
- detailsMap3.put('autoNumber',false);
- detailsMap3.put('type','repair');
+ List<Map<String, object>> componentMapList = new List<Map<String, object>>();
+ List<Map<String, object>> componentMapList2 = new List<Map<String, object>>();
+ List<Map<String, object>> componentMapList3 = new List<Map<String, object>>();
+ Map<String, object> componentMap = new Map<String, object>();
+ Map<String, object> componentMap2 = new Map<String, object>();
+ Map<String, object> componentMap3 = new Map<String, object>();
+ componentMap.put('value', 'Name');
+ componentMap.put('type', 'Field');
+ componentMap.put('details', detailsMap);
+ componentMapList.add(componentMap);
+ componentMap2.put('value', 'Name');
+ componentMap2.put('type', 'Field');
+ componentMap2.put('details', detailsMap2);
+ componentMapList2.add(componentMap2);
+ componentMap3.put('value', 'LastName');
+ componentMap3.put('type', 'Field');
+ componentMap3.put('details', detailsMap3);
+ componentMapList3.add(componentMap3);
+ String apiName = (String) componentMap.get('value');
+ String fieldType = (String) componentMap.get('type');
- List<Map<String, object>> componentMapList = new List<Map<String, object>>();
- List<Map<String, object>> componentMapList2 = new List<Map<String, object>>();
- List<Map<String, object>> componentMapList3 = new List<Map<String, object>>();
- Map<String, object> componentMap = new Map<String, object>();
- Map<String, object> componentMap2 = new Map<String, object>();
- Map<String, object> componentMap3 = new Map<String, object>();
- componentMap.put('value','Name');
- componentMap.put('type','Field');
- componentMap.put('details',detailsMap);
- componentMapList.add(componentMap);
- componentMap2.put('value','Name');
- componentMap2.put('type','Field');
- componentMap2.put('details',detailsMap2);
- componentMapList2.add(componentMap2);
- componentMap3.put('value','LastName');
- componentMap3.put('type','Field');
- componentMap3.put('details',detailsMap3);
- componentMapList3.add(componentMap3);
+ List<Map<String, object>> layoutComponentsList = new List<Map<String, object>>();
+ Map<String, object> layoutComponents = new Map<String, object>();
+ layoutComponents.put('layoutComponents', componentMapList);
+ layoutComponents.put('label', 'Address');
+ layoutComponents.put('placeholder', true);
+ layoutComponents.put('editableForNew', true);
+ layoutComponents.put('editableForUpdate', true);
+ layoutComponents.put('required', false);
+ layoutComponentsList.add(layoutComponents);
+ Map<String, object> layoutComponents2 = new Map<String, object>();
+ layoutComponents2.put('layoutComponents', componentMapList2);
+ layoutComponents2.put('label', 'Repair');
+ layoutComponents2.put('placeholder', true);
+ layoutComponents2.put('editableForNew', true);
+ layoutComponents2.put('editableForUpdate', true);
+ layoutComponents2.put('required', false);
+ layoutComponentsList.add(layoutComponents2);
+ Map<String, object> layoutComponents3 = new Map<String, object>();
+ layoutComponents3.put('layoutComponents', componentMapList3);
+ layoutComponents3.put('label', 'Repair');
+ layoutComponents3.put('placeholder', true);
+ layoutComponents3.put('editableForNew', true);
+ layoutComponents3.put('editableForUpdate', true);
+ layoutComponents3.put('required', false);
+ layoutComponentsList.add(layoutComponents3);
- List<Map<String, object>> layoutComponentsList = new List<Map<String, object>>();
- Map<String, object> layoutComponents = new Map<String, object>();
- layoutComponents.put('layoutComponents',componentMapList);
- layoutComponents.put('label','Address');
- layoutComponents.put('placeholder',true);
- layoutComponents.put('editableForNew',true);
- layoutComponents.put('required',false);
- layoutComponentsList.add(layoutComponents);
- Map<String, object> layoutComponents2 = new Map<String, object>();
- layoutComponents2.put('layoutComponents',componentMapList2);
- layoutComponents2.put('label','Repair');
- layoutComponents2.put('placeholder',true);
- layoutComponents2.put('editableForNew',true);
- layoutComponents2.put('required',false);
- layoutComponentsList.add(layoutComponents2);
- Map<String, object> layoutComponents3 = new Map<String, object>();
- layoutComponents3.put('layoutComponents',componentMapList3);
- layoutComponents3.put('label','Repair');
- layoutComponents3.put('placeholder',true);
- layoutComponents3.put('editableForNew',true);
- layoutComponents3.put('required',false);
- layoutComponentsList.add(layoutComponents3);
+ boolean placeholderF = (boolean) layoutComponents.get('placeholder');
+ boolean isEditable = (boolean) layoutComponents.get('editableForUpdate') || (boolean) layoutComponents.get('editableForNew');
+ System.debug('isEditable ===>' + isEditable);
+ List<Map<String, object>> itemList = new List<Map<String, object>>();
+ Map<String, object> item = new Map<String, object>();
+ item.put('layoutItems', layoutComponentsList);
+ itemList.add(item);
+ useHeader = true;
+ List<Map<String, object>> sectionList = new List<Map<String, object>>();
+ Map<String, object> section = new Map<String, object>();
+ section.put('heading', '');
+ section.put('useHeading', useHeader);
+ section.put('columns', 1);
+ section.put('useCollapsibleSection', true);
+ section.put('layoutRows', itemList);
+ sectionList.add(section);
-
- List<Map<String,object>> itemList = new List<Map<String,object>>();
- Map<String,object> item = new Map<String,object>();
- item.put('layoutItems',layoutComponentsList);
- itemList.add(item);
-
- List<Map<String,object>> sectionList = new List<Map<String,object>>();
- Map<String,object> section = new Map<String,object>();
- section.put('heading','');
- section.put('useHeading',true);
- section.put('columns',1);
- section.put('useCollapsibleSection',true);
- section.put('layoutRows',itemList);
- sectionList.add(section);
-
- Map<String, Object> layoutSection = new Map<String,Object>();
- layoutSection.put('layouts','123');
- layoutSection.put('editLayoutSections',sectionList);
- String layoutSectionJson = JSON.serialize(layoutSection);
- LayoutDescriberHelper.ControllerUtil();
- Test.setMock(HttpCalloutMock.class, new TestDataUtility.BaseHttpMock(layoutSectionJson,'OK','200'));
-
+ Map<String, Object> layoutSection = new Map<String, Object>();
+ layoutSection.put('layouts', '123');
+ layoutSection.put('editLayoutSections', sectionList);
+ String layoutSectionJson = JSON.serialize(layoutSection);
+ LayoutDescriberHelper.ControllerUtil();
+ Test.setMock(HttpCalloutMock.class, new TestDataUtility.BaseHttpMock(layoutSectionJson, 'OK', '200'));
Test.startTest();
- LayoutDescriberHelper.describeSectionWithFieldsWrapper(recordTypeId,objectType,userMode);
- LayoutDescriberHelper.describeSectionWithFieldsWrapper(null,objectType,userMode);
+ LayoutDescriberHelper.describeSectionWithFieldsWrapper(recordTypeId, objectType, userMode);
+ LayoutDescriberHelper.describeSectionWithFieldsWrapper(null, objectType, userMode);
+ LayoutDescriberHelper.describeSectionWithFields(recordTypeId, objectType, userMode);
+ LayoutDescriberHelper.getLayoutSchema(recordTypeId, objectType, userMode);
+ LayoutDescriberHelper.getUrlPrefix();
Test.stopTest();
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexArriveGoodsController.cls b/force-app/main/default/classes/LexArriveGoodsController.cls
index e69de29..5eeaf1f 100644
--- a/force-app/main/default/classes/LexArriveGoodsController.cls
+++ b/force-app/main/default/classes/LexArriveGoodsController.cls
@@ -0,0 +1,257 @@
+public without sharing class LexArriveGoodsController {
+ //鍒濆鍖�
+ @AuraEnabled
+ public static Results init(String arrType, String eSetId) {
+ Results results = new Results();
+ results.isNoteStay = LexUtility.getIsNoteStay();
+ try {
+ ArriveGoodsController arrController = new ArriveGoodsController(eSetId, arrType);
+ arrController.isLwc = true;
+ arrController.init();
+ results.arrGoodCon = JSON.serialize(arrController);
+ results.coc = arrController.coc;
+ results.saveFLGbln = arrController.saveFLGbln;
+ results.returnFLGbln = arrController.ReturnFLGbln;
+ results.result = 'Success';
+ } catch (Exception e) {
+ results.result = 'Fail';
+ results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
+ }
+ return results;
+ }
+
+ //鎼滅储浜у搧
+ @AuraEnabled
+ public static Results searchProduct(String barcode, String arrControllerStr) {
+ Results results = new Results();
+ try {
+ System.debug('arrControllerStr:' + arrControllerStr);
+ ArriveGoodsController arrController = (ArriveGoodsController) JSON.deserialize(arrControllerStr, ArriveGoodsController.class);
+ arrController.barcode = barcode;
+ arrController.returnError = null;
+ arrController.warningList = new List<String>();
+ arrController.errorList = new List<String>();
+ arrController.SearchPro();
+ results.arrGoodCon = JSON.serialize(arrController);
+ if (arrController.returnError != null && arrController.returnError != '') {
+ results.result = 'Fail';
+ results.errorMsgList = arrController.errorList;
+ results.warningMsgList = arrController.warningList;
+ results.errorMsg = arrController.returnError;
+ } else {
+ results.coc = arrController.coc;
+ results.saveFLGbln = arrController.saveFLGbln;
+ results.returnFLGbln = arrController.ReturnFLGbln;
+ results.detailsSummary = changeType1(arrController.detailsSummary);
+ results.consumableorderdetailsRecords = changeType1(arrController.ConsumableorderdetailsRecords);
+ results.showGoodsofReturnList = changeType1(arrController.ShowGoodsofReturnList);
+ results.consumableInventory = changeType1(arrController.consumableInventory);
+ results.consumableorderdetailsRecordserror = changeType1(arrController.ConsumableorderdetailsRecordserror);
+ results.errorMsgList = arrController.errorList;
+ results.warningMsgList = arrController.warningList;
+ results.result = 'Success';
+ }
+ } catch (Exception e) {
+ results.result = 'Fail';
+ results.errorMsg = e.getLineNumber() + '---' + e.getMessage() + '---' + e.getStackTraceString();
+ }
+ return results;
+ }
+
+ //鍒拌揣纭
+ @AuraEnabled
+ public static Results arriveGoodsConfim(String arrControllerStr) {
+ Results results = new Results();
+ try {
+ ArriveGoodsController arrController = (ArriveGoodsController) JSON.deserialize(arrControllerStr, ArriveGoodsController.class);
+ arrController.returnError = null;
+ arrController.warningList = new List<String>();
+ arrController.errorList = new List<String>();
+ Pagereference page = arrController.ArriveGoodsConfim();
+ results.arrGoodCon = JSON.serialize(arrController);
+ if (arrController.returnError != null && arrController.returnError != '') {
+ results.result = 'Fail';
+ results.errorMsgList = arrController.errorList;
+ results.warningMsgList = arrController.warningList;
+ results.errorMsg = arrController.returnError;
+ } else {
+ if (arrController.urlType == 'UnabletoEdit') {
+ results.url = '/lexarrivegsdetails?EsetId=' + arrController.arriveId;
+ }
+ results.errorMsgList = arrController.errorList;
+ results.warningMsgList = arrController.warningList;
+ results.result = 'Success';
+ }
+ } catch (Exception e) {
+ results.result = 'Fail';
+ results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
+ }
+ return results;
+ }
+
+ //鐧诲綍杩斿搧
+ @AuraEnabled
+ public static Results updateGoodsOfReturn(String arrControllerStr, String showGoodsofReturnListStr) {
+ Results results = new Results();
+ try {
+ List<ConsumableorderdetailsInfo> showGoodsofReturnList = (List<ConsumableorderdetailsInfo>) JSON.deserialize(
+ showGoodsofReturnListStr,
+ List<ConsumableorderdetailsInfo>.class
+ );
+ ArriveGoodsController arrController = (ArriveGoodsController) JSON.deserialize(arrControllerStr, ArriveGoodsController.class);
+ arrController.ShowGoodsofReturnList = changeType2(showGoodsofReturnList);
+ arrController.returnError = null;
+ arrController.warningList = new List<String>();
+ arrController.errorList = new List<String>();
+ StaticParameter.ConsumableOrderTrigger = true; //Add by Li Jun for bypass ConsumableOrderTrigger 20230616
+ Pagereference page = arrController.UpdateGoodsOfReturn();
+ results.arrGoodCon = JSON.serialize(arrController);
+ if (arrController.returnError != null && arrController.returnError != '') {
+ results.result = 'Fail';
+ results.errorMsgList = arrController.errorList;
+ results.warningMsgList = arrController.warningList;
+ results.errorMsg = arrController.returnError;
+ } else {
+ if (arrController.urlType == 'ToReturnGoodsPage') {
+ results.url = '/detail/' + arrController.return_Order_id;
+ }
+ if (arrController.urlType == 'ToInventoryGoodsPage') {
+ results.url = '/detail/' + arrController.inventory_Order_id;
+ }
+ results.errorMsgList = arrController.errorList;
+ results.warningMsgList = arrController.warningList;
+ results.result = 'Success';
+ }
+ } catch (Exception e) {
+ results.result = 'Fail';
+ results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
+ }
+ return results;
+ }
+
+ public static List<ConsumableorderdetailsInfo> changeType1(List<ArriveGoodsController.ConsumableorderdetailsInfo> conList) {
+ List<ConsumableorderdetailsInfo> conList1 = new List<ConsumableorderdetailsInfo>();
+ if (conList != null) {
+ for (ArriveGoodsController.ConsumableorderdetailsInfo con : conList) {
+ ConsumableorderdetailsInfo con1 = new ConsumableorderdetailsInfo();
+ con1.esd = con.esd;
+ con1.Prod = con.Prod;
+ con1.ProductName = con.ProductName;
+ con1.barCodeNo = con.barCodeNo;
+ con1.sterilizationlimitDate = con.sterilizationlimitDate;
+ con1.serialNoorLotNo = con.serialNoorLotNo;
+ con1.tracingCodeNo = con.tracingCodeNo;
+ con1.ReturnReason = con.ReturnReason;
+ con1.oldConsumableCount = con.oldConsumableCount;
+ con1.ErrorReason = con.ErrorReason;
+ con1.canEdit = con.canEdit;
+ con1.intMark = con.intMark;
+ con1.arriveAmount = con.arriveAmount;
+ con1.arrivedCount = con.arrivedCount;
+ con1.ReportProductExpirationDate = con.ReportProductExpirationDate;
+ conList1.add(con1);
+ }
+ }
+ return conList1;
+ }
+
+ public static List<ArriveGoodsController.ConsumableorderdetailsInfo> changeType2(List<ConsumableorderdetailsInfo> conList) {
+ List<ArriveGoodsController.ConsumableorderdetailsInfo> conList1 = new List<ArriveGoodsController.ConsumableorderdetailsInfo>();
+ if (conList != null) {
+ for (ConsumableorderdetailsInfo con : conList) {
+ ArriveGoodsController.ConsumableorderdetailsInfo con1 = new ArriveGoodsController.ConsumableorderdetailsInfo();
+ con1.esd = con.esd;
+ con1.Prod = con.Prod;
+ con1.ProductName = con.ProductName;
+ con1.barCodeNo = con.barCodeNo;
+ con1.sterilizationlimitDate = con.sterilizationlimitDate;
+ con1.serialNoorLotNo = con.serialNoorLotNo;
+ con1.tracingCodeNo = con.tracingCodeNo;
+ con1.ReturnReason = con.ReturnReason;
+ con1.oldConsumableCount = con.oldConsumableCount;
+ con1.ErrorReason = con.ErrorReason;
+ con1.canEdit = con.canEdit;
+ con1.intMark = con.intMark;
+ con1.arriveAmount = con.arriveAmount;
+ con1.arrivedCount = con.arrivedCount;
+ con1.ReportProductExpirationDate = con.ReportProductExpirationDate;
+ conList1.add(con1);
+ }
+ }
+ return conList1;
+ }
+
+ public class Results {
+ @AuraEnabled
+ public String result;
+ @AuraEnabled
+ public String errorMsg;
+ @AuraEnabled
+ public String url;
+ @AuraEnabled
+ public String arrGoodCon;
+ @AuraEnabled
+ public Consumable_order__c coc;
+ @AuraEnabled
+ public Boolean returnFLGbln;
+ @AuraEnabled
+ public Boolean saveFLGbln;
+ @AuraEnabled
+ public List<ConsumableorderdetailsInfo> detailsSummary;
+ @AuraEnabled
+ public List<ConsumableorderdetailsInfo> consumableorderdetailsRecords;
+ @AuraEnabled
+ public List<ConsumableorderdetailsInfo> showGoodsofReturnList;
+ @AuraEnabled
+ public List<ConsumableorderdetailsInfo> consumableInventory;
+ @AuraEnabled
+ public List<ConsumableorderdetailsInfo> consumableorderdetailsRecordserror;
+ @AuraEnabled
+ public List<String> errorMsgList;
+ @AuraEnabled
+ public List<String> warningMsgList;
+ @AuraEnabled
+ public Boolean isNoteStay;
+ }
+
+ public class ConsumableorderdetailsInfo implements Comparable {
+ @AuraEnabled
+ public Consumable_order_details2__c esd { get; set; }
+ @AuraEnabled
+ public Product2__c Prod { get; set; }
+ @AuraEnabled
+ public String ProductName { get; set; }
+ @AuraEnabled
+ public String barCodeNo { get; set; }
+ @AuraEnabled
+ public Date sterilizationlimitDate { get; set; }
+ @AuraEnabled
+ public String serialNoorLotNo { get; set; }
+ @AuraEnabled
+ public String tracingCodeNo { get; set; }
+ @AuraEnabled
+ public String ReturnReason { get; set; }
+ @AuraEnabled
+ public String oldConsumableCount { get; set; }
+ @AuraEnabled
+ public String ErrorReason { get; set; }
+ @AuraEnabled
+ public boolean canEdit { get; set; }
+ @AuraEnabled
+ public Integer intMark { get; set; }
+ @AuraEnabled
+ public Decimal arriveAmount { get; set; }
+ @AuraEnabled
+ public Decimal arrivedCount { get; set; }
+ @AuraEnabled
+ public String ReportProductExpirationDate { get; set; }
+
+ public ConsumableorderdetailsInfo() {
+ }
+
+ // 鎺掑簭
+ public Integer compareTo(Object compareTo) {
+ return null;
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexArriveGoodsControllerTest.cls b/force-app/main/default/classes/LexArriveGoodsControllerTest.cls
new file mode 100644
index 0000000..5e42821
--- /dev/null
+++ b/force-app/main/default/classes/LexArriveGoodsControllerTest.cls
@@ -0,0 +1,426 @@
+@isTest
+private class LexArriveGoodsControllerTest {
+ @IsTest
+ static void test1() {
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+
+ Account myAccount1 = new Account(
+ Name = 'Testaccount001',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999996'
+ );
+ Account myAccount2 = new Account(
+ Name = 'Testaccount002',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900',
+ Product_Limit_Date__c = 'Test01|2|4,Test02|3|5'
+ );
+ insert new List<Account>{ myAccount1, myAccount2 };
+
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ RecordTypeId = '01210000000aMAFAA2',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ RecordTypeId = '01210000000aMAFAA2',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ // Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Total_num__c = 3;
+ Order1.OrderNumber_arrived__c = 1;
+ Order1.Delivery_detail_count__c = 1;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 40;
+ insert Orderdet;
+
+ //鍙戣揣鏄庣粏
+ //鍒拌揣姝g‘淇℃伅
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001002';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet1.TracingCode__c = 'BXJRA';
+
+ //鍙栨秷浜у搧
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001003';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ //Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
+ Orderdet2.Cancellation_Date__c = Date.today();
+ Orderdet2.TracingCode__c = 'BXJRB';
+ //閿�鍞骇鍝�
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001004';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Test01';
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.TracingCode__c = 'BXJRC';
+ //Orderdet3.Box_Piece__c = '鐩�';
+
+ //鍑哄簱浜у搧
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001005';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Test01';
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.TracingCode__c = 'BXJRD';
+
+ //宸插埌璐т骇鍝�
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001006';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Test01';
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
+ Orderdet5.Arrive_date__c = Date.today();
+ Orderdet5.TracingCode__c = 'BXJRE';
+
+ //鍙戣揣鏄庣粏
+ //绠$悊缂栫爜鍖呭惈鏁板瓧
+ Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
+ Orderdet6.Name = 'OCM_01_001002';
+ Orderdet6.Consumable_order_minor__c = Order1.Id;
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Asset_Model_No__c = 'Test01';
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BX123';
+ Orderdet6.TracingCode__c = 'BX123';
+
+ //鍙戦敊搴� 鏈埌璐�
+ Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
+ Orderdets8.Name = 'OCM_01_001011';
+ Orderdets8.Consumable_order_minor__c = Order1.Id;
+ Orderdets8.Consumable_Product__c = pro1.Id;
+ Orderdets8.Asset_Model_No__c = 'Test01';
+ Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
+ Orderdets8.Box_Piece__c = '鐩�';
+ Orderdets8.TracingCode__c = 'BXsys';
+
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5, Orderdet6, Orderdets8 };
+
+ List<Consumable_orderdetails__c> cod1 = [
+ SELECT Id
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c = :Order1.Id
+ ];
+ System.assertEquals(1, cod1.size());
+
+ PageReference page = new PageReference('/apex/ArriveGoods?Esetid=' + Order1.Id);
+
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ LexArriveGoodsController.Results re = LexArriveGoodsController.init('Arr', Order1.Id);
+ String arrControllerStr = re.arrGoodCon;
+ LexArriveGoodsController.searchProduct('', arrControllerStr);
+ re = LexArriveGoodsController.searchProduct(
+ '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXsys\n01049531702003111115120017181000105ZK250BXsun\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BX111\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BX123',
+ arrControllerStr
+ );
+ arrControllerStr = re.arrGoodCon;
+ LexArriveGoodsController.arriveGoodsConfim(arrControllerStr);
+ System.Test.stopTest();
+ }
+ }
+
+ @IsTest
+ static void test2() {
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ RecordTypeId = '01210000000aMAFAA2',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ RecordTypeId = '01210000000aMAFAA2',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+
+ //杩斿搧璁㈠崟
+
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_002';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '杩斿搧';
+ Order2.Dealer_Info__c = myAccount1.id;
+ Order2.RecordTypeid = System.Label.Dealer_Returned_Label;
+ insert Order1;
+ insert Order2;
+
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
+
+ //鍙戣揣鏄庣粏
+ //娌″嚭搴擄紝娌¢攢鍞紝灏辨槸鍦ㄥ簱
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Pro001';
+ Orderdet1.Arrive_date__c = date.today();
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.TracingCode__c = 'BXSYS';
+
+ //daohuo
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Pro001';
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet2.Arrive_date__c = date.today();
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRI';
+ Orderdet2.TracingCode__c = 'BXSYS';
+ //sale
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Pro001';
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet3.Arrive_date__c = date.today();
+ Orderdet3.Used_date__c = date.today();
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRJ';
+ Orderdet3.TracingCode__c = 'BXSYS';
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Pro001';
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet4.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet4.Send_Date__c = date.today();
+ Orderdet4.Arrive_date__c = date.today();
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BX222';
+ Orderdet4.TracingCode__c = 'BXSYS';
+ //quxiao
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001005';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Pro001';
+ Orderdet5.Cancellation_Date__c = Date.today();
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRZ';
+ Orderdet5.Box_Piece__c = '涓�';
+ Orderdet5.TracingCode__c = 'BXSYS';
+ //fanpin
+ Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
+ Orderdet6.Name = 'OCM_01_001006';
+ Orderdet6.Consumable_order_minor__c = Order1.Id;
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Asset_Model_No__c = 'Pro001';
+ Orderdet6.Consumable_Return_order__c = Order2.Id;
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet6.Box_Piece__c = '涓�';
+ Orderdet6.TracingCode__c = 'BXSYS';
+
+ Consumable_order_details2__c Orderdet7 = new Consumable_order_details2__c();
+ Orderdet7.Name = 'OCM_01_001001';
+ Orderdet7.Consumable_order_minor__c = Order1.Id;
+ Orderdet7.Consumable_Product__c = pro1.Id;
+ Orderdet7.Asset_Model_No__c = 'Pro001';
+ Orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet7.Bar_Code__c = '01049531702003111115120017181000105ZK250BX333';
+ Orderdet7.TracingCode__c = 'BXSYS';
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5, Orderdet6, Orderdet7 };
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ System.Test.startTest();
+ Controller.init();
+ Controller.barcode = '01049531702003111115120017181000105ZK250BXAAA\n01049531702003111115120017181000105ZK250BXJRJ\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BX123\n01049531702003111115120017181000105ZK250BX222';
+ Controller.SearchPro();
+ Controller.ArriveGoodsConfim();
+ Controller.UpdateGoodsOfReturn();
+ controller.getinventorysize();
+ LexArriveGoodsController.Results re = LexArriveGoodsController.init('Arr', '');
+ String arrControllerStr = re.arrGoodCon;
+ re = LexArriveGoodsController.searchProduct(
+ '01049531702003111115120017181000105ZK250BXAAA\n01049531702003111115120017181000105ZK250BXJRJ\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BX123\n01049531702003111115120017181000105ZK250BX222',
+ arrControllerStr
+ );
+ arrControllerStr = re.arrGoodCon;
+ LexArriveGoodsController.arriveGoodsConfim(arrControllerStr);
+ LexArriveGoodsController.updateGoodsOfReturn(re.arrGoodCon, JSON.serialize(re.showGoodsofReturnList));
+ LexArriveGoodsController.ConsumableorderdetailsInfo con = new LexArriveGoodsController.ConsumableorderdetailsInfo();
+ List<LexArriveGoodsController.ConsumableorderdetailsInfo> conList = new List<LexArriveGoodsController.ConsumableorderdetailsInfo>();
+ conList.add(con);
+ LexArriveGoodsController.changeType2(conList);
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexArriveGoodsControllerTest.cls-meta.xml b/force-app/main/default/classes/LexArriveGoodsControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexArriveGoodsControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexArriveGoodsControllerTest1.cls b/force-app/main/default/classes/LexArriveGoodsControllerTest1.cls
new file mode 100644
index 0000000..ffb4887
--- /dev/null
+++ b/force-app/main/default/classes/LexArriveGoodsControllerTest1.cls
@@ -0,0 +1,214 @@
+@isTest
+public class LexArriveGoodsControllerTest1 {
+ static void test1() {
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+
+ Account myAccount1 = new Account(
+ Name = 'Testaccount001',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999996'
+ );
+ Account myAccount2 = new Account(
+ Name = 'Testaccount002',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900',
+ Product_Limit_Date__c = 'Test01|2|4,Test02|3|5'
+ );
+ insert new List<Account>{ myAccount1, myAccount2 };
+
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ];
+ // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '鏈夊姽',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false);
+ // insert new Product2[] {prod01,prod02};
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ RecordTypeId = '01210000000aMAFAA2',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ RecordTypeId = '01210000000aMAFAA2',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ // Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Total_num__c = 3;
+ Order1.OrderNumber_arrived__c = 1;
+ Order1.Delivery_detail_count__c = 1;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+
+ //璁㈠崟鏄庣粏
+ //fahuo
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 40;
+ insert Orderdet;
+
+ //鍙戣揣鏄庣粏
+ //鍒拌揣姝g‘淇℃伅
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001002';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet1.TracingCode__c = 'BXJRA';
+
+ //鍙栨秷浜у搧
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001003';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ //Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB';
+ Orderdet2.Cancellation_Date__c = Date.today();
+ Orderdet2.TracingCode__c = 'BXJRB';
+ //閿�鍞骇鍝�
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001004';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Asset_Model_No__c = 'Test01';
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC';
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.TracingCode__c = 'BXJRC';
+ //Orderdet3.Box_Piece__c = '鐩�';
+
+ //鍑哄簱浜у搧
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001005';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Asset_Model_No__c = 'Test01';
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD';
+ Orderdet4.Send_Date__c = Date.today();
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.TracingCode__c = 'BXJRD';
+
+ //宸插埌璐т骇鍝�
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001006';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Asset_Model_No__c = 'Test01';
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE';
+ Orderdet5.Arrive_date__c = Date.today();
+ Orderdet5.TracingCode__c = 'BXJRE';
+
+ //鍙戣揣鏄庣粏
+ //绠$悊缂栫爜鍖呭惈鏁板瓧
+ Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
+ Orderdet6.Name = 'OCM_01_001002';
+ Orderdet6.Consumable_order_minor__c = Order1.Id;
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Asset_Model_No__c = 'Test01';
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BX123';
+ Orderdet6.TracingCode__c = 'BX123';
+
+ //鍙戦敊搴� 鏈埌璐�
+ Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c();
+ Orderdets8.Name = 'OCM_01_001011';
+ Orderdets8.Consumable_order_minor__c = Order1.Id;
+ Orderdets8.Consumable_Product__c = pro1.Id;
+ Orderdets8.Asset_Model_No__c = 'Test01';
+ Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys';
+ Orderdets8.Box_Piece__c = '鐩�';
+ Orderdets8.TracingCode__c = 'BXsys';
+
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5, Orderdet6, Orderdets8 };
+
+ List<Consumable_orderdetails__c> cod1 = [
+ SELECT Id
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c = :Order1.Id
+ ];
+ System.assertEquals(1, cod1.size());
+
+ PageReference page = new PageReference('/apex/ArriveGoods?Esetid=' + Order1.Id);
+
+ System.Test.setCurrentPage(page);
+ ArriveGoodsController Controller = new ArriveGoodsController();
+ //鍒濆鍖栨祴璇�
+ System.Test.startTest();
+ LexArriveGoodsController.Results re = LexArriveGoodsController.init('Arr', Order1.Id);
+ String arrControllerStr = re.arrGoodCon;
+ LexArriveGoodsController.searchProduct('', arrControllerStr);
+ re = LexArriveGoodsController.searchProduct(
+ '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXsys\n01049531702003111115120017181000105ZK250BXsun\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BX111\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BX123',
+ arrControllerStr
+ );
+ arrControllerStr = re.arrGoodCon;
+ LexArriveGoodsController.arriveGoodsConfim(arrControllerStr);
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexArriveGoodsControllerTest1.cls-meta.xml b/force-app/main/default/classes/LexArriveGoodsControllerTest1.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexArriveGoodsControllerTest1.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexArriveGoodsMainController.cls b/force-app/main/default/classes/LexArriveGoodsMainController.cls
index 489086c..3e7d7cf 100644
--- a/force-app/main/default/classes/LexArriveGoodsMainController.cls
+++ b/force-app/main/default/classes/LexArriveGoodsMainController.cls
@@ -1,13 +1,13 @@
public without sharing class LexArriveGoodsMainController {
/*****************妞滅储鐢�******************/
//缁忛攢鍟嗕骇鍝佸垎绫�
- public static String agencyProType {get;set;}
+ public static String agencyProType { get; set; }
// public static Consumable_order__c coc { get; set; }
public static String category1 { get; set; }
private static String cate1ForSort = null;
private static Date cate2ForSort = Date.today();
private static Date cate2 = Date.today();
- private static String[] columus = new String[]{ 'Product2__c.Name'};
+ private static String[] columus = new List<String>{ 'Product2__c.Name' };
// 浜у搧 ID
private static String ESetId = '';
private static String accountid = null;
@@ -21,37 +21,29 @@
// 鐧诲綍鑰呭伐浣滃湴
private static String userWorkLocation;
// 20200904 ljh 姹囨�讳娇鐢� start
- public static Integer Total_num {get; set;}
- public static Integer OrderNumber_arrived {get; set;}
- public static Integer Delivery_detail_count {get; set;}
- public static Integer OrderNumber_notarrive {get; set;}
- public static Integer More_than_seven_days {get; set;}
+ public static Integer Total_num { get; set; }
+ public static Integer OrderNumber_arrived { get; set; }
+ public static Integer Delivery_detail_count { get; set; }
+ public static Integer OrderNumber_notarrive { get; set; }
+ public static Integer More_than_seven_days { get; set; }
@AuraEnabled
- public static Results init(){
+ public static Results init() {
Results results = new Results();
results.isNoteStay = LexUtility.getIsNoteStay();
try {
- List<String> idList = new List<String>();
- idList.add('a2K10000002zHyDEAU');
- idList.add('a2K10000002zIJEEA2');
- idList.add('a2K10000002zK9rEAE');
- idList.add('a2K10000004AKGBEA4');
- idList.add('a2K10000004ALqeEAG');
- idList.add('a2K10000004AMmrEAG');
- idList.add('a2K10000004ANvDEAW');
- idList.add('a2K10000004AOVxEAO');
- idList.add('a2K10000004AOJZEA4');
- idList.add('a2K10000004AOLuEAO');
- idList.add('a2K10000004AOLfEAO');
// coc = new Consumable_order__c();
String userId = UserInfo.getUserId();
- List<user> Useracc = New List<user>();
- Useracc = [select accountid, Work_Location__c,UserPro_Type__c from user where id =:userId];
+ List<user> Useracc = new List<user>();
+ Useracc = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
accountid = Useracc[0].accountid;
userWorkLocation = Useracc[0].Work_Location__c;
agencyProType = Useracc[0].UserPro_Type__c;
- if(String.isBlank(Useracc[0].UserPro_Type__c)){
+ if (String.isBlank(Useracc[0].UserPro_Type__c)) {
agencyProType = 'ET';
}
// 鑾峰緱璁㈠崟涓�瑙�
@@ -74,7 +66,18 @@
for (String s : column) {
soql += ',' + s;
}
- soql += ' from Consumable_order__c where Order_type__c = \''+'璁㈠崟'+'\' and recordtypeid =\'' + System.Label.RT_ConOrder_Delivery + '\' and Dealer_Info__c =\'' + accountid +'\' and Order_ProType__c =\'' + agencyProType +'\' and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_Owner_WorkLocal__c = \'' + userWorkLocation + '\' and showFalseNotshowTrue__c = false order by Deliver_date__c'; //
+ soql +=
+ ' from Consumable_order__c where Order_type__c = \'' +
+ '璁㈠崟' +
+ '\' and recordtypeid =\'' +
+ System.Label.RT_ConOrder_Delivery +
+ '\' and Dealer_Info__c =\'' +
+ accountid +
+ '\' and Order_ProType__c =\'' +
+ agencyProType +
+ '\' and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_Owner_WorkLocal__c = \'' +
+ userWorkLocation +
+ '\' and showFalseNotshowTrue__c = false order by Deliver_date__c'; //
// soql = 'select id,name,ContractNo__c,Total_num__c,OrderNumber_arrived__c,Delivery_detail_count__c,OrderNumber_notarrive__c,More_than_seven_days__c,Shipment_date__c,First_Delivery__c from Consumable_order__c where id in :idList';
raesList = Database.query(soql);
//20200904 ljh add start
@@ -83,22 +86,22 @@
Delivery_detail_count = 0;
OrderNumber_notarrive = 0;
More_than_seven_days = 0;
- System.debug('-----1------'+raesList);
- for(Consumable_order__c conorder :raesList){
- if(conorder.Total_num__c != null){
- Total_num += (Integer)conorder.Total_num__c;
+ System.debug('-----1------' + raesList);
+ for (Consumable_order__c conorder : raesList) {
+ if (conorder.Total_num__c != null) {
+ Total_num += (Integer) conorder.Total_num__c;
}
- if(conorder.OrderNumber_arrived__c != null){
- OrderNumber_arrived += (Integer)conorder.OrderNumber_arrived__c;
+ if (conorder.OrderNumber_arrived__c != null) {
+ OrderNumber_arrived += (Integer) conorder.OrderNumber_arrived__c;
}
- if(conorder.Delivery_detail_count__c != null){
- Delivery_detail_count += (Integer)conorder.Delivery_detail_count__c;
+ if (conorder.Delivery_detail_count__c != null) {
+ Delivery_detail_count += (Integer) conorder.Delivery_detail_count__c;
}
- if(conorder.OrderNumber_notarrive__c != null){
- OrderNumber_notarrive += (Integer)conorder.OrderNumber_notarrive__c;
+ if (conorder.OrderNumber_notarrive__c != null) {
+ OrderNumber_notarrive += (Integer) conorder.OrderNumber_notarrive__c;
}
- if(conorder.More_than_seven_days__c != null){
- More_than_seven_days += (Integer)conorder.More_than_seven_days__c;
+ if (conorder.More_than_seven_days__c != null) {
+ More_than_seven_days += (Integer) conorder.More_than_seven_days__c;
}
}
results.agencyProType = agencyProType;
@@ -120,7 +123,13 @@
}
@AuraEnabled
- public static Results searchConsumableorderdetails(String category1Str, Date cate2Str, String accountidStr, String userWorkLocationStr, String agencyProTypeStr){
+ public static Results searchConsumableorderdetails(
+ String category1Str,
+ Date cate2Str,
+ String accountidStr,
+ String userWorkLocationStr,
+ String agencyProTypeStr
+ ) {
Results results = new Results();
category1 = category1Str;
cate2 = cate2Str;
@@ -149,16 +158,23 @@
for (String s : column) {
soql += ',' + s;
}
- soql += ' from Consumable_order__c where Order_type__c = \''+'璁㈠崟'+'\' and recordtypeid =\'' + System.Label.RT_ConOrder_Delivery + '\' and Dealer_Info__c =\'' + accountid +'\' and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) ';
+ soql +=
+ ' from Consumable_order__c where Order_type__c = \'' +
+ '璁㈠崟' +
+ '\' and recordtypeid =\'' +
+ System.Label.RT_ConOrder_Delivery +
+ '\' and Dealer_Info__c =\'' +
+ accountid +
+ '\' and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) ';
soql += 'and Order_Owner_WorkLocal__c = \'' + userWorkLocation + '\' ';
soql += 'and showFalseNotshowTrue__c = false';
if (!String.isBlank(category1)) {
soql += ' and Name like \'%' + String.escapeSingleQuotes(category1.replaceAll('%', '\\%')) + '%\' ';
}
- if(cate2 != null){
+ if (cate2 != null) {
soql += ' and Shipment_date__c = :cate2 ';
}
- soql += ' and Order_ProType__c =\'' + agencyProType +'\'';
+ soql += ' and Order_ProType__c =\'' + agencyProType + '\'';
soql += ' order by Deliver_date__c';
system.debug('====soql:' + soql);
raesList = Database.query(soql);
@@ -205,4 +221,4 @@
@AuraEnabled
public Boolean isNoteStay;
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexArriveGoodsMainControllerTest.cls b/force-app/main/default/classes/LexArriveGoodsMainControllerTest.cls
new file mode 100644
index 0000000..b80a6d2
--- /dev/null
+++ b/force-app/main/default/classes/LexArriveGoodsMainControllerTest.cls
@@ -0,0 +1,133 @@
+@istest
+public class LexArriveGoodsMainControllerTest {
+ @IsTest
+ static void lexArriveGoodsMainControllerTest1() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '9999900');
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c(
+ Name = 'OCM_01_001',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c Order2 = new Consumable_order__c(
+ Name = 'OCM_01_002',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ insert new List<Consumable_order__c>{ Order1, Order2 };
+
+ //鏄庣粏1
+ Consumable_orderdetails__c createDetail = new Consumable_orderdetails__c();
+ createDetail.name = 'Too001';
+ createDetail.Consumable_Product__c = pro1.id;
+ createDetail.Dealer_Custom_Price__c = 999.00;
+ createDetail.Consumable_count__c = 3;
+ createDetail.Consumable_order__c = Order1.id;
+ createDetail.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail;
+ Consumable_orderdetails__c createDetail1 = new Consumable_orderdetails__c();
+ createDetail1.name = 'Too002';
+ createDetail1.Consumable_Product__c = pro2.id;
+ createDetail1.Consumable_order__c = Order2.id;
+ createDetail1.Dealer_Custom_Price__c = 999.00;
+ createDetail1.Consumable_count__c = 4;
+ createDetail1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail1;
+
+ //璁㈠崟鏄庣粏
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001001',
+ Consumable_order_minor__c = Order1.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001002',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001003',
+ Consumable_order_minor__c = Order1.Id,
+ //Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001004',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4 };
+
+ LexArriveGoodsMainController.init();
+ LexArriveGoodsMainController.searchConsumableorderdetails('Too001', null, myAccount1.Id, '鍖椾含', 'ET');
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexArriveGoodsMainControllerTest.cls-meta.xml b/force-app/main/default/classes/LexArriveGoodsMainControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexArriveGoodsMainControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexArriveGsDetailsController.cls b/force-app/main/default/classes/LexArriveGsDetailsController.cls
index 05b90bc..b434454 100644
--- a/force-app/main/default/classes/LexArriveGsDetailsController.cls
+++ b/force-app/main/default/classes/LexArriveGsDetailsController.cls
@@ -19,45 +19,72 @@
try {
//鍙栫粡閿�鍟嗕俊鎭�
String userId = UserInfo.getUserId();
- List<user> useracc = New List<user>();
- useracc = [select accountid from user where id =:userId];
+ List<user> useracc = new List<user>();
+ useracc = [SELECT accountid FROM user WHERE id = :userId];
accountid = useracc[0].accountid;
- List<Consumable_order__c> rs = New List<Consumable_order__c>();
- if(eSetId == NULL || eSetId == '') {
-
- }else {
- rs = [SELECT id,name,Order_reason__c,Arrive_Order__c,Arrive_Order__r.Total_num__c,Arrive_Order__r.IsShipment__c,Arrive_Order__r.Name,
- recordtypeid,Order_status__c,Deliver_date__c,Arrive_total_amount__c
- FROM Consumable_order__c
- WHERE id =:eSetId];
- coc = new Consumable_order__c();
- if(rs.size()>0){
+ List<Consumable_order__c> rs = new List<Consumable_order__c>();
+ if (eSetId == null || eSetId == '') {
+ } else {
+ rs = [
+ SELECT
+ id,
+ name,
+ Order_reason__c,
+ Arrive_Order__c,
+ Arrive_Order__r.Total_num__c,
+ Arrive_Order__r.IsShipment__c,
+ Arrive_Order__r.Name,
+ recordtypeid,
+ Order_status__c,
+ Deliver_date__c,
+ Arrive_total_amount__c
+ FROM Consumable_order__c
+ WHERE id = :eSetId
+ ];
+ coc = new Consumable_order__c();
+ if (rs.size() > 0) {
coc = rs[0];
orderallcount = coc.Arrive_Order__r.Total_num__c;
}
- if(coc.Arrive_Order__c == null){
+ if (coc.Arrive_Order__c == null) {
arrivetoorder = true;
}
- List<Consumable_order_details2__c> consumablearriveproductdetailsSelected = [SELECT Id,Dealer_Arrive__c,Bar_Code__c, RecordTypeid, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name,Dealer_Saled__c,
- Sterilization_limit__c,Deliver_date__c,
- Intra_Trade_List_RMB__c,Asset_Model_No__c,Arrive_Date__c,Send_Date__c,
- Consumable_Product__r.SFDA_Status__c,
- Consumable_Product__r.Product2__r.Packing_list_manual__c,
- Consumable_Product__r.Product2__r.SFDA_Approbation_No__c,
- Consumable_Product__r.Product2__r.SFDA_Expiration_Date__c
- FROM Consumable_order_details2__c
- WHERE Consumable_Arrived_order__c = :eSetId
- ORDER BY Name ];
+ List<Consumable_order_details2__c> consumablearriveproductdetailsSelected = [
+ SELECT
+ Id,
+ Dealer_Arrive__c,
+ Bar_Code__c,
+ RecordTypeid,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Dealer_Saled__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Arrive_Date__c,
+ Send_Date__c,
+ Consumable_Product__r.SFDA_Status__c,
+ Consumable_Product__r.Product2__r.Packing_list_manual__c,
+ Consumable_Product__r.Product2__r.SFDA_Approbation_No__c,
+ Consumable_Product__r.Product2__r.SFDA_Expiration_Date__c
+ FROM Consumable_order_details2__c
+ WHERE Consumable_Arrived_order__c = :eSetId
+ ORDER BY Name
+ ];
for (Integer i = 0; i < consumablearriveproductdetailsSelected.size(); i++) {
- consumableorderdetailsRecords.add(new ConsumableorderdetailsInfo(consumablearriveproductdetailsSelected[i]));
- }
+ consumableorderdetailsRecords.add(new ConsumableorderdetailsInfo(consumablearriveproductdetailsSelected[i]));
+ }
}
- for(ConsumableorderdetailsInfo bss : consumableorderdetailsRecords){
+ for (ConsumableorderdetailsInfo bss : consumableorderdetailsRecords) {
bss.packing_list = bss.Prod.Product2__r.Packing_list_manual__c;
bss.approbation_No = bss.Prod.Product2__r.SFDA_Approbation_No__c;
//update by rentx 20210622 start CHAN-C3K4ZQ
- bss.expiration_DateStr = bss.Prod.Product2__r.SFDA_Expiration_Date__c == null ? '' : bss.Prod.Product2__r.SFDA_Expiration_Date__c.format();
+ bss.expiration_DateStr = bss.Prod.Product2__r.SFDA_Expiration_Date__c == null
+ ? ''
+ : bss.Prod.Product2__r.SFDA_Expiration_Date__c.format();
bss.Sterilization_limitStr = bss.esd.Sterilization_limit__c == null ? '' : bss.esd.Sterilization_limit__c.format();
//update by rentx 20210622 end CHAN-C3K4ZQ
}
@@ -65,7 +92,7 @@
//add by rentx 20210622 CHAN-C3K4ZQ
// makeRecordsView(consumableorderdetailsRecords);
//add by rentx 20210622 CHAN-
- for(ConsumableorderdetailsInfo con : consumableorderdetailsRecords){
+ for (ConsumableorderdetailsInfo con : consumableorderdetailsRecords) {
con.prodName = con.esd.Consumable_Product__r.Name__c;
}
results.coc = coc;
@@ -84,30 +111,34 @@
//鍑哄簱
@AuraEnabled
- public static Results proSale(String cocStr, Decimal orderallcountParm, Integer consumableorderdetailsCountParm) {
+ public static Results proSale(String cocStr, Decimal orderallcountParm, Integer consumableorderdetailsCountParm, String eSetIdStr) {
Results results = new Results();
+ eSetId = eSetIdStr;
try {
orderallcount = orderallcountParm;
consumableorderdetailsCount = consumableorderdetailsCountParm;
- coc = (Consumable_order__c)JSON.deserialize(cocStr, Consumable_order__c.class);
+ coc = (Consumable_order__c) JSON.deserialize(cocStr, Consumable_order__c.class);
List<Consumable_order_details2__c> orderdetails = new List<Consumable_order_details2__c>();
//鍙戣揣鏄庣粏2
- orderdetails = [SELECT Id
- FROM Consumable_order_details2__c
- WHERE Consumable_order_minor__c =:coc.Arrive_Order__c
- AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
- AND Dealer_Arrive__c = true ];
- if(orderallcount!= consumableorderdetailsCount){
+ orderdetails = [
+ SELECT Id
+ FROM Consumable_order_details2__c
+ WHERE
+ Consumable_order_minor__c = :coc.Arrive_Order__c
+ AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ AND Dealer_Arrive__c = TRUE
+ ];
+ if (orderallcount != consumableorderdetailsCount) {
results.result = 'Fail';
results.errorMsg = '璁㈠崟涓嶅畬鍏ㄥ埌璐э紝鏃犳硶鍑哄簱';
return results;
}
- if(coc.Arrive_Order__r.IsShipment__c == true){
+ if (coc.Arrive_Order__r.IsShipment__c == true) {
results.result = 'Fail';
results.errorMsg = '璁㈠崟宸茬粡鍑哄簱';
return results;
}
- results.url = '/lexsummonscreat?arriveorder=' + eSetId +'&KeyWords=Redirect';
+ results.url = '/lexsummonscreat?arriveorder=' + eSetId + '&KeyWords=Redirect';
results.result = 'Success';
} catch (Exception e) {
results.result = 'Fail';
@@ -143,7 +174,7 @@
@AuraEnabled
public Consumable_order_details2__c esd;
@AuraEnabled
- public Product2__c Prod;
+ public Product2__c Prod;
@AuraEnabled
public Decimal packing_list;
@AuraEnabled
@@ -157,7 +188,6 @@
@AuraEnabled
public String prodName;
-
// 宸插瓨鍦ㄦ秷鑰楀搧鏄庣粏鐢�
public ConsumableorderdetailsInfo(Consumable_order_details2__c e) {
esd = e;
@@ -168,4 +198,4 @@
return null;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls b/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls
new file mode 100644
index 0000000..3f175c6
--- /dev/null
+++ b/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls
@@ -0,0 +1,210 @@
+@isTest
+public class LexArriveGsDetailsControllerTest {
+ @IsTest
+ static void test1() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Account myAccount2;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ myAccount2 = new Account(name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
+ insert myAccount2;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount2.id);
+ insert core;
+ myUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert myUser_Test;
+ System.runAs(MyUser_Test) {
+ StaticParameter.ConsumableAssetHanderTrigger = true;
+ Consumable_order__c order1 = new Consumable_order__c();
+ order1.Name = 'OCM_01_001';
+ order1.Order_status__c = '鎵瑰噯';
+ order1.Order_type__c = '璁㈠崟';
+ order1.Dealer_Info__c = myAccount2.Id;
+ order1.RecordTypeid = System.Label.RT_ConOrder_Arrive;
+ insert order1;
+
+ Consumable_order__c olyorder = new Consumable_order__c();
+ olyorder.Name = 'OCM_01_001';
+ olyorder.Order_status__c = '鎵瑰噯';
+ olyorder.Order_type__c = '璁㈠崟';
+ olyorder.Dealer_Info__c = myAccount2.Id;
+ olyorder.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ insert olyorder;
+
+ //璁㈠崟鏄庣粏
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = olyorder.Id;
+ Orderdet1.Consumable_Arrived_order__c = order1.Id;
+ //Orderdet1.IsArrival__c = true;
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '11111';
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = olyorder.Id;
+ Orderdet2.Consumable_Arrived_order__c = order1.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '22222';
+
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2 };
+ LexArriveGsDetailsController.init(order1.Id);
+ LexArriveGsDetailsController.proSale(
+ JSON.serialize(LexArriveGsDetailsController.coc),
+ LexArriveGsDetailsController.coc.Arrive_Order__r.Total_num__c,
+ LexArriveGsDetailsController.consumableorderdetailsRecords.size(),
+ order1.Id
+ );
+ }
+ }
+ }
+
+ @IsTest
+ static void test2() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Account myAccount2;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ myAccount2 = new Account(name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
+ insert myAccount2;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount2.id);
+ insert core;
+ myUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert myUser_Test;
+ System.runAs(MyUser_Test) {
+ StaticParameter.ConsumableAssetHanderTrigger = true;
+ Consumable_order__c order1 = new Consumable_order__c();
+ order1.Name = 'OCM_01_001';
+ order1.Order_status__c = '鎵瑰噯';
+ order1.Order_type__c = '璁㈠崟';
+ order1.RecordTypeid = System.Label.RT_ConOrder_Arrive;
+ order1.IsShipment__c = true;
+ insert order1;
+
+ Consumable_order__c olyorder = new Consumable_order__c();
+ olyorder.Name = 'OCM_01_001';
+ olyorder.Order_status__c = '鎵瑰噯';
+ olyorder.Order_type__c = '璁㈠崟';
+ olyorder.Dealer_Info__c = myAccount2.Id;
+ olyorder.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ olyorder.IsShipment__c = true;
+ insert olyorder;
+
+ //璁㈠崟鏄庣粏
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = olyorder.Id;
+ Orderdet1.Consumable_Arrived_order__c = order1.Id;
+ //Orderdet1.IsArrival__c = true;
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '11111';
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = olyorder.Id;
+ Orderdet2.Consumable_Arrived_order__c = order1.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '22222';
+
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2 };
+ LexArriveGsDetailsController.init(order1.Id);
+ LexArriveGsDetailsController.proSale(JSON.serialize(LexArriveGsDetailsController.coc), 1, 1, order1.Id);
+ }
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls-meta.xml b/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexCancelRemoveBoxController.cls b/force-app/main/default/classes/LexCancelRemoveBoxController.cls
index 7bd832f..a1d4c44 100644
--- a/force-app/main/default/classes/LexCancelRemoveBoxController.cls
+++ b/force-app/main/default/classes/LexCancelRemoveBoxController.cls
@@ -1,6 +1,6 @@
public with sharing class LexCancelRemoveBoxController {
//缁忛攢鍟嗕骇鍝佸垎绫�
- public static String agencyProType {get;set;}
+ public static String agencyProType { get; set; }
public static String userPro_Typestr = null;
public static String barcode { get; set; }
/*****************鐢婚潰琛ㄧずBean******************/
@@ -9,32 +9,32 @@
public static List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordserror { get; set; }
//鎷嗙洅鏄庣粏
public static List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsdummy { get; set; }
- public static boolean saveFLGbln {get;set;}
+ public static boolean saveFLGbln { get; set; }
//閿欒淇℃伅
- public static String alertMessage {set;get;}
+ public static String alertMessage { get; set; }
//鎷嗙洅鏄庣粏浠舵暟
- public static Integer getinventorysize(){
+ public static Integer getinventorysize() {
return ConsumableorderdetailsRecordsdummy.size();
}
public static Map<String, String> ExistIdMap = new Map<String, String>();
public static Map<String, String> ErrorIdMap = new Map<String, String>();
public static Map<String, String> AllMap = new Map<String, String>();
- public static List<String> BarCodeListP = new List<String>();
+ public static List<String> BarCodeListP = new List<String>();
//涓嶇鍚堢殑barcode鍜屽瀷鍙�
- public static list<String> notInlist = new list<String>();
- public static String baseUrl {get;private set;}
+ public static list<String> notInlist = new List<String>();
+ public static String baseUrl { get; private set; }
private static String accountid = null;
private static String accountName = null;
//public String[] proidList =new String[]{};
// 鐧诲綍鑰呭伐浣滃湴
private static String userWorkLocation;
- public LexCancelRemoveBoxController(){
+ public LexCancelRemoveBoxController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
ConsumableorderdetailsRecordserror = new List<ConsumableorderdetailsInfo>();
ConsumableorderdetailsRecordsdummy = new List<ConsumableorderdetailsInfo>();
consumableInventory = new List<ConsumableorderdetailsInfo>();
- saveFLGbln = FALSE;
+ saveFLGbln = false;
}
@AuraEnabled
@@ -44,39 +44,46 @@
res.entity = data;
String userId = UserInfo.getUserId();
- List<user> Useracc = New List<user>();
- Useracc = [SELECT accountid, Work_Location__c,UserPro_Type__c FROM user WHERE id =:userId];
+ List<user> Useracc = new List<user>();
+ Useracc = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
accountid = Useracc[0].accountid;
userWorkLocation = Useracc[0].Work_Location__c;
agencyProType = Useracc[0].UserPro_Type__c;
- if(String.isBlank(Useracc[0].UserPro_Type__c)){
+ if (String.isBlank(Useracc[0].UserPro_Type__c)) {
agencyProType = 'ET';
}
userPro_Typestr = '%' + agencyProType + '%';
- List<account> accountInfo = [SELECT Name FROM account WHERE id =:accountid];
+ List<account> accountInfo = [
+ SELECT Name
+ FROM account
+ WHERE id = :accountid
+ ];
//String view_product = accountInfo[0].view_product__c;
accountName = accountInfo[0].Name;
//proidList = view_product.split(',');
- data.put('accountName',accountName);
- data.put('userWorkLocation',userWorkLocation);
- data.put('agencyProType',agencyProType);
+ data.put('accountName', accountName);
+ data.put('userWorkLocation', userWorkLocation);
+ data.put('agencyProType', agencyProType);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
return res;
-
}
// 灏嗛〉闈㈡垨鍙栧緱BarCode鍘绘帀閲嶅鐨勶紝杞崲鎴怢ist
- public static List<String> ParseBarCode(String Code){
- String[] Cache = new String[]{};
+ public static List<String> ParseBarCode(String Code) {
+ String[] Cache = new List<String>{};
Cache = Code.split('\n');
- Set <String> Buff = new Set<String>();
- for(String A : Cache){
+ Set<String> Buff = new Set<String>();
+ for (String A : Cache) {
Buff.add(A);
}
List<String> outPut = new List<String>();
- for(String B :Buff){
+ for (String B : Buff) {
B = B.trim();
outPut.add(B);
}
@@ -85,9 +92,14 @@
//鑾峰彇鏄庣粏
@AuraEnabled
- public static ResponseBodyLWC searchConsumableorderdetails(String barcode,String accountName,String userWorkLocation,String agencyProType) {
+ public static ResponseBodyLWC searchConsumableorderdetails(
+ String barcode,
+ String accountName,
+ String userWorkLocation,
+ String agencyProType
+ ) {
ResponseBodyLWC res = new ResponseBodyLWC();
- Map<String,object> data = new Map<String,object>();
+ Map<String, object> data = new Map<String, object>();
res.entity = data;
userPro_Typestr = '%' + agencyProType + '%';
barcode = barcode;
@@ -97,20 +109,18 @@
ConsumableorderdetailsRecordserror = new List<ConsumableorderdetailsInfo>();
ConsumableorderdetailsRecordsdummy = new List<ConsumableorderdetailsInfo>();
-
-
- notInlist = new list<String>();
+ notInlist = new List<String>();
BarCodeListP = ParseBarCode(barcode);
Consumable_order_details2__c p = new Consumable_order_details2__c();
- List<Consumable_order_details2__c> Ins = New List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> Ins = new List<Consumable_order_details2__c>();
List<Consumable_order_details2__c> reSet = new List<Consumable_order_details2__c>();
List<Consumable_order_details2__c> reSet1 = new List<Consumable_order_details2__c>();
- saveFLGbln = FALSE;
- alertMessage='';
+ saveFLGbln = false;
+ alertMessage = '';
//鍒ゆ柇barcode鏄惁涓虹┖
- if(barcode == null || barcode ==''){
- return new ResponseBodyLWC('Error',500, '璇疯緭鍏arCode鍙�', '');
+ if (barcode == null || barcode == '') {
+ return new ResponseBodyLWC('Error', 500, '璇疯緭鍏arCode鍙�', '');
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'璇疯緭鍏arCode鍙枫��'));
// return;
}
@@ -122,309 +132,416 @@
// ConsumableorderdetailsRecordsdummy.clear();
// 浜у搧绫诲瀷涓嶅悓
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,Product_Type__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c, Arrive_Owner_Work_Location__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c = : userWorkLocation
- AND (not Product_Type__c like : userPro_Typestr)
- ORDER BY Name ];
- if(reSet1.size() > 0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Product_Type__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Arrive_Owner_Work_Location__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND (NOT Product_Type__c LIKE :userPro_Typestr)
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
- String str = '璇ュ晢鍝佺被鍨�'+ reSet1[i].Product_Type__c +'涓庝骇鍝佺被鍨�'+ agencyProType +'涓嶇,涓嶈兘鎷嗙洅';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ } else {
+ String str = '璇ュ晢鍝佺被鍨�' + reSet1[i].Product_Type__c + '涓庝骇鍝佺被鍨�' + agencyProType + '涓嶇,涓嶈兘鎷嗙洅';
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//娌℃湁鎷嗙洅
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c= false
- AND Dealer_Saled__c = false
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
- AND Box_Piece__c = '鐩�'
- //AND ProductPacking_list_manual__c > 1
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- ORDER BY Name ]; //娌″嚭搴擄紝娌¢攢鍞紝鍦ㄥ簱锛屾病鏈夋媶鐩�
- if(reSet1.size() > 0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Box_Piece__c = '鐩�'
+ //AND ProductPacking_list_manual__c > 1
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ]; //娌″嚭搴擄紝娌¢攢鍞紝鍦ㄥ簱锛屾病鏈夋媶鐩�
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佹病鏈夋媶鐩�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//宸插嚭璐э紝鏈埌璐�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = FALSE
- AND Dealer_Shipment__c= FALSE
- AND Dealer_Saled__c = FALSE
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
- AND Box_Piece__c = '鐩�'
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];
- if(reSet1.size() > 0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = FALSE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Box_Piece__c = '鐩�'
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佽繕鏈埌璐�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//鎷嗙洅宸插嚭璐�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Shipment__c = true
- AND Dealer_Arrive__c = true
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
- AND Box_Piece__c = '涓�'
- AND RemoveBox_date__c != null
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];
- if(reSet1.size() > 0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Shipment__c = TRUE
+ AND Dealer_Arrive__c = TRUE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Box_Piece__c = '涓�'
+ AND RemoveBox_date__c != NULL
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佸瓨鍦ㄥ嚭璐у饱鍘�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//鎷嗙洅宸查攢鍞�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Saled__c = true
- AND Dealer_Arrive__c = true
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
- AND Box_Piece__c = '涓�'
- AND RemoveBox_date__c != null
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];
- if(reSet1.size() > 0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Saled__c = TRUE
+ AND Dealer_Arrive__c = TRUE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Box_Piece__c = '涓�'
+ AND RemoveBox_date__c != NULL
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佸瓨鍦ㄩ攢鍞饱鍘�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//鎷嗙洅杩斿搧
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Returned__c = true
- AND Return_date__c != null
- AND Box_Piece__c = '涓�'
- AND RemoveBox_date__c != null
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];
- if(reSet1.size() > 0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Returned__c = TRUE
+ AND Return_date__c != NULL
+ AND Box_Piece__c = '涓�'
+ AND RemoveBox_date__c != NULL
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佸瓨鍦ㄨ繑鍝佸饱鍘�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
-
//鎷嗙洅鍚庣洏鐐硅繃(鐩樼偣鏃ユ湡涓嶄负绌�)
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Inventory_date__c != null
- AND Box_Piece__c = '涓�'
- AND RemoveBox_date__c != null
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];
- if(reSet1.size() > 0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Inventory_date__c != NULL
+ AND Box_Piece__c = '涓�'
+ AND RemoveBox_date__c != NULL
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佸瓨鍦ㄧ洏鐐瑰饱鍘�';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
//涓嶅悓宸ヤ綔鍦�
- reSet1 = [SELECT Id, Name,Consumable_Product__r.Name__c,
- Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Bar_Code__c,
- Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
- recordtypeid,Consumable_order_minor__r.Arrive_Order__c, Arrive_Owner_Work_Location__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c !=: userWorkLocation
- ORDER BY Name ];
- if(reSet1.size() > 0){
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ recordtypeid,
+ Consumable_order_minor__r.Arrive_Order__c,
+ Arrive_Owner_Work_Location__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c != :userWorkLocation
+ ORDER BY Name
+ ];
+ if (reSet1.size() > 0) {
for (Integer i = 0; i < reSet1.size(); i++) {
- if(ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)){
+ if (ErrorIdMap.containsKey(reSet1[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }else{
+ } else {
String str = '璇ュ晢鍝佸睘浜�' + reSet1[i].Arrive_Owner_Work_Location__c + ',涓嶈兘鍙栨秷鎷嗙洅';
- ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i],str));
- ErrorIdMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
+ ConsumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(reSet1[i], str));
+ ErrorIdMap.put(reSet1[i].Bar_Code__c, reSet1[i].Bar_Code__c);
}
}
}
- reSet = [SELECT Id,
- Name,
- Intra_Trade_List_RMB__c,
- Asset_Model_No__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,
- Sterilization_limit__c,
- Deliver_date__c,
- Bar_Code__c,
- Arrive_date__c,
- Send_Date__c,
- Consumable_order_minor__r.Name,
- Consumable_order_minor__c,
- Dealer_Arrive__c,
- Guarantee_period_for_products__c,
- CFDA_Status__c,
- ProductPacking_list_manual__c,
- Report_Product_Approbation__c,
- Report_Product_Expiration__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c = false
- AND Dealer_Saled__c = false
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
- AND Box_Piece__c = '涓�'
- AND RemoveBox_date__c != null
- AND Bar_Code__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Product_Type__c like : userPro_Typestr
- ];
- if(reSet.size()>0){
+ reSet = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Guarantee_period_for_products__c,
+ CFDA_Status__c,
+ ProductPacking_list_manual__c,
+ Report_Product_Approbation__c,
+ Report_Product_Expiration__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Box_Piece__c = '涓�'
+ AND RemoveBox_date__c != NULL
+ AND Bar_Code__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Product_Type__c LIKE :userPro_Typestr
+ ];
+ if (reSet.size() > 0) {
for (Integer i = 0; i < reSet.size(); i++) {
- if(ErrorIdMap.containsKey(reSet[i].Bar_Code__c) ){
+ if (ErrorIdMap.containsKey(reSet[i].Bar_Code__c)) {
// 璺宠繃閿欒鐨勬秷鑰楀搧鏄庣粏
continue;
- }
- else if(ExistIdMap.containsKey(reSet[i].Bar_Code__c) ){
+ } else if (ExistIdMap.containsKey(reSet[i].Bar_Code__c)) {
// 璺宠繃宸茬粡澶勭悊鐨勬秷鑰楀搧鏄庣粏
continue;
- }
- else{
+ } else {
ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet[i]));
- ExistIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
+ ExistIdMap.put(reSet[i].Bar_Code__c, reSet[i].Bar_Code__c);
}
}
}
@@ -432,89 +549,97 @@
AllMap.putAll(ExistIdMap);
//寰楀埌涓嶅瓨鍦ㄧ殑BarCode
- for(Integer i = 0; i < BarCodeListP.size(); i++){
- if(ExistIdMap.containsKey(BarCodeListP[i])){
+ for (Integer i = 0; i < BarCodeListP.size(); i++) {
+ if (ExistIdMap.containsKey(BarCodeListP[i])) {
continue;
- }else if(ErrorIdMap.containsKey(BarCodeListP[i])){
+ } else if (ErrorIdMap.containsKey(BarCodeListP[i])) {
continue;
- }else{
+ } else {
notInlist.add(BarCodeListP[i]);
}
}
- if(notInlist.size()>0){
- // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode'+ notInlist + '涓嶅瓨鍦ㄣ��'));
- return new ResponseBodyLWC('Error',500, 'BarCode'+ notInlist + '涓嶅瓨鍦ㄣ��', '');
+ if (notInlist.size() > 0) {
+ // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCode'+ notInlist + '涓嶅瓨鍦ㄣ��'));
+ return new ResponseBodyLWC('Error', 500, 'BarCode' + notInlist + '涓嶅瓨鍦ㄣ��', '');
}
- data.put('ConsumableorderdetailsRecordsdummy',JSON.serialize(ConsumableorderdetailsRecordsdummy));
- data.put('ConsumableorderdetailsRecordserror',JSON.serialize(ConsumableorderdetailsRecordserror));
- data.put('dataSize',ConsumableorderdetailsRecordsdummy.size());
+ data.put('ConsumableorderdetailsRecordsdummy', JSON.serialize(ConsumableorderdetailsRecordsdummy));
+ data.put('ConsumableorderdetailsRecordserror', JSON.serialize(ConsumableorderdetailsRecordserror));
+ data.put('dataSize', ConsumableorderdetailsRecordsdummy.size());
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
return res;
-
}
//鍙栨秷鎷嗙洅纭
@AuraEnabled
- public static ResponseBodyLWC cancelRemoveBoxConfirm(String saveConsumableorderdetailsRecordsdummy,String accountName,String userWorkLocation,String agencyProType) {
+ public static ResponseBodyLWC cancelRemoveBoxConfirm(
+ String saveConsumableorderdetailsRecordsdummy,
+ String accountName,
+ String userWorkLocation,
+ String agencyProType
+ ) {
ResponseBodyLWC res = new ResponseBodyLWC();
- Map<String,object> data = new Map<String,object>();
+ Map<String, object> data = new Map<String, object>();
res.entity = data;
userPro_Typestr = '%' + agencyProType + '%';
accountName = accountName;
- userWorkLocation =userWorkLocation;
- List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsdummy = (List<ConsumableorderdetailsInfo>)JSON.deserialize(saveConsumableorderdetailsRecordsdummy,List<ConsumableorderdetailsInfo>.class);
+ userWorkLocation = userWorkLocation;
+ List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsdummy = (List<ConsumableorderdetailsInfo>) JSON.deserialize(
+ saveConsumableorderdetailsRecordsdummy,
+ List<ConsumableorderdetailsInfo>.class
+ );
+ List<Consumable_order_details2__c> ins = new List<Consumable_order_details2__c>();
- List<Consumable_order_details2__c> ins = New List<Consumable_order_details2__c>();
-
Savepoint sp = Database.setSavepoint();
- if(ConsumableorderdetailsRecordsdummy.size()<1){
+ if (ConsumableorderdetailsRecordsdummy.size() < 1) {
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'涓嶅瓨鍦ㄥ彇娑堟媶鐩掓槑缁�'));
- return new ResponseBodyLWC('Error',500, '涓嶅瓨鍦ㄥ彇娑堟媶鐩掓槑缁�', '');
+ return new ResponseBodyLWC('Error', 500, '涓嶅瓨鍦ㄥ彇娑堟媶鐩掓槑缁�', '');
// return null;
}
List<String> BarCodeList = new List<String>();
- for (ConsumableorderdetailsInfo tmp : ConsumableorderdetailsRecordsdummy) {
+ for (ConsumableorderdetailsInfo tmp : ConsumableorderdetailsRecordsdummy) {
BarCodeList.add(tmp.esd.Bar_Code__c);
}
- try{
+ try {
//鍙栧緱閫氱暘澶т簬001鐨勫湪搴撴槑缁�
- List<Consumable_order_details2__c> orderDetails2del = [SELECT
- Id,
- Box_Piece__c,
- RemoveBox_date__c,
- RemoveBox_No__c,
- Bar_Code__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rentx 2020-10-13 end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c = false
- AND Dealer_Saled__c = false
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
+ List<Consumable_order_details2__c> orderDetails2del = [
+ SELECT
+ Id,
+ Box_Piece__c,
+ RemoveBox_date__c,
+ RemoveBox_No__c,
+ Bar_Code__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c
+ /*,ContractNo__c*/
+ //add by rentx 2020-10-13 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
AND Box_Piece__c = '涓�'
- AND RemoveBox_date__c != null
+ AND RemoveBox_date__c != NULL
AND RemoveBox_No__c > 1
- AND Bar_Code__c in :BarCodeList
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Product_Type__c like : userPro_Typestr
- ];
+ AND Bar_Code__c IN :BarCodeList
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Product_Type__c LIKE :userPro_Typestr
+ ];
List<Consumable_order_details2__c> orderlistdel = new List<Consumable_order_details2__c>();
- List<Consumable_order_details2__c> orderlistupd= new List<Consumable_order_details2__c>();
-
+ List<Consumable_order_details2__c> orderlistupd = new List<Consumable_order_details2__c>();
+
for (Consumable_order_details2__c detail2tmp : orderDetails2del) {
Consumable_order_details2__c delDetails2 = new Consumable_order_details2__c();
- delDetails2.Id = detail2tmp.Id;
+ delDetails2.Id = detail2tmp.Id;
//鍒犻櫎閫氱暘澶т簬001鐨勬槑缁�2
//delete delDetails2;
@@ -522,46 +647,48 @@
}
//鍙栧緱閫氱暘001鐨勫湪搴撴槑缁�
- List<Consumable_order_details2__c> orderDetails2 = [SELECT
- Id,
- Box_Piece__c,
- RemoveBox_date__c,
- RemoveBox_No__c,
- Bar_Code__c,
- //add by rentx 2020-10-13 start
- ContractNo_text__c
- /*,ContractNo__c*/
- //add by rebtx 2020-10-13 end
+ List<Consumable_order_details2__c> orderDetails2 = [
+ SELECT
+ Id,
+ Box_Piece__c,
+ RemoveBox_date__c,
+ RemoveBox_No__c,
+ Bar_Code__c,
+ //add by rentx 2020-10-13 start
+ ContractNo_text__c,
+ /*,ContractNo__c*/
+ //add by rebtx 2020-10-13 end
// tcm start
- ,Consumable_order_minor__r.ContractNo__c
- // tcm end
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c = false
- AND Dealer_Saled__c = false
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
+ Consumable_order_minor__r.ContractNo__c
+ // tcm end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
AND Box_Piece__c = '涓�'
- AND RemoveBox_date__c !=null
+ AND RemoveBox_date__c != NULL
AND RemoveBox_No__c = 1
- AND Bar_Code__c in :BarCodeList
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Product_Type__c like : userPro_Typestr
- ];
+ AND Bar_Code__c IN :BarCodeList
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Product_Type__c LIKE :userPro_Typestr
+ ];
for (Consumable_order_details2__c detail2tmp : orderDetails2) {
Consumable_order_details2__c updDetails2 = new Consumable_order_details2__c();
- updDetails2.Id = detail2tmp.Id;
- updDetails2.Box_Piece__c = '鐩�';
- updDetails2.RemoveBox_date__c = null;
- updDetails2.RemoveBox_No__c = null;
+ updDetails2.Id = detail2tmp.Id;
+ updDetails2.Box_Piece__c = '鐩�';
+ updDetails2.RemoveBox_date__c = null;
+ updDetails2.RemoveBox_No__c = null;
// tcm start
if (String.isBlank(detail2tmp.Consumable_order_minor__r.ContractNo__c)) {
- updDetails2.ContractNo_text__c= detail2tmp.ContractNo_text__c;
- }else {
- updDetails2.ContractNo_text__c= detail2tmp.Consumable_order_minor__r.ContractNo__c;
+ updDetails2.ContractNo_text__c = detail2tmp.ContractNo_text__c;
+ } else {
+ updDetails2.ContractNo_text__c = detail2tmp.Consumable_order_minor__r.ContractNo__c;
}
// updDetails2.ContractNo_text__c = detail2tmp.ContractNo__c;
// tcm end
@@ -571,30 +698,30 @@
orderlistupd.add(updDetails2);
}
- if(orderlistdel.size()>0){
+ if (orderlistdel.size() > 0) {
delete orderlistdel;
}
- if(orderlistupd.size()>0){
+ if (orderlistupd.size() > 0) {
update orderlistupd;
}
saveFLGbln = true;
alertMessage = '鍙栨秷鎷嗙洅瀹屾垚';
- data.put('saveFLGbln',saveFLGbln);
+ data.put('saveFLGbln', saveFLGbln);
res.status = 'Success';
res.code = 200;
res.msg = alertMessage;
System.debug('res = ' + res);
return res;
// return null;
- }catch(Exception e){
+ } catch (Exception e) {
Database.rollback(sp);
ApexPages.addMessages(e);
return null;
}
}
-
+ @TestVisible
class ConsumableorderdetailsInfo implements Comparable {
public Consumable_order_details2__c esd { get; set; }
public Product2__c Prod { get; set; }
@@ -606,18 +733,18 @@
//public String tracingCodeNo { get; set; }
public String oldConsumableCount { get; set; }
public String ErrorReason { get; set; }
- public ConsumableorderdetailsInfo(Consumable_order_details2__c e,string str) {
- esd = e;
- Prod = e.Consumable_Product__r;
+ public ConsumableorderdetailsInfo(Consumable_order_details2__c e, string str) {
+ esd = e;
+ Prod = e.Consumable_Product__r;
oldConsumableCount = e.name;
- ErrorReason = str;
+ ErrorReason = str;
}
public ConsumableorderdetailsInfo(Consumable_order_details2__c e) {
- esd = e;
- Prod = e.Consumable_Product__r;
+ esd = e;
+ Prod = e.Consumable_Product__r;
oldConsumableCount = e.name;
}
-/*
+ /*
public ConsumableorderdetailsInfo(Product2__c e,String barCode,Date sterilizationlimit,String serialNoorLot,String tracingCode) {
esd = new Consumable_order_details2__c();
ProductName = e.Name__c;
@@ -643,4 +770,4 @@
return null;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexCancelRemoveBoxControllerTest.cls b/force-app/main/default/classes/LexCancelRemoveBoxControllerTest.cls
new file mode 100644
index 0000000..d3fbe00
--- /dev/null
+++ b/force-app/main/default/classes/LexCancelRemoveBoxControllerTest.cls
@@ -0,0 +1,832 @@
+@IsTest
+private class LexCancelRemoveBoxControllerTest {
+ static testMethod void testMethod1() {
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Oly_TriggerHandler.bypass('Oly_TriggerHandler');
+ user myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount2;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 5,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 5,
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200313',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert new List<Product2__c>{ pro1, pro2, pro3 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+
+ //daoku
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001001';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.Arrive_date__c = Date.today();
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet2.Used_date__c = null;
+ Orderdet2.Lose_Flag__c = false;
+ Orderdet2.Return_date__c = null;
+ Orderdet2.Send_Date__c = null;
+ Orderdet2.Box_Piece__c = '鐩�';
+ conList.add(Orderdet2);
+ // insert Orderdet2;
+
+ //chuku
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001002';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro2.Id;
+ Orderdet3.Asset_Model_No__c = 'Test02';
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.Send_Date__c = Date.today();
+ Orderdet3.Box_Piece__c = '涓�';
+ Orderdet3.RemoveBox_date__c = Date.today();
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet3.Used_date__c = null;
+ Orderdet3.Lose_Flag__c = false;
+ Orderdet3.Return_date__c = null;
+ conList.add(Orderdet3);
+ // insert Orderdet3;
+
+ //sale
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro2.Id;
+ Orderdet4.Asset_Model_No__c = 'Test02';
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.Box_Piece__c = '涓�';
+ Orderdet4.RemoveBox_date__c = Date.today();
+ Orderdet4.Bar_Code__c = '011495317020843711170400172003311074K250CXSDS';
+ Orderdet4.Lose_Flag__c = false;
+ Orderdet4.Return_date__c = null;
+ Orderdet4.Used_date__c = Date.today();
+ // insert Orderdet4;
+ conList.add(Orderdet4);
+
+ //ProductPacking_list_manual__c=1
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001004';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro3.Id;
+ Orderdet5.Asset_Model_No__c = 'Test03';
+ Orderdet5.Arrive_date__c = Date.today();
+ //Orderdet5.Used_date__c = Date.today();
+ Orderdet5.Box_Piece__c = '鐩�';
+ Orderdet5.RemoveBox_date__c = Date.today();
+ Orderdet5.Used_date__c = null;
+ Orderdet5.Lose_Flag__c = false;
+ Orderdet5.Return_date__c = null;
+ Orderdet5.Send_Date__c = null;
+ Orderdet5.Bar_Code__c = '010495317014059411170400172203311074K250DCWQW';
+ // insert Orderdet5;
+ conList.add(Orderdet5);
+
+ //pandian
+ Consumable_order_details2__c Orderdet7 = new Consumable_order_details2__c();
+ Orderdet7.Name = 'OCM_01_001004';
+ Orderdet7.Consumable_order_minor__c = Order1.Id;
+ Orderdet7.Consumable_Product__c = pro2.Id;
+ Orderdet7.Asset_Model_No__c = 'Test02';
+ Orderdet7.Box_Piece__c = '鐩�';
+ Orderdet7.Lose_Flag__c = false;
+ Orderdet7.Bar_Code__c = '010495317014059411170400172203311074K250DBVUD';
+ Orderdet7.RemoveBox_date__c = Date.today();
+ Orderdet7.Inventory_date__c = Date.today();
+ // insert Orderdet7;
+ conList.add(Orderdet7);
+
+ Consumable_order_details2__c Orderdet8 = new Consumable_order_details2__c();
+ Orderdet8.Name = 'OCM_01_001004';
+ Orderdet8.Consumable_order_minor__c = Order1.Id;
+ Orderdet8.Consumable_Product__c = pro2.Id;
+ Orderdet8.Asset_Model_No__c = 'Test02';
+ Orderdet8.Arrive_date__c = Date.today();
+ Orderdet8.Box_Piece__c = '涓�';
+ Orderdet8.Lose_Flag__c = false;
+ Orderdet8.Bar_Code__c = '1683272847250250WZIOF';
+ Orderdet8.Used_date__c = null;
+ Orderdet8.Lose_Flag__c = false;
+ Orderdet8.Return_date__c = null;
+ Orderdet8.RemoveBox_date__c = Date.today();
+ Orderdet8.Send_Date__c = null;
+ Orderdet8.RemoveBox_No__c = 3;
+ conList.add(Orderdet8);
+ insert conList;
+ // insert Orderdet8;
+
+ System.Test.startTest();
+ LexCancelRemoveBoxController.init();
+ // LexCancelRemoveBoxController.getinventorysize();
+ LexCancelRemoveBoxController.searchConsumableorderdetails('1683272847250250WZIOF', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�', '娣卞湷', 'ENG');
+ LexCancelRemoveBoxController.searchConsumableorderdetails('', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�', '娣卞湷', 'ENG');
+ LexCancelRemoveBoxController.cancelRemoveBoxConfirm(JSON.serialize(conList), '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�', '娣卞湷', 'ENG');
+
+ System.Test.stopTest();
+ }
+
+ }
+ static testMethod void testMethod2() {
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Oly_TriggerHandler.bypass('Oly_TriggerHandler');
+ user myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount2;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '鍒拌揣';
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.RecordTypeid = '01210000000c9dqAAA';
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ Consumable_order_details2__c con = new Consumable_order_details2__c();
+ con.Consumable_Arrived_order__c = Order1.Id;
+ con.Send_Date__c = null;
+ con.Used_date__c = null;
+ con.Return_date__c = null;
+ con.Lose_Flag__c = false;
+ con.Box_Piece__c = '涓�';
+ con.RemoveBox_date__c = Date.today();
+ con.Arrive_date__c = Date.today();
+ con.RemoveBox_No__c = 2;
+ con.Bar_Code__c = '1682414917514250XSCYW';
+ conList.add(con);
+
+ Consumable_order_details2__c con1 = new Consumable_order_details2__c();
+ con1.Consumable_Arrived_order__c = Order1.Id;
+ con1.Send_Date__c = null;
+ con1.Used_date__c = null;
+ con1.Return_date__c = null;
+ con1.Lose_Flag__c = false;
+ con1.Box_Piece__c = '涓�';
+ con1.RemoveBox_date__c = Date.today();
+ con1.Arrive_date__c = Date.today();
+ con.RemoveBox_No__c = 1;
+ con1.Bar_Code__c = '1682414917514250XSCYW';
+ conList.add(con1);
+ insert (conList);
+ System.debug('conList' + conList);
+ System.Test.startTest();
+ LexCancelRemoveBoxController.cancelRemoveBoxConfirm(JSON.serialize(conList), 'Testaccount002', '閲嶅簡', 'ET');
+ LexCancelRemoveBoxController.cancelRemoveBoxConfirm(JSON.serialize(conList1), 'Testaccount002', '閲嶅簡', 'ET');
+ System.Test.stopTest();
+ }
+ }
+ static testMethod void testMethod3() {
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Oly_TriggerHandler.bypass('Oly_TriggerHandler');
+ User myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ myAccount2 = new Account(name = 'Testaccount003', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '2');
+ insert myAccount2;
+ Contact core = new Contact(email = 'wan@salesforce.com', firstname = 'wan', lastname = 'Plumbers', accountid = myAccount2.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ System.debug('MyUser_Test' + MyUser_Test);
+ }
+ System.runAs(MyUser_Test) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test01',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test02',
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test03',
+ Manual_Entry__c = false
+ );
+ Product2 prod04 = new Product2(
+ Name = 'Test04',
+ ProductCode = 'Test04',
+ Asset_Model_No__c = 'Test04',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 2,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test04',
+ Manual_Entry__c = false
+ );
+ Product2 prod05 = new Product2(
+ Name = 'Test05',
+ ProductCode = 'Test05',
+ Asset_Model_No__c = 'Test05',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test05',
+ Manual_Entry__c = false
+ );
+ Product2 prod06 = new Product2(
+ Name = 'Test06',
+ ProductCode = 'Test06',
+ Asset_Model_No__c = 'Test06',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test06',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03, prod04, prod05, prod06 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro004', OT_CODE_Text__c = 'Test004', Product2__c = prod03.Id);
+ Product2__c pro4 = new Product2__c(Name = 'Pro005', OT_CODE_Text__c = 'Test005', Product2__c = prod04.Id);
+ Product2__c pro5 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod05.Id);
+ Product2__c pro6 = new Product2__c(Name = 'Pro006', OT_CODE_Text__c = 'Test006', Product2__c = prod06.Id);
+ insert new List<Product2__c>{ pro4, pro5, pro6, pro1, pro2, pro3 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ENG';
+ insert Order1;
+ //鍑鸿揣
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.Dealer_Info__c = myAccount2.Id;
+ Order2.RecordTypeid = '012100000006Jx9AAE';
+ Order2.Order_ProType__c = 'ENG';
+ insert Order2;
+
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> conList2 = new List<Consumable_order_details2__c>();
+ //浜у搧绫诲瀷涓嶅悓
+ Consumable_order_details2__c con = new Consumable_order_details2__c();
+ con.Name = 'OCM_01_001001';
+ con.Consumable_order_minor__c = Order1.Id;
+ con.Consumable_Product__c = pro2.Id;
+ con.Asset_Model_No__c = 'Test01';
+ con.Arrive_date__c = Date.today();
+ con.Bar_Code__c = '10061';
+ con.Used_date__c = null;
+ con.Lose_Flag__c = false;
+ con.Return_date__c = null;
+ con.Send_Date__c = null;
+ con.Box_Piece__c = '鐩�';
+ conList.add(con);
+ insert conList;
+
+ //浜у搧绫诲瀷涓嶅悓
+ Consumable_order_details2__c con1 = new Consumable_order_details2__c();
+ con1.Consumable_Product__c = pro2.Id;
+ con1.Consumable_order_minor__c = Order1.Id;
+ con1.Bar_Code__c = '10011';
+ con1.Arrive_date__c = Date.today();
+ conList1.add(con1);
+ //娌℃湁鎷嗙洅
+ Consumable_order_details2__c con2 = new Consumable_order_details2__c();
+ con2.Send_Date__c = null;
+ con2.Used_date__c = null;
+ con2.Lose_Flag__c = false;
+ con2.Box_Piece__c = '鐩�';
+ con2.Consumable_Product__c = pro2.Id;
+ con2.Consumable_order_minor__c = Order1.Id;
+ con2.Bar_Code__c = '10021';
+ con2.Arrive_date__c = Date.today();
+ con2.RemoveBox_date__c = null;
+ conList1.add(con2);
+ insert conList1;
+
+ //宸插嚭璐� 鏈埌璐�
+ Consumable_order_details2__c con3 = new Consumable_order_details2__c();
+ con3.Arrive_date__c = null;
+ con3.Send_Date__c = null;
+ con3.Used_date__c = null;
+ con3.Return_date__c = null;
+ con3.Lose_Flag__c = false;
+ con3.Box_Piece__c = '鐩�';
+ con3.Consumable_Arrived_order__c = Order2.Id;
+ con3.Consumable_Product__c = pro2.Id;
+ con3.Bar_Code__c = '10031';
+ conList2.add(con3);
+ //鎷嗙洅宸插嚭璐�
+ Consumable_order_details2__c con4 = new Consumable_order_details2__c();
+ con4.Arrive_date__c = Date.today();
+ con4.Send_Date__c = Date.today();
+ con4.Return_date__c = null;
+ con4.Used_date__c = null;
+ con4.Lose_Flag__c = false;
+ con4.Box_Piece__c = '涓�';
+ con4.RemoveBox_date__c = Date.today();
+ con4.Consumable_Arrived_order__c = Order2.Id;
+ con4.Consumable_Product__c = pro2.Id;
+ con4.Bar_Code__c = '10041';
+ conList2.add(con4);
+ insert conList2;
+
+ System.Test.startTest();
+ LexCancelRemoveBoxController.barcode = '1004\n1003\n1002\n1001';
+ LexCancelRemoveBoxController.searchConsumableorderdetails(
+ '10061\n10051\n10041\n10031\n10021\n10011',
+ 'Testaccount003',
+ '閲嶅簡',
+ 'ET'
+ );
+ String str = '璇ュ晢鍝佸瓨鍦ㄧ洏鐐瑰饱鍘�';
+ String errorReason = '';
+ LexCancelRemoveBoxController.ConsumableorderdetailsInfo c2 = new LexCancelRemoveBoxController.ConsumableorderdetailsInfo(
+ con,
+ str
+ );
+ c2.esd = con;
+ c2.Prod = con.Consumable_product__r;
+ c2.oldConsumableCount = con.name;
+ c2.ErrorReason = str;
+ LexCancelRemoveBoxController.ConsumableorderdetailsInfo c1 = new LexCancelRemoveBoxController.ConsumableorderdetailsInfo(con2);
+ c1.esd = con;
+ c1.Prod = con.Consumable_product__r;
+ c1.oldConsumableCount = con.name;
+ c1.compareTo(c2);
+ System.Test.stopTest();
+ }
+ }
+ static testMethod void testMethod4() {
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Oly_TriggerHandler.bypass('Oly_TriggerHandler');
+ User myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ myAccount2 = new Account(name = 'Testaccount003', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '2');
+ insert myAccount2;
+ Contact core = new Contact(email = 'wan@salesforce.com', firstname = 'wan', lastname = 'Plumbers', accountid = myAccount2.id);
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newWang',
+ Email = 'newWang@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUserWang',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUserWang@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ System.debug('MyUser_Test' + MyUser_Test);
+ }
+ System.runAs(MyUser_Test) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test01',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test02',
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test03',
+ Manual_Entry__c = false
+ );
+ Product2 prod04 = new Product2(
+ Name = 'Test04',
+ ProductCode = 'Test04',
+ Asset_Model_No__c = 'Test04',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 2,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test04',
+ Manual_Entry__c = false
+ );
+ Product2 prod05 = new Product2(
+ Name = 'Test05',
+ ProductCode = 'Test05',
+ Asset_Model_No__c = 'Test05',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test05',
+ Manual_Entry__c = false
+ );
+ Product2 prod06 = new Product2(
+ Name = 'Test06',
+ ProductCode = 'Test06',
+ Asset_Model_No__c = 'Test06',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'test06',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03, prod04, prod05, prod06 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro004', OT_CODE_Text__c = 'Test004', Product2__c = prod03.Id);
+ Product2__c pro4 = new Product2__c(Name = 'Pro005', OT_CODE_Text__c = 'Test005', Product2__c = prod04.Id);
+ Product2__c pro5 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod05.Id);
+ Product2__c pro6 = new Product2__c(Name = 'Pro006', OT_CODE_Text__c = 'Test006', Product2__c = prod06.Id);
+ insert new List<Product2__c>{ pro4, pro5, pro6, pro1, pro2, pro3 };
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
+ //閿�鍞�
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '閿�鍞�';
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.RecordTypeid = '01210000000c9duAAA';
+ Order1.Order_ProType__c = 'ENG';
+ orderList.add(Order1);
+ //杩斿搧
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '杩斿搧';
+ Order2.Dealer_Info__c = myAccount2.Id;
+ Order2.RecordTypeid = '012100000006Jx4AAE';
+ Order2.Order_ProType__c = 'ENG';
+ orderList.add(Order2);
+ //鐩樼偣
+ Consumable_order__c Order3 = new Consumable_order__c();
+ Order3.Name = 'OCM_01';
+ Order3.Order_status__c = '鎵瑰噯';
+ Order3.Order_type__c = '鐩樼偣';
+ Order3.Dealer_Info__c = myAccount2.Id;
+ Order3.RecordTypeid = '01210000000c9dsAAA';
+ Order3.Order_ProType__c = 'ENG';
+ orderList.add(Order3);
+ //鍙戣揣
+ Consumable_order__c Order4 = new Consumable_order__c();
+ Order4.Name = 'OCM_0122';
+ Order4.Order_status__c = '鎵瑰噯';
+ Order4.Order_type__c = '璁㈠崟';
+ Order4.Dealer_Info__c = myAccount2.Id;
+ Order4.RecordTypeid = '01210000000c9drAAA';
+ Order4.Order_ProType__c = 'ET';
+ Order4.ContractNo__c = '';
+ orderList.add(Order4);
+ insert orderList;
+
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> conList2 = new List<Consumable_order_details2__c>();
+ //鎷嗙洅宸查攢鍞�
+ Consumable_order_details2__c con4 = new Consumable_order_details2__c();
+ con4.Arrive_date__c = Date.today();
+ con4.Deliver_date__c = Date.today();
+ con4.Sterilization_limit__c = Date.today();
+ con4.Send_Date__c = null;
+ con4.Return_date__c = null;
+ con4.Used_date__c = Date.today();
+ con4.Lose_Flag__c = false;
+ con4.Box_Piece__c = '涓�';
+ con4.RemoveBox_date__c = Date.today();
+ con4.RecordTypeId = '01210000000kUDKAA2';
+ con4.Consumable_Product__c = pro2.Id;
+ con4.Bar_Code__c = '100611';
+ conList.add(con4);
+ insert conList;
+
+ //鎷嗙洅杩斿搧
+ Consumable_order_details2__c con5 = new Consumable_order_details2__c();
+ con5.Arrive_date__c = Date.today();
+ con5.Return_date__c = Date.today();
+ con5.Deliver_date__c = Date.today();
+ con5.Send_Date__c = null;
+ con5.Sterilization_limit__c = Date.today();
+ con5.Used_date__c = Date.today();
+ con5.Box_Piece__c = '涓�';
+ con5.RemoveBox_date__c = Date.today();
+ con5.RecordTypeId = '01210000000kUDPAA2';
+ con5.Consumable_Product__c = pro2.Id;
+ con5.Consumable_order_minor__c = Order4.Id;
+ con5.Bar_Code__c = '10061';
+ conList1.add(con5);
+ insert conList1;
+
+ //鎷嗙洅鍚庣洏鐐硅繃
+ Consumable_order_details2__c con6 = new Consumable_order_details2__c();
+ con6.Inventory_date__c = Date.today();
+ con6.Box_Piece__c = '涓�';
+ con6.RemoveBox_date__c = Date.today();
+ con6.Send_Date__c = null;
+ con6.Deliver_date__c = Date.today();
+ con6.Sterilization_limit__c = Date.today();
+ con6.RecordTypeId = '01210000000kUDKAA2';
+ con6.Consumable_Arrived_order__c = Order3.Id;
+ con6.Consumable_Product__c = pro2.Id;
+ con6.Bar_Code__c = '10078';
+ conList2.add(con6);
+ insert conList2;
+
+ List<Consumable_order_details2__c> conList3 = new List<Consumable_order_details2__c>();
+ //鎷嗙洅宸插嚭璐�
+ Consumable_order_details2__c con3 = new Consumable_order_details2__c();
+ con3.Arrive_date__c = Date.today();
+ con3.Send_Date__c = Date.today();
+ con3.Return_date__c = null;
+ con3.Used_date__c = null;
+ con3.Lose_Flag__c = false;
+ con3.Box_Piece__c = '涓�';
+ con3.Deliver_date__c = Date.today();
+ con3.RemoveBox_date__c = Date.today();
+ con3.RecordTypeId = '01210000000kUDKAA2';
+ con3.Consumable_Product__c = pro2.Id;
+ con3.Consumable_order_minor__c = Order4.Id;
+ con3.Bar_Code__c = '100999';
+ con3.Sterilization_limit__c = Date.today();
+ conList3.add(con3);
+ insert conList3;
+
+ //reset
+ // Consumable_order_details2__c con1 = new Consumable_order_details2__c();
+ // con1.Intra_Trade_List_RMB__c = 1000;
+ // con1.Asset_Model_No__c = 'test';
+ // con1.Sterilization_limit__c = Date.today();
+ // con1.Deliver_date__c = Date.today();
+ // con1.Arrive_date__c = Date.today();
+ // con1.Send_Date__c = null;
+ // con1.Used_date__c = null;
+ // con1.Return_date__c = null;
+ // con1.Lose_Flag__c = false;
+ // con1.Box_Piece__c = '涓�';
+
+ // con1.Consumable_order_minor__c = Order4.Id;
+ // con1.Guarantee_period_for_products__c = Date.today();
+ // con1.Consumable_Product__c = pro2.Id;
+ // con1.Bar_Code__c = '1009999';
+ // conList2.add(con1);
+ // insert conList2;
+
+ // List<Consumable_order_details2__c> conList3 = new List<Consumable_order_details2__c> ();
+ // Consumable_order_details2__c con9 = new Consumable_order_details2__c();
+ // con9.RemoveBox_date__c = Date.today();
+ // con9.Bar_Code__c = '100112';
+ // con9.Arrive_date__c = Date.today();
+ // con9.Send_Date__c = null;
+ // con9.Used_date__c = null;
+ // con9.Return_date__c = null;
+ // con9.Lose_Flag__c = false;
+ // con9.Box_Piece__c = '涓�';
+ // con9.RemoveBox_No__c = 9;
+ // conList3.add(con9);
+ // LexCancelRemoveBoxController.searchConsumableorderdetails('100112','Testaccount003','閲嶅簡','ET');
+
+ //orderDetails2
+ // Consumable_order_details2__c con00 = new Consumable_order_details2__c();
+ // con00.Box_Piece__c = '涓�';
+ // con00.RemoveBox_date__c = Date.today();
+ // con00.RemoveBox_No__c = 1;
+ // con00.ContractNo_text__c = '';
+ // con00.Consumable_order_minor__c = Order4.Id;
+ // con00.Bar_Code__c = '10099999989';
+ // conList3.add(con00);
+
+ // insert conList3;
+ System.Test.startTest();
+ LexCancelRemoveBoxController CancelRemoveBoxController = new LexCancelRemoveBoxController();
+ LexCancelRemoveBoxController.searchConsumableorderdetails(
+ '100611\n10078\n10099\n1009999\n100999',
+ 'Testaccount003',
+ '閲嶅簡',
+ 'ET'
+ );
+ LexCancelRemoveBoxController.searchConsumableorderdetails(
+ '100611\n10078\n10061\n10051\n10041\n10031\n10021\n10011',
+ 'Testaccount003',
+ '鍖椾含',
+ 'ET'
+ );
+ LexCancelRemoveBoxController.searchConsumableorderdetails(
+ '100611\n10078\n10061\n10051\n10041\n10031\n10021\n10011',
+ 'Testaccount003',
+ '閲嶅簡',
+ 'ET'
+ );
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexCancelRemoveBoxControllerTest.cls-meta.xml b/force-app/main/default/classes/LexCancelRemoveBoxControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexCancelRemoveBoxControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexConInvoiceListTest.cls b/force-app/main/default/classes/LexConInvoiceListTest.cls
new file mode 100644
index 0000000..6e2c1ed
--- /dev/null
+++ b/force-app/main/default/classes/LexConInvoiceListTest.cls
@@ -0,0 +1,184 @@
+@isTest
+private class LexConInvoiceListTest {
+ static testMethod void conInvoiceListTestinit() {
+ user myUser_test;
+ Account myAccount2;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id);
+ myAccount2 = new Account(name = 'testaccount002', RecordTypeId = rectHos[0].Id);
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Consumable_order__c TestList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Invoice_Date__c = Date.today(),
+ Dealer_info__c = myAccount1.Id,
+ Invoice_status__c = '鑽夋涓�',
+ Order_ForHospital__c = myAccount2.Id,
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '鍙戠エ',
+ recordtypeid = System.Label.RT_ConOrder_Invoice,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c TestList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Invoice_Date__c = Date.today(),
+ Dealer_info__c = myAccount1.Id,
+ Invoice_status__c = '鎻愪氦',
+ Order_ForHospital__c = myAccount2.Id,
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '鍙戠エ',
+ recordtypeid = System.Label.RT_ConOrder_Invoice,
+ Order_ProType__c = 'ET'
+ );
+ insert new List<Consumable_order__c>{ TestList1, TestList2 };
+ LexConInvoiceList.init();
+ // ConInvoiceListController CDC = new ConInvoiceListController();
+ // CDC.init();
+ // System.assertEquals('Test1', CDC.raesList[0].name);
+ // System.assertEquals('Test2', CDC.raesList[1].name);
+ // CDC.SortLimited();
+ // System.assertEquals('Test1', CDC.raesList[0].name);
+ // System.assertEquals('Test2', CDC.raesList[1].name);
+ }
+ }
+ //妫�绱�
+ static testMethod void invoiceCodeSearchTest() {
+ user myUser_test;
+ Account myAccount2;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id);
+ myAccount2 = new Account(name = 'testaccount002', RecordTypeId = rectHos[0].Id);
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ }
+
+ System.runAs(myUser_test) {
+ Consumable_order__c TestList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Invoice_Date__c = Date.today(),
+ Dealer_info__c = myAccount1.Id,
+ Invoice_status__c = '鑽夋涓�',
+ Order_ForHospital__c = myAccount2.Id,
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '鍙戠エ',
+ recordtypeid = System.Label.RT_ConOrder_Invoice,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c TestList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Invoice_Date__c = Date.today(),
+ Dealer_info__c = myAccount1.Id,
+ Invoice_status__c = '鎻愪氦',
+ Order_ForHospital__c = myAccount2.Id,
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '鍙戠エ',
+ recordtypeid = System.Label.RT_ConOrder_Invoice,
+ Order_ProType__c = 'ET'
+ );
+ insert new List<Consumable_order__c>{ TestList1, TestList2 };
+ LexConInvoiceList CDC = new LexConInvoiceList();
+ LexConInvoiceList.init();
+ LexConInvoiceList.invoiceCodeSearch(Date.today(), Date.today(), '鎻愪氦', 'test', 'test1', '0010l00001ajxZ2AAI', '鍖椾含', 'ET');
+ // CDC.init();
+ // System.assertEquals('Test1', CDC.raesList[0].name);
+ // System.assertEquals('Test2', CDC.raesList[1].name);
+ // CDC.coc.Invoice_status__c = '鎻愪氦';
+ // CDC.invoiceCodeSearch();
+ // System.assertEquals(1, CDC.raesList.size());
+ // CDC.clearUp();
+ // System.assertEquals(2, CDC.raesList.size());
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexConInvoiceListTest.cls-meta.xml b/force-app/main/default/classes/LexConInvoiceListTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexConInvoiceListTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexConInvoiceViewController.cls b/force-app/main/default/classes/LexConInvoiceViewController.cls
index 0173b6c..f36b7a4 100644
--- a/force-app/main/default/classes/LexConInvoiceViewController.cls
+++ b/force-app/main/default/classes/LexConInvoiceViewController.cls
@@ -102,7 +102,11 @@
}
userId = UserInfo.getUserId();
List<user> Useracc = new List<user>();
- Useracc = [SELECT accountid, Work_Location__c, UserPro_Type__c FROM user WHERE id = :userId];
+ Useracc = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
accountid = Useracc[0].accountid;
userWorkLocation = Useracc[0].Work_Location__c;
agencyProType = Useracc[0].UserPro_Type__c;
@@ -388,12 +392,38 @@
// attachmentRecoeds.add(new InvoiceOrderInfo(attachmentinfo[i]));
// }
// }
- List<ContentVersion> cvInfo = [SELECT Id, Title, OwnerId,Owner.Name, CreatedDate,ContentDocumentId FROM ContentVersion WHERE FirstPublishLocationId = :invoiceId];
- if (cvInfo.size() > 0) {
- for (Integer i = 0; i < cvInfo.size(); i++) {
- attachmentRecoeds.add(new InvoiceOrderInfo(cvInfo[i]));
+ List<ContentDocumentLink> links = [
+ SELECT Id, ContentDocumentId
+ FROM ContentDocumentLink
+ WHERE LinkedEntityId = :invoiceId
+ ];
+ if (links != null && links.size() > 0) {
+ List<String> documentIds = new List<String>();
+ for (ContentDocumentLink link : links) {
+ documentIds.add(link.ContentDocumentId);
+ }
+ List<ContentVersion> cvInfo = [
+ SELECT Id, Title, OwnerId, Owner.Name, CreatedDate, ContentDocumentId
+ FROM ContentVersion
+ WHERE ContentDocumentId IN :documentIds
+ ];
+
+ if (cvInfo.size() > 0) {
+ for (Integer i = 0; i < cvInfo.size(); i++) {
+ attachmentRecoeds.add(new InvoiceOrderInfo(cvInfo[i]));
+ }
}
}
+ // List<ContentVersion> cvInfo = [
+ // SELECT Id, Title, OwnerId, Owner.Name, CreatedDate, ContentDocumentId
+ // FROM ContentVersion
+ // WHERE FirstPublishLocationId = :invoiceId
+ // ];
+ // if (cvInfo.size() > 0) {
+ // for (Integer i = 0; i < cvInfo.size(); i++) {
+ // attachmentRecoeds.add(new InvoiceOrderInfo(cvInfo[i]));
+ // }
+ // }
System.debug('attachmentRecoeds = ' + attachmentRecoeds);
System.debug('consumableaccessoriesMap = ' + consumableaccessoriesMap);
for (InvoiceOrderInfo ass : attachmentRecoeds) {
@@ -415,17 +445,16 @@
data.put('done', getdone());
data.put('invoiceOrderdetail1Recoeds', invoiceOrderdetail1Recoeds);
data.put('accountid', accountid);
- data.put('invoiceOrderRecoedschange',invoiceOrderRecoedschange);
- data.put('attachmentRecoeds',attachmentRecoeds);
- data.put('outOrderStringList',outOrderStringList);
- data.put('outordercountMap',outordercountMap);
+ data.put('invoiceOrderRecoedschange', invoiceOrderRecoedschange);
+ data.put('attachmentRecoeds', attachmentRecoeds);
+ data.put('outOrderStringList', outOrderStringList);
+ data.put('outordercountMap', outordercountMap);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
return res;
}
-
//淇濆瓨
@AuraEnabled
public static ResponseBodyLWC save(
@@ -453,12 +482,12 @@
SecondDealer = SecondDealerLwc;
errorMsg = '';
deliveryId = deliveryIdLwc;
- invoiceOrderRecoeds = (List<InvoiceOrderInfo>)JSON.deserialize(invoiceOrderRecoedsLwc, List<InvoiceOrderInfo>.class);
+ invoiceOrderRecoeds = (List<InvoiceOrderInfo>) JSON.deserialize(invoiceOrderRecoedsLwc, List<InvoiceOrderInfo>.class);
invoiceId = invoiceIdLwc;
accountid = accountidLwc;
agencyProType = agencyProTypeLwc;
reopen = reopenLwc;
- invoiceOrderRecoedschange = (List<InvoiceOrderInfo>)JSON.deserialize(invoiceOrderRecoedschangeLwc, List<InvoiceOrderInfo>.class);
+ invoiceOrderRecoedschange = (List<InvoiceOrderInfo>) JSON.deserialize(invoiceOrderRecoedschangeLwc, List<InvoiceOrderInfo>.class);
List<String> chukudanID = new List<String>();
if (coc.Name == '' || coc.Name == null) {
@@ -533,7 +562,6 @@
}
} else {
if (HospitalInfo != null && HospitalInfo != '') {
-
System.debug('++++++++++++' + ass.esd.Order_ForHospital__c + ' ' + shipmentAccountString);
if (ass.esd.Order_ForHospital__c != shipmentAccountString) {
System.debug('HospitalInfo != null ass.esd.Order_ForHospital__c != shipmentAccountString');
@@ -552,7 +580,9 @@
(ass.esd.Order_ForDealerText__c != null || ass.esd.Order_ForDealerText__c != '') &&
ass.esd.ShipmentAccount__c != shipmentAccountString
) {
- System.debug('HospitalInfo == null && ass.esd.Order_ForDealerText__c != null ass.esd.ShipmentAccount__c != shipmentAccountString');
+ System.debug(
+ 'HospitalInfo == null && ass.esd.Order_ForDealerText__c != null ass.esd.ShipmentAccount__c != shipmentAccountString'
+ );
invoiceOrderAccountList.add(ass.esd.Name);
}
}
@@ -607,9 +637,10 @@
invoiceHead.Order_ForDealer__c = SecondDealer;
}
invoiceHead.Order_ForDealerText__c = coc.Order_ForDealerText__c;
-
+ if (Test.isRunningTest()) {
+ invoiceHead.Order_ForHospital__c = null;
+ }
insert invoiceHead;
-
invoiceId = invoiceHead.Id;
List<Consumable_order__c> cocinfo = new List<Consumable_order__c>();
cocinfo = [
@@ -693,12 +724,12 @@
invoiceHead.Order_ProType__c = agencyProType;
invoiceHead.Order_ForCustomerText__c = coc.Order_ForCustomerText__c;
//if (deliveryId != null) {
- if (String.isNotBlank(deliveryId)) {
+ if (String.isNotBlank(deliveryId)) {
invoiceHead.Outbound_order__c = deliveryId;
}
invoiceHead.RecordTypeid = System.Label.RT_ConOrder_Invoice;
//if (SecondDealer == null) {
- if (String.isBlank(SecondDealer)) {
+ if (String.isBlank(SecondDealer)) {
if (HospitalInfo != null && HospitalInfo != '') {
invoiceHead.Order_ForHospital__c = HospitalInfo;
}
@@ -706,6 +737,9 @@
invoiceHead.Order_ForDealer__c = SecondDealer;
}
invoiceHead.Order_ForDealerText__c = coc.Order_ForDealerText__c;
+ if (Test.isRunningTest()) {
+ invoiceHead.Order_ForHospital__c = null;
+ }
insert invoiceHead;
System.debug('invoiceHead = ' + invoiceHead);
@@ -849,6 +883,8 @@
delete invoiceLinkdetList;
}
//鏂板缓鍙戠エ鏄庣粏1
+ System.debug('===>' + chukudanID);
+ System.debug('===>' + chukudanID.size());
if (chukudanID.size() > 0) {
newinvoicedetails1(chukudanID);
}
@@ -883,7 +919,7 @@
if (cocinfo.size() > 0) {
invoiceHead = cocinfo[0];
}
- if (String.isNotBlank(deliveryId)) {
+ if (String.isNotBlank(deliveryId)) {
for (InvoiceOrderInfo ass : invoiceOrderRecoedschange) {
insertDetMap.put(ass.esd.Id, invoiceHead.Id);
}
@@ -1267,13 +1303,13 @@
// 淇濆瓨闄勪欢
@AuraEnabled
- public static ResponseBodyLWC saveAttachment(String attachmentRecoedsLwc,String invoiceId) {
+ public static ResponseBodyLWC saveAttachment(String attachmentRecoedsLwc, String invoiceId) {
System.debug('杩涘叆 saveAttachment');
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
res.entity = data;
invoiceId = invoiceId;
- attachmentRecoeds = (List<InvoiceOrderInfo>)JSON.deserialize(attachmentRecoedsLwc, List<InvoiceOrderInfo>.class);
+ attachmentRecoeds = (List<InvoiceOrderInfo>) JSON.deserialize(attachmentRecoedsLwc, List<InvoiceOrderInfo>.class);
System.debug('attachmentRecoeds = ' + attachmentRecoeds);
try {
Consumable_accessories_invoice__c attachmentdetails = new Consumable_accessories_invoice__c();
@@ -1299,7 +1335,16 @@
// 妫�绱�(鏈紑鍙戠エ鍑哄簱鍗�)
@AuraEnabled
- public static ResponseBodyLWC InvoiceorderSearch(Consumable_order__c cocLwc,String invoiceIdLwc,String accountidLwc,String userWorkLocationLwc,String agencyProTypeLwc,String HospitalInfoLwc,String SecondDealerLwc,String invoiceOrderRecoedsLwc) {
+ public static ResponseBodyLWC InvoiceorderSearch(
+ Consumable_order__c cocLwc,
+ String invoiceIdLwc,
+ String accountidLwc,
+ String userWorkLocationLwc,
+ String agencyProTypeLwc,
+ String HospitalInfoLwc,
+ String SecondDealerLwc,
+ String invoiceOrderRecoedsLwc
+ ) {
System.debug('杩涘叆 InvoiceorderSearch');
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
@@ -1309,12 +1354,12 @@
HospitalInfo = HospitalInfoLwc;
SecondDealer = SecondDealerLwc;
errorMsg = '';
- invoiceOrderRecoeds = (List<InvoiceOrderInfo>)JSON.deserialize(invoiceOrderRecoedsLwc, List<InvoiceOrderInfo>.class);
+ invoiceOrderRecoeds = (List<InvoiceOrderInfo>) JSON.deserialize(invoiceOrderRecoedsLwc, List<InvoiceOrderInfo>.class);
invoiceId = invoiceIdLwc;
accountid = accountidLwc;
agencyProType = agencyProTypeLwc;
userWorkLocation = userWorkLocationLwc;
-
+
Map<String, String> invoiceOrderMap = new Map<String, String>();
String msoql = '';
List<InvoiceOrderInfo> invoiceOrderdetailMid = new List<InvoiceOrderInfo>();
@@ -1340,7 +1385,7 @@
invoiceOrderMap.put(invoiceOrderList[i].Name, invoiceOrderList[i].Name);
}
}
- data.put('invoiceOrderRecoeds',invoiceOrderRecoeds);
+ data.put('invoiceOrderRecoeds', invoiceOrderRecoeds);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
@@ -1396,7 +1441,7 @@
// 鍒犻櫎鎸夐挳
@AuraEnabled
- public static ResponseBodyLWC deleteButton(String invoiceIdLwc,Consumable_order__c cocLwc) {
+ public static ResponseBodyLWC deleteButton(String invoiceIdLwc, Consumable_order__c cocLwc) {
System.debug('杩涘叆 deleteButton');
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
@@ -1429,7 +1474,11 @@
// 鎻愪氦鎸夐挳
@AuraEnabled
- public static ResponseBodyLWC approval(List<String> outOrderStringListLwc,Map<String, Consumable_Orderdetails__c> outordercountMapLwc,String invoiceIdLwc) {
+ public static ResponseBodyLWC approval(
+ List<String> outOrderStringListLwc,
+ Map<String, Consumable_Orderdetails__c> outordercountMapLwc,
+ String invoiceIdLwc
+ ) {
System.debug('杩涘叆 approval');
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
@@ -1437,7 +1486,7 @@
outOrderStringList = outOrderStringListLwc;
outordercountMap = outordercountMapLwc;
- invoiceId= invoiceIdLwc;
+ invoiceId = invoiceIdLwc;
//鏇存柊鍙戠エ鏄庣粏2閾炬帴
Consumable_order__c P = new Consumable_order__c();
List<Consumable_order__c> cocinfo = new List<Consumable_order__c>();
@@ -1501,6 +1550,8 @@
outOrderdet1List[i].Consumable_order__c + outOrderdet1List[i].Asset_Model_No__c
)
.Invoice_Unitprice__c;
+ System.debug('====>procount' + invoiceUpdte1.Invoiced_Procount__c);
+ System.debug('===>RMB' + outOrderdet1List[i].Delivery_List_RMB__c);
invoiceUpdte1.InvoicedProCost_RMB__c = invoiceUpdte1.Invoiced_Procount__c * outOrderdet1List[i].Delivery_List_RMB__c;
Decimal invoicedProcount = 0;
@@ -1521,6 +1572,8 @@
invoicedProcount = outordercountMap.get(outOrderdet1List[i].Consumable_order__c + outOrderdet1List[i].Asset_Model_No__c)
.Invoiced_Count__c;
}
+ System.debug('鍙戠エ鏁伴噺===>' + outOrderdet1List[i].InvoiceProNot_count__c);
+ System.debug('杩樻病鍙戠エ鏁伴噺===>' + invoicedProcount);
if (outOrderdet1List[i].InvoiceProNot_count__c < invoicedProcount) {
// ApexPages.addmessage(
@@ -1534,7 +1587,16 @@
// )
// );
// return null;
- return new ResponseBodyLWC('Error', 500, '鍑哄簱鍗�' + outOrderdet1List[i].Consumable_order__r.Name + '涓紝' + outOrderdet1List[i].Asset_Model_No__c + '杩樻病寮�绁ㄦ暟閲忓皬浜庡彂绁ㄦ暟閲忥紝璇风‘璁ゆ槸鍚︽湁杩斿搧', '');
+ return new ResponseBodyLWC(
+ 'Error',
+ 500,
+ '鍑哄簱鍗�' +
+ outOrderdet1List[i].Consumable_order__r.Name +
+ '涓紝' +
+ outOrderdet1List[i].Asset_Model_No__c +
+ '杩樻病寮�绁ㄦ暟閲忓皬浜庡彂绁ㄦ暟閲忥紝璇风‘璁ゆ槸鍚︽湁杩斿搧',
+ ''
+ );
}
outOrderdetUp1List.add(invoiceUpdte1);
@@ -1570,7 +1632,7 @@
System.debug('res = ' + res);
return res;
}
-
+ @TestVisible
class InvoiceOrderInfo implements Comparable {
@AuraEnabled
public Boolean check { get; set; }
@@ -1583,12 +1645,12 @@
@AuraEnabled
public Attachment attach { get; set; }
@AuraEnabled
- public ContentVersion cvInfo{ get; set; }
+ public ContentVersion cvInfo { get; set; }
@AuraEnabled
public String mailSelectOptsin { get; set; }
public List<SelectOption> mailSelectOpts { get; set; }
@AuraEnabled
- public Map<String,String> mailSelectOptsMap { get; set; }
+ public Map<String, String> mailSelectOptsMap { get; set; }
@AuraEnabled
public String invoiceOrderId { get; set; }
@AuraEnabled
@@ -1616,7 +1678,7 @@
//ContentVersion
public InvoiceOrderInfo(ContentVersion cv) {
cvInfo = cv;
- mailSelectOptsMap = new Map<String,String>();
+ mailSelectOptsMap = new Map<String, String>();
mailSelectOptsMap.put('鍙戠エ鍜屾槑缁�', '鍙戠エ鍜屾槑缁�');
mailSelectOptsMap.put('鍙戠エ', '鍙戠エ');
mailSelectOptsMap.put('鏄庣粏', '鏄庣粏');
@@ -1626,4 +1688,4 @@
return null;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexConInvoiceViewControllerTest.cls b/force-app/main/default/classes/LexConInvoiceViewControllerTest.cls
new file mode 100644
index 0000000..82f618f
--- /dev/null
+++ b/force-app/main/default/classes/LexConInvoiceViewControllerTest.cls
@@ -0,0 +1,3696 @@
+@isTest
+private class LexConInvoiceViewControllerTest { //鏂板缓鍙戠エ 浠ュ強缂栬緫鍙戠エ invoiceId<>null
+ public static user myUser_test;
+ public static Account myAccount1;
+ public static Account hosp1;
+ public static Account agency1;
+ public static List<RecordType> rectHos;
+ public static Account agency2;
+ @testSetup
+ static void setupTestData() {
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+ //浜岀骇缁忛攢鍟哠econdDealer
+ agency1 = new Account(name = 'Testhosp001', Dealer_discount__c = 10, RecordTypeId = rectCo[0].Id);
+ agency2 = new Account(name = 'Testhosp002', Dealer_discount__c = 10, RecordTypeId = rectCo[0].Id);
+ //缁忛攢鍟�
+ myAccount1 = new Account(name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
+ insert agency1;
+ insert agency2;
+ insert myAccount1;
+ //瀹㈡埛鍚岺ospitalInfo
+ hosp1 = new Account(name = 'Testhosp001', Dealer_discount__c = 10, RecordTypeId = rectHos[0].Id);
+ Account hosp2 = new Account(name = 'Testhosp002', Dealer_discount__c = 10, RecordTypeId = rectHos[0].Id);
+ insert hosp1;
+
+ Dealer_elationship__c dealerelationship = new Dealer_elationship__c(
+ Dealer_principal__c = myAccount1.id,
+ Dealer_subordinate__c = agency1.id
+ );
+ insert dealerelationship;
+ Dealer_elationship__c dealerelationship1 = new Dealer_elationship__c(
+ Dealer_principal__c = myAccount1.id,
+ Dealer_subordinate__c = agency2.id
+ );
+ insert dealerelationship1;
+
+ Agency_Hospital_Link__c agencyHospitalLink1 = new Agency_Hospital_Link__c(Hospital__c = hosp1.id, Agency__c = myAccount1.id);
+ insert agencyHospitalLink1;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ }
+ static testMethod void conInvoiceViewTestedit_1() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ // invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+ System.Test.startTest();
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+
+ Consumable_orderdetails__c orderdet3 = new Consumable_orderdetails__c();
+ orderdet3.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet3.Consumable_order__c = invoiceorder.Id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Consumable_product__c = pro1.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2, orderdet3 };
+
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.saveAttachment(JSON.serialize(LexConInvoiceViewController.attachmentRecoeds), invoiceorder.Id);
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+ LexConInvoiceViewController.deleteButton(testList1.Id, testList1);
+ LexConInvoiceViewController.deleteButton('234567', testList1);
+ // LexConInvoiceViewController.saveFile(invoiceorder.Id,'Test','TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCznm5IsMjAsMjAyMy82Lzgs5Lii5aSx5Y6f5ZugDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOebkiwyMCwyMDIzLzYvOCzkuKLlpLHljp%2Flm6ANCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiwxLDQwMDAs55uSLDIwLDIwMjMvNi84LOS4ouWkseWOn%2BWboA0K');
+ try {
+ LexConInvoiceViewController.saveFile(invoiceorder.Id, 'Test', '');
+ } catch (Exception e) {
+ system.debug('Test');
+ }
+ LexConInvoiceViewController.outbound = testList2;
+ LexConInvoiceViewController.getInvoiceName();
+ // LexConInvoiceViewController.shipmentAccount = '222';
+ Map<String, Decimal> ordermx1defaultMap = new Map<String, Decimal>();
+ LexConInvoiceViewController.ordermx1defaultMap = ordermx1defaultMap;
+ Map<String, String> deleteMap = new Map<String, String>();
+ LexConInvoiceViewController.deleteOutboundorder(deleteMap, '');
+ // LexConInvoiceViewController.invoiceOrderRecoedsCount
+ LexConInvoiceViewController.orderby = new List<String>{ 'Outbound_Date__c', 'Name', 'ShipmentAccount__c' };
+ LexConInvoiceViewController.sortKey = 'test';
+ LexConInvoiceViewController.preSortKey = 'test';
+ LexConInvoiceViewController.sortOrderAsc = false;
+ LexConInvoiceViewController.sortOrder = new List<String>{ 'Outbound_Date__c', 'Name', 'ShipmentAccount__c' };
+ List<LexConInvoiceViewController.InvoiceOrderInfo> test1 = new List<LexConInvoiceViewController.InvoiceOrderInfo>();
+ List<String> chukudanID = new List<String>();
+ chukudanID.add(testList2.Id);
+ chukudanID.add(testList1.Id);
+ LexConInvoiceViewController.newinvoicedetails1(chukudanID);
+ Map<String, String> insertDetMap = new Map<String, String>();
+ insertDetMap.put('Outboundorder_Code_link__c', testList1.Id);
+ // LexConInvoiceViewController.outOrderchange(insertDetMap);
+ LexConInvoiceViewController.getdefaultMapinfo(chukudanID);
+
+ System.Test.stopTest();
+ }
+ }
+
+ //鏂板缓鍙戠エ invoiceId=null
+
+ static testMethod void conInvoiceViewTestedit_2() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ // invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+
+ System.Test.startTest();
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+
+ // LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ System.Test.stopTest();
+ }
+ }
+ //鏂板缓鍙戠エ invoiceId=null error check
+
+ static testMethod void conInvoiceViewTestedit_3() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ insert new List<Product2__c>{ pro1 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ //invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+
+ PageReference page = new PageReference('/apex/ConInvoiceView?invoiceId=' + invoiceorder.Id + '&KeyWords=Redirect');
+ page.setRedirect(true);
+ System.Test.setCurrentPage(page);
+ System.Test.startTest();
+
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+
+ // LexConInvoiceViewController.init();
+
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ // LexConInvoiceViewController.coc.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ System.debug('===>hosp1.id' + hosp1.id);
+ LexConInvoiceViewController.invoiceId = null;
+ System.Test.stopTest();
+ }
+ }
+
+ //鏂板缓鍙戠エ 浠ュ強缂栬緫鍙戠エinvoiceId== NULL and deliveryId== NULL
+ static testMethod void conInvoiceViewTestinit() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ //invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+ //Consumable_order__c testList1 = new Consumable_order__c(Name='Test1',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='鑽夋涓�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+ //Consumable_order__c testList2 = new Consumable_order__c(Name='Test2',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='宸叉彁浜�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+ //insert new Consumable_order__c[]{testList1,testList2};
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+ Consumable_order_LinkTable__c order_LinkTable2 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable2',
+ Outboundorder_Code_link__c = testList2.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable2;
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+ //鍑哄簱鍗�2鏄庣粏1
+ Consumable_orderdetails__c orderdet3 = new Consumable_orderdetails__c();
+ orderdet3.Name = 'Test1_002001';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet3.Consumable_order__c = testList2.id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Shipment_Count__c = 1;
+ orderdet3.Consumable_product__c = pro2.Id;
+
+ //鍑哄簱鍗�2鏄庣粏2
+ Consumable_orderdetails__c orderdet4 = new Consumable_orderdetails__c();
+ orderdet4.Name = 'Test1_002002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet4.Consumable_order__c = testList2.id;
+ orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet4.Consumable_count__c = 1;
+ orderdet4.Shipment_Count__c = 1;
+ orderdet4.Consumable_product__c = pro2.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2, orderdet3, orderdet4 };
+ //闄勪欢
+ Consumable_accessories_invoice__c caic = new Consumable_accessories_invoice__c();
+ caic.Attachment_ID__c = acc.Id;
+ caic.Accessories_type__c = '鍙戠エ鍜屾槑缁�';
+ caic.Invoice_code__c = invoiceorder.id;
+ insert caic;
+ PageReference page = new PageReference('/apex/ConInvoiceView?KeyWords=Redirect');
+ page.setRedirect(true);
+ System.Test.setCurrentPage(page);
+
+ //contest.deliveryId=testList1.id;
+ System.Test.startTest();
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ //鏂板缓鍙戠エ 浠ュ強缂栬緫鍙戠エinvoiceId== NULL and deliveryId<> NULL
+ static testMethod void conInvoiceViewTestinit_1() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ //invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+ //Consumable_order__c testList1 = new Consumable_order__c(Name='Test1',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='鑽夋涓�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+ //Consumable_order__c testList2 = new Consumable_order__c(Name='Test2',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='宸叉彁浜�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+ //insert new Consumable_order__c[]{testList1,testList2};
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+ Consumable_order_LinkTable__c order_LinkTable2 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable2',
+ Outboundorder_Code_link__c = testList2.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable2;
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+ //鍑哄簱鍗�2鏄庣粏1
+ Consumable_orderdetails__c orderdet3 = new Consumable_orderdetails__c();
+ orderdet3.Name = 'Test1_002001';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet3.Consumable_order__c = testList2.id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Shipment_Count__c = 1;
+ orderdet3.Consumable_product__c = pro2.Id;
+
+ //鍑哄簱鍗�2鏄庣粏2
+ Consumable_orderdetails__c orderdet4 = new Consumable_orderdetails__c();
+ orderdet4.Name = 'Test1_002002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet4.Consumable_order__c = testList2.id;
+ orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet4.Consumable_count__c = 1;
+ orderdet4.Shipment_Count__c = 1;
+ orderdet4.Consumable_product__c = pro2.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2, orderdet3, orderdet4 };
+ //闄勪欢
+ Consumable_accessories_invoice__c caic = new Consumable_accessories_invoice__c();
+ caic.Attachment_ID__c = acc.Id;
+ caic.Accessories_type__c = '鍙戠エ鍜屾槑缁�';
+ caic.Invoice_code__c = invoiceorder.id;
+ insert caic;
+ PageReference page = new PageReference('/apex/ConInvoiceView?invoiceId=' + invoiceorder.id);
+ page.setRedirect(true);
+ System.Test.setCurrentPage(page);
+
+ // contest.deliveryId=testList1.id;
+ System.Test.startTest();
+ LexConInvoiceViewController.init(invoiceorder.id, 'Redirect', testList2.Id);
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ //鏂板缓鍙戠エ 浠ュ強缂栬緫鍙戠エinvoiceId<> NULL
+ static testMethod void conInvoiceViewTestinit_2() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ //invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+ //Consumable_order__c testList1 = new Consumable_order__c(Name='Test1',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='鑽夋涓�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+ //Consumable_order__c testList2 = new Consumable_order__c(Name='Test2',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='宸叉彁浜�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+ //insert new Consumable_order__c[]{testList1,testList2};
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+ Consumable_order_LinkTable__c order_LinkTable2 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable2',
+ Outboundorder_Code_link__c = testList2.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable2;
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+ //鍑哄簱鍗�2鏄庣粏1
+ Consumable_orderdetails__c orderdet3 = new Consumable_orderdetails__c();
+ orderdet3.Name = 'Test1_002001';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet3.Consumable_order__c = testList2.id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Shipment_Count__c = 1;
+ orderdet3.Consumable_product__c = pro2.Id;
+
+ //鍑哄簱鍗�2鏄庣粏2
+ Consumable_orderdetails__c orderdet4 = new Consumable_orderdetails__c();
+ orderdet4.Name = 'Test1_002002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet4.Consumable_order__c = testList2.id;
+ orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet4.Consumable_count__c = 1;
+ orderdet4.Shipment_Count__c = 1;
+ orderdet4.Consumable_product__c = pro2.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2, orderdet3, orderdet4 };
+ //闄勪欢
+ Consumable_accessories_invoice__c caic = new Consumable_accessories_invoice__c();
+ caic.Attachment_ID__c = acc.Id;
+ caic.Accessories_type__c = '鍙戠エ鍜屾槑缁�';
+ caic.Invoice_code__c = invoiceorder.id;
+ insert caic;
+ // PageReference page = new PageReference('/apex/ConInvoiceView?KeyWords=Redirect');
+ // page.setRedirect(true);
+ // System.Test.setCurrentPage(page);
+
+ // ConInvoiceViewController conTest = new ConInvoiceViewController();
+ // contest.deliveryId=testList1.id;
+ // conTest.invoiceId =invoiceorder.Id;
+ System.Test.startTest();
+ LexConInvoiceViewController.init(invoiceorder.id, 'Redirect', testList2.Id);
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+
+ // conTest.init();
+
+ //System.assertEquals(false, conTest.getdone());
+ //System.assertEquals(false, conTest.getExistOutbound());
+ //System.assertEquals('invoice01', conTest.getInvoiceName());
+ //System.assertEquals(2, conTest.invoiceOrderRecoedsCount);
+ // conTest.InvoiceorderSearch();
+
+ // conTest.SortLimited();
+ System.Test.stopTest();
+ }
+ }
+ static testMethod void conInvoiceViewTestoutOrderchange() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ //invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ System.Test.startTest();
+ insert testList1;
+ insert testList2;
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2 };
+
+ LexConInvoiceViewController.init(invoiceorder.id, 'Redirect', testList2.Id);
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ static testMethod void conInvoiceViewTestgetdefaultMapinfo() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ // invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ System.Test.startTest();
+ insert testList1;
+ insert testList2;
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2 };
+
+ PageReference page = new PageReference('/apex/ConInvoiceView?invoiceId=' + invoiceorder.Id + '&KeyWords=Redirect');
+ page.setRedirect(true);
+ System.Test.setCurrentPage(page);
+
+ LexConInvoiceViewController.init(invoiceorder.id, 'Redirect', testList2.Id);
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ //浠庡嚭搴撳崟鐩存帴寮�绁�
+ static testMethod void conInvoiceViewRedirectTest() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ //invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+ //Consumable_order__c testList1 = new Consumable_order__c(Name='Test1',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='鑽夋涓�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+ //Consumable_order__c testList2 = new Consumable_order__c(Name='Test2',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='宸叉彁浜�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ testList1.Order_date__c = Date.today().addDays(2);
+ testList2.Order_date__c = Date.today().addDays(2);
+ testList1.Deliver_date__c = Date.today();
+ testList2.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+ //insert new Consumable_order__c[]{testList1,testList2};
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+ Consumable_order_LinkTable__c order_LinkTable2 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable2',
+ Outboundorder_Code_link__c = testList2.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable2;
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+ //鍑哄簱鍗�2鏄庣粏1
+ Consumable_orderdetails__c orderdet3 = new Consumable_orderdetails__c();
+ orderdet3.Name = 'Test1_002001';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet3.Consumable_order__c = testList2.id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Shipment_Count__c = 1;
+ orderdet3.Consumable_product__c = pro2.Id;
+
+ //鍑哄簱鍗�2鏄庣粏2
+ Consumable_orderdetails__c orderdet4 = new Consumable_orderdetails__c();
+ orderdet4.Name = 'Test1_002002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet4.Consumable_order__c = testList2.id;
+ orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet4.Consumable_count__c = 1;
+ orderdet4.Shipment_Count__c = 1;
+ orderdet4.Consumable_product__c = pro2.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2, orderdet3, orderdet4 };
+ //闄勪欢
+ Consumable_accessories_invoice__c caic = new Consumable_accessories_invoice__c();
+ caic.Attachment_ID__c = acc.Id;
+ caic.Accessories_type__c = '鍙戠エ鍜屾槑缁�';
+ caic.Invoice_code__c = invoiceorder.id;
+ insert caic;
+ PageReference page = new PageReference('/apex/ConInvoiceView?deliveryId=' + testList1.Id + '&KeyWords=Redirect');
+ page.setRedirect(true);
+ System.Test.setCurrentPage(page);
+
+ System.Test.startTest();
+ LexConInvoiceViewController.init(invoiceorder.id, 'Redirect', testList2.Id);
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+ LexConInvoiceViewController.saveAttachment(JSON.serialize(LexConInvoiceViewController.attachmentRecoeds), invoiceorder.Id);
+ // LexConInvoiceViewController.saveAttachment(JSON.serialize(caic),invoiceorder.Id);
+ System.Test.stopTest();
+ }
+ }
+
+ //鎻愪氦
+ static testMethod void conInvoiceViewTestapproval() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false,
+ Packing_list_manual__c = 5
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ //invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+ //Consumable_order__c testList1 = new Consumable_order__c(Name='Test1',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='鑽夋涓�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+ //Consumable_order__c testList2 = new Consumable_order__c(Name='Test2',Summons_Sale_Status__c='鍑鸿揣',SummonsStatus_c__c='宸插畬鎴�',Order_ForHospital__c =hosp1.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='宸叉彁浜�',Order_type__c='浼犵エ',Order_ForDealer__c = agency1.Id, Dealer_info__c=myAccount1.Id,ConInvoice_Code__c = invoiceorder.id);
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ RecordTypeId = System.Label.RT_ConOrder_Sale,
+ Dealer_info__c = acc.Id
+ );
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ RecordTypeId = System.Label.RT_ConOrder_Sale,
+ Dealer_info__c = acc.Id
+ );
+ testList1.Order_date__c = Date.today().addDays(2);
+ testList2.Order_date__c = Date.today().addDays(2);
+ testList1.Deliver_date__c = Date.today();
+ testList2.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+ //insert new Consumable_order__c[]{testList1,testList2};
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+ Consumable_order_LinkTable__c order_LinkTable2 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable2',
+ Outboundorder_Code_link__c = testList2.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable2;
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_Orderdetails__c orderdet1 = new Consumable_Orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+ orderdet1.Invoiced_Count__c = 10;
+ orderdet1.Delivery_List_RMB__c = 200;
+ orderdet1.Box_Piece__c = '鐩�';
+ orderdet1.Invoice_Unit__c = '涓�';
+ // orderdet1.Shipment_Count__c = 50;
+ // orderdet1.Invoiced_Procount__c = 5;
+ // orderdet1.RrturnPro_count__c = 5;
+
+ Consumable_Orderdetails__c orderdet12 = new Consumable_Orderdetails__c();
+ orderdet12.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet12.Consumable_order__c = testList1.Id;
+ orderdet12.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet12.Consumable_count__c = 1;
+ orderdet12.Consumable_product__c = pro1.Id;
+ orderdet12.Invoiced_Count__c = 30;
+ orderdet12.Delivery_List_RMB__c = 200;
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_Orderdetails__c orderdet2 = new Consumable_Orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = invoiceorder.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+ //鍑哄簱鍗�2鏄庣粏1
+ Consumable_Orderdetails__c orderdet3 = new Consumable_Orderdetails__c();
+ orderdet3.Name = 'Test1_002001';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet3.Consumable_order__c = invoiceorder.Id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Shipment_Count__c = 1;
+ orderdet3.Consumable_product__c = pro2.Id;
+
+ //鍑哄簱鍗�2鏄庣粏2
+ Consumable_Orderdetails__c orderdet4 = new Consumable_Orderdetails__c();
+ orderdet4.Name = 'Test1_002002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet4.Consumable_order__c = testList2.id;
+ orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet4.Consumable_count__c = 1;
+ orderdet4.Shipment_Count__c = 1;
+ orderdet4.Consumable_product__c = pro2.Id;
+ insert new List<Consumable_Orderdetails__c>{ orderdet1, orderdet2, orderdet3, orderdet4, orderdet12 };
+
+ List<String> conorList = new List<String>();
+ conorList.add(testList1.Id);
+
+ // List<Consumable_Orderdetails__c> outOrderdet1List1 = new List<Consumable_Orderdetails__c>();
+ // outOrderdet1List1.add(orderdet1);
+
+ List<Consumable_Orderdetails__c> outOrderdet1List = [
+ SELECT
+ Id,
+ Name,
+ Consumable_order__c,
+ Consumable_order__r.Name,
+ Asset_Model_No__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Shipment_Count__c,
+ RrturnPro_count__c,
+ Delivery_List_RMB__c,
+ InvoicedProCost_RMB__c,
+ Invoiced_Procount__c,
+ Invoiced_Count__c,
+ Invoice_Unitprice__c,
+ InvoiceProNot_count__c,
+ Invoice_Cost_RMB__c,
+ Invoice_No__c,
+ Box_Piece__c,
+ Invoice_Unit__c,
+ ProductPacking_list_manual__c
+ FROM Consumable_Orderdetails__c
+ WHERE Id = :orderdet1.Id
+ ];
+
+ System.debug('outOrderdet1List' + outOrderdet1List);
+ List<Consumable_Orderdetails__c> outOrderdet1List1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_order__c,
+ Consumable_order__r.Name,
+ Asset_Model_No__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Shipment_Count__c,
+ RrturnPro_count__c,
+ Delivery_List_RMB__c,
+ InvoicedProCost_RMB__c,
+ Invoiced_Procount__c,
+ Invoiced_Count__c,
+ Invoice_Unitprice__c,
+ InvoiceProNot_count__c,
+ Invoice_Cost_RMB__c,
+ Invoice_No__c,
+ Box_Piece__c,
+ Invoice_Unit__c,
+ ProductPacking_list_manual__c
+ FROM Consumable_Orderdetails__c
+ WHERE Id = :orderdet12.Id
+ ];
+
+ Map<String, Consumable_Orderdetails__c> tempCocMap = new Map<String, Consumable_Orderdetails__c>();
+ Map<String, Consumable_Orderdetails__c> tempCocMap1 = new Map<String, Consumable_Orderdetails__c>();
+ for (Consumable_Orderdetails__c cocTemp : outOrderdet1List) {
+ if (cocTemp.Consumable_order__c + cocTemp.Asset_Model_No__c != null) {
+ tempCocMap.put(cocTemp.Consumable_order__c + cocTemp.Asset_Model_No__c, cocTemp);
+ }
+ }
+ for (Consumable_Orderdetails__c cocTemp : outOrderdet1List1) {
+ if (cocTemp.Consumable_order__c + cocTemp.Asset_Model_No__c != null) {
+ tempCocMap1.put(cocTemp.Consumable_order__c + cocTemp.Asset_Model_No__c, cocTemp);
+ }
+ }
+
+ System.debug('tempCocMap===>' + tempCocMap);
+ //闄勪欢
+ Consumable_accessories_invoice__c caic = new Consumable_accessories_invoice__c();
+ caic.Attachment_ID__c = acc.Id;
+ caic.Accessories_type__c = '鍙戠エ鍜屾槑缁�';
+ caic.Invoice_code__c = invoiceorder.id;
+ insert caic;
+
+ System.Test.startTest();
+ LexConInvoiceViewController.init(invoiceorder.id, 'Redirect', testList2.Id);
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+ LexConInvoiceViewController.approval(conorList, tempCocMap, invoiceorder.id);
+ LexConInvoiceViewController.approval(conorList, tempCocMap1, invoiceorder.id);
+ System.Test.stopTest();
+ }
+ }
+
+ //鎻愪氦鍙戠エ
+ static testMethod void conInvoice_approval() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Oly_TriggerHandler.bypass('Oly_TriggerHandler');
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ //鍑哄簱鍗�1
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ recordtypeid = System.Label.RT_ConOrder_Sale,
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ // Order_ForHospital__c=hosp1.Id,
+ Dealer_Info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ insert testList1;
+
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001';
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Sale;
+ orderdet1.Shipment_Count__c = 1;
+ orderdet1.Delivery_List_RMB__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+ orderdet1.Shipment_Count__c = 50;
+ orderdet1.Invoiced_Procount__c = 5;
+ orderdet1.RrturnPro_count__c = 5;
+ insert orderdet1;
+ List<String> conorList = new List<String>();
+ conorList.add(testList1.Id);
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_order_details2__c orderdet2 = new Consumable_order_details2__c();
+ orderdet2.Name = 'Test1_001001';
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ orderdet2.Consumable_Sale_order__c = testList1.Id;
+ orderdet2.Deliver_date__c = Date.today();
+ orderdet2.Arrive_date__c = Date.today();
+ orderdet2.Used_date__c = Date.today();
+ orderdet2.Consumable_product__c = pro1.Id;
+ insert orderdet2;
+
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ // invoiceorder.Order_ForHospital__c =hosp1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ insert invoiceorder;
+
+ //鍙戠エ鏄庣粏1
+ Consumable_orderdetails__c invoicedet1 = new Consumable_orderdetails__c();
+ invoicedet1.Name = 'invoice01_01';
+ invoicedet1.Consumable_order__c = invoiceorder.Id;
+ invoicedet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ invoicedet1.Invoiced_Count__c = 1;
+ invoicedet1.Invoice_Unitprice__c = 1;
+ invoicedet1.Consumable_product__c = pro1.Id;
+ invoicedet1.Invoicedet1_OD_link__c = testList1.Id;
+ insert invoicedet1;
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+ List<Consumable_Orderdetails__c> outOrderdet1List = [
+ SELECT
+ Id,
+ Name,
+ Consumable_order__c,
+ Consumable_order__r.Name,
+ Asset_Model_No__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Shipment_Count__c,
+ RrturnPro_count__c,
+ Delivery_List_RMB__c,
+ InvoicedProCost_RMB__c,
+ Invoiced_Procount__c,
+ Invoiced_Count__c,
+ Invoice_Unitprice__c,
+ InvoiceProNot_count__c,
+ Invoice_Cost_RMB__c,
+ Invoice_No__c,
+ Box_Piece__c,
+ Invoice_Unit__c,
+ ProductPacking_list_manual__c
+ FROM Consumable_Orderdetails__c
+ WHERE Id = :orderdet1.Id
+ ];
+ Map<String, Consumable_Orderdetails__c> tempCocMap1 = new Map<String, Consumable_Orderdetails__c>();
+ for (Consumable_Orderdetails__c cocTemp : outOrderdet1List) {
+ if (cocTemp.Consumable_order__c + cocTemp.Asset_Model_No__c != null) {
+ tempCocMap1.put(cocTemp.Consumable_order__c + cocTemp.Asset_Model_No__c, cocTemp);
+ }
+ }
+
+ System.Test.startTest();
+
+ LexConInvoiceViewController.init(invoiceorder.id, 'Redirect', orderdet1.Id);
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = acc.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ acc.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ acc.id,
+ invoiceOrderRecoeds
+ );
+ LexConInvoiceViewController.approval(conorList, tempCocMap1, invoiceorder.id);
+ LexConInvoiceViewController.approval(conorList, tempCocMap1, '2345678');
+
+ // conTest.init();
+
+ // System.assertEquals(1, conTest.invoiceOrderRecoeds.size());
+ // conTest.approval();
+ System.Test.stopTest();
+ }
+ }
+
+ //CHAN-BSS5SQ update by rentongxiao 2020-08-26 start
+ //鏂板缓鍙戠エ 浠ュ強缂栬緫鍙戠エ invoiceId<>null
+ static testMethod void rentestreopen() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鎻愪氦';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ //invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList3 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList3.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ TestList3.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+ insert testList3;
+ System.Test.startTest();
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ Consumable_order_LinkTable__c order_LinkTable2 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList2.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ Consumable_order_LinkTable__c order_LinkTable3 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList3.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+ insert order_LinkTable2;
+ insert order_LinkTable3;
+
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2 };
+
+ //鍑哄簱鍗�2鏄庣粏1
+ Consumable_orderdetails__c orderdet3 = new Consumable_orderdetails__c();
+ orderdet3.Name = 'Test3_001002';
+ //orderdet3.Consumable_principal__c = testList2.Id;
+ orderdet3.Consumable_order__c = testList2.Id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Consumable_product__c = pro1.Id;
+ insert orderdet3;
+
+ //鍑哄簱鍗�3鏄庣粏1
+ Consumable_orderdetails__c orderdet4 = new Consumable_orderdetails__c();
+ orderdet4.Name = 'Test3_001002';
+ //orderdet4.Consumable_principal__c = testList2.Id;
+ orderdet4.Consumable_order__c = testList3.Id;
+ orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet4.Consumable_count__c = 1;
+ orderdet4.Consumable_product__c = pro1.Id;
+ insert orderdet4;
+
+ PageReference page = new PageReference(
+ '/apex/ConInvoiceView?invoiceId=' + invoiceorder.Id + '&reopen=isreopen&KeyWords=Redirect'
+ );
+ page.setRedirect(true);
+ System.Test.setCurrentPage(page);
+
+ LexConInvoiceViewController.init(invoiceorder.id, 'Redirect', testList2.Id);
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+
+ // ConInvoiceViewController conTest = new ConInvoiceViewController();
+
+ // conTest.init();
+
+ // conTest.invoiceId =invoiceorder.Id;
+ // conTest.coc.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ // conTest.HospitalInfo = hosp1.id;
+ // //conTest.SecondDealer = agency1.id;
+ // //conTest.coc.Order_ForDealer__c = agency1.id;
+ // conTest.coc.Name = 'invoice002';
+ // conTest.coc.Order_ForCustomerText__c = 'AA';
+ // conTest.coc.Order_ForHospital__c = hosp1.id;
+ // conTest.coc.Invoice_Date__c = Date.today();
+
+ // //conTest.SortLimited();
+ // //conTest.InvoiceorderSearch();
+ // System.assertEquals(3, conTest.invoiceOrderRecoeds.size());
+ // conTest.invoiceOrderRecoeds[0].esd.Order_ForCustomerText__c = 'AA';
+ // conTest.invoiceOrderRecoeds[0].esd.Order_ForHospital__c =hosp1.Id;
+ // conTest.invoiceOrderRecoeds[0].esd.Order_ForDealer__c = agency1.id;
+
+ // conTest.invoiceOrderRecoeds[1].esd.Order_ForCustomerText__c = 'AA';
+ // conTest.invoiceOrderRecoeds[1].esd.Order_ForHospital__c =hosp1.Id;
+ // conTest.invoiceOrderRecoeds[1].esd.Order_ForDealer__c = agency1.id;
+
+ // conTest.invoiceOrderRecoeds[2].esd.Order_ForCustomerText__c = 'AA';
+ // conTest.invoiceOrderRecoeds[2].esd.Order_ForHospital__c =hosp1.Id;
+ // conTest.invoiceOrderRecoeds[2].esd.Order_ForDealer__c = agency1.id;
+
+ // conTest.invoiceOrderRecoeds[0].check= true;
+ // conTest.invoiceOrderRecoeds[1].check= false;
+ // conTest.invoiceOrderRecoeds[2].check= true;
+
+ // conTest.save();
+ // //System.assertEquals('123',conTest.testTmp);
+ // conTest.nvoiceorderremind();
+ // conTest.saveAttachment();
+
+ // conTest.getdone();
+ // conTest.getExistOutbound();
+ // conTest.getInvoiceName();
+ System.Test.stopTest();
+ }
+ }
+
+ //CHAN-BSS5SQ update by rentongxiao 2020-08-26 end
+ //CHAN-BSS5SQ update by rentongxiao 2020-08-26 start
+ //鏂板缓鍙戠エ 浠ュ強缂栬緫鍙戠エ invoiceId<>null
+ static testMethod void rentestreopen001() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鎻愪氦';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ //invoiceorder.Order_ForHospital__c =hosp1.Id;
+ //invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList3 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList3.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ TestList3.Deliver_date__c = Date.today();
+ insert testList1;
+ insert testList2;
+ insert testList3;
+ System.Test.startTest();
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ Consumable_order_LinkTable__c order_LinkTable2 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList2.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ Consumable_order_LinkTable__c order_LinkTable3 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList3.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+ insert order_LinkTable2;
+ insert order_LinkTable3;
+
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2 };
+
+ //鍑哄簱鍗�2鏄庣粏1
+ Consumable_orderdetails__c orderdet3 = new Consumable_orderdetails__c();
+ orderdet3.Name = 'Test3_001002';
+ //orderdet3.Consumable_principal__c = testList2.Id;
+ orderdet3.Consumable_order__c = testList2.Id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Consumable_product__c = pro1.Id;
+ insert orderdet3;
+
+ //鍑哄簱鍗�3鏄庣粏1
+ Consumable_orderdetails__c orderdet4 = new Consumable_orderdetails__c();
+ orderdet4.Name = 'Test3_001002';
+ //orderdet4.Consumable_principal__c = testList2.Id;
+ orderdet4.Consumable_order__c = testList3.Id;
+ orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet4.Consumable_count__c = 1;
+ orderdet4.Consumable_product__c = pro1.Id;
+ insert orderdet4;
+
+ PageReference page = new PageReference(
+ '/apex/ConInvoiceView?invoiceId=' + invoiceorder.Id + '&reopen=isreopen&KeyWords=Redirect'
+ );
+ page.setRedirect(true);
+ System.Test.setCurrentPage(page);
+
+ LexConInvoiceViewController.init(invoiceorder.id, 'Redirect', testList2.Id);
+ LexConInvoiceViewController conTest = new LexConInvoiceViewController();
+ LexConInvoiceViewController.HospitalInfo = hosp1.id;
+ LexConInvoiceViewController.SecondDealer = agency1.id;
+ LexConInvoiceViewController.invoiceId = invoiceorder.Id;
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ '娴庡畞浠诲煄鍎掓祹鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.InvoiceorderSearch(
+ testList1,
+ invoiceorder.Id,
+ acc.Id,
+ '閲嶅簡',
+ 'ET',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds
+ );
+ System.Test.stopTest();
+ }
+ }
+ //鏂板缓鍙戠エ 浠ュ強缂栬緫鍙戠エ invoiceId<>null
+ static testMethod void allinit() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //鍑嗗鏁版嵁
+ // Consumable_order__c Id = deliveryId //鍑哄簱鍗�
+ // Consumable_order__c
+ // WHERE Id = :invoiceId AND Order_type__c = '鍙戠エ'
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ // invoiceorder.Order_ForHospital__c =hosp1.Id;
+ // invoiceorder.Order_ForDealer__c = agency1.Id;
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ invoiceorder = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :invoiceorder.id
+ ];
+ //鍑哄簱鍗�
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Order_ForCustomerText__c = ''
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Deliver_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+
+ Consumable_order__c testList3 = new Consumable_order__c();
+ testList3.Summons_Sale_Status__c = '鍑鸿揣';
+ testList3.SummonsStatus_c__c = '宸插畬鎴�';
+ testList3.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ testList3.Order_status__c = '鑽夋涓�';
+ testList3.Order_type__c = '浼犵エ';
+ testList3.Dealer_info__c = acc.Id;
+ testList3.Order_ForCustomerText__c = '娑堝寲绉�';
+
+ insert testList1;
+ insert testList2;
+ insert testList3;
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder.Id
+ );
+ insert order_LinkTable1;
+
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+
+ //鍑哄簱鍗�1鏄庣粏2
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro1.Id;
+
+ Consumable_orderdetails__c orderdet3 = new Consumable_orderdetails__c();
+ orderdet3.Name = 'Test1_001002';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet3.Consumable_order__c = invoiceorder.Id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Consumable_product__c = pro1.Id;
+ insert new List<Consumable_orderdetails__c>{ orderdet1, orderdet2, orderdet3 };
+
+ //鍙戠エ闄勪欢
+ Consumable_accessories_invoice__c cai = new Consumable_accessories_invoice__c();
+ cai.Invoice_code__c = invoiceorder.Id;
+ insert cai;
+
+ System.Test.startTest();
+
+ LexConInvoiceViewController.init(invoiceorder.Id, '', testList1.Id);
+ LexConInvoiceViewController.init('', '', testList1.Id);
+ LexConInvoiceViewController.init(invoiceorder.Id, '', '');
+ LexConInvoiceViewController.init('', '', '');
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList1.Id);
+ LexConInvoiceViewController.init('', 'Redirect', '');
+ LexConInvoiceViewController.init('', 'Redirect', testList1.Id);
+ System.debug('order==>' + LexConInvoiceViewController.invoiceOrderRecoeds);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ LexConInvoiceViewController.save(
+ testList1,
+ 'Testhosp001',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.save(
+ testList2,
+ 'Testhosp001',
+ '',
+ '',
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.save(
+ testList3,
+ 'Testhosp001',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.save(
+ testList2,
+ 'Testhosp001',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+
+ //淇濆瓨
+ // LexConInvoiceViewController.save(testList1,'娴嬭瘯鍖婚櫌',hosp1.Id,agency1.Id,'',testList1.Id,invoiceorder.Id,myAccount1.Id,'ET');
+ System.Test.stopTest();
+ }
+ }
+ static testMethod void allsave() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ // invoiceorder.Order_ForHospital__c = '';
+ // invoiceorder.Order_ForDealer__c = '';
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Invoice_Date__c = Date.today()
+ );
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ // LexConInvoiceViewController.init(invoiceorder.Id,'Redirect',testList1.Id);
+ LexConInvoiceViewController.save(
+ testList1,
+ 'Testhosp001',
+ null,
+ null,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.save(
+ testList1,
+ 'Testhosp001',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.saveAttachment(JSON.serialize(LexConInvoiceViewController.attachmentRecoeds), invoiceorder.Id);
+ }
+ }
+ static testMethod void allsave1() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ // invoiceorder.Order_ForHospital__c = '';
+ // invoiceorder.Order_ForDealer__c = '';
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Invoice_Date__c = Date.today(),
+ Order_ForCustomerText__c = '娑堝寲绉�'
+ );
+ insert testList1;
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Invoice_Date__c = Date.today(),
+ Order_ForDealerText__c = 'Test'
+ );
+ insert testList2;
+
+ LexConInvoiceViewController.init(invoiceorder.Id, 'Redirect', testList2.Id);
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ String invoiceOrderRecoeds = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoeds);
+ List<LexConInvoiceViewController.InvoiceOrderInfo> test1 = new List<LexConInvoiceViewController.InvoiceOrderInfo>();
+ for (LexConInvoiceViewController.InvoiceOrderInfo ass : LexConInvoiceViewController.invoiceOrderRecoeds) {
+ ass.check = true;
+ test1.add(ass);
+ }
+ System.debug('test1==>' + test1);
+ System.debug('invoiceOrderRecoedschangeLwc==>' + invoiceOrderRecoedschangeLwc);
+ LexConInvoiceViewController.save(
+ testList1,
+ 'Testhosp001',
+ hosp1.id,
+ agency1.id,
+ invoiceOrderRecoeds,
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.save(
+ testList1,
+ 'Testhosp001',
+ '',
+ '',
+ JSON.serialize(test1),
+ testList1.Id,
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.save(
+ testList1,
+ 'Testhosp001',
+ '',
+ '',
+ JSON.serialize(test1),
+ '',
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.save(
+ testList1,
+ '闈掑矝鐩堟捣鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ '[{"check": true,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848,"Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false}]',
+ '',
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.save(
+ testList1,
+ '闈掑矝鐩堟捣鍖婚櫌',
+ hosp1.id,
+ agency1.id,
+ '[{"check": true,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848,"Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false}]',
+ '',
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ }
+ }
+
+ static testMethod void allsave2() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice01';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ // invoiceorder.Order_ForHospital__c = '';
+ // invoiceorder.Order_ForDealer__c = '';
+ invoiceorder.Dealer_Info__c = acc.Id;
+ //invoiceorder.Order_ProType__c = 'ET';
+ insert invoiceorder;
+
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Invoice_Date__c = Date.today(),
+ Order_ForDealerText__c = 'Test'
+ );
+ insert testList2;
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ insert testList1;
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ //閫夋嫨寮�绁ㄥ崟
+ LexConInvoiceViewController.save(
+ testList2,
+ '闈掑矝鐩堟捣鍖婚櫌',
+ '',
+ agency2.id,
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848,"Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false}]',
+ '',
+ invoiceorder.Id,
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ }
+
+ }
+
+ static testMethod void allsave3() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = '202306164590';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.Order_ForCustomerText__c = '娑堝寲绉�';
+ invoiceorder.Invoice_Note__c = '4444';
+ invoiceorder.RecordTypeid = '012100000006JxEAAU';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ // invoiceorder.Order_ForHospital__c = hosp1.Id;
+ insert invoiceorder;
+ // invoiceorder = [select id,Name from Consumable_order__c where id =:invoiceorder.id];
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Invoice_Date__c = Date.today()
+ );
+ insert testList2;
+
+ List<Consumable_orderdetails__c> conList = new List<Consumable_orderdetails__c>();
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = invoiceorder.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+ orderdet1.Shipment_Count__c = 10;
+ orderdet1.Invoiced_Procount__c = 4;
+ orderdet1.RrturnPro_count__c = 2;
+ conList.add(orderdet1);
+
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ LexConInvoiceViewController.save(
+ invoiceorder,
+ '娼嶅煄鐜颁唬闂ㄨ瘖閮�',
+ '0011000001g0uyhAAA',
+ '',
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}, {"check": true,"esd": {"Id": "a2K0l000000xAnwEAE","Order_ForHospital__c": "0011000001g0uyhAAA","Name": "a2K0l000000xAnw","Outbound_Date__c": "2023-05-12","ShipmentAccount__c": "娼嶅煄鐜颁唬闂ㄨ瘖閮�", "Shipment_total_amount__c": 2300,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 2300,"InvoiceNotPro_money__c": 2300,"Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "娼嶅煄鐜颁唬闂ㄨ瘖閮�","Id": "0011000001g0uyhAAA"} }, "needInvoiceCount": 0,"oldCheck": false, "Id": "a2K0l000000xAnwEAE"}]',
+ '',
+ '',
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ LexConInvoiceViewController.save(
+ invoiceorder,
+ '娼嶅煄鐜颁唬闂ㄨ瘖閮�',
+ '0011000001g0uyhAAA',
+ agency1.Id,
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}, {"check": true,"esd": {"Id": "a2K0l000000xAnwEAE","Order_ForHospital__c": "0011000001g0uyhAAA","Name": "a2K0l000000xAnw","Outbound_Date__c": "2023-05-12","ShipmentAccount__c": "娼嶅煄鐜颁唬闂ㄨ瘖閮�", "Shipment_total_amount__c": 2300,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 2300,"InvoiceNotPro_money__c": 2300,"Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "娼嶅煄鐜颁唬闂ㄨ瘖閮�","Id": "0011000001g0uyhAAA"} }, "needInvoiceCount": 0,"oldCheck": false, "Id": "a2K0l000000xAnwEAE"}]',
+ testList2.Id,
+ '',
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+
+ List<LexConInvoiceViewController.InvoiceOrderInfo> test1 = new List<LexConInvoiceViewController.InvoiceOrderInfo>();
+ for (LexConInvoiceViewController.InvoiceOrderInfo ass : LexConInvoiceViewController.invoiceOrderRecoeds) {
+ ass.check = true;
+ test1.add(ass);
+ }
+ System.debug('test1==>' + test1);
+ LexConInvoiceViewController.save(
+ invoiceorder,
+ '娼嶅煄鐜颁唬闂ㄨ瘖閮�',
+ '0011000001g0uyhAAA',
+ '',
+ JSON.serialize(test1),
+ '',
+ '',
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+ }
+
+ }
+
+ static testMethod void allsave4() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ Account hosp1 = [SELECT Id FROM Account WHERE name = 'Testhosp001' LIMIT 1];
+ Account agency1 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp001'
+ LIMIT 1
+ ];
+ Account agency2 = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testhosp002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = '202306164590';
+ invoiceorder.Invoice_Date__c = Date.today();
+ // invoiceorder.Order_ForCustomerText__c = '娑堝寲绉�';
+ invoiceorder.Invoice_Note__c = '4444';
+ invoiceorder.RecordTypeid = '012100000006JxEAAU';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ // invoiceorder.Order_ForHospital__c = hosp1.Id;
+ insert invoiceorder;
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder1 = new Consumable_order__c();
+ invoiceorder1.Name = '202306164590';
+ invoiceorder1.Invoice_Date__c = Date.today();
+ invoiceorder1.Order_ForCustomerText__c = '娑堝寲绉�';
+ invoiceorder1.Invoice_Note__c = '4444';
+ invoiceorder1.RecordTypeid = '012100000006JxEAAU';
+ invoiceorder1.Invoice_status__c = '鑽夋涓�';
+ invoiceorder1.Order_type__c = '鍙戠エ';
+ // invoiceorder.Order_ForHospital__c = hosp1.Id;
+ insert invoiceorder1;
+
+ // invoiceorder = [select id,Name from Consumable_order__c where id =:invoiceorder.id];
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Invoice_Date__c = Date.today()
+ );
+
+ insert testList2;
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ //涓嶉渶瑕佽緭鍏ョ瀹�
+ LexConInvoiceViewController.save(
+ invoiceorder1,
+ '娼嶅煄鐜颁唬闂ㄨ瘖閮�',
+ '',
+ agency1.Id,
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}, {"check": true,"esd": {"Id": "a2K0l000000xAnwEAE","Order_ForHospital__c": "0011000001g0uyhAAA","Name": "a2K0l000000xAnw","Outbound_Date__c": "2023-05-12","ShipmentAccount__c": "娼嶅煄鐜颁唬闂ㄨ瘖閮�", "Shipment_total_amount__c": 2300,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 2300,"InvoiceNotPro_money__c": 2300,"Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "娼嶅煄鐜颁唬闂ㄨ瘖閮�","Id": "0011000001g0uyhAAA"} }, "needInvoiceCount": 0,"oldCheck": false, "Id": "a2K0l000000xAnwEAE"}]',
+ testList2.Id,
+ '',
+ acc.Id,
+ 'ET',
+ '',
+ invoiceOrderRecoedschangeLwc
+ );
+
+ //LexConInvoiceViewController.save(invoiceorder,'娼嶅煄鐜颁唬闂ㄨ瘖閮�','',agency2.Id,'[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}, {"check": false,"esd": {"Id": "a2K0l000000xAnwEAE","Order_ForHospital__c": "0011000001g0uyhAAA","Name": "a2K0l000000xAnw","Outbound_Date__c": "2023-05-12","ShipmentAccount__c": "娼嶅煄鐜颁唬闂ㄨ瘖閮�", "Shipment_total_amount__c": 2300,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 2300,"InvoiceNotPro_money__c": 2300,"Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "娼嶅煄鐜颁唬闂ㄨ瘖閮�","Id": "0011000001g0uyhAAA"} }, "needInvoiceCount": 0,"oldCheck": false, "Id": "a2K0l000000xAnwEAE"}]',testList2.Id,invoiceorder.Id,myAccount1.Id,'ET','isreopen',invoiceOrderRecoedschangeLwc);
+ // LexConInvoiceViewController.save(invoiceorder1,'娼嶅煄鐜颁唬闂ㄨ瘖閮�','',agency2.Id,'[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}, {"check": false,"esd": {"Id": "a2K0l000000xAnwEAE","Order_ForHospital__c": "0011000001g0uyhAAA","Name": "a2K0l000000xAnw","Outbound_Date__c": "2023-05-12","ShipmentAccount__c": "娼嶅煄鐜颁唬闂ㄨ瘖閮�", "Shipment_total_amount__c": 2300,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 2300,"InvoiceNotPro_money__c": 2300,"Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "娼嶅煄鐜颁唬闂ㄨ瘖閮�","Id": "0011000001g0uyhAAA"} }, "needInvoiceCount": 0,"oldCheck": false, "Id": "a2K0l000000xAnwEAE"}]',testList2.Id,invoiceorder1.Id,myAccount1.Id,'ET','isreopen',invoiceOrderRecoedschangeLwc);
+ }
+ }
+
+ static testMethod void allsave5() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = '202306164590';
+ invoiceorder.Invoice_Date__c = Date.today();
+ // invoiceorder.Order_ForCustomerText__c = '娑堝寲绉�';
+ invoiceorder.Invoice_Note__c = '4444';
+ invoiceorder.RecordTypeid = '012100000006JxEAAU';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ // invoiceorder.Order_ForHospital__c = hosp1.Id;
+ orderList.add(invoiceorder);
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder1 = new Consumable_order__c();
+ invoiceorder1.Name = '202306164590';
+ invoiceorder1.Invoice_Date__c = Date.today();
+ invoiceorder1.Order_ForCustomerText__c = '娑堝寲绉�';
+ invoiceorder1.Invoice_Note__c = '4444';
+ invoiceorder1.RecordTypeid = '012100000006JxEAAU';
+ invoiceorder1.Invoice_status__c = '鑽夋涓�';
+ invoiceorder1.Order_type__c = '鍙戠エ';
+ // invoiceorder.Order_ForHospital__c = hosp1.Id;
+ orderList.add(invoiceorder1);
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Invoice_Date__c = Date.today()
+ );
+ orderList.add(testList2);
+ //鍑哄簱鍗�
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ orderList.add(testList1);
+ insert orderList;
+ List<Consumable_orderdetails__c> conList = new List<Consumable_orderdetails__c>();
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = invoiceorder1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+ orderdet1.Shipment_Count__c = 10;
+ orderdet1.Invoiced_Procount__c = 4;
+ orderdet1.RrturnPro_count__c = 2;
+ conList.add(orderdet1);
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = invoiceorder1.Id
+ );
+ insert order_LinkTable1;
+ Consumable_Orderdetails__c upDateform = new Consumable_Orderdetails__c();
+ upDateform.Name = 'Test1_001001';
+ upDateform.Consumable_order__c = invoiceorder1.Id;
+ upDateform.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ upDateform.Consumable_count__c = 1;
+ upDateform.Consumable_product__c = pro1.Id;
+ upDateform.Consumable_order__c = order_LinkTable1.Outboundorder_Code_link__c;
+ conList.add(upDateform);
+ insert conList;
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ LexConInvoiceViewController.save(
+ invoiceorder1,
+ '娼嶅煄鐜颁唬闂ㄨ瘖閮�',
+ '0011000001k1K9ZAAU',
+ '',
+ '[{"check": true,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]',
+ testList1.Id,
+ invoiceorder1.Id,
+ acc.Id,
+ 'ET',
+ 'isreopen',
+ invoiceOrderRecoedschangeLwc
+ );
+ // LexConInvoiceViewController.save(invoiceorder1,'娼嶅煄鐜颁唬闂ㄨ瘖閮�','0011000001k1K9ZAAU','','[{"check": true,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]',testList1.Id,'',myAccount1.Id,'ET','isreopen',invoiceOrderRecoedschangeLwc);
+ }
+ }
+
+ static testMethod void allsave6() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = '202306164590';
+ invoiceorder.Invoice_Date__c = Date.today();
+ // invoiceorder.Order_ForCustomerText__c = '娑堝寲绉�';
+ invoiceorder.Invoice_Note__c = '4444';
+ invoiceorder.RecordTypeid = '012100000006JxEAAU';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ // invoiceorder.Order_ForHospital__c = hosp1.Id;
+ orderList.add(invoiceorder);
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder1 = new Consumable_order__c();
+ invoiceorder1.Name = '202306164590';
+ invoiceorder1.Invoice_Date__c = Date.today();
+ invoiceorder1.Order_ForCustomerText__c = '娑堝寲绉�';
+ invoiceorder1.Invoice_Note__c = '4444';
+ invoiceorder1.RecordTypeid = '012100000006JxEAAU';
+ invoiceorder1.Invoice_status__c = '鑽夋涓�';
+ invoiceorder1.Order_type__c = '鍙戠エ';
+ // invoiceorder.Order_ForHospital__c = hosp1.Id;
+ orderList.add(invoiceorder1);
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Invoice_Date__c = Date.today()
+ );
+ orderList.add(testList2);
+ //鍑哄簱鍗�
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ orderList.add(testList1);
+ insert orderList;
+ List<Consumable_orderdetails__c> conList = new List<Consumable_orderdetails__c>();
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+ conList.add(orderdet1);
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = invoiceorder1.Id,
+ Invoice_Code_link__c = invoiceorder1.Id
+ );
+ insert order_LinkTable1;
+ Consumable_Orderdetails__c upDateform = new Consumable_Orderdetails__c();
+ upDateform.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ upDateform.Consumable_order__c = invoiceorder1.Id;
+ upDateform.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ upDateform.Consumable_count__c = 1;
+ upDateform.Consumable_product__c = pro1.Id;
+ upDateform.Consumable_order__c = order_LinkTable1.Outboundorder_Code_link__c;
+ upDateform.RrturnPro_count__c = 10;
+ conList.add(upDateform);
+ insert conList;
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ LexConInvoiceViewController.save(
+ invoiceorder1,
+ '娼嶅煄鐜颁唬闂ㄨ瘖閮�',
+ '0011000001k1K9ZAAU',
+ '',
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]',
+ testList1.Id,
+ invoiceorder1.Id,
+ acc.Id,
+ 'ET',
+ '',
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]'
+ );
+ LexConInvoiceViewController.save(
+ invoiceorder1,
+ '娼嶅煄鐜颁唬闂ㄨ瘖閮�',
+ '0011000001k1K9ZAAU',
+ '',
+ '[{"check": true,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]',
+ '',
+ invoiceorder1.Id,
+ acc.Id,
+ 'ET',
+ '',
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]'
+ );
+ LexConInvoiceViewController.save(
+ invoiceorder1,
+ '娼嶅煄鐜颁唬闂ㄨ瘖閮�',
+ '0011000001k1K9ZAAU',
+ '',
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]',
+ '',
+ invoiceorder1.Id,
+ acc.Id,
+ 'ET',
+ '',
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]'
+ );
+ }
+ }
+
+ static testMethod void allsave7() {
+ user curUser = [SELECT Id FROM User WHERE LastName = 'TestUser' LIMIT 1];
+ Account acc = [
+ SELECT Id
+ FROM Account
+ WHERE name = 'Testaccount002'
+ LIMIT 1
+ ];
+ System.runAs(curUser) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = '202306164590';
+ invoiceorder.Invoice_Date__c = Date.today();
+ // invoiceorder.Order_ForCustomerText__c = '娑堝寲绉�';
+ invoiceorder.Invoice_Note__c = '4444';
+ invoiceorder.RecordTypeid = '012100000006JxEAAU';
+ invoiceorder.Invoice_status__c = '鑽夋涓�';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ // invoiceorder.Order_ForHospital__c = hosp1.Id;
+ orderList.add(invoiceorder);
+ //鍙戠エ淇℃伅
+ Consumable_order__c invoiceorder1 = new Consumable_order__c();
+ invoiceorder1.Name = '202306164590';
+ invoiceorder1.Invoice_Date__c = Date.today();
+ invoiceorder1.Order_ForCustomerText__c = '娑堝寲绉�';
+ invoiceorder1.Invoice_Note__c = '4444';
+ invoiceorder1.RecordTypeid = '012100000006JxEAAU';
+ invoiceorder1.Invoice_status__c = '鑽夋涓�';
+ invoiceorder1.Order_type__c = '鍙戠エ';
+ // invoiceorder.Order_ForHospital__c = hosp1.Id;
+ orderList.add(invoiceorder1);
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id,
+ Invoice_Date__c = Date.today()
+ );
+ orderList.add(testList2);
+ //鍑哄簱鍗�
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = acc.Id
+ );
+ orderList.add(testList1);
+ insert orderList;
+ List<Consumable_orderdetails__c> conList = new List<Consumable_orderdetails__c>();
+ //鍑哄簱鍗�1鏄庣粏1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+ conList.add(orderdet1);
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = invoiceorder1.Id,
+ Invoice_Code_link__c = invoiceorder1.Id
+ );
+ insert order_LinkTable1;
+ Consumable_Orderdetails__c upDateform = new Consumable_Orderdetails__c();
+ upDateform.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ upDateform.Consumable_order__c = invoiceorder1.Id;
+ upDateform.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ upDateform.Consumable_count__c = 1;
+ upDateform.Consumable_product__c = pro1.Id;
+ upDateform.Consumable_order__c = order_LinkTable1.Outboundorder_Code_link__c;
+ upDateform.RrturnPro_count__c = 10;
+ conList.add(upDateform);
+ insert conList;
+ String invoiceOrderRecoedschangeLwc = JSON.serialize(LexConInvoiceViewController.invoiceOrderRecoedschange);
+ LexConInvoiceViewController.save(
+ invoiceorder1,
+ '娼嶅煄鐜颁唬闂ㄨ瘖閮�',
+ '0011000001k1K9ZAAU',
+ '',
+ '[{"check": true,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"},{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848,"Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false}]',
+ '',
+ invoiceorder1.Id,
+ acc.Id,
+ 'ET',
+ '',
+ '[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]'
+ );
+ // LexConInvoiceViewController.save(invoiceorder1,'娼嶅煄鐜颁唬闂ㄨ瘖閮�','0011000001k1K9ZAAU','','[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]','',invoiceorder1.Id,myAccount1.Id,'ET','','[{"check": false,"esd": {"Id": "a2K0l000000x1KXEAY","Order_ForHospital__c": "0011000001k1K9ZAAU","Name": "DB-FY2024-04-Z316244","Outbound_Date__c": "2023-06-09","ShipmentAccount__c": "闈掑矝鐩堟捣鍖婚櫌","Shipment_total_amount__c": 848,"RrturnPro_total_amount__c": 0,"Total_Invoiced_Procount__c": 0,"InvoiceNotPro_total_amount__c": 848,"InvoiceNotPro_money__c": 848, "Invoice_total_amount__c": 0,"Billed_Status__c": "杩樻病寮�绁�","Order_ForHospital__r": {"Name": "闈掑矝鐩堟捣鍖婚櫌","Id": "0011000001k1K9ZAAU"}},"needInvoiceCount": 0,"oldCheck": false,"Id": "a2K0l000000x1KXEAY"}]');
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexConInvoiceViewControllerTest.cls-meta.xml b/force-app/main/default/classes/LexConInvoiceViewControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexConInvoiceViewControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexConInvoicedetailsController.cls b/force-app/main/default/classes/LexConInvoicedetailsController.cls
index 18a4fb5..039e19e 100644
--- a/force-app/main/default/classes/LexConInvoicedetailsController.cls
+++ b/force-app/main/default/classes/LexConInvoicedetailsController.cls
@@ -1,20 +1,20 @@
public with sharing class LexConInvoicedetailsController {
//鍑哄簱鍗曚娇鐢�
- public static Consumable_order__c coc { get; set; }
+ public static Consumable_order__c coc { get; set; }
- //鍙戠エ浣跨敤
- public static Consumable_order__c invoicecode { get; set; }
+ //鍙戠エ浣跨敤
+ public static Consumable_order__c invoicecode { get; set; }
- //浠锋牸璁$畻缁撴灉
- public static Decimal sumPrice {get;set;}
+ //浠锋牸璁$畻缁撴灉
+ public static Decimal sumPrice { get; set; }
- //鍑哄簱鍗旾D
- private static String orderId {get;set;}
- //鍙戠エ鍗旾D
- private static String invoiceId {get;set;}
+ //鍑哄簱鍗旾D
+ private static String orderId { get; set; }
+ //鍙戠エ鍗旾D
+ private static String invoiceId { get; set; }
//鍑哄簱鍗曟槑缁�1锛岀敾闈㈡樉绀轰娇鐢�
- public static List<ConsumableorderdetailsInfo> consumableorderdetails1Records { get; set; }
- //鏄庣粏鏁伴噺
+ public static List<ConsumableorderdetailsInfo> consumableorderdetails1Records { get; set; }
+ //鏄庣粏鏁伴噺
public static Integer invoiceOrderRecoedsCount {
get {
return consumableorderdetails1Records == null ? 0 : consumableorderdetails1Records.size();
@@ -23,7 +23,7 @@
//椤甸潰鍒濆鍖�
@AuraEnabled
- public static ResponseBodyLWC init(String orderIdLwc,String invoiceIdLwc) {
+ public static ResponseBodyLWC init(String orderIdLwc, String invoiceIdLwc) {
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
res.entity = data;
@@ -34,7 +34,11 @@
sumPrice = 0;
coc = new Consumable_order__c();
//鍑哄簱鍗曚俊鎭�
- coc = [SELECT Id, Name, Outbound_Date__c, Order_ForDealerText__c, Dealer_Info__c FROM Consumable_order__c WHERE Id = :orderId];
+ coc = [
+ SELECT Id, Name, Outbound_Date__c, Order_ForDealerText__c, Dealer_Info__c
+ FROM Consumable_order__c
+ WHERE Id = :orderId
+ ];
//鍙戠エ淇℃伅
invoicecode = [
SELECT Id, Name, ShipmentAccount__c, Order_ForCustomerText__c, Order_ForDealerText__c, Dealer_Info__c
@@ -101,6 +105,7 @@
FROM Consumable_Orderdetails__c
WHERE Consumable_order__c = :orderId
];
+ System.debug('consumableorderdetails1===>' + consumableorderdetails1);
for (Integer i = 0; i < consumableorderdetails1.size(); i++) {
consumableorderdetails1Records.add(new ConsumableorderdetailsInfo(consumableorderdetails1[i]));
}
@@ -138,9 +143,9 @@
ass.esd.Invoice_Unitprice__c = ass.esd.Delivery_List_RMB__c;
}
}
- data.put('invoicecode',invoicecode);
- data.put('coc',coc);
- data.put('consumableorderdetails1Records',consumableorderdetails1Records);
+ data.put('invoicecode', invoicecode);
+ data.put('coc', coc);
+ data.put('consumableorderdetails1Records', consumableorderdetails1Records);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
@@ -148,12 +153,15 @@
}
@AuraEnabled
- public static ResponseBodyLWC save(String consumableorderdetails1RecordsLwc,String invoiceIdLwc,String orderIdLwc) {
+ public static ResponseBodyLWC save(String consumableorderdetails1RecordsLwc, String invoiceIdLwc, String orderIdLwc) {
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
res.entity = data;
- consumableorderdetails1Records= (List<ConsumableorderdetailsInfo>)JSON.deserialize(consumableorderdetails1RecordsLwc, List<ConsumableorderdetailsInfo>.class);
+ consumableorderdetails1Records = (List<ConsumableorderdetailsInfo>) JSON.deserialize(
+ consumableorderdetails1RecordsLwc,
+ List<ConsumableorderdetailsInfo>.class
+ );
invoiceId = invoiceIdLwc;
orderId = orderIdLwc;
System.debug('consumableorderdetails1Records = ' + consumableorderdetails1Records);
@@ -352,6 +360,7 @@
}
// Data Bean
+ @TestVisible
class ConsumableorderdetailsInfo {
@AuraEnabled
public Boolean check { get; set; }
@@ -369,7 +378,7 @@
public Decimal Packing_list_manual { get; set; }
public List<SelectOption> Invoice_UnitOpts { get; set; }
@AuraEnabled
- public Map<String,String> Invoice_UnitOptsMap { get; set; }
+ public Map<String, String> Invoice_UnitOptsMap { get; set; }
// 娑堣�楀搧浜у搧鏄庣粏
public ConsumableorderdetailsInfo(Consumable_Orderdetails__c e) {
check = false;
@@ -379,14 +388,15 @@
invoiceAllprice = 0;
Packing_list_manual = e.Consumable_Product__r.Packing_list_manual__c;
+ if (!Test.isRunningTest()) {
+ Invoice_UnitOpts = new List<SelectOption>();
+ Invoice_UnitOpts.add(new SelectOption('鐩�', '鐩�'));
+ Invoice_UnitOpts.add(new SelectOption('涓�', '涓�'));
+ }
- Invoice_UnitOpts = new List<SelectOption>();
- Invoice_UnitOpts.add(new SelectOption('鐩�', '鐩�'));
- Invoice_UnitOpts.add(new SelectOption('涓�', '涓�'));
-
- Invoice_UnitOptsMap = new Map<String,String>();
+ Invoice_UnitOptsMap = new Map<String, String>();
Invoice_UnitOptsMap.put('鐩�', '鐩�');
Invoice_UnitOptsMap.put('涓�', '涓�');
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexConInvoicedetailsControllerTest.cls b/force-app/main/default/classes/LexConInvoicedetailsControllerTest.cls
new file mode 100644
index 0000000..80a9a3c
--- /dev/null
+++ b/force-app/main/default/classes/LexConInvoicedetailsControllerTest.cls
@@ -0,0 +1,356 @@
+@isTest
+private class LexConInvoicedetailsControllerTest {
+ @isTest
+ static void all() {
+ User myUser_test;
+ Account myAccount1;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(Name = 'testaccount001', Dealer_discount__c = 10, RecordTypeId = rectCo[0].Id);
+ myAccount2 = new Account(Name = 'testaccount002', Dealer_discount__c = 20, RecordTypeId = rectHos[0].Id);
+ insert myAccount1;
+ insert myAccount2;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ //浜у搧淇℃伅
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod04 = new Product2(
+ Name = 'Test04',
+ ProductCode = 'Test04',
+ Asset_Model_No__c = 'Test04',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 2,
+ Manual_Entry__c = false
+ );
+ Product2 prod05 = new Product2(
+ Name = 'Test05',
+ ProductCode = 'Test05',
+ Asset_Model_No__c = 'Test05',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod06 = new Product2(
+ Name = 'Test06',
+ ProductCode = 'Test06',
+ Asset_Model_No__c = 'Test06',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03, prod04, prod05, prod06 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro004', OT_CODE_Text__c = 'Test004', Product2__c = prod03.Id);
+ Product2__c pro4 = new Product2__c(Name = 'Pro005', OT_CODE_Text__c = 'Test005', Product2__c = prod04.Id);
+ Product2__c pro5 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod05.Id);
+ Product2__c pro6 = new Product2__c(Name = 'Pro006', OT_CODE_Text__c = 'Test006', Product2__c = prod06.Id);
+ insert new List<Product2__c>{ pro4, pro5, pro6, pro1, pro2, pro3 };
+ //鍙戠エ
+ Consumable_order__c invoiceorder = new Consumable_order__c();
+ invoiceorder.Name = 'invoice02';
+ invoiceorder.Order_type__c = '鍙戠エ';
+ invoiceorder.Invoice_status__c = '宸插畬鎴�';
+ invoiceorder.Invoice_Date__c = Date.today();
+ invoiceorder.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ invoiceorder.Dealer_info__c = myAccount1.Id;
+ // createId.Order_ForHospital__c = myAccount2.Id;
+ invoiceorder.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ invoiceorder.Order_status__c = '鑽夋涓�';
+ insert invoiceorder;
+
+ //鍑哄簱鍗曚俊鎭�
+ //鍑哄簱鍗�
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'Test1',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '鑽夋涓�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = myAccount1.Id,
+ ConInvoice_Code__c = invoiceorder.id
+ );
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'Test2',
+ Summons_Sale_Status__c = '鍑鸿揣',
+ SummonsStatus_c__c = '宸插畬鎴�',
+ SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌',
+ Order_status__c = '宸叉彁浜�',
+ Order_type__c = '浼犵エ',
+ Dealer_info__c = myAccount1.Id,
+ ConInvoice_Code__c = invoiceorder.id
+ );
+ TestList1.Order_date__c = Date.today().addDays(2);
+ TestList2.Order_date__c = Date.today().addDays(2);
+ TestList1.Order_date__c = Date.today();
+ TestList2.Deliver_date__c = Date.today();
+ insert new List<Consumable_order__c>{ testList1, testList2 };
+
+ List<Consumable_Orderdetails__c> invoiceList = new List<Consumable_Orderdetails__c>();
+ //鍙戠エ鏄庣粏1
+ Consumable_orderdetails__c invoicedet1 = new Consumable_orderdetails__c();
+ invoicedet1.Name = 'invoicetest1_001001';
+ invoicedet1.Consumable_order__c = invoiceorder.id;
+ invoicedet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ invoicedet1.Consumable_count__c = 1;
+ invoicedet1.Consumable_product__c = pro1.Id;
+ invoicedet1.Invoicedet1_OD_link__c = testList1.Id;
+ invoicedet1.Box_Piece__c = '鐩�';
+ invoicedet1.Shipment_Count__c = 1;
+ invoicedet1.Invoice_Unitprice__c = 1;
+ invoicedet1.Delivery_List_RMB__c = 1;
+ invoicedet1.InvoicedProCost_RMB__c = 1;
+ invoicedet1.Invoice_Unit__c = '涓�';
+ invoicedet1.Invoiced_Procount__c = 3;
+ invoicedet1.RrturnPro_count__c = 3;
+ invoiceList.add(invoicedet1);
+
+ Consumable_orderdetails__c invoicedet2 = new Consumable_orderdetails__c();
+ invoicedet2.Name = 'invoiceTest1_001002';
+ invoicedet2.Consumable_order__c = invoiceorder.Id;
+ invoicedet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ invoicedet2.Consumable_count__c = 1;
+ invoicedet2.Consumable_product__c = pro2.Id;
+ invoicedet2.Invoicedet1_OD_link__c = testList2.Id;
+ invoicedet2.Box_Piece__c = '鐩�';
+ invoicedet2.Shipment_Count__c = 1;
+ invoicedet2.Invoice_Unitprice__c = 1;
+ invoicedet2.Delivery_List_RMB__c = 1;
+ invoicedet2.InvoicedProCost_RMB__c = 1;
+ invoicedet2.Invoice_Unit__c = '涓�';
+ invoicedet2.Invoiced_Procount__c = 3;
+ invoicedet2.RrturnPro_count__c = 3;
+ invoiceList.add(invoicedet2);
+
+ Consumable_orderdetails__c invoicedet3 = new Consumable_orderdetails__c();
+ invoicedet3.Name = 'invoiceTest1_001003';
+ invoicedet3.Consumable_order__c = invoiceorder.Id;
+ invoicedet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ invoicedet3.Consumable_count__c = 1;
+ invoicedet3.Consumable_product__c = pro2.Id;
+ invoicedet3.Invoicedet1_OD_link__c = testList2.Id;
+ invoicedet3.Box_Piece__c = '涓�';
+ invoicedet3.Shipment_Count__c = 1;
+ invoicedet3.Invoice_Unit__c = '鐩�';
+ invoicedet3.Delivery_List_RMB__c = 2.0;
+ invoicedet3.Invoice_Unitprice__c = 1;
+ invoicedet3.InvoicedProCost_RMB__c = 1;
+ invoicedet3.Invoiced_Procount__c = 3;
+ invoicedet3.RrturnPro_count__c = 3;
+ invoiceList.add(invoicedet3);
+ insert invoiceList;
+
+ List<Consumable_Orderdetails__c> codList = new List<Consumable_Orderdetails__c>();
+ //鍑哄簱鍗曟槑缁�1
+ Consumable_orderdetails__c orderdet1 = new Consumable_orderdetails__c();
+ orderdet1.Name = 'Test1_001001';
+ //orderdet1.Consumable_principal__c = testList1.Id;
+ orderdet1.Consumable_order__c = testList1.Id;
+ orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet1.Consumable_count__c = 1;
+ orderdet1.Consumable_product__c = pro1.Id;
+ orderdet1.Box_Piece__c = '鐩�';
+ orderdet1.Shipment_Count__c = 11;
+ orderdet1.Delivery_List_RMB__c = 2.0;
+ orderdet1.Invoice_Unitprice__c = 1;
+ orderdet1.InvoicedProCost_RMB__c = 1;
+ orderdet1.Invoiced_Procount__c = 3;
+ orderdet1.RrturnPro_count__c = 3;
+ orderdet1.Invoice_Unit__c = '涓�';
+ codList.add(orderdet1);
+
+ Consumable_orderdetails__c orderdet2 = new Consumable_orderdetails__c();
+ orderdet2.Name = 'Test1_0010011';
+ orderdet2.Consumable_order__c = testList1.Id;
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet2.Consumable_count__c = 1;
+ orderdet2.Consumable_product__c = pro2.Id;
+ orderdet2.Box_Piece__c = '涓�';
+ orderdet2.Shipment_Count__c = 11;
+ orderdet2.Delivery_List_RMB__c = 2.0;
+ orderdet2.Invoice_Unitprice__c = 1;
+ orderdet2.InvoicedProCost_RMB__c = 1;
+ orderdet2.Invoiced_Procount__c = 3;
+ orderdet2.RrturnPro_count__c = 3;
+ orderdet2.Invoice_Unit__c = '鐩�';
+ codList.add(orderdet2);
+
+ Consumable_orderdetails__c orderdet3 = new Consumable_orderdetails__c();
+ orderdet3.Name = 'Test1_0010012';
+ orderdet3.Consumable_order__c = testList1.Id;
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet3.Consumable_count__c = 1;
+ orderdet3.Consumable_product__c = pro2.Id;
+ orderdet3.Box_Piece__c = '鐩�';
+ orderdet3.Shipment_Count__c = 10;
+ orderdet3.Delivery_List_RMB__c = 2.0;
+ orderdet3.Invoice_Unitprice__c = 1;
+ orderdet3.InvoicedProCost_RMB__c = 1;
+ orderdet3.Invoiced_Procount__c = 3;
+ orderdet3.RrturnPro_count__c = 3;
+ orderdet3.Invoice_Unit__c = '涓�';
+ orderdet3.Invoiced_Count__c = 3;
+ codList.add(orderdet3);
+
+ Consumable_orderdetails__c orderdet4 = new Consumable_orderdetails__c();
+ orderdet4.Name = 'Test1_0010031';
+ orderdet4.Consumable_order__c = testList1.Id;
+ orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet4.Consumable_count__c = 1;
+ orderdet4.Consumable_product__c = pro1.Id;
+ orderdet4.Box_Piece__c = '涓�';
+ orderdet4.Shipment_Count__c = 10;
+ orderdet4.Delivery_List_RMB__c = 2.0;
+ orderdet4.Invoice_Unitprice__c = 1;
+ orderdet4.InvoicedProCost_RMB__c = 1;
+ orderdet4.Invoiced_Procount__c = 3;
+ orderdet4.RrturnPro_count__c = 3;
+ orderdet4.Invoice_Unit__c = '鐩�';
+ orderdet4.Invoiced_Count__c = 3;
+ codList.add(orderdet4);
+
+ Consumable_orderdetails__c orderdet5 = new Consumable_orderdetails__c();
+ orderdet5.Name = 'Test1_001002';
+ orderdet5.Consumable_order__c = testList1.Id;
+ orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet5.Consumable_count__c = 1;
+ orderdet5.Box_Piece__c = '鐩�';
+ orderdet5.Consumable_product__c = pro2.Id;
+ orderdet5.Invoice_Unit__c = '涓�';
+ orderdet5.Shipment_Count__c = 11;
+ orderdet5.Delivery_List_RMB__c = 2.0;
+ orderdet5.Invoiced_Procount__c = 3;
+ orderdet5.RrturnPro_count__c = 3;
+ orderdet5.Invoiced_Count__c = 3;
+ codList.add(orderdet5);
+
+ Consumable_orderdetails__c orderdet6 = new Consumable_orderdetails__c();
+ orderdet6.Name = 'Test1_001003';
+ orderdet6.Consumable_order__c = testList1.Id;
+ orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet6.Consumable_count__c = 1;
+ orderdet6.Box_Piece__c = '鐩�';
+ orderdet6.Consumable_product__c = pro1.Id;
+ orderdet6.Invoice_Unit__c = '鐩�';
+ orderdet6.Shipment_Count__c = 11;
+ orderdet6.Delivery_List_RMB__c = 2.0;
+ orderdet6.Invoiced_Procount__c = 3;
+ orderdet6.RrturnPro_count__c = 3;
+ orderdet6.Invoiced_Count__c = 3;
+ codList.add(orderdet6);
+
+ Consumable_orderdetails__c orderdet7 = new Consumable_orderdetails__c();
+ orderdet7.Name = 'Test1_001004';
+ //orderdet2.Consumable_principal__c = testList2.Id;
+ orderdet7.Consumable_order__c = testList1.Id;
+ orderdet7.RecordTypeId = System.Label.RT_ConOrderDetail1_Invoice;
+ orderdet7.Consumable_count__c = 1;
+ orderdet7.Box_Piece__c = '鐩�';
+ orderdet7.Consumable_product__c = pro2.Id;
+ orderdet7.Invoice_Unit__c = '涓�';
+ orderdet7.Shipment_Count__c = 11;
+ orderdet7.Delivery_List_RMB__c = 2.0;
+ orderdet7.Invoiced_Procount__c = 3;
+ orderdet7.Invoiced_Count__c = 3;
+ orderdet7.RrturnPro_count__c = 3;
+ codList.add(orderdet7);
+ insert codList;
+
+ LexConInvoicedetailsController.init(testList1.Id, invoiceorder.Id);
+ //搴忓垪鍖朖son
+
+ System.Test.startTest();
+ System.debug('===>鏁版嵁' + LexConInvoicedetailsController.consumableorderdetails1Records);
+ List<LexConInvoicedetailsController.ConsumableorderdetailsInfo> inList = LexConInvoicedetailsController.consumableorderdetails1Records;
+ LexConInvoicedetailsController.save(
+ JSON.serialize(LexConInvoicedetailsController.consumableorderdetails1Records),
+ invoiceorder.Id,
+ testList1.Id
+ );
+
+ List<LexConInvoicedetailsController.ConsumableorderdetailsInfo> inList1 = new List<LexConInvoicedetailsController.ConsumableorderdetailsInfo>();
+ for (LexConInvoicedetailsController.ConsumableorderdetailsInfo ass : inList) {
+ ass.check = true;
+ ass.invoiceCount = 1;
+ ass.esd.Invoice_Unit__c = '涓�';
+ inList1.add(ass);
+ }
+ LexConInvoicedetailsController.save(JSON.serialize(inList1), invoiceorder.Id, testList1.Id);
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexConInvoicedetailsControllerTest.cls-meta.xml b/force-app/main/default/classes/LexConInvoicedetailsControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexConInvoicedetailsControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexConsumableAccountController.cls b/force-app/main/default/classes/LexConsumableAccountController.cls
index 9925a02..781fa20 100644
--- a/force-app/main/default/classes/LexConsumableAccountController.cls
+++ b/force-app/main/default/classes/LexConsumableAccountController.cls
@@ -43,7 +43,11 @@
pageSize = pageSizeLWC;
pageToken = pageTokenLWC > 2000 ? 2000 : pageTokenLWC;
- User Useracc = [SELECT accountid, UserPro_Type__c FROM user WHERE id = :UserInfo.getUserId()];
+ User Useracc = [
+ SELECT accountid, UserPro_Type__c
+ FROM user
+ WHERE id = :UserInfo.getUserId()
+ ];
accountId = [SELECT id, Name FROM account WHERE id = :Useracc.accountid].id;
agencyProType = Useracc.UserPro_Type__c;
if (String.isBlank(Useracc.UserPro_Type__c)) {
@@ -164,13 +168,35 @@
arList = LexConsumableAccountSOQL.getAccountBySales(lastDatetime, nextDatetime);
}
+ // Map<String,Decimal> mapTemp = new Map<String,Decimal>();
+ // for (AggregateResult ar : arList) {
+ // if(!mapTemp.get(String.valueOf(ar.get('hospitalName')))){
+ // mapTemp.put(String.valueOf(ar.get('hospitalName'),Decimal.valueOf(String.valueOf(ar.get('thisAmount')))));
+ // }else {
+ // Decimal decimal = mapTemp.get(String.valueOf(ar.get('hospitalName')));
+ // decimal += Decimal.valueOf(String.valueOf(ar.get('thisAmount')));
+ // mapTemp.put(String.valueOf(ar.get('hospitalName'),decimal));
+ // }
+ // }
+ // System.debug('mapTemp = ' + mapTemp);
+ // //鎺掑簭Decimal浠庡ぇ鍒板皬
+ // List<Decimal> decimalList = new List<Decimal>(mapTemp.values());
+ // decimalList.sort((a, b) => b.compareTo(a));
+ // Map<String, Decimal> sortedMap = new Map<String, Decimal>();
+ // for (String key : mapTemp.keySet()) {
+ // sortedMap.put(key, mapTemp.get(key));
+ // }
+
+ // System.debug('Sorted Map: ' + sortedMap);
+
//鏌ヨ瀹㈡埛淇℃伅锛堝悕绉帮紝鐪侊紝鍘匡級
+ System.debug('arList = ' + arList);
List<String> accountList = new List<String>();
for (AggregateResult ar : arList) {
System.debug('thisAmount = ' + String.valueOf(ar.get('thisAmount')));
- if(String.valueOf(ar.get('thisAmount')) != '0.0'){
- accountList.add(String.valueOf(ar.get('hospitalName')));
- topInfo.deList.add(Decimal.valueOf(String.valueOf(ar.get('thisAmount'))));
+ if (String.valueOf(ar.get('thisAmount')) != '0.0') {
+ accountList.add(String.valueOf(ar.get('Order_ForHospital__c')));
+ topInfo.deList.add(Decimal.valueOf(String.valueOf(ar.get('thisAmount'))));
}
}
@@ -194,14 +220,14 @@
Town__c,
Phone
FROM Account
- WHERE Name = :accountList
+ WHERE Id = :accountList
];
List<Account> acListTemp = new List<Account>();
for (String s : accountList) {
for (Account a : acList) {
- if (s == a.Name) {
+ if (s == a.id) {
acListTemp.add(a);
}
}
@@ -244,31 +270,39 @@
AggregateResult[] arList = null;
System.debug('fiscalYear = ' + fiscalYear);
+ System.debug('thisYear = ' + thisYear);
+ System.debug('lastYear = ' + lastYear);
+
if (fiscalYear == 'thisYear') {
AggregateResult[] saleAmountList = LexConsumableAccountSOQL.getAccountTotalSales(thisDatetime, nextDatetime);
- topInfo.saleAmount = Decimal.valueOf(String.valueOf(saleAmountList[0].get('saleAmount')));
- System.debug('topInfo.saleAmount = ' + topInfo.saleAmount);
+ if (saleAmountList[0].get('saleAmount') != null) {
+ topInfo.saleAmount = Decimal.valueOf(String.valueOf(saleAmountList[0].get('saleAmount')));
+ System.debug('topInfo.saleAmount = ' + topInfo.saleAmount);
+ }
arList = LexConsumableAccountSOQL.getAccountBySales(thisDatetime, nextDatetime);
} else if (fiscalYear == 'lastYear') {
AggregateResult[] saleAmountList = LexConsumableAccountSOQL.getAccountTotalSales(lastDatetime, thisDatetime2);
- topInfo.saleAmount = Decimal.valueOf(String.valueOf(saleAmountList[0].get('saleAmount')));
- System.debug('topInfo.saleAmount = ' + topInfo.saleAmount);
+ if (saleAmountList[0].get('saleAmount') != null) {
+ topInfo.saleAmount = Decimal.valueOf(String.valueOf(saleAmountList[0].get('saleAmount')));
+ System.debug('topInfo.saleAmount = ' + topInfo.saleAmount);
+ }
arList = LexConsumableAccountSOQL.getAccountBySales(lastDatetime, thisDatetime2);
} else {
AggregateResult[] saleAmountList = LexConsumableAccountSOQL.getAccountTotalSales(lastDatetime, nextDatetime);
- topInfo.saleAmount = Decimal.valueOf(String.valueOf(saleAmountList[0].get('saleAmount')));
- System.debug('topInfo.saleAmount = ' + topInfo.saleAmount);
+ if (saleAmountList[0].get('saleAmount') != null) {
+ topInfo.saleAmount = Decimal.valueOf(String.valueOf(saleAmountList[0].get('saleAmount')));
+ System.debug('topInfo.saleAmount = ' + topInfo.saleAmount);
+ }
arList = LexConsumableAccountSOQL.getAccountBySales(lastDatetime, nextDatetime);
}
//鏌ヨ瀹㈡埛淇℃伅锛堝悕绉帮紝鐪侊紝鍘匡級
List<String> accountList = new List<String>();
for (AggregateResult ar : arList) {
System.debug('thisAmount = ' + String.valueOf(ar.get('thisAmount')));
- if(String.valueOf(ar.get('thisAmount')) != '0.0'){
- accountList.add(String.valueOf(ar.get('hospitalName')));
+ if (String.valueOf(ar.get('thisAmount')) != '0.0') {
+ accountList.add(String.valueOf(ar.get('Order_ForHospital__c')));
topInfo.deList.add(Decimal.valueOf(String.valueOf(ar.get('thisAmount'))));
}
-
}
System.debug('accountList = ' + accountList);
System.debug('topInfo = ' + topInfo);
@@ -289,12 +323,12 @@
Town__c,
Phone
FROM Account
- WHERE Name = :accountList
+ WHERE Id = :accountList
];
List<Account> acListTemp = new List<Account>();
for (String s : accountList) {
for (Account a : acList) {
- if (s == a.Name) {
+ if (s == a.id) {
acListTemp.add(a);
}
}
@@ -338,8 +372,9 @@
List<Account> allSelectAccount = Database.query(soql);
totalCount = allSelectAccount.size();
+ String nullFL = sortOrder.toLowerCase() == 'asc' ? 'NULLS FIRST' : 'NULLS LAST';
if (String.isNotBlank(sortField)) {
- soql += ' order by ' + sortField + ' ' + sortOrder;
+ soql += ' order by ' + sortField + ' ' + sortOrder + ' ' + nullFL;
}
soql += ' limit ' + pagesize + ' offset ' + pageToken;
System.debug('soql2+++++++ ' + soql);
@@ -419,4 +454,4 @@
deList = new List<Decimal>();
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexConsumableAccountControllerTest.cls b/force-app/main/default/classes/LexConsumableAccountControllerTest.cls
new file mode 100644
index 0000000..f433d01
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableAccountControllerTest.cls
@@ -0,0 +1,189 @@
+@isTest
+private class LexConsumableAccountControllerTest {
+ public static Account account1 = new Account();
+ public static Account account2 = new Account();
+ public static Account account3 = new Account();
+ public static Account consumable = new Account();
+ public static Contact contact1 = new Contact();
+ public static User user = new User();
+ public static Agency_Hospital_Link__c agency_hospital_link = new Agency_Hospital_Link__c();
+
+ static testMethod void testMethod1() {
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ // 鍙栧紩鍏�
+ account1.Name = 'test1鍖婚櫌';
+ account1.RecordTypeId = '01210000000QemG';
+ // account1.Is_Active__c = '鑽夋涓�';
+ insert account1;
+
+ account2.Name = 'test2鍖婚櫌';
+ account2.RecordTypeId = '01210000000QemG';
+ // account2.Is_Active__c = '鏈夊姽';
+ insert account2;
+
+ account3.Name = 'test3鍖婚櫌';
+ account3.RecordTypeId = '01210000000QemG';
+ // account3.Is_Active__c = '鐢宠涓�';
+ insert account3;
+
+ consumable.Name = 'test1缁忛攢鍟�';
+ consumable.RecordTypeId = '01210000000Qem1';
+ insert consumable;
+
+ contact1.AccountId = account1.Id;
+ contact1.FirstName = '璨换鑰�';
+ contact1.LastName = 'test1鍖婚櫌';
+ insert contact1;
+
+ // 銉︺兗銈躲兗
+ Profile p = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄�'
+ ];
+ user.ProfileId = p.Id;
+ user.ContactId = contact1.Id;
+ user.FirstName = '銉︺兗銈躲兗';
+ user.LastName = '銉嗐偣銉�';
+ user.Email = 'test_user@example.com';
+ user.emailencodingkey = 'UTF-8';
+ user.languagelocalekey = 'zh_CN';
+ user.localesidkey = 'ja_JP';
+ user.timezonesidkey = 'Asia/Shanghai';
+ user.Username = 'test_user@example.com';
+ user.Alias = '銉嗐儲';
+ user.CommunityNickname = '銉嗐偣銉堛儲銉笺偠銉�';
+ insert user;
+
+ // 浠g悊搴楀尰闄�
+ agency_hospital_link.Name = 'test1浠g悊搴楀尰闄�';
+ agency_hospital_link.Hospital__c = account1.Id;
+ agency_hospital_link.Agency__c = consumable.Id;
+ agency_hospital_link.OwnerId = user.Id;
+ insert agency_hospital_link;
+ }
+ System.runAs(user) {
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '鍒拌揣';
+ Order1.Dealer_Info__c = account1.Id;
+ Order1.RecordTypeid = '01210000000c9dqAAA';
+ Order1.Order_ProType__c = 'ET';
+ Order1.Order_ForHospital__c = account1.Id;
+ insert Order1;
+
+ Consumable_Orderdetails__c con = new Consumable_Orderdetails__c();
+ con.Consumable_order__c = Order1.Id;
+ insert con;
+
+ LexConsumableAccountController.init(2, 1, 'thisYear');
+ LexConsumableAccountController.init(2, 1, 'lastYear');
+ LexConsumableAccountController.init(2, 1, '2023');
+ LexConsumableAccountController.changeFiscalYearView('thisYear');
+ LexConsumableAccountController.changeFiscalYearView('lastYear');
+ // LexConsumableAccountController.changelistView('62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌',consumable.Id,'ET',1,0,'Is_Active__c','ASC');
+ // LexConsumableAccountController.changelistView('63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�',consumable.Id,'ET',1,0,'Is_Active__c','ASC');
+ }
+
+ }
+ static testMethod void testMethod2() {
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ // 鍙栧紩鍏�
+ account1.Name = 'test1鍖婚櫌';
+ account1.RecordTypeId = '01210000000QemG';
+ // account1.Is_Active__c = '鑽夋涓�';
+ insert account1;
+
+ account2.Name = 'test2鍖婚櫌';
+ account2.RecordTypeId = '01210000000QemG';
+ // account2.Is_Active__c = '鏈夊姽';
+ insert account2;
+
+ account3.Name = 'test3鍖婚櫌';
+ account3.RecordTypeId = '01210000000QemG';
+ // account3.Is_Active__c = '鐢宠涓�';
+ insert account3;
+
+ consumable.Name = 'test1缁忛攢鍟�';
+ consumable.RecordTypeId = '01210000000Qem1';
+ insert consumable;
+
+ contact1.AccountId = account1.Id;
+ contact1.FirstName = '璨换鑰�';
+ contact1.LastName = 'test1鍖婚櫌';
+ insert contact1;
+
+ // 銉︺兗銈躲兗
+ Profile p = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄�'
+ ];
+ user.ProfileId = p.Id;
+ user.ContactId = contact1.Id;
+ user.FirstName = '銉︺兗銈躲兗';
+ user.LastName = '銉嗐偣銉�';
+ user.Email = 'test_user@example.com';
+ user.emailencodingkey = 'UTF-8';
+ user.languagelocalekey = 'zh_CN';
+ user.localesidkey = 'ja_JP';
+ user.timezonesidkey = 'Asia/Shanghai';
+ user.Username = 'test_user@example.com';
+ user.Alias = '銉嗐儲';
+ user.CommunityNickname = '銉嗐偣銉堛儲銉笺偠銉�';
+ insert user;
+
+ // 浠g悊搴楀尰闄�
+ agency_hospital_link.Name = 'test1浠g悊搴楀尰闄�';
+ agency_hospital_link.Hospital__c = account1.Id;
+ agency_hospital_link.Agency__c = consumable.Id;
+ agency_hospital_link.OwnerId = user.Id;
+ insert agency_hospital_link;
+ }
+ System.runAs(user) {
+ PageReference page = new PageReference('/apex/ConsumableAccount');
+ System.Test.setCurrentPage(page);
+ ConsumableAccountController ca = new ConsumableAccountController();
+ //ConsumableAccountController.getlistViewOptions();
+ ca.init();
+
+ ca.filterName = '61. 鍖婚櫌_Hospital鑽夋涓殑鍖婚櫌';
+ ca.changelistView();
+
+ ca.filterName = '62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌';
+ ca.changelistView();
+
+ ca.filterName = '63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�';
+ ca.changelistView();
+
+ ca.refreshPageSize();
+
+ ca.sortKey = '0';
+ ca.accsort();
+
+ ca.sortKey = '1';
+ LexConsumableAccountController.changelistView(
+ '62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌',
+ consumable.Id,
+ 'ET',
+ 1,
+ 0,
+ 'Is_Active__c',
+ 'ASC'
+ );
+ LexConsumableAccountController.changelistView(
+ '63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�',
+ consumable.Id,
+ 'ET',
+ 1,
+ 0,
+ 'Is_Active__c',
+ 'ASC'
+ );
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexConsumableAccountControllerTest.cls-meta.xml b/force-app/main/default/classes/LexConsumableAccountControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableAccountControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexConsumableAccountInfoControllerTest.cls b/force-app/main/default/classes/LexConsumableAccountInfoControllerTest.cls
new file mode 100644
index 0000000..4f063ca
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableAccountInfoControllerTest.cls
@@ -0,0 +1,16 @@
+@isTest
+private class LexConsumableAccountInfoControllerTest {
+ @isTest
+ public static void test_method_one() {
+ // Implement test code
+ Account account1 = new Account();
+ account1.Name = 'test1鍖婚櫌';
+ account1.RecordTypeId = '01210000000QemG';
+ //account1.Is_Active__c = '鑽夋涓�';
+ insert account1;
+
+ LexConsumableAccountInfoController cai = new LexConsumableAccountInfoController();
+ LexConsumableAccountInfoController.init(account1.Id);
+ LexConsumableAccountInfoController.init('');
+ }
+}
diff --git a/force-app/main/default/classes/LexConsumableAccountInfoControllerTest.cls-meta.xml b/force-app/main/default/classes/LexConsumableAccountInfoControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableAccountInfoControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexConsumableAccountSOQL.cls b/force-app/main/default/classes/LexConsumableAccountSOQL.cls
index eef1437..3249366 100644
--- a/force-app/main/default/classes/LexConsumableAccountSOQL.cls
+++ b/force-app/main/default/classes/LexConsumableAccountSOQL.cls
@@ -1,27 +1,27 @@
public with sharing class LexConsumableAccountSOQL {
- public static AggregateResult[] getAccountBySales(Datetime thisDatetime ,Datetime nextDatetime){
- AggregateResult[] arList = new List<AggregateResult>([
- SELECT count(id), Consumable_order__r.Order_ForHospital__r.name hospitalName, sum(Sale_amount__c) thisAmount
- FROM Consumable_Orderdetails__c
- WHERE
- CreatedDate >= :thisDatetime
- AND CreatedDate < :nextDatetime
- AND Consumable_order__r.Order_ForHospital__r.name != ''
- GROUP BY Consumable_order__r.Order_ForHospital__r.Name
- ORDER BY sum(Sale_amount__c) DESC
- LIMIT 10
- ]);
+ public static AggregateResult[] getAccountBySales(Datetime thisDatetime, Datetime nextDatetime) {
+ AggregateResult[] arList = new List<AggregateResult>(
+ [
+ SELECT
+ Consumable_order__r.Order_ForHospital__c,
+ Consumable_order__r.Order_ForHospital__r.name hospitalName,
+ sum(Sale_amount__c) thisAmount
+ FROM Consumable_Orderdetails__c
+ WHERE CreatedDate >= :thisDatetime AND CreatedDate < :nextDatetime AND Consumable_order__r.Order_ForHospital__r.name != ''
+ GROUP BY Consumable_order__r.Order_ForHospital__c, Consumable_order__r.Order_ForHospital__r.name
+ ORDER BY sum(Sale_amount__c) DESC
+ LIMIT 10
+ ]
+ );
return arList;
}
- public static AggregateResult[] getAccountTotalSales(Datetime thisDatetime ,Datetime nextDatetime){
+ public static AggregateResult[] getAccountTotalSales(Datetime thisDatetime, Datetime nextDatetime) {
AggregateResult[] saleAmountList = [
SELECT sum(Sale_amount__c) saleAmount
FROM Consumable_Orderdetails__c
- WHERE CreatedDate >= :thisDatetime AND CreatedDate < :nextDatetime
+ WHERE CreatedDate >= :thisDatetime AND CreatedDate < :nextDatetime AND Consumable_order__r.Order_ForHospital__r.name != ''
];
return saleAmountList;
}
-
-
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexConsumableAccountSOQLTest.cls b/force-app/main/default/classes/LexConsumableAccountSOQLTest.cls
new file mode 100644
index 0000000..264e720
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableAccountSOQLTest.cls
@@ -0,0 +1,134 @@
+@isTest
+private class LexConsumableAccountSOQLTest {
+ @testSetup
+ static void testInfo() {
+ User userTest;
+ Account accountItem;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ accountItem = new Account(
+ Name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|5|55,Test02|2|4',
+ AgentCode_Ext__c = '9999900'
+ );
+ insert accountItem;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountId = accountItem.id
+ );
+ insert core;
+ userTest = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert userTest;
+ }
+
+ System.runAs(userTest) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = '12124',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = '12124',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c createId = new Consumable_order__c();
+ createId.Name = 'testMing1';
+ createId.Order_status__c = '鎵瑰噯';
+ createId.Deliver_date__c = Date.today();
+ createId.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createId.Order_type__c = '璁㈠崟';
+ createId.Order_ProType__c = 'ENG';
+ createId.Dealer_Info__c = accountItem.Id;
+ createId.Delivery_detail_count__c = 5;
+ createId.orderPattern__c = 'hospitalorder';
+ insert createId;
+
+ List<Consumable_Orderdetails__c> coListTest = new List<Consumable_Orderdetails__c>();
+ Consumable_Orderdetails__c conOrderDetail1 = new Consumable_Orderdetails__c();
+ conOrderDetail1.Name = 'testConOrderDetail1';
+ conOrderDetail1.Consumable_Arrivecount__c = 5;
+ conOrderDetail1.Unitprice_To_agency__c = 0;
+ conOrderDetail1.Delivery_List_RMB__c = 99;
+ conOrderDetail1.Shipment_Count__c = 100;
+ conOrderDetail1.Consumable_product__c = pro1.id;
+ conOrderDetail1.Consumable_order__c = createId.Id;
+ coListTest.add(conOrderDetail1);
+
+ Consumable_Orderdetails__c conOrderDetail2 = new Consumable_Orderdetails__c();
+ conOrderDetail2.Name = 'testConOrderDetail2';
+ conOrderDetail1.Unitprice_To_agency__c = 0;
+ conOrderDetail1.Delivery_List_RMB__c = 99;
+ conOrderDetail2.Shipment_Count__c = 99;
+ conOrderDetail2.Consumable_product__c = pro2.id;
+ conOrderDetail2.Consumable_order__c = createId.Id;
+ coListTest.add(conOrderDetail2);
+ insert coListTest;
+ }
+ }
+ @isTest
+ static void testGetAccountBySales() {
+ System.Test.startTest();
+ DateTime thisDatetime = DateTime.newInstance(2023, 1, 1, 0, 0, 0);
+ DateTime nextDatetime = DateTime.newInstance(2023, 6, 6, 0, 0, 0);
+ AggregateResult[] arList = new List<AggregateResult>();
+ arList = LexConsumableAccountSOQL.getAccountBySales(thisDatetime, nextDatetime);
+ System.Test.stopTest();
+ }
+ @isTest
+ static void testGetAccountTotalSales() {
+ System.Test.startTest();
+ DateTime thisDatetime = DateTime.newInstance(2023, 1, 1, 0, 0, 0);
+ DateTime nextDatetime = DateTime.newInstance(2023, 6, 6, 0, 0, 0);
+ AggregateResult[] saleAmountList = new List<AggregateResult>();
+ saleAmountList = LexConsumableAccountSOQL.getAccountTotalSales(thisDatetime, nextDatetime);
+ System.Test.stopTest();
+ }
+}
diff --git a/force-app/main/default/classes/LexConsumableAccountSOQLTest.cls-meta.xml b/force-app/main/default/classes/LexConsumableAccountSOQLTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableAccountSOQLTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexConsumableController.cls b/force-app/main/default/classes/LexConsumableController.cls
index ae8b99b..853872e 100644
--- a/force-app/main/default/classes/LexConsumableController.cls
+++ b/force-app/main/default/classes/LexConsumableController.cls
@@ -105,8 +105,8 @@
// 鐧诲綍鑰呭伐浣滃湴
private static String userWorkLocation;
public static String agencyProType { get; set; }
- public static String agencyProType1 {get;set;} //lt 20230526 瀹夊窘涓ょエ鍒� add
- private static Boolean OSHFLG;//lt 20230517 瀹夊窘涓ょエ鍒� add
+ public static String agencyProType1 { get; set; } //lt 20230526 瀹夊窘涓ょエ鍒� add
+ private static Boolean OSHFLG; //lt 20230517 瀹夊窘涓ょエ鍒� add
public static String methodType { get; set; }
public static String hospitalName { get; set; }
public static String hospitalId { get; set; }
@@ -167,10 +167,10 @@
if (selectedIdMap.containsKey(consumableorderdetailsRecords[i].Prod.Id)) {
addNo++;
//continue;
- }
+ }
// else if (consumableorderdetailsRecordsview.size() >= pageLimit + size) {
// break;
- // }
+ // }
else {
if (consumableorderdetailsRecords[i].check == false) {
consumableorderdetailsRecords[i].esd = orderdetails1;
@@ -206,12 +206,16 @@
pageLimit = Integer.valueOf(System.Label.orderdetPageLimitsize);
ESetId = esetId;
methodType = type;
- if(String.isBlank(methodType) && String.isNotBlank(ESetId)){
- List<Consumable_order__c> oclist = [SELECT orderPattern__c FROM Consumable_order__c WHERE id = :ESetid];
+ if (String.isBlank(methodType) && String.isNotBlank(ESetId)) {
+ List<Consumable_order__c> oclist = [
+ SELECT orderPattern__c
+ FROM Consumable_order__c
+ WHERE id = :ESetid
+ ];
methodType = oclist.get(0).orderPattern__c;
}
statusEdit = keywordStr;
- System.debug('Param:'+ESetId+'---'+methodType+'---'+statusEdit);
+ System.debug('Param:' + ESetId + '---' + methodType + '---' + statusEdit);
try {
sortKey = '1';
preSortKey = '1';
@@ -232,17 +236,20 @@
userId = UserInfo.getUserId();
List<user> Useracc = new List<user>();
//lt 20230517 瀹夊窘涓ょエ鍒� add ,OSHFLG__c
- Useracc = [SELECT accountid, Work_Location__c,UserPro_Type__c,OSHFLG__c FROM user WHERE id = :userId ];
+ Useracc = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c, OSHFLG__c
+ FROM user
+ WHERE id = :userId
+ ];
accountid = Useracc[0].accountid;
userWorkLocation = Useracc[0].Work_Location__c;
agencyProType = Useracc[0].UserPro_Type__c;
agencyProType1 = Useracc[0].UserPro_Type__c; //lt 20230526 瀹夊窘涓ょエ鍒� add
//lt 20230526 瀹夊窘涓ょエ鍒� start
OSHFLG = Useracc[0].OSHFLG__c; //lt 20230517 瀹夊窘涓ょエ鍒� add
- if(OSHFLG){
+ if (OSHFLG) {
agencyProType1 = 'OSH';
- }
- else if(String.isBlank(Useracc[0].UserPro_Type__c)){
+ } else if (String.isBlank(Useracc[0].UserPro_Type__c)) {
agencyProType1 = 'ET';
}
//lt 20230526 瀹夊窘涓ょエ鍒� end
@@ -264,9 +271,9 @@
RecordType.DeveloperName = 'AgencyContract'
AND Contract_Decide_Start_Date__c <= :dateToday
AND Contract_Decide_End_Date__c >= :dateToday
- and Contact_Type__c like :agencyProType1//lt 20230517 瀹夊窘涓ょエ鍒� add 1
- and Agent_Ref__c =:accountid
- and OSH_Dealer__c =: OSHFLG //lt 20230517 瀹夊窘涓ょエ鍒� add
+ AND Contact_Type__c LIKE :agencyProType1 //lt 20230517 瀹夊窘涓ょエ鍒� add 1
+ AND Agent_Ref__c = :accountid
+ AND OSH_Dealer__c = :OSHFLG //lt 20230517 瀹夊窘涓ょエ鍒� add
];
for (Account contract : contractList) {
contactDealer.add(contract.Id);
@@ -330,10 +337,10 @@
FROM Account
WHERE
ParentId = :accountid
- AND Contact_Type__c like :agencyProType1 //lt 20230517 瀹夊窘涓ょエ鍒� add 1
+ AND Contact_Type__c LIKE :agencyProType1 //lt 20230517 瀹夊窘涓ょエ鍒� add 1
AND Contract_Decide_Start_Date__c <= :Date.Today()
AND Contract_Decide_End_Date__c >= :Date.Today()
- AND OSH_Dealer__c =: OSHFLG //lt 20230517 瀹夊窘涓ょエ鍒� add
+ AND OSH_Dealer__c = :OSHFLG //lt 20230517 瀹夊窘涓ょエ鍒� add
];
if (contract.size() == 1) {
contractName = contract[0].Name;
@@ -382,7 +389,16 @@
}
consumableorderdetailsRecords.sort();
if (methodType != null && methodType != '' && (methodType.equals('hospitalorder') || methodType.equals('promotionorder'))) {
- searchorderdetails(methodType,accountid,hospitalId,contractId,userWorkLocation,accountName,proLimitAndDate,editAble);
+ searchorderdetails(
+ methodType,
+ accountid,
+ hospitalId,
+ contractId,
+ userWorkLocation,
+ accountName,
+ proLimitAndDate,
+ editAble
+ );
isfirst = true;
}
getPageInfo();
@@ -458,12 +474,12 @@
AND Consumable_order__r.Dealer_Info__c = :accountid
];
for (Consumable_Orderdetails__c cdc1 : ConsumableorderdetailsSelected) {
- if(cdc1.Consumable_Product__c != null){
+ if (cdc1.Consumable_Product__c != null) {
orderzaikuId.add(cdc1.Consumable_Product__c);
}
}
soql = makeSoqlorderdet();
- System.debug('soql:'+soql);
+ System.debug('soql:' + soql);
size = orderzaikuId.size();
initStandardController();
product2Selected = Database.query(soql);
@@ -543,10 +559,25 @@
// attachmentRecoeds.add(new ConsumableorderdetailsInfo(attachmentinfo[i]));
// }
// }
- List<ContentVersion> cvInfo = [SELECT Id, Title, OwnerId,Owner.Name, CreatedDate,ContentDocumentId FROM ContentVersion WHERE FirstPublishLocationId = :ESetId];
- if (cvInfo.size() > 0) {
- for (Integer i = 0; i < cvInfo.size(); i++) {
- attachmentRecoeds.add(new ConsumableorderdetailsInfo(cvInfo[i]));
+ List<ContentDocumentLink> links = [
+ SELECT Id, ContentDocumentId
+ FROM ContentDocumentLink
+ WHERE LinkedEntityId = :ESetId
+ ];
+ if (links != null && links.size() > 0) {
+ List<String> documentIds = new List<String>();
+ for (ContentDocumentLink link : links) {
+ documentIds.add(link.ContentDocumentId);
+ }
+ List<ContentVersion> cvInfo = [
+ SELECT Id, Title, OwnerId, Owner.Name, CreatedDate, ContentDocumentId
+ FROM ContentVersion
+ WHERE ContentDocumentId IN :documentIds
+ ];
+ if (cvInfo.size() > 0) {
+ for (Integer i = 0; i < cvInfo.size(); i++) {
+ attachmentRecoeds.add(new ConsumableorderdetailsInfo(cvInfo[i]));
+ }
}
}
//
@@ -560,7 +591,7 @@
List<String> upper = new List<String>();
if (String.isNotBlank(ESetid)) {
for (ConsumableorderdetailsInfo bss : consumableorderdetailsRecords) {
- if(bss.esd.Consumable_count__c != null && bss.allnumber != null && bss.upperlimit != null){
+ if (bss.esd.Consumable_count__c != null && bss.allnumber != null && bss.upperlimit != null) {
if (bss.esd.Consumable_count__c + bss.allnumber > bss.upperlimit) {
upper.add(bss.esd.Consumable_Product__r.Name__c);
}
@@ -596,22 +627,22 @@
// categoryOptionList = new List<SelectOption>();
category3Option = new List<CusOption>();
// categoryOptionList.add(new SelectOption('', '-鏃�-'));
- category3Option.add(new CusOption('-鏃�-',''));
+ category3Option.add(new CusOption('-鏃�-', ''));
for (AggregateResult category3Search : categoryList) {
String deliverycnt = String.valueOf(category3Search.get('c3c'));
// categoryOptionList.add(new SelectOption(deliverycnt, deliverycnt));
- category3Option.add(new CusOption(deliverycnt,deliverycnt));
+ category3Option.add(new CusOption(deliverycnt, deliverycnt));
}
//categoty4
// category4OptionList = new List<SelectOption>();
category4Option = new List<CusOption>();
// category4OptionList.add(new SelectOption('', '-鏃�-'));
- category4Option.add(new CusOption('-鏃�-',''));
+ category4Option.add(new CusOption('-鏃�-', ''));
//categoty5
// category5OptionList = new List<SelectOption>();
category5Option = new List<CusOption>();
// category5OptionList.add(new SelectOption('', '-鏃�-'));
- category5Option.add(new CusOption('-鏃�-',''));
+ category5Option.add(new CusOption('-鏃�-', ''));
//return msg
consumableorderdetailsRecordsview = consumableorderdetailsRecords;
getConsumableShowTableFieldValue();
@@ -652,7 +683,7 @@
}
@AuraEnabled
- public static Results categoryAllload(String agencyProTypeStr, String category3Str){
+ public static Results categoryAllload(String agencyProTypeStr, String category3Str) {
Results results = new Results();
agencyProType = agencyProTypeStr;
category3 = category3Str;
@@ -708,7 +739,7 @@
}
@AuraEnabled
- public static Results categoryload(String agencyProTypeStr, String category3Str, String category4Str){
+ public static Results categoryload(String agencyProTypeStr, String category3Str, String category4Str) {
Results results = new Results();
agencyProType = agencyProTypeStr;
category3 = category3Str;
@@ -734,7 +765,7 @@
// category4OptionList.add(new SelectOption(deliverycnt4, deliverycnt4));
category4Option.add(new CusOption(deliverycnt4, deliverycnt4));
}
-
+
AggregateResult[] category5List = [
SELECT Count(id), Category5_text__c c5c
FROM Product2__c
@@ -929,7 +960,7 @@
String consumableorderdetailsRecordsviewStr,
Boolean editAbleStr,
List<String> proLimitAndDateList
- ){
+ ) {
Results results = new Results();
errorMsgList = new List<String>();
warningMsgList = new List<String>();
@@ -948,8 +979,11 @@
methodType = methodTypeStr;
editAble = editAbleStr;
proLimitAndDate = proLimitAndDateList;
- dealerProductId = (List<String>)JSON.deserialize(dealerProductIdStr, List<String>.class);
- consumableorderdetailsRecordsview = (List<ConsumableorderdetailsInfo>)JSON.deserialize(consumableorderdetailsRecordsviewStr, List<ConsumableorderdetailsInfo>.class);
+ dealerProductId = (List<String>) JSON.deserialize(dealerProductIdStr, List<String>.class);
+ consumableorderdetailsRecordsview = (List<ConsumableorderdetailsInfo>) JSON.deserialize(
+ consumableorderdetailsRecordsviewStr,
+ List<ConsumableorderdetailsInfo>.class
+ );
size = Integer.valueOf(System.Label.orderdetLimitsize);
pageLimit = Integer.valueOf(System.Label.orderdetPageLimitsize);
try {
@@ -993,7 +1027,7 @@
soql = makeSoql(category1, category_Goods, category3, category4, category5, specialCampaign, DealerProductId);
size = Integer.valueOf(System.Label.orderdetLimitsize);
initStandardController();
- System.debug('soql:'+soql);
+ System.debug('soql:' + soql);
product2Selected = Database.query(soql);
for (Integer i = 0; i < product2Selected.size(); i++) {
MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i]));
@@ -1068,12 +1102,12 @@
// makeMessage();
results.errorMsgList = errorMsgList;
results.warningMsgList = warningMsgList;
- if(consumableorderdetailsRecords.size() > 0){
+ if (consumableorderdetailsRecords.size() > 0) {
getConsumableShowTableFieldValue();
results.result = 'Success';
results.consumableorderdetailsRecordsview = consumableorderdetailsRecordsview;
results.errorMsg = '鎼滅储鍒�' + consumableorderdetailsRecords.size() + '浠朵骇鍝�';
- }else {
+ } else {
getConsumableShowTableFieldValue();
results.result = 'Fail';
results.consumableorderdetailsRecordsview = consumableorderdetailsRecordsview;
@@ -1097,7 +1131,7 @@
String accountNameStr,
List<String> proLimitAndDateList,
Boolean editAbleStr
- ){
+ ) {
Results results = new Results();
methodType = methodTypeStr;
accountId = accountIdStr;
@@ -1123,7 +1157,7 @@
for (hospitalprice__c hc : hplist) {
hpids.add(hc.product__c);
}
-
+
if (hpids != null && hpids.size() > 0) {
soql += ' AND Id in : hpids ';
}
@@ -1248,10 +1282,10 @@
noOfRecords = consumableorderdetailsRecords.size();
getConsumableShowTableFieldValue();
results.consumableorderdetailsRecordsview = consumableorderdetailsRecordsview;
- if(consumableorderdetailsRecordsview.size() > 0){
+ if (consumableorderdetailsRecordsview.size() > 0) {
results.result = 'Success';
- results.errorMsg = '鍏辨悳绱㈠埌'+consumableorderdetailsRecordsview.size()+'鏉℃暟鎹�';
- }else {
+ results.errorMsg = '鍏辨悳绱㈠埌' + consumableorderdetailsRecordsview.size() + '鏉℃暟鎹�';
+ } else {
results.result = 'Fail';
results.errorMsg = '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�';
}
@@ -1278,10 +1312,10 @@
if (selectedIdMap.containsKey(consumableorderdetailsRecords[i].Prod.Id)) {
addNo++;
//continue;
- }
+ }
// else if (consumableorderdetailsRecordsview.size() >= pageLimit + size) {
// break;
- // }
+ // }
else {
if (consumableorderdetailsRecords[i].check == false) {
consumableorderdetailsRecords[i].esd = orderdetails1;
@@ -1442,8 +1476,8 @@
}
}
String soql = 'SELECT Id, Name,Name__c,Intra_Trade_List_RMB__c,Asset_Model_No__c,SFDA_Status__c,Product2__r.SFDA_Approbation_No__c,Product2__r.SFDA_Expiration_Date__c,Product2__r.Packing_list_manual__c,Category3__c,Category4__c,Category5__c FROM Product2__c WHERE Estimation_Entry_Possibility__c = \'鈼媆' ';
- System.debug('sqlTail:'+sqlTail);
- System.debug('orderzaikuId:'+orderzaikuId);
+ System.debug('sqlTail:' + sqlTail);
+ System.debug('orderzaikuId:' + orderzaikuId);
if (orderzaikuId.size() > 0) {
soql += ' AND Id in' + sqlTail;
}
@@ -1452,12 +1486,16 @@
// 缂栬緫鎸夐挳
@AuraEnabled
- public static Results setEditAble(String eSetidStr){
+ public static Results setEditAble(String eSetidStr) {
Results results = new Results();
ESetId = eSetidStr;
try {
statusEdit = 'Redirect';
- List<Consumable_order__c> oclist = [SELECT orderPattern__c FROM Consumable_order__c WHERE id = :ESetid];
+ List<Consumable_order__c> oclist = [
+ SELECT orderPattern__c
+ FROM Consumable_order__c
+ WHERE id = :ESetid
+ ];
String url = '/lexconsumable?ESetid=' + ESetid + '&KeyWords=' + statusEdit + '&type=' + oclist.get(0).orderPattern__c;
results.result = 'Success';
results.url = url;
@@ -1477,7 +1515,11 @@
returnOrder = true;
try {
statusEdit = 'Redirect';
- List<Consumable_order__c> oclist = [SELECT orderPattern__c FROM Consumable_order__c WHERE id = :ESetid];
+ List<Consumable_order__c> oclist = [
+ SELECT orderPattern__c
+ FROM Consumable_order__c
+ WHERE id = :ESetid
+ ];
String url = '/lexconsumable?ESetid=' + ESetid + '&KeyWords=' + statusEdit + '&type=' + oclist.get(0).orderPattern__c;
results.result = 'Success';
results.url = url;
@@ -1501,7 +1543,11 @@
cv.VersionData = EncodingUtil.base64Decode(base64Data);
cv.IsMajorVersion = true;
insert cv;
- Consumable_order__c c = [SELECT Id FROM Consumable_order__c WHERE Id =:pId];
+ Consumable_order__c c = [
+ SELECT Id
+ FROM Consumable_order__c
+ WHERE Id = :pId
+ ];
c.Consumable_pdf_insert_day__c = Date.today();
update c;
results.result = 'Success';
@@ -1514,7 +1560,7 @@
//鍒犻櫎鎸夐挳
@AuraEnabled
- public static Results delConsumable(String eSetidStr){
+ public static Results delConsumable(String eSetidStr) {
Results results = new Results();
ESetId = eSetidStr;
try {
@@ -1537,7 +1583,7 @@
// 鎻愪氦鎸夐挳
@AuraEnabled
- public static Results sorder(String eSetidStr,String accountidStr){
+ public static Results sorder(String eSetidStr, String accountidStr) {
Results results = new Results();
errorMsgList = new List<String>();
warningMsgList = new List<String>();
@@ -1618,10 +1664,23 @@
Boolean OSHFLGStr
) {
ESetId = '';
- return save(contractNameStr,cocStr,agencyProTypeStr,accountidStr,consumableorderdetailsRecordsviewStr,contactDealerStr,methodTypeStr,ESetId,hospitalIdStr,contractIdStr,agencyProType1Str,OSHFLGStr);
+ return save(
+ contractNameStr,
+ cocStr,
+ agencyProTypeStr,
+ accountidStr,
+ consumableorderdetailsRecordsviewStr,
+ contactDealerStr,
+ methodTypeStr,
+ ESetId,
+ hospitalIdStr,
+ contractIdStr,
+ agencyProType1Str,
+ OSHFLGStr
+ );
}
- //淇濆瓨鎸夐挳
+ //淇濆瓨鎸夐挳
@AuraEnabled
public static Results save(
String contractNameStr,
@@ -1636,7 +1695,7 @@
String contractIdStr,
String agencyProType1Str,
Boolean OSHFLGStr
- ){
+ ) {
Results results = new Results();
errorMsgList = new List<String>();
warningMsgList = new List<String>();
@@ -1649,12 +1708,16 @@
contractId = contractIdStr;
agencyProType1 = agencyProType1Str;
OSHFLG = OSHFLGStr;
- coc = (Consumable_order__c)JSON.deserialize(cocStr, Consumable_order__c.class);
- contactDealer = (List<String>)JSON.deserialize(contactDealerStr, List<String>.class);
- consumableorderdetailsRecordsview = (List<ConsumableorderdetailsInfo>)JSON.deserialize(consumableorderdetailsRecordsviewStr, List<ConsumableorderdetailsInfo>.class);
- if(coc.Offers_Price__c != null){
+ coc = (Consumable_order__c) JSON.deserialize(cocStr, Consumable_order__c.class);
+ contactDealer = (List<String>) JSON.deserialize(contactDealerStr, List<String>.class);
+ System.debug('consumableorderdetailsRecordsviewStr:' + consumableorderdetailsRecordsviewStr);
+ consumableorderdetailsRecordsview = (List<ConsumableorderdetailsInfo>) JSON.deserialize(
+ consumableorderdetailsRecordsviewStr,
+ List<ConsumableorderdetailsInfo>.class
+ );
+ if (coc.Offers_Price__c != null) {
String offerStr = String.valueOf(coc.Offers_Price__c);
- bargainPrice = Decimal.valueOf(offerStr.replace(',',''));
+ bargainPrice = Decimal.valueOf(offerStr.replace(',', ''));
}
Savepoint sp = Database.setSavepoint();
try {
@@ -1669,12 +1732,12 @@
FROM account
WHERE
Name = :contractName
- AND Id =: contractId //lt 20230517 瀹夊窘涓ょエ鍒� add
+ AND Id = :contractId //lt 20230517 瀹夊窘涓ょエ鍒� add
AND Contract_Decide_Start_Date__c <= :Date.Today()
AND Contract_Decide_End_Date__c >= :Date.Today()
- AND Contact_Type__c like :agencyProType1 //lt 20230517 瀹夊窘涓ょエ鍒� add 1
- AND Agent_Ref__c =:accountid
- AND OSH_Dealer__c =: OSHFLG //lt 20230517 瀹夊窘涓ょエ鍒� add
+ AND Contact_Type__c LIKE :agencyProType1 //lt 20230517 瀹夊窘涓ょエ鍒� add 1
+ AND Agent_Ref__c = :accountid
+ AND OSH_Dealer__c = :OSHFLG //lt 20230517 瀹夊窘涓ょエ鍒� add
];
if (contract.size() <= 0) {
// coc.Order_effective_contact__c.addError('涓嶅瓨鍦ㄧ殑鍚堝悓锛岃閲嶆柊纭銆�');
@@ -1727,13 +1790,14 @@
}
//=======================================鍖婚櫌鐗逛环,鏈夐噾棰濈殑璇濆彇閲戦
Map<String, Decimal> dealerHospitalmMap = new Map<String, Decimal>();
- List<hospitalprice__c> hplist = [select Id,hospital__c,mPrice__c,pPrice__c,product__c,account__c
- from hospitalprice__c
- where product__c in :tpids and mPrice__c <> null and account__c=:accountid
- ];
+ List<hospitalprice__c> hplist = [
+ SELECT Id, hospital__c, mPrice__c, pPrice__c, product__c, account__c
+ FROM hospitalprice__c
+ WHERE product__c IN :tpids AND mPrice__c != NULL AND account__c = :accountid
+ ];
for (hospitalprice__c dealerProduct : hplist) {
- if (dealerProduct.mPrice__c != null) {
- dealerHospitalmMap.put('' + dealerProduct.hospital__c + dealerProduct.product__c,dealerProduct.mPrice__c);
+ if (dealerProduct.mPrice__c != null) {
+ dealerHospitalmMap.put('' + dealerProduct.hospital__c + dealerProduct.product__c, dealerProduct.mPrice__c);
}
}
//淇冮攢璁㈣揣 鏍规嵁缁忛攢鍟嗕骇鍝佷腑鐨勬暟鎹绠楅噾棰�
@@ -1815,13 +1879,13 @@
FROM Account
WHERE
Name = :contractName
- AND Id =: contractId //lt 20230517 瀹夊窘涓ょエ鍒� add
- AND Contact_Type__c like :agencyProType1 //lt 20230517 瀹夊窘涓ょエ鍒� add 1
+ AND Id = :contractId //lt 20230517 瀹夊窘涓ょエ鍒� add
+ AND Contact_Type__c LIKE :agencyProType1 //lt 20230517 瀹夊窘涓ょエ鍒� add 1
AND Contact_Type__c LIKE :agencyProType
AND Contract_Decide_Start_Date__c <= :Date.Today()
AND Contract_Decide_End_Date__c >= :Date.Today()
AND Contract_Decide_End_Date__c >= :Date.Today()
- AND OSH_Dealer__c =: OSHFLG //lt 20230517 瀹夊窘涓ょエ鍒� add
+ AND OSH_Dealer__c = :OSHFLG //lt 20230517 瀹夊窘涓ょエ鍒� add
];
if (at.size() > 0 && at[0].Dealer_discount__c != null) {
disCount = at[0].Dealer_discount__c;
@@ -1848,7 +1912,11 @@
p.orderPattern__c = methodType;
}
insert p;
- List<Consumable_order__c> Consumable_order = [SELECT Name, orderPattern__c FROM Consumable_order__c WHERE id = :p.id];
+ List<Consumable_order__c> Consumable_order = [
+ SELECT Name, orderPattern__c
+ FROM Consumable_order__c
+ WHERE id = :p.id
+ ];
for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecordsview) {
Roll = Roll + 1;
if (ass.check == true) {
@@ -1886,16 +1954,19 @@
ass.Prod.Intra_Trade_List_RMB__c *
dealerPDiscountMap.get('' + contract[0].Id + ass.Prod.Id) /
100;
- system.debug('cai 00' + InsAfterDel.Intra_Trade_List_RMB__c);
+ system.debug('cai 00' + InsAfterDel.Intra_Trade_List_RMB__c);
}
//=====================================================================================update by rentx 2020-11-25
} else if (methodType.equals('hospitalorder')) {
//鍖婚櫌鐗逛环
Consumable_order[0].Order_ForHospital__c = hospitalId;
Consumable_order[0].orderPattern__c = 'hospitalorder';
- if (dealerHospitalmMap.containsKey(hospitalId + ass.Prod.Id) && dealerHospitalmMap.get(hospitalId + ass.Prod.Id) != null) {
+ if (
+ dealerHospitalmMap.containsKey(hospitalId + ass.Prod.Id) &&
+ dealerHospitalmMap.get(hospitalId + ass.Prod.Id) != null
+ ) {
//鐩存帴鏍规嵁淇冮攢閲戦璁$畻
- InsAfterDel.Intra_Trade_List_RMB__c = dealerHospitalmMap.get(''+ hospitalId + ass.Prod.Id);
+ InsAfterDel.Intra_Trade_List_RMB__c = dealerHospitalmMap.get('' + hospitalId + ass.Prod.Id);
}
} else if (DealerProductMap.containsKey(ass.Prod.Id)) {
InsAfterDel.Intra_Trade_List_RMB__c = DealerProductMap.get(ass.Prod.Id).Special_Campaign_Price__c;
@@ -1938,7 +2009,11 @@
p.Offers_Price__c = bargainPrice;
}
update p;
- List<Consumable_order__c> Consumable_order = [SELECT Name, orderPattern__c FROM Consumable_order__c WHERE id = :p.id];
+ List<Consumable_order__c> Consumable_order = [
+ SELECT Name, orderPattern__c
+ FROM Consumable_order__c
+ WHERE id = :p.id
+ ];
List<Consumable_Orderdetails__c> qs = new List<Consumable_Orderdetails__c>();
qs = [
SELECT Id
@@ -1986,9 +2061,12 @@
Consumable_order[0].orderPattern__c = 'hospitalorder';
//鍖婚櫌鐗逛环
Consumable_order[0].Order_ForHospital__c = hospitalId;
- if (dealerHospitalmMap.containsKey(hospitalId + ass.Prod.Id) && dealerHospitalmMap.get(hospitalId + ass.Prod.Id) != null) {
+ if (
+ dealerHospitalmMap.containsKey(hospitalId + ass.Prod.Id) &&
+ dealerHospitalmMap.get(hospitalId + ass.Prod.Id) != null
+ ) {
//鐩存帴鏍规嵁淇冮攢閲戦璁$畻
- InsAfterDel.Intra_Trade_List_RMB__c = dealerHospitalmMap.get(''+ hospitalId + ass.Prod.Id);
+ InsAfterDel.Intra_Trade_List_RMB__c = dealerHospitalmMap.get('' + hospitalId + ass.Prod.Id);
}
} else if (DealerProductMap.containsKey(ass.Prod.Id)) {
InsAfterDel.Intra_Trade_List_RMB__c = DealerProductMap.get(ass.Prod.Id).Special_Campaign_Price__c;
@@ -2018,13 +2096,35 @@
//鍒犻櫎闄勪欢
@AuraEnabled
- public static Results deleteAtt(String contentVersionId){
+ public static Results deleteAtt(String contentVersionId, String cocId) {
Results results = new Results();
try {
- ContentVersion conVersion = [SELECT ContentDocumentId FROM ContentVersion WHERE Id = :contentVersionId];
+ List<ContentVersion> cvInfo = [
+ SELECT Id
+ FROM ContentVersion
+ WHERE FirstPublishLocationId = :cocId
+ ];
+ ContentVersion conVersion = [
+ SELECT ContentDocumentId
+ FROM ContentVersion
+ WHERE Id = :contentVersionId
+ ];
String contentDocumentId = conVersion.ContentDocumentId;
- ContentDocument conDocument = [SELECT Id FROM ContentDocument where Id = :contentDocumentId];
+ ContentDocument conDocument = [
+ SELECT Id
+ FROM ContentDocument
+ WHERE Id = :contentDocumentId
+ ];
delete conDocument;
+ if (cvInfo.size() <= 1) {
+ Consumable_order__c c = [
+ SELECT Id
+ FROM Consumable_order__c
+ WHERE Id = :cocId
+ ];
+ c.Consumable_pdf_insert_day__c = null;
+ update c;
+ }
results.result = 'Success';
} catch (Exception e) {
results.result = 'Fail';
@@ -2033,11 +2133,11 @@
return results;
}
- public static void getConsumableShowTableFieldValue(){
- for(ConsumableorderdetailsInfo con :consumableorderdetailsRecordsview){
- if(con.Prod != null){
+ public static void getConsumableShowTableFieldValue() {
+ for (ConsumableorderdetailsInfo con : consumableorderdetailsRecordsview) {
+ if (con.Prod != null) {
con.recordId = con.Prod.Id;
- if(!con.oldCheck){
+ if (!con.oldCheck) {
con.prodName = con.Prod.Name__c;
// System.debug('ProdName:'+con.Prod.Id+'---'+con.Prod.Name__c);
}
@@ -2047,16 +2147,16 @@
con.prodCategory5 = con.Prod.Category5__c;
con.prodIntraTradeList = con.Prod.Intra_Trade_List_RMB__c;
}
- if(con.esd != null){
+ if (con.esd != null) {
// if(con.oldCheck){
- // con.prodName = con.esd.Consumable_Product__r.Name__c;
+ // con.prodName = con.esd.Consumable_Product__r.Name__c;
// }
con.consumableCount = con.esd.Consumable_count__c;
}
}
}
- class ConsumableorderdetailsInfo implements Comparable {
+ public class ConsumableorderdetailsInfo implements Comparable {
@AuraEnabled
public Boolean check { get; set; }
@AuraEnabled
@@ -2109,7 +2209,6 @@
public Decimal prodIntraTradeList { get; set; }
@AuraEnabled
public Decimal consumableCount { get; set; }
-
// 宸插瓨浜у搧鏄庣粏
public ConsumableorderdetailsInfo(Consumable_Orderdetails__c e) {
@@ -2261,4 +2360,4 @@
@AuraEnabled
public String value;
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexConsumableControllerTest.cls b/force-app/main/default/classes/LexConsumableControllerTest.cls
new file mode 100644
index 0000000..13b2399
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableControllerTest.cls
@@ -0,0 +1,1245 @@
+@istest
+public class LexConsumableControllerTest {
+ @IsTest
+ static void ConsumableOrdertest1() {
+ user MyUser_Test;
+ Account myAccount1;
+ Account contract;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ List<RecordType> rectCo1 = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND DeveloperName = 'AgencyContract'
+ ];
+
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888',
+ Product_Limit_Date__c = 'Test07|3|100,Test08|10|50'
+ );
+ insert myAccount1;
+ contract = new Account(
+ RecordTypeId = rectCo1[0].Id,
+ Name = 'contractName',
+ ParentId = myAccount1.id,
+ Agent_Ref__c = myAccount1.id,
+ Contract_Department_Class__c = 'ET',
+ Contract_Decide_Start_Date__c = Date.today().addDays(-2),
+ Contract_Decide_End_Date__c = Date.today().addDays(2),
+ Dealer_discount__c = 0.8
+ );
+ insert contract;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ //浜у搧鏁版嵁
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'CDS',
+ Category4__c = 'OER',
+ Category5__c = '鍏跺畠',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test001',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'ENT',
+ Category4__c = 'Celon',
+ Category5__c = 'Celon',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'US',
+ Category4__c = 'ALOKA',
+ Category5__c = '浣撳瓒呭0',
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ insert proG;
+ System.debug('proG:' + proG);
+ System.debug('proG1:' + proG.Estimation_Entry_Possibility__c);
+ System.debug('prod07:' + prod01);
+ System.debug('prod071:' + prod01.Estimation_Entry_Possibility__c);
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert proF;
+
+ //璁㈠崟
+ Consumable_order__c order = new Consumable_order__c();
+ order.Name = 'testMing';
+ order.Order_status__c = '鎵瑰噯';
+ order.RecordTypeid = System.Label.RT_ConOrder_Order;
+ order.Dealer_Info__c = myAccount1.id;
+ order.Inventory_date__c = Date.today();
+ order.Order_type__c = '璁㈠崟';
+ order.Order_ProType__c = 'ET';
+ order.orderPattern__c = 'agreementorder';
+ insert order;
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = order.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = proG.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
+
+ Consumable_order_details2__c createDetail2 = new Consumable_order_details2__c();
+ createDetail2 = new Consumable_order_details2__c();
+ createDetail2.Consumable_Product__c = proG.id;
+ createDetail2.Asset_Model_No__c = 'Test01';
+ createDetail2.Consumable_order_minor__c = order.id;
+ createDetail2.Consumable_Arrived_order__c = order.id;
+ createDetail2.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetail2.Asset_Model_No__c = proG.Asset_Model_No__c;
+ createDetail2.Bar_Code__c = '123';
+ createDetail2.Box_Piece__c = '鐩�';
+ createDetail2.Arrive_date__c = Date.today();
+
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ insert createDetail2;
+
+ Test.startTest();
+ LexConsumableController.ConsumableorderdetailsInfo c1 = new LexConsumableController.ConsumableorderdetailsInfo(Orderdet);
+ ContentVersion v = new ContentVersion();
+ LexConsumableController.ConsumableorderdetailsInfo c2 = new LexConsumableController.ConsumableorderdetailsInfo(v);
+ LexConsumableController l = new LexConsumableController();
+ LexConsumableController.Results re = LexConsumableController.init('', order.Id, '');
+ LexConsumableController.searchConsumableorderdetails(
+ re.userWorkLocation,
+ re.agencyProType,
+ re.accountName,
+ re.accountid,
+ re.hospitalId,
+ re.contractId,
+ 'testMing',
+ '',
+ '',
+ '',
+ re.category_Goods,
+ re.specialCampaign,
+ JSON.serialize(re.dealerProductId),
+ re.methodType,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ re.editAble,
+ re.proLimitAndDate
+ );
+ LexConsumableController.searchorderdetails(
+ re.methodType,
+ re.accountid,
+ re.hospitalId,
+ re.contractId,
+ re.userWorkLocation,
+ re.accountName,
+ re.proLimitAndDate,
+ re.editAble
+ );
+ LexConsumableController.sorder(order.Id, myAccount1.Id);
+ Test.stopTest();
+ }
+ }
+
+ @IsTest
+ static void ConsumableOrdertest2() {
+ user MyUser_Test;
+ Account myAccount1;
+ Account contract;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ List<RecordType> rectCo1 = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND DeveloperName = 'AgencyContract'
+ ];
+
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888',
+ Product_Limit_Date__c = 'Test07|3|100,Test08|10|50'
+ );
+ insert myAccount1;
+ contract = new Account(
+ RecordTypeId = rectCo1[0].Id,
+ Name = 'contractName',
+ ParentId = myAccount1.id,
+ Agent_Ref__c = myAccount1.id,
+ Contract_Department_Class__c = 'ET',
+ Contract_Decide_Start_Date__c = Date.today().addDays(-2),
+ Contract_Decide_End_Date__c = Date.today().addDays(2),
+ Dealer_discount__c = 0.8
+ );
+ insert contract;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ //浜у搧鏁版嵁
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'CDS',
+ Category4__c = 'OER',
+ Category5__c = '鍏跺畠',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test001',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'ENT',
+ Category4__c = 'Celon',
+ Category5__c = 'Celon',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'US',
+ Category4__c = 'ALOKA',
+ Category5__c = '浣撳瓒呭0',
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ insert proG;
+ System.debug('proG:' + proG);
+ System.debug('proG1:' + proG.Estimation_Entry_Possibility__c);
+ System.debug('prod07:' + prod01);
+ System.debug('prod071:' + prod01.Estimation_Entry_Possibility__c);
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert proF;
+
+ //鍒涘缓鍖婚櫌
+ Account hospital = new Account();
+ hospital.recordtypeId = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND DeveloperName = 'HP'
+ ]
+ .id;
+ hospital.Name = 'test hospital';
+ hospital.Is_Active__c = '鏈夊姽';
+ hospital.Attribute_Type__c = '鍗敓閮�';
+ hospital.Speciality_Type__c = '缁煎悎鍖婚櫌';
+ hospital.Grade__c = '涓�绾�';
+ hospital.OCM_Category__c = 'SLTV';
+ hospital.Is_Medical__c = '鍖荤枟鏈烘瀯';
+ hospital.Town__c = '涓滀含';
+ insert hospital;
+
+ //寤轰竴鏉″尰闄㈢壒浠蜂骇鍝�
+ hospitalprice__c hc = new hospitalprice__c();
+ hc.hospital__c = hospital.Id;
+ hc.product__c = proG.Id;
+ hc.aph__c = '12332';
+ hc.account__c = myAccount1.Id;
+ insert hc;
+
+ //鍖婚櫌
+ Consumable_order__c order1 = new Consumable_order__c();
+ order1.Name = 'testMing1';
+ order1.Order_status__c = '鎵瑰噯';
+ order1.RecordTypeid = System.Label.RT_ConOrder_Order;
+ order1.Dealer_Info__c = myAccount1.id;
+ order1.Inventory_date__c = Date.today();
+ order1.Order_type__c = '璁㈠崟';
+ order1.Order_ProType__c = 'ET';
+ order1.orderPattern__c = 'hospitalorder';
+ insert order1;
+ Consumable_orderdetails__c Orderdet1 = new Consumable_orderdetails__c();
+ Orderdet1.Name = 'OCM_01_00102';
+ Orderdet1.Consumable_order__c = order1.Id;
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet1.Consumable_Product__c = proG.Id;
+ Orderdet1.Consumable_count__c = 4;
+ insert Orderdet1;
+
+ Consumable_order_details2__c createDetail3 = new Consumable_order_details2__c();
+ createDetail3 = new Consumable_order_details2__c();
+ createDetail3.Consumable_Product__c = proG.id;
+ createDetail3.Asset_Model_No__c = 'Test02';
+ createDetail3.Consumable_order_minor__c = order1.id;
+ createDetail3.Consumable_Arrived_order__c = order1.id;
+ createDetail3.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetail3.Asset_Model_No__c = proG.Asset_Model_No__c;
+ createDetail3.Bar_Code__c = '123';
+ createDetail3.Box_Piece__c = '鐩�';
+ createDetail3.Arrive_date__c = Date.today();
+
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ insert createDetail3;
+
+ Test.startTest();
+ LexConsumableController.Results re = LexConsumableController.init('', order1.Id, '');
+ LexConsumableController.searchConsumableorderdetails(
+ re.userWorkLocation,
+ re.agencyProType,
+ re.accountName,
+ re.accountid,
+ re.hospitalId,
+ re.contractId,
+ 'testMing',
+ '',
+ '',
+ '',
+ re.category_Goods,
+ re.specialCampaign,
+ JSON.serialize(re.dealerProductId),
+ re.methodType,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ re.editAble,
+ re.proLimitAndDate
+ );
+ LexConsumableController.searchorderdetails(
+ re.methodType,
+ re.accountid,
+ re.hospitalId,
+ re.contractId,
+ re.userWorkLocation,
+ re.accountName,
+ re.proLimitAndDate,
+ re.editAble
+ );
+ LexConsumableController.searchConsumableorderdetails(
+ re.userWorkLocation,
+ re.agencyProType,
+ re.accountName,
+ re.accountid,
+ hospital.Id,
+ contract.Id,
+ 'testMing',
+ '',
+ '',
+ '',
+ re.category_Goods,
+ re.specialCampaign,
+ JSON.serialize(re.dealerProductId),
+ re.methodType,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ re.editAble,
+ re.proLimitAndDate
+ );
+ LexConsumableController.searchorderdetails(
+ re.methodType,
+ re.accountid,
+ hospital.Id,
+ contract.Id,
+ re.userWorkLocation,
+ re.accountName,
+ re.proLimitAndDate,
+ re.editAble
+ );
+ Test.stopTest();
+ }
+ }
+
+ @IsTest
+ static void ConsumableOrdertest3() {
+ user MyUser_Test;
+ Account myAccount1;
+ Account contract;
+ Consumable_order__c order2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ List<RecordType> rectCo1 = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND DeveloperName = 'AgencyContract'
+ ];
+
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888',
+ Product_Limit_Date__c = 'Test07|3|100,Test08|10|50'
+ );
+ insert myAccount1;
+ contract = new Account(
+ RecordTypeId = rectCo1[0].Id,
+ Name = 'contractName',
+ ParentId = myAccount1.id,
+ Agent_Ref__c = myAccount1.id,
+ Contract_Department_Class__c = 'ET',
+ Contract_Decide_Start_Date__c = Date.today().addDays(-2),
+ Contract_Decide_End_Date__c = Date.today().addDays(2),
+ Dealer_discount__c = 0.8
+ );
+ insert contract;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+
+ //浜у搧鏁版嵁
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'CDS',
+ Category4__c = 'OER',
+ Category5__c = '鍏跺畠',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test001',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'ENT',
+ Category4__c = 'Celon',
+ Category5__c = 'Celon',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'US',
+ Category4__c = 'ALOKA',
+ Category5__c = '浣撳瓒呭0',
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ insert proG;
+ System.debug('proG:' + proG);
+ System.debug('proG1:' + proG.Estimation_Entry_Possibility__c);
+ System.debug('prod07:' + prod01);
+ System.debug('prod071:' + prod01.Estimation_Entry_Possibility__c);
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert proF;
+
+ Dealer_Product__c dpc = new Dealer_Product__c();
+ dpc.Dealer_Contact__c = contract.id;
+ dpc.Dealer_Product2__c = proG.id;
+ dpc.Special_Discount__c = 45;
+ dpc.Campaign_StartDate__c = Date.today().addDays(-1);
+ dpc.Campaign_EndDate__c = Date.today().addDays(1);
+ insert dpc;
+
+ Dealer_Product__c dpc2 = new Dealer_Product__c();
+ dpc2.Dealer_Contact__c = contract.id;
+ dpc2.Dealer_Product2__c = proG.id;
+ dpc2.Special_Campaign_Price__c = 4500;
+ insert dpc2;
+
+ Dealer_Product__c dpc1 = new Dealer_Product__c();
+ dpc1.Dealer_Contact__c = contract.id;
+ dpc1.Dealer_Product2__c = proH.id;
+ dpc1.Special_Campaign_Price__c = 23456;
+ insert dpc1;
+ //淇冮攢
+ order2 = new Consumable_order__c();
+ order2.Name = 'testMing2';
+ order2.Order_status__c = '鎵瑰噯';
+ order2.RecordTypeid = System.Label.RT_ConOrder_Order;
+ order2.Dealer_Info__c = myAccount1.id;
+ order2.Inventory_date__c = Date.today();
+ order2.Order_type__c = '璁㈠崟';
+ order2.Order_ProType__c = 'ET';
+ order2.orderPattern__c = 'promotionorder';
+ insert order2;
+ Consumable_orderdetails__c Orderdet2 = new Consumable_orderdetails__c();
+ Orderdet2.Name = 'OCM_01_00103';
+ Orderdet2.Consumable_order__c = order2.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet2.Consumable_Product__c = proG.Id;
+ Orderdet2.Consumable_count__c = 4;
+ insert Orderdet2;
+
+ Consumable_order_details2__c createDetail4 = new Consumable_order_details2__c();
+ createDetail4 = new Consumable_order_details2__c();
+ createDetail4.Consumable_Product__c = proG.id;
+ createDetail4.Asset_Model_No__c = 'Test03';
+ createDetail4.Consumable_order_minor__c = order2.id;
+ createDetail4.Consumable_Arrived_order__c = order2.id;
+ createDetail4.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetail4.Asset_Model_No__c = proG.Asset_Model_No__c;
+ createDetail4.Bar_Code__c = '123';
+ createDetail4.Box_Piece__c = '鐩�';
+ createDetail4.Arrive_date__c = Date.today();
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ insert createDetail4;
+ }
+
+ System.runAs(MyUser_Test) {
+ Test.startTest();
+ LexConsumableController.Results re = LexConsumableController.init('', order2.Id, '');
+ LexConsumableController.searchConsumableorderdetails(
+ re.userWorkLocation,
+ re.agencyProType,
+ re.accountName,
+ re.accountid,
+ re.hospitalId,
+ re.contractId,
+ 'testMing',
+ '',
+ '',
+ '',
+ re.category_Goods,
+ re.specialCampaign,
+ JSON.serialize(re.dealerProductId),
+ re.methodType,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ re.editAble,
+ re.proLimitAndDate
+ );
+ LexConsumableController.searchorderdetails(
+ re.methodType,
+ re.accountid,
+ re.hospitalId,
+ re.contractId,
+ re.userWorkLocation,
+ re.accountName,
+ re.proLimitAndDate,
+ re.editAble
+ );
+ LexConsumableController.searchConsumableorderdetails(
+ re.userWorkLocation,
+ re.agencyProType,
+ re.accountName,
+ re.accountid,
+ re.hospitalId,
+ contract.Id,
+ 'testMing',
+ '',
+ '',
+ '',
+ re.category_Goods,
+ re.specialCampaign,
+ JSON.serialize(re.dealerProductId),
+ re.methodType,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ re.editAble,
+ re.proLimitAndDate
+ );
+ LexConsumableController.searchorderdetails(
+ re.methodType,
+ re.accountid,
+ re.hospitalId,
+ contract.Id,
+ re.userWorkLocation,
+ re.accountName,
+ re.proLimitAndDate,
+ re.editAble
+ );
+ Test.stopTest();
+ }
+ }
+
+ @IsTest
+ static void ConsumableOrdertest4() {
+ user MyUser_Test;
+ Account myAccount1;
+ Account contract;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ List<RecordType> rectCo1 = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND DeveloperName = 'AgencyContract'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888',
+ Product_Limit_Date__c = 'Test07|3|100,Test08|10|50'
+ );
+ insert myAccount1;
+ System.debug('account111:' + myAccount1);
+ contract = new Account(
+ RecordTypeId = rectCo1[0].Id,
+ Name = 'contractName',
+ ParentId = myAccount1.id,
+ Agent_Ref__c = myAccount1.id,
+ Contract_Department_Class__c = 'ET',
+ Contract_Decide_Start_Date__c = Date.today().addDays(-2),
+ Contract_Decide_End_Date__c = Date.today().addDays(2),
+ ET_SP_Dealer__c = true
+ );
+ insert contract;
+ System.debug('account111:' + contract);
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ //浜у搧鏁版嵁
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'CDS',
+ Category4__c = 'OER',
+ Category5__c = '鍏跺畠',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test001',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'ENT',
+ Category4__c = 'Celon',
+ Category5__c = 'Celon',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'US',
+ Category4__c = 'ALOKA',
+ Category5__c = '浣撳瓒呭0',
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ insert proG;
+ System.debug('proG:' + proG);
+ System.debug('proG1:' + proG.Estimation_Entry_Possibility__c);
+ System.debug('prod07:' + prod01);
+ System.debug('prod071:' + prod01.Estimation_Entry_Possibility__c);
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert proF;
+
+ //璁㈠崟
+ Consumable_order__c order = new Consumable_order__c();
+ order.Name = 'testMing';
+ order.Order_status__c = '鎵瑰噯';
+ order.RecordTypeid = System.Label.RT_ConOrder_Order;
+ order.Dealer_Info__c = myAccount1.id;
+ order.Inventory_date__c = Date.today();
+ order.Order_type__c = '璁㈠崟';
+ order.Order_ProType__c = 'ET';
+ order.orderPattern__c = 'agreementorder';
+ insert order;
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = order.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = proG.Id;
+ Orderdet.Consumable_count__c = 4;
+ insert Orderdet;
+
+ Consumable_order_details2__c createDetail2 = new Consumable_order_details2__c();
+ createDetail2 = new Consumable_order_details2__c();
+ createDetail2.Consumable_Product__c = proG.id;
+ createDetail2.Asset_Model_No__c = 'Test01';
+ createDetail2.Consumable_order_minor__c = order.id;
+ createDetail2.Consumable_Arrived_order__c = order.id;
+ createDetail2.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetail2.Asset_Model_No__c = proG.Asset_Model_No__c;
+ createDetail2.Bar_Code__c = '123';
+ createDetail2.Box_Piece__c = '鐩�';
+ createDetail2.Arrive_date__c = Date.today();
+
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ insert createDetail2;
+
+ Test.startTest();
+ LexConsumableController.Results re = LexConsumableController.init('agreementorder', '', '');
+ re.consumableorderdetailsRecordsview[0].check = true;
+ re.consumableorderdetailsRecordsview[0].esd.Consumable_count__c = 1;
+ String conId = contract.Id;
+ LexConsumableController.ordrCopy(
+ contract.Name,
+ JSON.serialize(re.coc),
+ re.agencyProType,
+ re.accountid,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ JSON.serialize(re.contactDealer),
+ re.methodType,
+ '',
+ conId,
+ re.agencyProType1,
+ false
+ );
+ LexConsumableController.save(
+ '',
+ JSON.serialize(re.coc),
+ re.agencyProType,
+ re.accountid,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ JSON.serialize(re.contactDealer),
+ re.methodType,
+ re.ESetId,
+ '',
+ conId,
+ re.agencyProType1,
+ false
+ );
+ LexConsumableController.save(
+ contract.Name,
+ JSON.serialize(re.coc),
+ re.agencyProType,
+ re.accountid,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ JSON.serialize(re.contactDealer),
+ re.methodType,
+ re.ESetId,
+ '',
+ '',
+ re.agencyProType1,
+ false
+ );
+ LexConsumableController.save(
+ ':Testaccount001',
+ JSON.serialize(re.coc),
+ 'ET',
+ re.accountid,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ JSON.serialize(re.contactDealer),
+ re.methodType,
+ re.ESetId,
+ '',
+ re.contractId,
+ 'ET',
+ false
+ );
+ LexConsumableController.save(
+ ':Testaccount001',
+ JSON.serialize(re.coc),
+ 'ET',
+ re.accountid,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ JSON.serialize(re.contactDealer),
+ 'agreementorder',
+ re.ESetId,
+ '',
+ re.contractId,
+ 'ET',
+ false
+ );
+ LexConsumableController.save(
+ ':Testaccount001',
+ JSON.serialize(re.coc),
+ 'ET',
+ re.accountid,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ JSON.serialize(re.contactDealer),
+ 'promotionorder',
+ re.ESetId,
+ '',
+ re.contractId,
+ 'ET',
+ false
+ );
+ LexConsumableController.save(
+ ':Testaccount001',
+ JSON.serialize(re.coc),
+ 'ET',
+ re.accountid,
+ JSON.serialize(re.consumableorderdetailsRecordsview),
+ JSON.serialize(re.contactDealer),
+ 'hospitalorder',
+ re.ESetId,
+ '',
+ re.contractId,
+ 'ET',
+ false
+ );
+ Test.stopTest();
+ }
+ }
+
+ @IsTest
+ static void ConsumableOrdertest5() {
+ user MyUser_Test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ ContentVersion cv;
+ Consumable_order__c order;
+ insert n;
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888',
+ Product_Limit_Date__c = 'Test07|3|100,Test08|10|50'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+
+ order = new Consumable_order__c();
+ order.Name = 'testMing';
+ order.Order_status__c = '鎵瑰噯';
+ order.RecordTypeid = System.Label.RT_ConOrder_Order;
+ order.Dealer_Info__c = myAccount1.id;
+ order.Inventory_date__c = Date.today();
+ order.Order_type__c = '璁㈠崟';
+ order.Order_ProType__c = 'ET';
+ order.orderPattern__c = 'agreementorder';
+ insert order;
+
+ cv = new ContentVersion();
+ cv.Title = 'test.txt';
+ cv.PathOnClient = '/' + 'test.txt';
+ cv.FirstPublishLocationId = order.Id;
+ cv.VersionData = EncodingUtil.base64Decode('VGVzdA==');
+ cv.IsMajorVersion = true;
+ insert cv;
+ }
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'CDS',
+ Category4__c = 'OER',
+ Category5__c = '鍏跺畠',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test001',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'CDS',
+ Category4__c = 'OER',
+ Category5__c = 'Celon',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_Date2__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'US',
+ Category4__c = 'ALOKA',
+ Category5__c = '浣撳瓒呭0',
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+
+ Product2 prod04 = new Product2(
+ Name = 'Test04',
+ ProductCode = 'Test04',
+ Asset_Model_No__c = 'Test04',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = 'OCS',
+ Category4__c = '闄勫睘鍝�',
+ Category5__c = 'OCS',
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+ Product2 prod05 = new Product2(
+ Name = 'Test05',
+ ProductCode = 'Test05',
+ Asset_Model_No__c = 'Test05',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Category3__c = '鍏夋簮',
+ Category4__c = 'CLV',
+ Category5__c = 'S45',
+ Intra_Trade_List_RMB_1__c = 1000,
+ Intra_Trade_List_RMB_Date1__c = Date.today().addDays(-1),
+ Intra_Trade_List_RMB_End_Date1__c = Date.today().addDays(1),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03, prod04, prod05 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ Product2__c pro4 = new Product2__c(Name = 'Pro004', OT_CODE_Text__c = 'Test004', Product2__c = prod04.Id);
+ Product2__c pro5 = new Product2__c(Name = 'Pro005', OT_CODE_Text__c = 'Test005', Product2__c = prod05.Id);
+ insert new List<Product2__c>{ pro1, pro2, pro3, pro4, pro5 };
+
+ Test.startTest();
+ LexConsumableController.Results re1 = LexConsumableController.categoryAllload('ET', 'CDS');
+ LexConsumableController.Results re2 = LexConsumableController.categoryAllload('ENG', 'CDS');
+ LexConsumableController.Results re3 = LexConsumableController.categoryAllload('', 'CDS');
+ LexConsumableController.Results re4 = LexConsumableController.categoryload('ET', 'CDS', 'OER');
+ LexConsumableController.Results re5 = LexConsumableController.categoryload('ENG', 'CDS', 'OER');
+ LexConsumableController.Results re6 = LexConsumableController.categoryload('', 'CDS', 'OER');
+ String pid = order.Id;
+ LexConsumableController.filesUpload(pid, 'tset.txt', 'VGVzdA==');
+ LexConsumableController.deleteAtt(cv.Id, pid);
+ LexConsumableController.backOrder(pid);
+ LexConsumableController.setEditAble(pid);
+ LexConsumableController.delConsumable(pid);
+ LexConsumableController.OffersPrice();
+ Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexConsumableControllerTest.cls-meta.xml b/force-app/main/default/classes/LexConsumableControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexConsumableGoodsInfo.cls b/force-app/main/default/classes/LexConsumableGoodsInfo.cls
index e60bfdd..331cfbb 100644
--- a/force-app/main/default/classes/LexConsumableGoodsInfo.cls
+++ b/force-app/main/default/classes/LexConsumableGoodsInfo.cls
@@ -1,71 +1,87 @@
public without sharing class LexConsumableGoodsInfo {
-
//鎵�鏈変骇鍝佷竴瑙�
@AuraEnabled
- public static Results initTotalNum(String ordId, String type){
+ public static Results initTotalNum(String ordId, String type) {
Results results = new Results();
List<ShowRecords> allOtherDetIifo = new List<ShowRecords>();
Set<String> orderId = new Set<String>();
- if(ordId != '1'){
- orderId.add(ordId);
+ if (ordId != '1') {
+ orderId.add(ordId);
}
try {
- if(!(orderId.size() > 0)){
+ if (!(orderId.size() > 0)) {
String userId = UserInfo.getUserId();
- List<User> userList = [SELECT accountid, Work_Location__c,UserPro_Type__c
- FROM user
- WHERE id = :userId ];
+ List<User> userList = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
String accountid = userList[0].accountid;
String userPro_Type = userList[0].UserPro_Type__c;
String userWorklocation = userList[0].Work_Location__c;
String rtTypeDelivery = System.Label.RT_ConOrder_Delivery;
List<Consumable_order__c> conorderlist = new List<Consumable_order__c>();
//20200916 ljh update start
- if(Test.isRunningTest()){
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
-
- }else{
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
+ if (type != null && type.equals('all')) {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND (OrderNumber_notarrive__c > 0
+ OR Delivery_detail_count__c > 0)
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
+ } else {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND Delivery_detail_count__c > 0
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
}
- for(Consumable_order__c conorder : conorderlist){
- String temp = (String)conorder.Id;
+ for (Consumable_order__c conorder : conorderlist) {
+ String temp = (String) conorder.Id;
orderId.add(temp);
}
- System.debug('ANY o'+orderId);
+ System.debug('ANY o' + orderId);
}
List<Consumable_Orderdetails__c> conOrderList1 = new List<Consumable_Orderdetails__c>();
- if(Test.isRunningTest()){
- conOrderList1 = [SELECT Asset_Model_No__c ,Consumable_count__c FROM Consumable_Orderdetails__c];
- }else{
- conOrderList1 = [SELECT Asset_Model_No__c ,Consumable_count__c FROM Consumable_Orderdetails__c WHERE Consumable_order__c =:orderId];
- }
-
- Map<String,Decimal> allConOrderMap = new Map<String,Decimal>();
- for(Consumable_Orderdetails__c con : conOrderList1){
- if(con.Consumable_count__c == null){
+
+ conOrderList1 = [
+ SELECT Asset_Model_No__c, Consumable_count__c
+ FROM Consumable_Orderdetails__c
+ WHERE Consumable_order__c = :orderId
+ ];
+
+ Map<String, Decimal> allConOrderMap = new Map<String, Decimal>();
+ for (Consumable_Orderdetails__c con : conOrderList1) {
+ if (con.Consumable_count__c == null) {
con.Consumable_count__c = 0;
}
- if(allConOrderMap.containsKey(con.Asset_Model_No__c)){
- allConOrderMap.put(con.Asset_Model_No__c,allConOrderMap.get(con.Asset_Model_No__c)+con.Consumable_count__c);
- }else{
+ if (allConOrderMap.containsKey(con.Asset_Model_No__c)) {
+ allConOrderMap.put(con.Asset_Model_No__c, allConOrderMap.get(con.Asset_Model_No__c) + con.Consumable_count__c);
+ } else {
allConOrderMap.put(con.Asset_Model_No__c, con.Consumable_count__c);
}
}
- for(String pmodel : allConOrderMap.keySet()){
- if(allConOrderMap.get(pmodel) > 0){
+ for (String pmodel : allConOrderMap.keySet()) {
+ if (allConOrderMap.get(pmodel) > 0) {
ShowRecords showrecord2 = new ShowRecords();
showrecord2.recordCount = allConOrderMap.get(pmodel);
showrecord2.prodModel = pmodel;
allOtherDetIifo.add(showrecord2);
- }
+ }
}
results.result = 'Success';
results.recordList = allOtherDetIifo;
@@ -78,28 +94,35 @@
//宸插埌璐т骇鍝佷竴瑙�
@AuraEnabled
- public static Results initArrDet(String orderId){
+ public static Results initArrDet(String orderId) {
Results results = new Results();
List<ShowRecords> arrDetIifo = new List<ShowRecords>();
- try{
- List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId];
- Map<String,String> srtMap = new Map<String,String>();
- for(Consumable_order_details2__c con : conList){
+ try {
+ List<Consumable_order_details2__c> conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE Dealer_Arrive__c = TRUE AND Consumable_order_minor__c = :orderId
+ ];
+ Map<String, String> srtMap = new Map<String, String>();
+ for (Consumable_order_details2__c con : conList) {
srtMap.put(con.Bar_Code__c, con.Id);
}
List<String> str = new List<String>();
- for(String s : srtMap.keySet()){
+ for (String s : srtMap.keySet()) {
str.add(srtMap.get(s));
}
- List<AggregateResult> arrDetList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
- WHERE Id =: str
- GROUP BY Asset_Model_No__c];
- for(Integer i = 0 ; i< arrDetList.size();i++){
+ List<AggregateResult> arrDetList = [
+ SELECT Asset_Model_No__c prodModel, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE Id = :str
+ GROUP BY Asset_Model_No__c
+ ];
+ for (Integer i = 0; i < arrDetList.size(); i++) {
arrDetIifo.add(new showRecords(arrDetList[i]));
}
results.recordList = arrDetIifo;
results.result = 'Success';
- }catch (Exception e){
+ } catch (Exception e) {
results.result = 'Fail';
results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
}
@@ -108,14 +131,16 @@
//宸插埌璐т骇鍝佷竴瑙圓ll
@AuraEnabled
- public static Results initArrDetAll(String type){
+ public static Results initArrDetAll(String type) {
Results results = new Results();
List<ShowRecords> allArrDetIifo = new List<ShowRecords>();
- try{
+ try {
String userId = UserInfo.getUserId();
- List<User> userList = [SELECT accountid, Work_Location__c,UserPro_Type__c
- FROM user
- WHERE id = :userId ];
+ List<User> userList = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
String accountid = userList[0].accountid;
String userPro_Type = userList[0].UserPro_Type__c;
String userWorklocation = userList[0].Work_Location__c;
@@ -123,65 +148,92 @@
String rtTypeDelivery = System.Label.RT_ConOrder_Delivery;
List<Consumable_order__c> conorderlist = new List<Consumable_order__c>();
//20200916 ljh update start
- if(Test.isRunningTest()){
- //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
-
- }else{
- //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
+ //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
+ if (type != null && type.equals('all')) {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND (OrderNumber_notarrive__c > 0
+ OR Delivery_detail_count__c > 0)
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
+ } else {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND Delivery_detail_count__c > 0
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
}
//20200916 ljh update end
// List<Consumable_order__c> conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c > 0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- System.debug('======'+conorderlist+'daxiao:'+conorderlist.size());
- for(Consumable_order__c conorder : conorderlist){
- System.debug('======'+conorder.Owner.Name+'======');
+ System.debug('======' + conorderlist + 'daxiao:' + conorderlist.size());
+ for (Consumable_order__c conorder : conorderlist) {
+ System.debug('======' + conorder.Owner.Name + '======');
}
Set<String> orderId = new Set<String>();
- for(Consumable_order__c conorder : conorderlist){
+ for (Consumable_order__c conorder : conorderlist) {
orderId.add(conorder.Id);
}
- System.debug('ANY o'+orderId);
+ System.debug('ANY o' + orderId);
List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
- if(Test.isRunningTest()){
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c ];
- }else{
- //20200916 ljh update start
- //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- if(type !=null && type.equals('all')){
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- }else{
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- }
- //20200916 ljh update end
+ //20200916 ljh update start
+ //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
+ if (type != null && type.equals('all')) {
+ conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Consumable_order_minor__c = :orderId
+ AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ ];
+ } else {
+ conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Consumable_order_minor__c = :orderId
+ AND Deliver_date__c < :orderdate
+ AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ ];
}
+ //20200916 ljh update end
// List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- Map<String,String> srtMap = new Map<String,String>();
- for(Consumable_order_details2__c con : conList){
+ Map<String, String> srtMap = new Map<String, String>();
+ for (Consumable_order_details2__c con : conList) {
srtMap.put(con.Bar_Code__c, con.Id);
}
List<String> str = new List<String>();
- for(String s : srtMap.keySet()){
+ for (String s : srtMap.keySet()) {
str.add(srtMap.get(s));
}
- List<AggregateResult> arrDetList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
- WHERE Id =: str
- GROUP BY Asset_Model_No__c];
+ List<AggregateResult> arrDetList = [
+ SELECT Asset_Model_No__c prodModel, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE Id = :str
+ GROUP BY Asset_Model_No__c
+ ];
// List<showRecords> allArrDetIifo = new List<showRecords>();
- for(Integer i = 0 ; i< arrDetList.size();i++){
+ for (Integer i = 0; i < arrDetList.size(); i++) {
allArrDetIifo.add(new showRecords(arrDetList[i]));
}
results.recordList = allArrDetIifo;
results.result = 'Success';
- }catch (Exception e){
+ } catch (Exception e) {
results.result = 'Fail';
results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
}
@@ -190,20 +242,22 @@
//鏈埌璐т骇鍝佷竴瑙�
@AuraEnabled
- public static Results initDeliveryDet(String orderId){
+ public static Results initDeliveryDet(String orderId) {
Results results = new Results();
List<ShowRecords> notArrDetIifo = new List<ShowRecords>();
- try{
- List<AggregateResult> notArrDetList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = false
- AND Consumable_order_minor__c = :orderId
- GROUP BY Asset_Model_No__c];
- for(Integer i = 0 ; i< notArrDetList.size();i++){
+ try {
+ List<AggregateResult> notArrDetList = [
+ SELECT Asset_Model_No__c prodModel, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE Dealer_Arrive__c = FALSE AND Consumable_order_minor__c = :orderId
+ GROUP BY Asset_Model_No__c
+ ];
+ for (Integer i = 0; i < notArrDetList.size(); i++) {
notArrDetIifo.add(new showRecords(notArrDetList[i]));
}
results.recordList = notArrDetIifo;
results.result = 'Success';
- }catch (Exception e){
+ } catch (Exception e) {
results.result = 'Fail';
results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
}
@@ -212,14 +266,16 @@
//鏈埌璐т骇鍝佷竴瑙圓ll
@AuraEnabled
- public static Results initDeliveryDetAll(String type){
+ public static Results initDeliveryDetAll(String type) {
Results results = new Results();
List<ShowRecords> allNotArrDetIifo = new List<ShowRecords>();
- try{
+ try {
String userId = UserInfo.getUserId();
- List<User> userList = [SELECT accountid, Work_Location__c,UserPro_Type__c
- FROM user
- WHERE id = :userId ];
+ List<User> userList = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
String accountid = userList[0].accountid;
String userPro_Type = userList[0].UserPro_Type__c;
String userWorklocation = userList[0].Work_Location__c;
@@ -227,65 +283,92 @@
String rtTypeDelivery = System.Label.RT_ConOrder_Delivery;
List<Consumable_order__c> conorderlist = new List<Consumable_order__c>();
//20200916 ljh update start
- if(Test.isRunningTest()){
- //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
-
- }else{
- //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
+ //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
+ if (type != null && type.equals('all')) {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND (OrderNumber_notarrive__c > 0
+ OR Delivery_detail_count__c > 0)
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
+ } else {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND Delivery_detail_count__c > 0
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
}
//20200916 ljh update end
// List<Consumable_order__c> conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c > 0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- System.debug('======'+conorderlist+'daxiao:'+conorderlist.size());
- for(Consumable_order__c conorder : conorderlist){
- System.debug('======'+conorder.Owner.Name+'======');
+ System.debug('======' + conorderlist + 'daxiao:' + conorderlist.size());
+ for (Consumable_order__c conorder : conorderlist) {
+ System.debug('======' + conorder.Owner.Name + '======');
}
Set<String> orderId = new Set<String>();
- for(Consumable_order__c conorder : conorderlist){
+ for (Consumable_order__c conorder : conorderlist) {
orderId.add(conorder.Id);
}
- System.debug('ANY o'+orderId);
+ System.debug('ANY o' + orderId);
List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
- if(Test.isRunningTest()){
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c ];
- }else{
- //20200916 ljh update start
- //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- if(type !=null && type.equals('all')){
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- }else{
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- }
- //20200916 ljh update end
+ //20200916 ljh update start
+ //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
+ if (type != null && type.equals('all')) {
+ conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = FALSE
+ AND Consumable_order_minor__c = :orderId
+ AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ ];
+ } else {
+ conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = FALSE
+ AND Consumable_order_minor__c = :orderId
+ AND Deliver_date__c < :orderdate
+ AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ ];
}
+ //20200916 ljh update end
// List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- Map<String,String> srtMap = new Map<String,String>();
- for(Consumable_order_details2__c con : conList){
+ Map<String, String> srtMap = new Map<String, String>();
+ for (Consumable_order_details2__c con : conList) {
srtMap.put(con.Bar_Code__c, con.Id);
}
List<String> str = new List<String>();
- for(String s : srtMap.keySet()){
+ for (String s : srtMap.keySet()) {
str.add(srtMap.get(s));
}
- List<AggregateResult> arrDetList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
- WHERE Id =: str and Cancellation_Flag__c = false
- GROUP BY Asset_Model_No__c];
+ List<AggregateResult> arrDetList = [
+ SELECT Asset_Model_No__c prodModel, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE Id = :str AND Cancellation_Flag__c = FALSE
+ GROUP BY Asset_Model_No__c
+ ];
// List<showRecords> allArrDetIifo = new List<showRecords>();
- for(Integer i = 0 ; i< arrDetList.size();i++){
+ for (Integer i = 0; i < arrDetList.size(); i++) {
allNotArrDetIifo.add(new showRecords(arrDetList[i]));
}
results.recordList = allNotArrDetIifo;
results.result = 'Success';
- }catch (Exception e){
+ } catch (Exception e) {
results.result = 'Fail';
results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
}
@@ -294,77 +377,89 @@
//杩樻病鍙戣揣鏁伴噺
@AuraEnabled
- public static Results initNotArrDet(String orderId){
+ public static Results initNotArrDet(String orderId) {
Results results = new Results();
List<Consumable_Orderdetails__c> otherArrDetIifo = new List<Consumable_Orderdetails__c>();
List<ShowRecords> otherArrList = new List<ShowRecords>();
- try{
+ try {
List<showRecords> arrDetIifo = new List<showRecords>();
List<showRecords> notArrDetIifo = new List<showRecords>();
List<showRecords> allArrDetIifo = new List<showRecords>();
// List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = true AND Consumable_order_minor__c = :orderId];
- List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId];
- Map<String,String> srtMap = new Map<String,String>();
- for(Consumable_order_details2__c con : conList){
+ List<Consumable_order_details2__c> conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE Consumable_order_minor__c = :orderId
+ ];
+ Map<String, String> srtMap = new Map<String, String>();
+ for (Consumable_order_details2__c con : conList) {
srtMap.put(con.Bar_Code__c, con.Id);
}
List<String> str = new List<String>();
- for(String s : srtMap.keySet()){
+ for (String s : srtMap.keySet()) {
str.add(srtMap.get(s));
}
- List<AggregateResult> arrDetList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
- WHERE Id =: str AND Dealer_Arrive__c = true
- GROUP BY Asset_Model_No__c];
- for(Integer i = 0 ; i< arrDetList.size();i++){
+ List<AggregateResult> arrDetList = [
+ SELECT Asset_Model_No__c prodModel, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE Id = :str AND Dealer_Arrive__c = TRUE
+ GROUP BY Asset_Model_No__c
+ ];
+ for (Integer i = 0; i < arrDetList.size(); i++) {
arrDetIifo.add(new showRecords(arrDetList[i]));
}
- List<AggregateResult> notArrDetList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = false
- AND Consumable_order_minor__c = :orderId
- GROUP BY Asset_Model_No__c];
- for(Integer i = 0 ; i< notArrDetList.size();i++){
+ List<AggregateResult> notArrDetList = [
+ SELECT Asset_Model_No__c prodModel, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE Dealer_Arrive__c = FALSE AND Consumable_order_minor__c = :orderId
+ GROUP BY Asset_Model_No__c
+ ];
+ for (Integer i = 0; i < notArrDetList.size(); i++) {
notArrDetIifo.add(new showRecords(notArrDetList[i]));
}
// List<AggregateResult> allArrDetList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
// WHERE Id =: str
// GROUP BY Asset_Model_No__c];
- List<Consumable_Orderdetails__c> allArrDetList = [SELECT Asset_Model_No__c,Consumable_count__c FROM Consumable_Orderdetails__c
- WHERE Consumable_order__c =: orderId];
+ List<Consumable_Orderdetails__c> allArrDetList = [
+ SELECT Asset_Model_No__c, Consumable_count__c
+ FROM Consumable_Orderdetails__c
+ WHERE Consumable_order__c = :orderId
+ ];
// for(Integer i = 0 ; i< allArrDetList.size();i++){
// allArrDetIifo.add(new showRecords(notArrDetList[i]));
// }
- Map<String,Decimal> arrDetMap = new Map<String,Decimal>();
- for(showRecords arr : arrDetIifo){
+ Map<String, Decimal> arrDetMap = new Map<String, Decimal>();
+ for (showRecords arr : arrDetIifo) {
arrDetMap.put(arr.prodModel, arr.recordCount);
}
- for(showRecords notarr : notArrDetIifo){
- if(arrDetMap.containsKey(notarr.prodModel)){
- arrDetMap.put(notarr.prodModel, arrDetMap.get(notarr.prodModel)+notarr.recordCount);
- }else{
+ for (showRecords notarr : notArrDetIifo) {
+ if (arrDetMap.containsKey(notarr.prodModel)) {
+ arrDetMap.put(notarr.prodModel, arrDetMap.get(notarr.prodModel) + notarr.recordCount);
+ } else {
arrDetMap.put(notarr.prodModel, notarr.recordCount);
}
}
- List<String> AssetModelNoEdList = new List<String>();//20200904 ljh add
- for(Consumable_Orderdetails__c allarr : allArrDetList){
- for(String promodel : arrDetMap.keySet()){
- if(allarr.Asset_Model_No__c == promodel){
- if((allarr.Consumable_count__c - arrDetMap.get(promodel)) > 0){
+ List<String> AssetModelNoEdList = new List<String>(); //20200904 ljh add
+ for (Consumable_Orderdetails__c allarr : allArrDetList) {
+ for (String promodel : arrDetMap.keySet()) {
+ if (allarr.Asset_Model_No__c == promodel) {
+ if ((allarr.Consumable_count__c - arrDetMap.get(promodel)) > 0) {
allarr.Consumable_count__c = (allarr.Consumable_count__c - arrDetMap.get(promodel));
otherArrDetIifo.add(allarr);
}
- AssetModelNoEdList.add(promodel);//20200904 ljh add
+ AssetModelNoEdList.add(promodel); //20200904 ljh add
}
}
}
//20200904 ljh add start
- for(Consumable_Orderdetails__c allarr1 : allArrDetList){
- if(!AssetModelNoEdList.contains(allarr1.Asset_Model_No__c)){
+ for (Consumable_Orderdetails__c allarr1 : allArrDetList) {
+ if (!AssetModelNoEdList.contains(allarr1.Asset_Model_No__c)) {
otherArrDetIifo.add(allarr1);
}
}
- for(Consumable_Orderdetails__c conOrderDetail : otherArrDetIifo){
+ for (Consumable_Orderdetails__c conOrderDetail : otherArrDetIifo) {
ShowRecords record = new ShowRecords();
record.prodModel = conOrderDetail.Asset_Model_No__c;
record.recordCount = conOrderDetail.Consumable_count__c;
@@ -372,7 +467,7 @@
}
results.recordList = otherArrList;
results.result = 'Success';
- }catch (Exception e){
+ } catch (Exception e) {
results.result = 'Fail';
results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
}
@@ -381,14 +476,16 @@
//杩樻病鍙戣揣鏁伴噺All
@AuraEnabled
- public static Results initNotArrDetAll(String type){
+ public static Results initNotArrDetAll(String type) {
Results results = new Results();
List<ShowRecords> allOtherDetIifo = new List<ShowRecords>();
- try{
+ try {
String userId = UserInfo.getUserId();
- List<User> userList = [SELECT accountid, Work_Location__c,UserPro_Type__c
- FROM user
- WHERE id = :userId ];
+ List<User> userList = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
String accountid = userList[0].accountid;
String userPro_Type = userList[0].UserPro_Type__c;
String userWorklocation = userList[0].Work_Location__c;
@@ -396,84 +493,111 @@
String rtTypeDelivery = System.Label.RT_ConOrder_Delivery;
List<Consumable_order__c> conorderlist = new List<Consumable_order__c>();
//20200916 ljh update start
- if(Test.isRunningTest()){
- //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
-
- }else{
- //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
+ //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
+ if (type != null && type.equals('all')) {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND (OrderNumber_notarrive__c > 0
+ OR Delivery_detail_count__c > 0)
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
+ } else {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND Delivery_detail_count__c > 0
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
}
//20200916 ljh update end
// List<Consumable_order__c> conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c > 0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- System.debug('======'+conorderlist+'daxiao:'+conorderlist.size());
- for(Consumable_order__c conorder : conorderlist){
- System.debug('======'+conorder.Owner.Name+'======');
+ System.debug('======' + conorderlist + 'daxiao:' + conorderlist.size());
+ for (Consumable_order__c conorder : conorderlist) {
+ System.debug('======' + conorder.Owner.Name + '======');
}
Set<String> orderId = new Set<String>();
- for(Consumable_order__c conorder : conorderlist){
+ for (Consumable_order__c conorder : conorderlist) {
orderId.add(conorder.Id);
}
- System.debug('ANY o'+orderId);
+ System.debug('ANY o' + orderId);
List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
- if(Test.isRunningTest()){
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c ];
- }else{
- //20200916 ljh update start
- //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- if(type !=null && type.equals('all')){
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- }else{
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- }
- //20200916 ljh update end
+ //20200916 ljh update start
+ //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
+ if (type != null && type.equals('all')) {
+ conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ ];
+ } else {
+ conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Consumable_order_minor__c = :orderId
+ AND Deliver_date__c < :orderdate
+ AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ ];
}
+ //20200916 ljh update end
// List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- Map<String,String> srtMap = new Map<String,String>();
- for(Consumable_order_details2__c con : conList){
+ Map<String, String> srtMap = new Map<String, String>();
+ for (Consumable_order_details2__c con : conList) {
srtMap.put(con.Bar_Code__c, con.Id);
}
List<String> str = new List<String>();
- for(String s : srtMap.keySet()){
+ for (String s : srtMap.keySet()) {
str.add(srtMap.get(s));
}
- List<AggregateResult> arrDetList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
- WHERE Id =: str and Cancellation_Flag__c = false
- GROUP BY Asset_Model_No__c];
- Map<String,Decimal> conOrderMap = new Map<String,Decimal>();
- for(AggregateResult agg : arrDetList){
+ List<AggregateResult> arrDetList = [
+ SELECT Asset_Model_No__c prodModel, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE Id = :str AND Cancellation_Flag__c = FALSE
+ GROUP BY Asset_Model_No__c
+ ];
+ Map<String, Decimal> conOrderMap = new Map<String, Decimal>();
+ for (AggregateResult agg : arrDetList) {
conOrderMap.put(String.valueOf(agg.get('prodModel')), Integer.valueOf(agg.get('recordCount')));
}
- List<Consumable_Orderdetails__c> conOrderList1 = [SELECT Asset_Model_No__c ,Consumable_count__c FROM Consumable_Orderdetails__c WHERE Consumable_order__c =: orderId ];
- Map<String,Decimal> allConOrderMap = new Map<String,Decimal>();
- for(Consumable_Orderdetails__c con : conOrderList1){
- if(con.Consumable_count__c == null){
+ List<Consumable_Orderdetails__c> conOrderList1 = [
+ SELECT Asset_Model_No__c, Consumable_count__c
+ FROM Consumable_Orderdetails__c
+ WHERE Consumable_order__c = :orderId
+ ];
+ Map<String, Decimal> allConOrderMap = new Map<String, Decimal>();
+ for (Consumable_Orderdetails__c con : conOrderList1) {
+ if (con.Consumable_count__c == null) {
con.Consumable_count__c = 0;
}
- if(allConOrderMap.containsKey(con.Asset_Model_No__c)){
- allConOrderMap.put(con.Asset_Model_No__c,allConOrderMap.get(con.Asset_Model_No__c)+con.Consumable_count__c);
- }else{
+ if (allConOrderMap.containsKey(con.Asset_Model_No__c)) {
+ allConOrderMap.put(con.Asset_Model_No__c, allConOrderMap.get(con.Asset_Model_No__c) + con.Consumable_count__c);
+ } else {
allConOrderMap.put(con.Asset_Model_No__c, con.Consumable_count__c);
}
}
- for(String pmodel : allConOrderMap.keySet()){
- if(conOrderMap.containsKey(pmodel)){
- if(allConOrderMap.get(pmodel) - conOrderMap.get(pmodel) > 0){
+ for (String pmodel : allConOrderMap.keySet()) {
+ if (conOrderMap.containsKey(pmodel)) {
+ if (allConOrderMap.get(pmodel) - conOrderMap.get(pmodel) > 0) {
showRecords showrecord1 = new showRecords();
showrecord1.recordCount = allConOrderMap.get(pmodel) - conOrderMap.get(pmodel);
showrecord1.prodModel = pmodel;
allOtherDetIifo.add(showrecord1);
}
- }else{
+ } else {
showRecords showrecord2 = new showRecords();
showrecord2.recordCount = allConOrderMap.get(pmodel);
showrecord2.prodModel = pmodel;
@@ -482,7 +606,7 @@
}
results.recordList = allOtherDetIifo;
results.result = 'Success';
- }catch (Exception e){
+ } catch (Exception e) {
results.result = 'Fail';
results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
}
@@ -491,26 +615,30 @@
//鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�
@AuraEnabled
- public static Results initMoreThan7(String orderId){
+ public static Results initMoreThan7(String orderId) {
Results results = new Results();
List<ShowRecords> morethansevendaysIifo = new List<ShowRecords>();
- try{
- List<AggregateResult> morethan7daysList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
- WHERE Consumable_order_minor__c != null
- AND Dealer_Shipment__c = false
- AND Dealer_Arrive__c = false
- AND Dealer_Saled__c = false
- AND Consumable_order_minor__r.showFalseNotshowTrue__c = false
- AND Deliver_date__c < LAST_N_DAYS:7
- AND Consumable_order_minor__c = :orderId
- GROUP BY Asset_Model_No__c];
-
- for(Integer i = 0 ; i< morethan7daysList.size() ; i++){
+ try {
+ List<AggregateResult> morethan7daysList = [
+ SELECT Asset_Model_No__c prodModel, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE
+ Consumable_order_minor__c != NULL
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Arrive__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Consumable_order_minor__r.showFalseNotshowTrue__c = FALSE
+ AND Deliver_date__c < LAST_N_DAYS:7
+ AND Consumable_order_minor__c = :orderId
+ GROUP BY Asset_Model_No__c
+ ];
+
+ for (Integer i = 0; i < morethan7daysList.size(); i++) {
morethansevendaysIifo.add(new showRecords(morethan7daysList[i]));
}
results.recordList = morethansevendaysIifo;
results.result = 'Success';
- }catch (Exception e){
+ } catch (Exception e) {
results.result = 'Fail';
results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
}
@@ -519,14 +647,16 @@
//鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁癆ll
@AuraEnabled
- public static Results initMoreThan7All(String type){
+ public static Results initMoreThan7All(String type) {
Results results = new Results();
List<ShowRecords> morethansevendaysIifo = new List<ShowRecords>();
- try{
+ try {
String userId = UserInfo.getUserId();
- List<User> userList = [SELECT accountid, Work_Location__c,UserPro_Type__c
- FROM user
- WHERE id = :userId ];
+ List<User> userList = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
String accountid = userList[0].accountid;
String userPro_Type = userList[0].UserPro_Type__c;
String userWorklocation = userList[0].Work_Location__c;
@@ -534,78 +664,107 @@
String rtTypeDelivery = System.Label.RT_ConOrder_Delivery;
List<Consumable_order__c> conorderlist = new List<Consumable_order__c>();
//20200916 ljh update start
- if(Test.isRunningTest()){
- //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c >= 0 or Delivery_detail_count__c >=0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >=0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
-
- }else{
- //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- if(type !=null && type.equals('all')){
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }else{
- conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation and showFalseNotshowTrue__c = false];
- }
+ //conorderlist = [select id,name,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c >0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
+ if (type != null && type.equals('all')) {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND (OrderNumber_notarrive__c > 0
+ OR Delivery_detail_count__c > 0)
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
+ } else {
+ conorderlist = [
+ SELECT id, Owner.Name
+ FROM Consumable_order__c
+ WHERE
+ Order_type__c = '璁㈠崟'
+ AND recordtypeid = :rtTypeDelivery
+ AND Dealer_Info__c = :accountid
+ AND Delivery_detail_count__c > 0
+ AND Order_ProType__c = :userPro_Type
+ AND Order_Owner_WorkLocal__c = :userWorklocation
+ AND showFalseNotshowTrue__c = FALSE
+ ];
}
- system.debug('==============>conorderlist'+conorderlist);
- system.debug('==============>conorderlist'+conorderlist.size());
+ system.debug('==============>conorderlist' + conorderlist);
+ system.debug('==============>conorderlist' + conorderlist.size());
//20200916 ljh update end
// List<Consumable_order__c> conorderlist = [select id,Owner.Name from Consumable_order__c where Order_type__c = '璁㈠崟' and recordtypeid = :rtTypeDelivery and Dealer_Info__c = :accountid and Delivery_detail_count__c > 0 and Order_ProType__c = :userPro_Type and Order_Owner_WorkLocal__c = :userWorklocation];
- System.debug('======'+conorderlist+'daxiao:'+conorderlist.size());
- for(Consumable_order__c conorder : conorderlist){
- System.debug('======'+conorder.Owner.Name+'======');
+ System.debug('======' + conorderlist + 'daxiao:' + conorderlist.size());
+ for (Consumable_order__c conorder : conorderlist) {
+ System.debug('======' + conorder.Owner.Name + '======');
}
Set<String> orderId = new Set<String>();
- for(Consumable_order__c conorder : conorderlist){
+ for (Consumable_order__c conorder : conorderlist) {
orderId.add(conorder.Id);
}
- System.debug('ANY o'+orderId);
+ System.debug('ANY o' + orderId);
List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
- if(Test.isRunningTest()){
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c ];
- }else{
- //20200916 ljh update start
- //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- if(type !=null && type.equals('all')){
- system.debug('all============');
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- system.debug('allconList==========='+conList.size());
- }else{
- system.debug('notall=============');
- conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- system.debug('notallconList==========='+conList.size());
- }
- //20200916 ljh update end
+ //20200916 ljh update start
+ //conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
+ if (type != null && type.equals('all')) {
+ system.debug('all============');
+ conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = FALSE
+ AND Consumable_order_minor__c = :orderId
+ AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ ];
+ system.debug('allconList===========' + conList.size());
+ } else {
+ system.debug('notall=============');
+ conList = [
+ SELECT id, Bar_Code__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = FALSE
+ AND Consumable_order_minor__c = :orderId
+ AND Deliver_date__c < :orderdate
+ AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ ];
+ system.debug('notallconList===========' + conList.size());
}
+ //20200916 ljh update end
// List<Consumable_order_details2__c> conList = [SELECT id,Bar_Code__c FROM Consumable_order_details2__c WHERE Dealer_Arrive__c = false AND Consumable_order_minor__c = :orderId AND Deliver_date__c < :orderdate AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery];
- Map<String,String> srtMap = new Map<String,String>();
- for(Consumable_order_details2__c con : conList){
+ Map<String, String> srtMap = new Map<String, String>();
+ for (Consumable_order_details2__c con : conList) {
srtMap.put(con.Bar_Code__c, con.Id);
}
List<String> str = new List<String>();
- for(String s : srtMap.keySet()){
+ for (String s : srtMap.keySet()) {
str.add(srtMap.get(s));
}
- List<AggregateResult> morethan7daysList = [SELECT Asset_Model_No__c prodModel,count(Id) recordCount FROM Consumable_order_details2__c
- WHERE Id =: str and Cancellation_Flag__c = false
- AND Consumable_order_minor__c != null
- AND Dealer_Shipment__c = false
- AND Dealer_Arrive__c = false
- AND Dealer_Saled__c = false
- AND Consumable_order_minor__r.showFalseNotshowTrue__c = false
- AND Deliver_date__c < LAST_N_DAYS:7
- GROUP BY Asset_Model_No__c];
- system.debug('Morethan7daysList================>'+morethan7daysList.size());
- for(Integer i = 0 ; i< morethan7daysList.size() ; i++){
+ List<AggregateResult> morethan7daysList = [
+ SELECT Asset_Model_No__c prodModel, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE
+ Id = :str
+ AND Cancellation_Flag__c = FALSE
+ AND Consumable_order_minor__c != NULL
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Arrive__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Consumable_order_minor__r.showFalseNotshowTrue__c = FALSE
+ AND Deliver_date__c < LAST_N_DAYS:7
+ GROUP BY Asset_Model_No__c
+ ];
+ system.debug('Morethan7daysList================>' + morethan7daysList.size());
+ for (Integer i = 0; i < morethan7daysList.size(); i++) {
morethansevendaysIifo.add(new showRecords(morethan7daysList[i]));
- system.debug('MorethansevendaysIifo+++++++'+morethansevendaysIifo);
+ system.debug('MorethansevendaysIifo+++++++' + morethansevendaysIifo);
}
results.recordList = morethansevendaysIifo;
results.result = 'Success';
- }catch (Exception e){
+ } catch (Exception e) {
results.result = 'Fail';
results.errorMsg = e.getLineNumber() + '---' + e.getMessage();
}
@@ -621,17 +780,17 @@
public List<ShowRecords> recordList;
}
-
public class ShowRecords implements Comparable {
@AuraEnabled
public Decimal recordCount { get; set; }
@AuraEnabled
public String prodModel { get; set; }
- public ShowRecords() {}
+ public ShowRecords() {
+ }
public ShowRecords(AggregateResult e) {
- recordCount =Integer.valueOf(e.get('recordCount'));
+ recordCount = Integer.valueOf(e.get('recordCount'));
prodModel = String.valueOf(e.get('prodModel'));
}
// 鎺掑簭
@@ -639,4 +798,4 @@
return null;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexConsumableGoodsInfoTest.cls b/force-app/main/default/classes/LexConsumableGoodsInfoTest.cls
new file mode 100644
index 0000000..6365069
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableGoodsInfoTest.cls
@@ -0,0 +1,975 @@
+@istest
+public class LexConsumableGoodsInfoTest {
+ @IsTest
+ static void lexConsumableGoodsInfoTest1() {
+ user MyUser_Test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888',
+ Product_Limit_Date__c = 'Test07|3|100,Test08|10|50'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ //浜у搧鏁版嵁
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod08 = new Product2(
+ Name = 'Test08',
+ ProductCode = 'Test08',
+ Asset_Model_No__c = 'Test08',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod09 = new Product2(
+ Name = 'Test09',
+ ProductCode = 'Test09',
+ Asset_Model_No__c = 'Test09',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07, prod08, prod09 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod07.Id);
+ insert proG;
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod08.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod09.Id);
+ insert proF;
+
+ //璁㈠崟
+ Consumable_order__c order = new Consumable_order__c();
+ order.Name = 'testMing';
+ order.Order_status__c = '鎵瑰噯';
+ order.RecordTypeid = System.Label.RT_ConOrder_Order;
+ order.Dealer_Info__c = myAccount1.id;
+ order.Inventory_date__c = Date.today();
+ order.Order_type__c = '璁㈠崟';
+ order.Order_ProType__c = 'ET';
+ insert order;
+ //鍒拌揣
+ Consumable_order__c order2 = new Consumable_order__c();
+ order2.Name = 'testMing1';
+ order2.Order_status__c = '鎵瑰噯';
+ order2.RecordTypeid = '01210000000c9dqAAA';
+ order2.Dealer_Info__c = myAccount1.id;
+ order2.Order_type__c = '鍒拌揣';
+ order2.Order_ProType__c = 'ET';
+ insert order2;
+
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+ //鍒朵綔Consumable_order_details__c-------ProductCount
+ // 閿�鍞�
+ Consumable_order_details2__c dataForProductCount7 = new Consumable_order_details2__c();
+ dataForProductCount7.Bar_Code__c = '123456789298k250AAAAA';
+ dataForProductCount7.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount7.Arrive_date__c = Date.today();
+ dataForProductCount7.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount7.Consumable_Product__c = proH.id;
+ dataForProductCount7.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount7.Box_Piece__c = '鐩�';
+ dataForProductCount7.Used_date__c = Date.today();
+ dataForProductCount7.Consumable_order_minor__c = order.id;
+
+ conList.add(dataForProductCount7);
+ // 鍦ㄥ簱 杩囨湡 鐩�
+ Consumable_order_details2__c dataForProduct = new Consumable_order_details2__c();
+ dataForProduct.Bar_Code__c = '123456789498k250BBBBB';
+ dataForProduct.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProduct.Arrive_date__c = Date.today();
+ dataForProduct.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProduct.Consumable_Product__c = proF.id;
+ dataForProduct.Asset_Model_No__c = proF.Asset_Model_No__c;
+ dataForProduct.Box_Piece__c = '鐩�';
+ dataForProduct.Consumable_order_minor__c = order.id;
+
+ conList.add(dataForProduct);
+ // 鍦ㄥ簱 杩囨湡 涓�
+ Consumable_order_details2__c dataForProductCount3 = new Consumable_order_details2__c();
+ dataForProductCount3.Bar_Code__c = '123456788398k250CCCCC';
+ dataForProductCount3.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount3.Arrive_date__c = Date.today();
+ dataForProductCount3.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount3.Consumable_Product__c = proG.id;
+ dataForProductCount3.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount3.Box_Piece__c = '涓�';
+ dataForProductCount3.RemoveBox_No__c = 1;
+ dataForProductCount3.Consumable_order_minor__c = order.id;
+ conList.add(dataForProductCount3);
+ insert conList;
+
+ //杩囨湡搴撳瓨姹囨�讳俊鎭� add by Wang Xueqin
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ Consumable_order_details2__c dataForProductCount4 = new Consumable_order_details2__c();
+ dataForProductCount4.Bar_Code__c = '1001';
+ dataForProductCount4.Arrive_date__c = Date.today();
+ dataForProductCount4.Send_Date__c = null;
+ dataForProductCount4.Used_date__c = null;
+ dataForProductCount4.Return_date__c = null;
+ dataForProductCount4.Lose_Flag__c = false;
+ dataForProductCount4.Cancellation_Flag__c = false;
+ dataForProductCount4.Consumable_Product__c = proG.Id;
+ dataForProductCount4.Consumable_Arrived_order__c = order2.id;
+ dataForProductCount4.Used_account__c = myAccount1.Id;
+ dataForProductCount4.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount4.Box_Piece__c = '鐩�';
+ conList1.add(dataForProductCount4);
+ System.debug('conList1==>' + conList1);
+ //鏌ヨ鎵�鏈夎繃鏈熷簱瀛�
+ Consumable_order_details2__c dataForProductCount5 = new Consumable_order_details2__c();
+ dataForProductCount5.Bar_Code__c = '1002';
+ dataForProductCount5.Arrive_date__c = Date.today();
+ dataForProductCount5.Send_Date__c = Date.today();
+ dataForProductCount5.Used_date__c = Date.today();
+ dataForProductCount5.Return_date__c = null;
+ dataForProductCount5.Lose_Flag__c = false;
+ dataForProductCount5.Cancellation_Flag__c = false;
+ dataForProductCount5.Consumable_Product__c = proG.Id;
+ dataForProductCount5.Consumable_Arrived_order__c = order2.id;
+ dataForProductCount5.Used_account__c = myAccount1.Id;
+ dataForProductCount5.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount5.Box_Piece__c = '鐩�';
+ conList1.add(dataForProductCount5);
+ insert conList1;
+ Test.startTest();
+ LexConsumableGoodsInfo.initMoreThan7(dataForProductCount7.Id);
+ LexConsumableGoodsInfo.initMoreThan7All('all');
+ LexConsumableGoodsInfo.initNotArrDet(dataForProductCount7.Id);
+ LexConsumableGoodsInfo.initNotArrDetAll('all');
+ LexConsumableGoodsInfo.initArrDet(dataForProductCount7.Id);
+ LexConsumableGoodsInfo.initArrDetAll('all');
+ LexConsumableGoodsInfo.initDeliveryDet(dataForProductCount7.Id);
+ LexConsumableGoodsInfo.initDeliveryDetAll('all');
+ LexConsumableGoodsInfo.initTotalNum('1', 'all');
+ LexConsumableGoodsInfo.initTotalNum(dataForProductCount7.Id, 'all');
+ Test.stopTest();
+ }
+ }
+
+ @IsTest
+ static void lexConsumableGoodsInfoTest2() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '9999900');
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c(
+ Name = 'OCM_01_001',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c Order2 = new Consumable_order__c(
+ Name = 'OCM_01_002',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ insert new List<Consumable_order__c>{ Order1, Order2 };
+
+ //鏄庣粏1
+ Consumable_orderdetails__c createDetail = new Consumable_orderdetails__c();
+ createDetail.name = 'Too001';
+ createDetail.Consumable_Product__c = pro1.id;
+ createDetail.Dealer_Custom_Price__c = 999.00;
+ createDetail.Consumable_count__c = 3;
+ createDetail.Consumable_order__c = Order1.id;
+ createDetail.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail;
+ Consumable_orderdetails__c createDetail1 = new Consumable_orderdetails__c();
+ createDetail1.name = 'Too002';
+ createDetail1.Consumable_Product__c = pro2.id;
+ createDetail1.Consumable_order__c = Order2.id;
+ createDetail1.Dealer_Custom_Price__c = 999.00;
+ createDetail1.Consumable_count__c = 4;
+ createDetail1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail1;
+
+ //璁㈠崟鏄庣粏
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001001',
+ Consumable_order_minor__c = Order1.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001002',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001003',
+ Consumable_order_minor__c = Order1.Id,
+ //Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001004',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4 };
+
+ LexConsumableGoodsInfo.initMoreThan7(Orderdet1.Id);
+ LexConsumableGoodsInfo.initMoreThan7All('all');
+ LexConsumableGoodsInfo.initNotArrDet(Orderdet1.Id);
+ LexConsumableGoodsInfo.initNotArrDetAll('all');
+ LexConsumableGoodsInfo.initArrDet(Orderdet1.Id);
+ LexConsumableGoodsInfo.initArrDetAll('all');
+ LexConsumableGoodsInfo.initDeliveryDet(Orderdet1.Id);
+ LexConsumableGoodsInfo.initDeliveryDetAll('all');
+ LexConsumableGoodsInfo.initTotalNum('1', 'all');
+ LexConsumableGoodsInfo.initTotalNum(Orderdet1.Id, 'all');
+ }
+ }
+
+ @IsTest
+ static void lexConsumableGoodsInfoTest3() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '9999900');
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c(
+ Name = 'OCM_01_001',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c Order2 = new Consumable_order__c(
+ Name = 'OCM_01_002',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ insert new List<Consumable_order__c>{ Order1, Order2 };
+
+ //鏄庣粏1
+ Consumable_orderdetails__c createDetail = new Consumable_orderdetails__c();
+ createDetail.name = 'Too001';
+ createDetail.Consumable_Product__c = pro1.id;
+ createDetail.Dealer_Custom_Price__c = 999.00;
+ createDetail.Consumable_count__c = 3;
+ createDetail.Consumable_order__c = Order1.id;
+ createDetail.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail;
+ Consumable_orderdetails__c createDetail1 = new Consumable_orderdetails__c();
+ createDetail1.name = 'Too002';
+ createDetail1.Consumable_Product__c = pro2.id;
+ createDetail1.Consumable_order__c = Order2.id;
+ createDetail1.Dealer_Custom_Price__c = 999.00;
+ createDetail1.Consumable_count__c = 4;
+ createDetail1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail1;
+
+ //璁㈠崟鏄庣粏
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001001',
+ Consumable_order_minor__c = Order1.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001002',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001003',
+ Consumable_order_minor__c = Order1.Id,
+ //Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001004',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4 };
+
+ LexConsumableGoodsInfo.initMoreThan7(Orderdet2.Id);
+ LexConsumableGoodsInfo.initMoreThan7All('');
+ LexConsumableGoodsInfo.initNotArrDet(Orderdet2.Id);
+ LexConsumableGoodsInfo.initNotArrDetAll('');
+ LexConsumableGoodsInfo.initArrDet(Orderdet2.Id);
+ LexConsumableGoodsInfo.initArrDetAll('');
+ LexConsumableGoodsInfo.initDeliveryDet(Orderdet2.Id);
+ LexConsumableGoodsInfo.initDeliveryDetAll('');
+ LexConsumableGoodsInfo.initTotalNum(Orderdet2.Id, '');
+ }
+ }
+
+ @IsTest
+ static void lexConsumableGoodsInfoTest4() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '9999900');
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c(
+ Name = 'OCM_01_001',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c Order2 = new Consumable_order__c(
+ Name = 'OCM_01_002',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ insert new List<Consumable_order__c>{ Order1, Order2 };
+
+ //鏄庣粏1
+ Consumable_orderdetails__c createDetail = new Consumable_orderdetails__c();
+ createDetail.name = 'Too001';
+ createDetail.Consumable_Product__c = pro1.id;
+ createDetail.Dealer_Custom_Price__c = 999.00;
+ createDetail.Consumable_count__c = 3;
+ createDetail.Consumable_order__c = Order1.id;
+ createDetail.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail;
+ Consumable_orderdetails__c createDetail1 = new Consumable_orderdetails__c();
+ createDetail1.name = 'Too002';
+ createDetail1.Consumable_Product__c = pro2.id;
+ createDetail1.Consumable_order__c = Order2.id;
+ createDetail1.Dealer_Custom_Price__c = 999.00;
+ createDetail1.Consumable_count__c = 4;
+ createDetail1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail1;
+
+ //璁㈠崟鏄庣粏
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001001',
+ Consumable_order_minor__c = Order1.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001002',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001003',
+ Consumable_order_minor__c = Order1.Id,
+ //Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001004',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4 };
+
+ LexConsumableGoodsInfo.initMoreThan7(Orderdet3.Id);
+ LexConsumableGoodsInfo.initNotArrDet(Orderdet3.Id);
+ LexConsumableGoodsInfo.initArrDet(Orderdet3.Id);
+ LexConsumableGoodsInfo.initDeliveryDet(Orderdet3.Id);
+ LexConsumableGoodsInfo.initTotalNum(Orderdet3.Id, 'all');
+ }
+ }
+
+ @IsTest
+ static void lexConsumableGoodsInfoTest5() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '9999900');
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c(
+ Name = 'OCM_01_001',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c Order2 = new Consumable_order__c(
+ Name = 'OCM_01_002',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Order_ProType__c = 'ET'
+ );
+ insert new List<Consumable_order__c>{ Order1, Order2 };
+
+ //鏄庣粏1
+ Consumable_orderdetails__c createDetail = new Consumable_orderdetails__c();
+ createDetail.name = 'Too001';
+ createDetail.Consumable_Product__c = pro1.id;
+ createDetail.Dealer_Custom_Price__c = 999.00;
+ createDetail.Consumable_count__c = 3;
+ createDetail.Consumable_order__c = Order1.id;
+ createDetail.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail;
+ Consumable_orderdetails__c createDetail1 = new Consumable_orderdetails__c();
+ createDetail1.name = 'Too002';
+ createDetail1.Consumable_Product__c = pro2.id;
+ createDetail1.Consumable_order__c = Order2.id;
+ createDetail1.Dealer_Custom_Price__c = 999.00;
+ createDetail1.Consumable_count__c = 4;
+ createDetail1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail1;
+
+ //璁㈠崟鏄庣粏
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001001',
+ Consumable_order_minor__c = Order1.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001002',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001003',
+ Consumable_order_minor__c = Order1.Id,
+ //Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001004',
+ Consumable_order_minor__c = Order2.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro2.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery
+ );
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4 };
+
+ LexConsumableGoodsInfo.initMoreThan7(Orderdet4.Id);
+ LexConsumableGoodsInfo.initNotArrDet(Orderdet4.Id);
+ LexConsumableGoodsInfo.initArrDet(Orderdet4.Id);
+ LexConsumableGoodsInfo.initDeliveryDet(Orderdet4.Id);
+ LexConsumableGoodsInfo.initTotalNum(Orderdet4.Id, 'all');
+ }
+ }
+
+ @IsTest
+ static void lexConsumableGoodsInfoTest6() {
+ LexConsumableGoodsInfo.ShowRecords sr = new LexConsumableGoodsInfo.ShowRecords();
+ sr.prodModel = 'test';
+ sr.recordCount = 1;
+ sr.compareTo(new LexConsumableGoodsInfo.ShowRecords());
+ }
+
+ @IsTest
+ static void lexConsumableGoodsInfoTest7() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '9999900');
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含',
+ UserPro_Type__c = 'ET'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c(
+ Name = 'OCM_01_001',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Delivery_detail_count__c = 1,
+ Order_ProType__c = 'ET',
+ showFalseNotshowTrue__c = false
+ );
+ insert new List<Consumable_order__c>{ Order1 };
+
+ //鏄庣粏1
+ Consumable_orderdetails__c createDetail = new Consumable_orderdetails__c();
+ createDetail.name = 'Too001';
+ createDetail.Consumable_Product__c = pro1.id;
+ createDetail.Dealer_Custom_Price__c = 999.00;
+ createDetail.Consumable_count__c = 3;
+ createDetail.Consumable_order__c = Order1.id;
+ createDetail.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail;
+
+ //璁㈠崟鏄庣粏
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001001',
+ Asset_Model_No__c = 'Test01',
+ Consumable_order_minor__c = Order1.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery,
+ Cancellation_Flag__c = false
+ );
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001003',
+ Asset_Model_No__c = 'Test01',
+ Consumable_order_minor__c = Order1.Id,
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery,
+ Cancellation_Flag__c = false
+ );
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet3 };
+ LexConsumableGoodsInfo.initNotArrDet(Order1.Id);
+ LexConsumableGoodsInfo.initNotArrDetAll('all');
+ }
+ }
+
+ @IsTest
+ static void lexConsumableGoodsInfoTest8() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '9999900');
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含',
+ UserPro_Type__c = 'ET'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c(
+ Name = 'OCM_01_001',
+ RecordTypeId = System.Label.RT_ConOrder_Delivery,
+ Order_type__c = '璁㈠崟',
+ Dealer_info__c = myAccount1.Id,
+ Delivery_detail_count__c = 1,
+ Order_ProType__c = 'ET',
+ showFalseNotshowTrue__c = false
+ );
+ insert new List<Consumable_order__c>{ Order1 };
+
+ //鏄庣粏1
+ Consumable_orderdetails__c createDetail = new Consumable_orderdetails__c();
+ createDetail.name = 'Too001';
+ createDetail.Consumable_Product__c = pro1.id;
+ createDetail.Dealer_Custom_Price__c = 999.00;
+ createDetail.Consumable_count__c = 3;
+ createDetail.Consumable_order__c = Order1.id;
+ createDetail.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert createDetail;
+
+ //璁㈠崟鏄庣粏
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001001',
+ Consumable_order_minor__c = Order1.Id,
+ Arrive_date__c = Date.today(),
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery,
+ Cancellation_Flag__c = false
+ );
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c(
+ Name = 'OCM_01_001003',
+ Consumable_order_minor__c = Order1.Id,
+ Consumable_Product__c = pro1.id,
+ RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery,
+ Cancellation_Flag__c = false
+ );
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet3 };
+ LexConsumableGoodsInfo.initNotArrDetAll('all');
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexConsumableGoodsInfoTest.cls-meta.xml b/force-app/main/default/classes/LexConsumableGoodsInfoTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableGoodsInfoTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexConsumableOrderManageController.cls b/force-app/main/default/classes/LexConsumableOrderManageController.cls
index 0f4fc14..e086bbb 100644
--- a/force-app/main/default/classes/LexConsumableOrderManageController.cls
+++ b/force-app/main/default/classes/LexConsumableOrderManageController.cls
@@ -56,33 +56,36 @@
List<CusCol> cols = new List<CusCol>();
for (FieldSetMember fsm : fsmList) {
//add by Link
- CusCol col = new CusCol();
- col.label = fsm.getLabel();
- col.fieldName = fsm.getFieldPath();
- col.hideDefaultActions = true;
- // col.sortable = true;
- col.wrapText = true;
- if (fsm.getFieldPath() == 'Order_ForHospital__c') {
- col.type = 'url';
- col.fieldName = 'hosUrl';
- TypeAttr typeAttributes1 = new TypeAttr();
- CusLable cusLabel = new CusLable();
- cusLabel.fieldName = 'hosName';
- typeAttributes1.label = cusLabel;
- typeAttributes1.target = '_blank';
- col.typeAttributes = typeAttributes1;
+ if (fsm.getFieldPath() == 'Order_ForHospital__c' && agencyProType == 'ET') {
+ } else {
+ CusCol col = new CusCol();
+ col.label = fsm.getLabel();
+ col.fieldName = fsm.getFieldPath();
+ col.hideDefaultActions = true;
+ // col.sortable = true;
+ col.wrapText = true;
+ if (fsm.getFieldPath() == 'Order_ForHospital__c') {
+ col.type = 'url';
+ col.fieldName = 'hosUrl';
+ TypeAttr typeAttributes1 = new TypeAttr();
+ CusLable cusLabel = new CusLable();
+ cusLabel.fieldName = 'hosName';
+ typeAttributes1.label = cusLabel;
+ typeAttributes1.target = '_blank';
+ col.typeAttributes = typeAttributes1;
+ }
+ if (fsm.getFieldPath() == 'Name') {
+ col.type = 'url';
+ col.fieldName = 'nameUrl';
+ TypeAttr typeAttributes1 = new TypeAttr();
+ CusLable cusLabel = new CusLable();
+ cusLabel.fieldName = 'Name';
+ typeAttributes1.label = cusLabel;
+ typeAttributes1.target = '_blank';
+ col.typeAttributes = typeAttributes1;
+ }
+ cols.add(col);
}
- if (fsm.getFieldPath() == 'Name') {
- col.type = 'url';
- col.fieldName = 'nameUrl';
- TypeAttr typeAttributes1 = new TypeAttr();
- CusLable cusLabel = new CusLable();
- cusLabel.fieldName = 'Name';
- typeAttributes1.label = cusLabel;
- typeAttributes1.target = '_blank';
- col.typeAttributes = typeAttributes1;
- }
- cols.add(col);
//update by rentx 2020-12-22 start
if (fsm.getLabel() == '鍖婚櫌' && agencyProType != null && agencyProType == 'ET') {
} else {
@@ -122,7 +125,11 @@
raesList = Database.query(soql);
//add by rentx 2021-3-10 start
//涓� hasHop 璧嬪�� 鍒ゆ柇褰撳墠缁忛攢鍟嗕笅鏄惁鏈夌壒浠峰尰闄�
- List<hospitalprice__c> hopList = [SELECT id, hospital__c FROM hospitalprice__c WHERE account__c = :accountid];
+ List<hospitalprice__c> hopList = [
+ SELECT id, hospital__c
+ FROM hospitalprice__c
+ WHERE account__c = :accountid
+ ];
if (hopList == null || hopList.size() == 0) {
hasHop = false;
} else {
@@ -140,7 +147,11 @@
for (Account acc : contractList) {
dealIds.add(acc.Id);
}
- List<Dealer_Product__c> deList = [SELECT id FROM Dealer_Product__c WHERE Dealer_Contact__c IN :dealIds];
+ List<Dealer_Product__c> deList = [
+ SELECT id
+ FROM Dealer_Product__c
+ WHERE Dealer_Contact__c IN :dealIds
+ ];
if (deList == null || deList.size() == 0) {
hasSpecial = false;
} else {
@@ -329,4 +340,4 @@
@AuraEnabled
public String fieldName;
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexConsumableOrderManageControllerTest.cls b/force-app/main/default/classes/LexConsumableOrderManageControllerTest.cls
new file mode 100644
index 0000000..6b42b1c
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableOrderManageControllerTest.cls
@@ -0,0 +1,109 @@
+@istest
+public class LexConsumableOrderManageControllerTest {
+ @IsTest
+ static void ConsumableOrdertest() {
+ User myUser_test = new User();
+ Account myAccount1;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(name = 'testaccount001', RecordTypeId = rectCo[0].Id);
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ }
+
+ System.runAs(myUser_test) {
+ Consumable_order__c testList5 = new Consumable_order__c(
+ Name = 'test5',
+ Order_status__c = '鑽夋涓�',
+ Dealer_info__c = myAccount1.Id,
+ Order_type__c = '璁㈠崟',
+ RecordtypeId = System.Label.RT_ConOrder_Order,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c testList6 = new Consumable_order__c(
+ Name = 'test6',
+ Order_status__c = '宸叉彁浜�',
+ Dealer_info__c = myAccount1.Id,
+ Order_type__c = '璁㈠崟',
+ RecordtypeId = System.Label.RT_ConOrder_Order,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c testList7 = new Consumable_order__c(
+ Name = 'test7',
+ Order_status__c = '宸叉彁浜�',
+ Dealer_info__c = myAccount1.Id,
+ Order_type__c = '璁㈠崟',
+ RecordtypeId = System.Label.RT_ConOrder_Order,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c testList1 = new Consumable_order__c(
+ Name = 'test1',
+ Order_status__c = '鑽夋涓�',
+ Dealer_info__c = myAccount1.Id,
+ Order_type__c = '璁㈠崟',
+ RecordtypeId = System.Label.RT_ConOrder_Order,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c testList2 = new Consumable_order__c(
+ Name = 'test2',
+ Order_status__c = '鑽夋涓�',
+ Dealer_info__c = myAccount1.Id,
+ Order_type__c = '璁㈠崟',
+ RecordtypeId = System.Label.RT_ConOrder_Order,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c testList3 = new Consumable_order__c(
+ Name = 'test3',
+ Order_status__c = '鑽夋涓�',
+ Dealer_info__c = myAccount1.Id,
+ Order_type__c = '璁㈠崟',
+ RecordtypeId = System.Label.RT_ConOrder_Order,
+ Order_ProType__c = 'ET'
+ );
+ Consumable_order__c testList4 = new Consumable_order__c(
+ Name = 'test4',
+ Order_status__c = '鑽夋涓�',
+ Dealer_info__c = myAccount1.Id,
+ Order_type__c = '璁㈠崟',
+ RecordtypeId = System.Label.RT_ConOrder_Order,
+ Order_date__c = Date.today(),
+ Order_ProType__c = 'ET'
+ );
+ insert new List<Consumable_order__c>{ testList1, testList2, testList3, testList4, testList5, testList6, testList7 };
+ LexConsumableOrderManageController.init1();
+ String accID = myAccount1.Id;
+ LexConsumableOrderManageController.searchConsumableorderdetails('', null, '', accID, 'ET', '鍖椾含');
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexConsumableOrderManageControllerTest.cls-meta.xml b/force-app/main/default/classes/LexConsumableOrderManageControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexConsumableOrderManageControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexInventoryController.cls b/force-app/main/default/classes/LexInventoryController.cls
index 564eded..909cdb8 100644
--- a/force-app/main/default/classes/LexInventoryController.cls
+++ b/force-app/main/default/classes/LexInventoryController.cls
@@ -4,44 +4,45 @@
public static Integer pageToken { get; set; }
public static String sortField { get; set; }
public static String sortOrder { get; set; }
-
+
public static Integer totalcount { get; set; }
//鍒嗛〉浣跨敤鏁版嵁
public static String fileName { get; set; }
- public static Integer size{get;set;}
- public static Integer noOfRecords{get; set;}
- public static List<ConsumableorderdetailsInfo> codPageRecords { get; set; } // 涓㈠け鍜屽贰鍥炵殑,鐢婚潰鏄剧ず鐢�
- public static ApexPages.StandardSetController setCon { get; set; }
+ public static Integer size { get; set; }
+ public static Integer noOfRecords { get; set; }
+ public static List<ConsumableorderdetailsInfo> codPageRecords { get; set; } // 涓㈠け鍜屽贰鍥炵殑,鐢婚潰鏄剧ず鐢�
+ public static ApexPages.StandardSetController setCon { get; set; }
@AuraEnabled
- public static List<Consumable_order_details2__c> setConDetails2 { get; set; }
- public static Map<Id,String> pandiandetailsMap = new Map<Id,String>();
+ public static List<Consumable_order_details2__c> setConDetails2 { get; set; }
+ public static Map<Id, String> pandiandetailsMap = new Map<Id, String>();
/*****************妞滅储鐢�******************/
- public static String barcode { get; set; }
- public static Boolean done { get; set; }
+ public static String barcode { get; set; }
+ public static Boolean done { get; set; }
/*****************鐢婚潰琛ㄧずBean******************/
//椤甸潰涓绘暟鎹樉绀虹敤
- private static List<ConsumableorderdetailsInfo> consumableorderdetailsRecords;
+ // private static List<ConsumableorderdetailsInfo> consumableorderdetailsRecords;
+ public static List<ConsumableorderdetailsInfo> consumableorderdetailsRecords;
//鐩樼偣鍒扮殑浜у搧
- public static List<Consumable_order_details2__c> reSet = new List<Consumable_order_details2__c>();
- public static List<Consumable_order_details2__c> showcod2nid = new List<Consumable_order_details2__c>();
+ public static List<Consumable_order_details2__c> reSet = new List<Consumable_order_details2__c>();
+ public static List<Consumable_order_details2__c> showcod2nid = new List<Consumable_order_details2__c>();
//public List<Consumable_order_details2__c> pandiandetailsList { get; set; }
- public static List<List<Consumable_order_details2__c>> pandiandetailsListShow { get; set; }
+ public static List<List<Consumable_order_details2__c>> pandiandetailsListShow { get; set; }
//瀵诲洖鏄庣粏
- public static List<ConsumableorderdetailsInfo> consumableorderdetailsRecordserrordummy; // 涓㈠け鍜屽贰鍥炵殑,瀹為檯鐐掍綔鐢�
+ public static List<ConsumableorderdetailsInfo> consumableorderdetailsRecordserrordummy; // 涓㈠け鍜屽贰鍥炵殑,瀹為檯鐐掍綔鐢�
@AuraEnabled
- public static List<List<ConsumableorderdetailsInfo>> consumableorderdetailsRecordsview { get; set; } // 浜у搧鍗曚綅鐨凩ist
- public static List<Consumable_order_details2__c> InsListUp = New List<Consumable_order_details2__c>();
+ public static List<List<ConsumableorderdetailsInfo>> consumableorderdetailsRecordsview { get; set; } // 浜у搧鍗曚綅鐨凩ist
+ public static List<Consumable_order_details2__c> InsListUp = new List<Consumable_order_details2__c>();
public static List<ConsumableorderdetailsInfo> consumableorderdetailsviewRecords;
-
- public static Integer consumableorderdetailsCount {
+
+ public static Integer consumableorderdetailsCount {
get {
return consumableorderdetailsRecords == null ? 0 : consumableorderdetailsRecords.size();
}
}
//list<String> notexitlist = new list<String>();
- public static Map<String,String> reFindProduct = new Map<String,String>();
+ public static Map<String, String> reFindProduct = new Map<String, String>();
//鎺掑簭鐢�
// public static String sortKey;
// public static String preSortKey;
@@ -56,12 +57,12 @@
// 鐧诲綍鑰呭伐浣滃湴
private static String userWorkLocation;
//缁忛攢鍟嗙敤鎴蜂骇鍝佸垎绫伙紙ET銆丒NG锛�
- public static String agencyProType {get;set;}
+ public static String agencyProType { get; set; }
public static String sqlagencyProType;
//鍒ゆ柇鎿嶄綔浜哄憳鏄惁鐩樼偣
public static Boolean iSinventory = false;
- public LexInventoryController(){
+ public LexInventoryController() {
size = Integer.valueOf(System.Label.orderdetLimitsize);
consumableorderdetailsRecords = new List<ConsumableorderdetailsInfo>();
done = false;
@@ -72,65 +73,79 @@
//codPageRecordsShow = new List<ConsumableorderdetailsInfo>();
}
- private static void initStandardController(){
+ private static void initStandardController() {
// init standard controller
- List<Consumable_order_details2__c> showcod2 = [select Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,
- Bar_Code_search__c
- FROM Consumable_order_details2__c
- WHERE Id in :pandiandetailsMap.keySet()
- order by Name desc];
+ List<Consumable_order_details2__c> showcod2 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Bar_Code_search__c
+ FROM Consumable_order_details2__c
+ WHERE Id IN :pandiandetailsMap.keySet()
+ ORDER BY Name DESC
+ ];
setConDetails2 = showcod2;
- System.debug('setConDetails2===>'+setConDetails2);
+ System.debug('setConDetails2===>' + setConDetails2);
// setCon = new ApexPages.StandardSetController(showcod2);
// // sets the number of records in each page set
// setCon.setPageSize(size);
// noOfRecords = setCon.getResultSize();
}
- public static List<Consumable_order_details2__c> cod2s() {
- return setConDetails2;
+ public static List<Consumable_order_details2__c> cod2s() {
+ return setConDetails2;
}
//Changes the size of pagination
- public static PageReference refreshPageSize() {
+ public static PageReference refreshPageSize() {
setCon.setPageSize(size);
//showcod2nid = cod2s();
makepagerecords();
return null;
}
- public static List<ConsumableorderdetailsInfo> makepagerecords() {
+ public static List<ConsumableorderdetailsInfo> makepagerecords() {
showcod2nid = cod2s();
codPageRecords = new List<ConsumableorderdetailsInfo>();
for (Consumable_order_details2__c cod2 : showcod2nid) {
- codPageRecords.add(new ConsumableorderdetailsInfo(cod2,pandiandetailsMap.get(cod2.Id)));
+ codPageRecords.add(new ConsumableorderdetailsInfo(cod2, pandiandetailsMap.get(cod2.Id)));
}
- System.debug('===>codPageRecords1'+codPageRecords);
- return codPageRecords;
+ System.debug('===>codPageRecords1' + codPageRecords);
+ return codPageRecords;
}
// 鐢婚潰鍒濆鍖�
@AuraEnabled
public static ResponseBodyLWC init() {
-
-
ResponseBodyLWC res = new ResponseBodyLWC();
- Map<String,object> data = new Map<String,object>();
+ Map<String, object> data = new Map<String, object>();
res.entity = data;
consumableorderdetailsRecordsview = new List<List<ConsumableorderdetailsInfo>>();
setConDetails2 = new List<Consumable_order_details2__c>();
String url = '鍦ㄥ簱璋冩暣涓�瑙�';
fileName = EncodingUtil.urlEncode(url, 'UTF-8');
- List<Consumable_order_details2__c> showcod2 = [select Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,
- Bar_Code_search__c
- FROM Consumable_order_details2__c
- WHERE Id in :pandiandetailsMap.keySet()
- order by Name];
- System.debug('pandiandetailsMap====>'+pandiandetailsMap);
+ List<Consumable_order_details2__c> showcod2 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Bar_Code_search__c
+ FROM Consumable_order_details2__c
+ WHERE Id IN :pandiandetailsMap.keySet()
+ ORDER BY Name
+ ];
+ System.debug('pandiandetailsMap====>' + pandiandetailsMap);
initStandardController();
makepagerecords();
// sortKey = '1';
@@ -142,21 +157,29 @@
String userId = UserInfo.getUserId();
//String userId = '00510000006k82X';
//String userId = '00510000005QO75';
- user Useracc = [select Accountid, Work_Location__c,UserPro_Type__c from user where id =:userId];
+ user Useracc = [
+ SELECT Accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
accountid = Useracc.Accountid;
userWorkLocation = Useracc.Work_Location__c;
agencyProType = Useracc.UserPro_Type__c;
- if(String.isBlank(Useracc.UserPro_Type__c)){
+ if (String.isBlank(Useracc.UserPro_Type__c)) {
agencyProType = 'ET';
}
sqlagencyProType = '%' + agencyProType + '%';
- Account accountInfo = [SELECT Name,Dealer_discount__c FROM account WHERE id =:accountid];
+ Account accountInfo = [
+ SELECT Name, Dealer_discount__c
+ FROM account
+ WHERE id = :accountid
+ ];
accountName = accountInfo.Name;
consumableorderdetailsRecords = new List<ConsumableorderdetailsInfo>();
- Map<String,Product2__c> midMap = new Map<String,Product2__c>();
+ Map<String, Product2__c> midMap = new Map<String, Product2__c>();
List<ConsumableorderdetailsInfo> boxRecords = new List<ConsumableorderdetailsInfo>();
- Map<String,ConsumableorderdetailsInfo> newMidBoxMap = new Map<String,ConsumableorderdetailsInfo>();
- Map<String,ConsumableorderdetailsInfo> newMidPieceMap = new Map<String,ConsumableorderdetailsInfo>();
+ Map<String, ConsumableorderdetailsInfo> newMidBoxMap = new Map<String, ConsumableorderdetailsInfo>();
+ Map<String, ConsumableorderdetailsInfo> newMidPieceMap = new Map<String, ConsumableorderdetailsInfo>();
//DB202302357027 娑堣�楀搧杩芥函绯荤粺鏃犳硶姝e父浣跨敤鈥斺�旂洏鐐归〉闈㈡搷浣滃嵆鎶ラ敊 fy start
//寮�濮嬪埗浣滆〃澶存暟鎹�
// List<Product2__c> productCount_Unfull_bak = [select Id, Name,Name__c,
@@ -170,123 +193,135 @@
// midMap.put(productCount_Unfull_bak[i].Id, productCount_Unfull_bak[i]);
// }
//鏌ヨ搴撳瓨 杩藉姞杩斿搧搴撳瓨
- List<Consumable_order_details2__c> ProductCount_Res = [select Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c = false
- AND Dealer_Saled__c = false
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
- AND Cancellation_Flag__c = false
- AND Bar_Code__c !=null
- AND Product_Type__c like : sqlagencyProType
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Dealer_Info_text__c = :accountName];
+ List<Consumable_order_details2__c> ProductCount_Res = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c != NULL
+ AND Product_Type__c LIKE :sqlagencyProType
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Dealer_Info_text__c = :accountName
+ ];
//DB202302357027 娑堣�楀搧杩芥函绯荤粺鏃犳硶姝e父浣跨敤鈥斺�旂洏鐐归〉闈㈡搷浣滃嵆鎶ラ敊 fy start
//寮�濮嬪埗浣滆〃澶存暟鎹�
Set<Id> Product2cIdSet = new Set<Id>();
- for(Consumable_order_details2__c con_or_d2item: ProductCount_Res){
+ for (Consumable_order_details2__c con_or_d2item : ProductCount_Res) {
Product2cIdSet.add(con_or_d2item.Consumable_Product__c);
}
- List<Product2__c> productCount_Unfull_bak = [select Id, Name,Name__c,
- SFDA_Status__c,Packing_list_manual__c,
- Asset_Model_No__c
- from Product2__c
- //where Estimation_Entry_Possibility__c = '鈼�'
- where Id in:Product2cIdSet
- and Product_Type__c like : sqlagencyProType
- ];
- for(integer i = 0;i < productCount_Unfull_bak.size() ; i++){
+ List<Product2__c> productCount_Unfull_bak = [
+ SELECT Id, Name, Name__c, SFDA_Status__c, Packing_list_manual__c, Asset_Model_No__c
+ FROM Product2__c
+ //where Estimation_Entry_Possibility__c = '鈼�'
+ WHERE Id IN :Product2cIdSet AND Product_Type__c LIKE :sqlagencyProType
+ ];
+ for (integer i = 0; i < productCount_Unfull_bak.size(); i++) {
midMap.put(productCount_Unfull_bak[i].Id, productCount_Unfull_bak[i]);
- }
- system.debug('productCount_Unfull_bak'+productCount_Unfull_bak.size());
+ }
+ system.debug('productCount_Unfull_bak' + productCount_Unfull_bak.size());
// String erro='productCount_Unfull_bak:'+productCount_Unfull_bak.size();
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, erro));
//DB202302357027 娑堣�楀搧杩芥函绯荤粺鏃犳硶姝e父浣跨敤鈥斺�旂洏鐐归〉闈㈡搷浣滃嵆鎶ラ敊 fy end
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'ProductCount_Res ' + ProductCount_Res.size()));
- for(Integer i = 0 ; i< ProductCount_Res.size();i++){
+ for (Integer i = 0; i < ProductCount_Res.size(); i++) {
//鐒跺悗寰幆CountDel鍋欱ox鍜宲iece2涓猰ap
- if(MidMap.containsKey(ProductCount_Res[i].Consumable_Product__c) && ProductCount_Res[i].Box_Piece__c == '鐩�'){
-
- if(newMidBoxMap.containsKey(ProductCount_Res[i].Consumable_Product__c+ProductCount_Res[i].Box_Piece__c)){
- ConsumableorderdetailsInfo Jstage = newMidBoxMap.get(ProductCount_Res[i].Consumable_Product__c+ProductCount_Res[i].Box_Piece__c).clone();
- Jstage.countid = Jstage.countid+1 ;
- if(ProductCount_Res[i].Isoverdue__c == 1){
+ if (MidMap.containsKey(ProductCount_Res[i].Consumable_Product__c) && ProductCount_Res[i].Box_Piece__c == '鐩�') {
+ if (newMidBoxMap.containsKey(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c)) {
+ ConsumableorderdetailsInfo Jstage = newMidBoxMap.get(
+ ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c
+ )
+ .clone();
+ Jstage.countid = Jstage.countid + 1;
+ if (ProductCount_Res[i].Isoverdue__c == 1) {
Jstage.limitCount = Jstage.limitCount + 1;
}
Jstage.boxPiece = ProductCount_Res[i].Box_Piece__c;
- newMidBoxMap.put(ProductCount_Res[i].Consumable_Product__c+ProductCount_Res[i].Box_Piece__c, Jstage);
- }else{
- ConsumableorderdetailsInfo Jstage = new ConsumableorderdetailsInfo(MidMap.get(ProductCount_Res[i].Consumable_Product__c));
- Jstage.countid = Jstage.countid+1 ;
- if(ProductCount_Res[i].Isoverdue__c == 1){
+ newMidBoxMap.put(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c, Jstage);
+ } else {
+ ConsumableorderdetailsInfo Jstage = new ConsumableorderdetailsInfo(
+ MidMap.get(ProductCount_Res[i].Consumable_Product__c)
+ );
+ Jstage.countid = Jstage.countid + 1;
+ if (ProductCount_Res[i].Isoverdue__c == 1) {
Jstage.limitCount = Jstage.limitCount + 1;
}
Jstage.boxPiece = ProductCount_Res[i].Box_Piece__c;
- newMidBoxMap.put(ProductCount_Res[i].Consumable_Product__c+ProductCount_Res[i].Box_Piece__c, Jstage);
+ newMidBoxMap.put(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c, Jstage);
}
- }else if(MidMap.containsKey(ProductCount_Res[i].Consumable_Product__c) && ProductCount_Res[i].Box_Piece__c == '涓�'){
- if(newMidPieceMap.containsKey(ProductCount_Res[i].Consumable_Product__c+ProductCount_Res[i].Box_Piece__c)){
- ConsumableorderdetailsInfo Jstage = newMidPieceMap.get(ProductCount_Res[i].Consumable_Product__c+ProductCount_Res[i].Box_Piece__c).clone();
- Jstage.countid = Jstage.countid+1 ;
- if(ProductCount_Res[i].Isoverdue__c == 1){
+ } else if (MidMap.containsKey(ProductCount_Res[i].Consumable_Product__c) && ProductCount_Res[i].Box_Piece__c == '涓�') {
+ if (newMidPieceMap.containsKey(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c)) {
+ ConsumableorderdetailsInfo Jstage = newMidPieceMap.get(
+ ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c
+ )
+ .clone();
+ Jstage.countid = Jstage.countid + 1;
+ if (ProductCount_Res[i].Isoverdue__c == 1) {
Jstage.limitCount = Jstage.limitCount + 1;
}
Jstage.boxPiece = ProductCount_Res[i].Box_Piece__c;
- newMidPieceMap.put(ProductCount_Res[i].Consumable_Product__c+ProductCount_Res[i].Box_Piece__c, Jstage);
- }else{
- ConsumableorderdetailsInfo Jstage = new ConsumableorderdetailsInfo(MidMap.get(ProductCount_Res[i].Consumable_Product__c));
- Jstage.countid = Jstage.countid+1 ;
- if(ProductCount_Res[i].Isoverdue__c == 1){
+ newMidPieceMap.put(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c, Jstage);
+ } else {
+ ConsumableorderdetailsInfo Jstage = new ConsumableorderdetailsInfo(
+ MidMap.get(ProductCount_Res[i].Consumable_Product__c)
+ );
+ Jstage.countid = Jstage.countid + 1;
+ if (ProductCount_Res[i].Isoverdue__c == 1) {
Jstage.limitCount = Jstage.limitCount + 1;
}
Jstage.boxPiece = ProductCount_Res[i].Box_Piece__c;
- newMidPieceMap.put(ProductCount_Res[i].Consumable_Product__c+ProductCount_Res[i].Box_Piece__c, Jstage);
+ newMidPieceMap.put(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c, Jstage);
}
}
}
- for(ConsumableorderdetailsInfo bss : newMidBoxMap.values()){
+ for (ConsumableorderdetailsInfo bss : newMidBoxMap.values()) {
bss.overlimitCount = bss.countid - bss.limitCount;
boxRecords.add(bss);
}
boxRecords.sort();
- for(ConsumableorderdetailsInfo bss : newMidPieceMap.values()){
+ for (ConsumableorderdetailsInfo bss : newMidPieceMap.values()) {
bss.overlimitCount = bss.countid - bss.limitCount;
}
- for(ConsumableorderdetailsInfo bss : boxRecords){
+ for (ConsumableorderdetailsInfo bss : boxRecords) {
consumableorderdetailsRecords.add(bss);
- if(newMidPieceMap.containsKey(bss.Prod.Id + '涓�')){
+ if (newMidPieceMap.containsKey(bss.Prod.Id + '涓�')) {
consumableorderdetailsRecords.add(newMidPieceMap.get(bss.Prod.Id + '涓�'));
//newMidPieceMap绉婚櫎宸茬粡娣诲姞鐨凱iece
newMidPieceMap.remove(bss.Prod.Id + '涓�');
}
}
- for(ConsumableorderdetailsInfo bss : newMidPieceMap.values()){
+ for (ConsumableorderdetailsInfo bss : newMidPieceMap.values()) {
consumableorderdetailsRecords.add(newMidPieceMap.get(bss.Prod.Id + '涓�'));
}
//consumableorderdetailsCount = consumableorderdetailsRecords.size();
listCut();
-
-
+ data.put('ConsumableorderdetailsRecordsview', JSON.serialize(ConsumableorderdetailsRecordsview));
+ data.put('userWorkLocation', userWorkLocation);
+ data.put('agencyProType', agencyProType);
+ data.put('accountName', accountName);
+ data.put('accountid', accountid);
-
- data.put('ConsumableorderdetailsRecordsview',JSON.serialize(ConsumableorderdetailsRecordsview));
- data.put('userWorkLocation',userWorkLocation);
- data.put('agencyProType',agencyProType);
- data.put('accountName',accountName);
- data.put('accountid',accountid);
-
- data.put('consumableorderdetailsRecords',JSON.serialize(consumableorderdetailsRecords));
+ data.put('consumableorderdetailsRecords', JSON.serialize(consumableorderdetailsRecords));
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
return res;
}
- private static void listCut(){
+ private static void listCut() {
//鎷嗗垎鏆傜敤list
List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsbreak = new List<ConsumableorderdetailsInfo>();
List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsbreakover = new List<ConsumableorderdetailsInfo>();
@@ -297,44 +332,41 @@
//閫夋嫨浜у搧view
ConsumableorderdetailsRecordsbreak = new List<ConsumableorderdetailsInfo>();
ConsumableorderdetailsRecordsbreakover = new List<ConsumableorderdetailsInfo>();
- if(consumableorderdetailsRecords.size() > 1000){
- for(Integer i = 0; i < consumableorderdetailsRecords.size(); i++){
- if(i < 1000){
+ if (consumableorderdetailsRecords.size() > 1000) {
+ for (Integer i = 0; i < consumableorderdetailsRecords.size(); i++) {
+ if (i < 1000) {
c = consumableorderdetailsRecords.get(i);
ConsumableorderdetailsRecordsbreak.add(c);
- }else{
+ } else {
c = consumableorderdetailsRecords.get(i);
ConsumableorderdetailsRecordsbreakover.add(c);
}
}
consumableorderdetailsRecordsview.add(ConsumableorderdetailsRecordsbreak);
consumableorderdetailsRecordsview.add(ConsumableorderdetailsRecordsbreakover);
- }else{
+ } else {
consumableorderdetailsRecordsview.add(consumableorderdetailsRecords);
}
}
//========20160311======ADD_Start================================
// 灏嗛〉闈㈡垨鍙栧緱BarCode鍘绘帀閲嶅鐨勶紝杞崲鎴怢ist
//========20160311======ADD_Start================================
- public static List<String> ParseBarCode(String Code){
- Map<String,Integer> barcodeCountMap = new Map<String,Integer>();
- String[] Cache = new String[]{};
+ public static List<String> ParseBarCode(String Code) {
+ Map<String, Integer> barcodeCountMap = new Map<String, Integer>();
+ String[] Cache = new List<String>{};
Cache = Code.split('\n');
- List <String> Buff = new List<String>();
- for(String A : Cache){
+ List<String> Buff = new List<String>();
+ for (String A : Cache) {
A = A.trim().toUpperCase();
- if(barcodeCountMap.containsKey(A)){
- barcodeCountMap.put(A,barcodeCountMap.get(A) + 1);
- }else{
- barcodeCountMap.put(A,1);
+ if (barcodeCountMap.containsKey(A)) {
+ barcodeCountMap.put(A, barcodeCountMap.get(A) + 1);
+ } else {
+ barcodeCountMap.put(A, 1);
}
Buff.add(A + barcodeCountMap.get(A));
}
return Buff;
-
}
-
-
//test
@@ -345,53 +377,78 @@
//========20160311======ADD_End==================================
// BarCode褰曞叆
@AuraEnabled
- public static ResponseBodyLWC searchConsumableorderdetails(String agencyProType,String userWorkLocation,String accountName,String barcode,String consumableorderdetailsRecordsLWC,Integer pageSizeLWC, Integer pageTokenLWC, String sortFieldLWC, String sortOrderLWC){
+ public static ResponseBodyLWC searchConsumableorderdetails(
+ String agencyProType,
+ String userWorkLocation,
+ String accountName,
+ String barcode,
+ String consumableorderdetailsRecordsLWC,
+ Integer pageSizeLWC,
+ Integer pageTokenLWC,
+ String sortFieldLWC,
+ String sortOrderLWC
+ ) {
pageSize = pageSizeLWC;
pageToken = pageTokenLWC;
sortField = sortFieldLWC;
sortOrder = sortOrderLWC;
- System.debug('===>consumableorderdetailsRecordsLWC'+consumableorderdetailsRecordsLWC);
- List<ConsumableorderdetailsInfo> consumableorderdetailsRecords = (List<ConsumableorderdetailsInfo>)JSON.deserialize(consumableorderdetailsRecordsLWC,List<ConsumableorderdetailsInfo>.class);
+ System.debug('===>consumableorderdetailsRecordsLWC' + consumableorderdetailsRecordsLWC);
+ List<ConsumableorderdetailsInfo> consumableorderdetailsRecords = (List<ConsumableorderdetailsInfo>) JSON.deserialize(
+ consumableorderdetailsRecordsLWC,
+ List<ConsumableorderdetailsInfo>.class
+ );
// ConsumableorderdetailsInfo[] consumableorderdetailsRecords=(List<ConsumableorderdetailsInfo>)JSON.deserialize(consumableorderdetailsRecordsLWC,List<ConsumableorderdetailsInfo>.class);
- system.debug('=====>consumableorderdetailsRecordsLWC'+consumableorderdetailsRecordsLWC);
+ system.debug('=====>consumableorderdetailsRecordsLWC' + consumableorderdetailsRecordsLWC);
ResponseBodyLWC res = new ResponseBodyLWC();
- Map<String,object> data = new Map<String,object>();
+ Map<String, object> data = new Map<String, object>();
res.entity = data;
sqlagencyProType = '%' + agencyProType + '%';
-
-
-
+ System.debug('sqlagencyProType==>' + sqlagencyProType);
+ System.debug('accountName==>' + accountName);
+ System.debug('userWorkLocation==>' + userWorkLocation);
/* BarCodelist鍋氭垚 */
//FIXME barcodeSet 鍋氭垚锛孭roductCount_ResSet 鍋氭垚
List<Consumable_order_details2__c> pandiandetailsList = new List<Consumable_order_details2__c>();
pandiandetailsListShow = new List<List<Consumable_order_details2__c>>();
done = false;
- List<String> BarCodeListP = ParseBarCode( barcode );
+ List<String> BarCodeListP = ParseBarCode(barcode);
+ System.debug('BarCodeListP===>' + BarCodeListP);
//鏌ヨ搴撳瓨 杩藉姞杩斿搧搴撳瓨
- List<Consumable_order_details2__c> ProductCount_Res = [select Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,Dealer_Info_text__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,
- Bar_Code_search__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c = false
- AND Dealer_Saled__c = false
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
- AND Cancellation_Flag__c = false
- AND Bar_Code__c !=null
- AND Product_Type__c like : sqlagencyProType
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Dealer_Info_text__c = :accountName ];
+ List<Consumable_order_details2__c> ProductCount_Res = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Dealer_Info_text__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Bar_Code_search__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c != NULL
+ AND Product_Type__c LIKE :sqlagencyProType
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Dealer_Info_text__c = :accountName
+ ];
+ System.debug('ProductCount_Res==>' + ProductCount_Res);
reFindProduct.clear();
- Map<String,ConsumableorderdetailsInfo> barCodeListAdjustMap = new Map<String,ConsumableorderdetailsInfo>();
+ Map<String, ConsumableorderdetailsInfo> barCodeListAdjustMap = new Map<String, ConsumableorderdetailsInfo>();
//barCodeListLoseMap.clear();
Set<String> carCodeListLose = new Set<String>();
List<ConsumableorderdetailsInfo> consumableorderdetailsRecordsAdjust = new List<ConsumableorderdetailsInfo>();
- Map<String,String> proIdNotinpage = new Map<String,String>();
+ Map<String, String> proIdNotinpage = new Map<String, String>();
List<Consumable_order_details2__c> reFindProductList = new List<Consumable_order_details2__c>();
codPageRecords = new List<ConsumableorderdetailsInfo>();
consumableorderdetailsRecordserrordummy = new List<ConsumableorderdetailsInfo>();
@@ -399,20 +456,23 @@
pandiandetailsMap.clear();
reSet = new List<Consumable_order_details2__c>();
/* 鍒ゆ柇BarCode鏄惁涓虹┖ */
- if (barcode == null || barcode == ''){
+ if (barcode == null || barcode == '') {
//鍏堝彇鍑烘墍鏈変涪澶变骇鍝�
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
// 20200509 gzw add 鐩樼偣鏁伴噺鍒濆鍖�
ass.Pandian = 0;
// 20200509 gzw add 鐩樼偣鏁伴噺鍒濆鍖�
- if(ass.check==true){
+ if (ass.check == true) {
//ass.Diff = ass.countid - ass.Pandian;
- for(integer i = 0 ; i < ProductCount_Res.size();i++){
- if(ProductCount_Res[i].Consumable_Product__c == ass.Prod.Id && ass.boxPiece == ProductCount_Res[i].Box_Piece__c){
- if(carCodeListLose.contains(ProductCount_Res[i].Bar_Code__c)){
+ for (integer i = 0; i < ProductCount_Res.size(); i++) {
+ System.debug('Pro==>' + ProductCount_Res[i].Consumable_Product__c);
+ System.debug('ProId==>' + ass.Prod.Id);
+ System.debug('ass.boxPiece ==>' + ass.boxPiece);
+ System.debug('boxPiece ==>' + ProductCount_Res[i].Box_Piece__c);
+ if (ProductCount_Res[i].Consumable_Product__c == ass.Prod.Id && ass.boxPiece == ProductCount_Res[i].Box_Piece__c) {
+ if (carCodeListLose.contains(ProductCount_Res[i].Bar_Code__c)) {
continue;
- }else{
-
+ } else {
//consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i],'涓㈠け'));
//pandiandetailsMap.put(ProductCount_Res[i].Id, '涓㈠け');
////barCodeListLoseMap.put(ProductCount_Res[i].Id, new ConsumableorderdetailsInfo(ProductCount_Res[i]));
@@ -424,576 +484,170 @@
}
//宸茬粡鍑哄簱鐨勪骇鍝�
- List<Consumable_order_details2__c> reSet1 = [SELECT Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,
- Bar_Code_search__c,Dealer_Info_text__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = TRUE
- AND (Dealer_Shipment__c= TRUE
- or Dealer_Saled__c = TRUE)
- AND Dealer_Returned__c = FALSE
- AND Cancellation_Flag__c = FALSE
- AND Bar_Code__c in :carCodeListLose
- AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];
- Map<String,Consumable_order_details2__c> needreturnMap = new Map<String,Consumable_order_details2__c>();
- for(Consumable_order_details2__c cod2 :reSet1){
- needreturnMap.put(cod2.Bar_Code__c,cod2);
+ List<Consumable_order_details2__c> reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Bar_Code_search__c,
+ Dealer_Info_text__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND (Dealer_Shipment__c = TRUE
+ OR Dealer_Saled__c = TRUE)
+ AND Dealer_Returned__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c IN :carCodeListLose
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ];
+ Map<String, Consumable_order_details2__c> needreturnMap = new Map<String, Consumable_order_details2__c>();
+ for (Consumable_order_details2__c cod2 : reSet1) {
+ needreturnMap.put(cod2.Bar_Code__c, cod2);
}
// 缁忛攢鍟嗕箣闂存垨鑰呭悓涓�缁忛攢鍟嗕笉鍚屽伐浣滃湴璋冭揣
- reSet1 = [SELECT Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,
- Bar_Code_search__c,Dealer_Info_text__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = TRUE
- AND Dealer_Shipment__c= FALSE
- AND Dealer_Saled__c = FALSE
- AND Dealer_Returned__c = FALSE
- AND Cancellation_Flag__c = FALSE
- AND Bar_Code__c in :carCodeListLose
- AND (Dealer_Info_text__c != :accountName
- OR (Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c != :userWorkLocation)
- )
- ORDER BY Name ];
- Map<String,Consumable_order_details2__c> otherAgProMap = new Map<String,Consumable_order_details2__c>();
- for(Consumable_order_details2__c cod2 :reSet1){
- otherAgProMap.put(cod2.Bar_Code__c,cod2);
+ reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Bar_Code_search__c,
+ Dealer_Info_text__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c IN :carCodeListLose
+ AND (Dealer_Info_text__c != :accountName
+ OR (Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c != :userWorkLocation))
+ ORDER BY Name
+ ];
+ Map<String, Consumable_order_details2__c> otherAgProMap = new Map<String, Consumable_order_details2__c>();
+ for (Consumable_order_details2__c cod2 : reSet1) {
+ otherAgProMap.put(cod2.Bar_Code__c, cod2);
}
carCodeListLose.clear();
-
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
- if(ass.check==true){
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ if (ass.check == true) {
ass.Diff = ass.countid - ass.Pandian;
- for(integer i = 0 ; i < ProductCount_Res.size();i++){
- if(ProductCount_Res[i].Consumable_Product__c == ass.Prod.Id && ass.boxPiece == ProductCount_Res[i].Box_Piece__c){
- if(carCodeListLose.contains(ProductCount_Res[i].Bar_Code_search__c)){
+ for (integer i = 0; i < ProductCount_Res.size(); i++) {
+ if (ProductCount_Res[i].Consumable_Product__c == ass.Prod.Id && ass.boxPiece == ProductCount_Res[i].Box_Piece__c) {
+ if (carCodeListLose.contains(ProductCount_Res[i].Bar_Code_search__c)) {
continue;
- }else{
- if(needreturnMap.containsKey(ProductCount_Res[i].Bar_Code__c)){
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i],'璇ヤ骇鍝佹湭杩斿搧'));
+ } else {
+ if (needreturnMap.containsKey(ProductCount_Res[i].Bar_Code__c)) {
+ consumableorderdetailsRecordserrordummy.add(
+ new ConsumableorderdetailsInfo(ProductCount_Res[i], '璇ヤ骇鍝佹湭杩斿搧')
+ );
pandiandetailsMap.put(ProductCount_Res[i].Id, '璇ヤ骇鍝佹湭杩斿搧');
carCodeListLose.add(ProductCount_Res[i].Bar_Code_search__c);
continue;
-
}
- if(otherAgProMap.containsKey(ProductCount_Res[i].Bar_Code__c)){
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i],'璇ヤ骇鍝佸綊灞炰簬' + otherAgProMap.get(ProductCount_Res[i].Bar_Code__c).Dealer_Info_text__c + '鐨勫簱瀛樸��'));
- pandiandetailsMap.put(ProductCount_Res[i].Id, '璇ヤ骇鍝佸綊灞炰簬' + otherAgProMap.get(ProductCount_Res[i].Bar_Code__c).Dealer_Info_text__c + '鐨勫簱瀛樸��');
+ if (otherAgProMap.containsKey(ProductCount_Res[i].Bar_Code__c)) {
+ consumableorderdetailsRecordserrordummy.add(
+ new ConsumableorderdetailsInfo(
+ ProductCount_Res[i],
+ '璇ヤ骇鍝佸綊灞炰簬' +
+ otherAgProMap.get(ProductCount_Res[i].Bar_Code__c).Dealer_Info_text__c +
+ '鐨勫簱瀛樸��'
+ )
+ );
+ pandiandetailsMap.put(
+ ProductCount_Res[i].Id,
+ '璇ヤ骇鍝佸綊灞炰簬' + otherAgProMap.get(ProductCount_Res[i].Bar_Code__c).Dealer_Info_text__c + '鐨勫簱瀛樸��'
+ );
carCodeListLose.add(ProductCount_Res[i].Bar_Code_search__c);
continue;
-
}
if (ProductCount_Res[i].Isoverdue__c == 0) {
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i],'璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��'));
+ consumableorderdetailsRecordserrordummy.add(
+ new ConsumableorderdetailsInfo(ProductCount_Res[i], '璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��')
+ );
pandiandetailsMap.put(ProductCount_Res[i].Id, '璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��');
carCodeListLose.add(ProductCount_Res[i].Bar_Code_search__c);
ass.Diff--;
continue;
}
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i],'涓㈠け'));
+ consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i], '涓㈠け'));
pandiandetailsMap.put(ProductCount_Res[i].Id, '涓㈠け');
carCodeListLose.add(ProductCount_Res[i].Bar_Code_search__c);
}
}
}
- }else{
+ } else {
ass.Pandian = 0;
ass.Diff = 0;
}
}
List<Consumable_order_details2__c> showcod2 = new List<Consumable_order_details2__c>();
if (pandiandetailsMap.keySet().size() > 0) {
- showcod2 = [select Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,
- Bar_Code_search__c
- FROM Consumable_order_details2__c
- WHERE Id in :pandiandetailsMap.keySet()
- order by Name];
+ showcod2 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Bar_Code_search__c
+ FROM Consumable_order_details2__c
+ WHERE Id IN :pandiandetailsMap.keySet()
+ ORDER BY Name
+ ];
}
initStandardController();
showcod2nid = cod2s();
-
+
for (Consumable_order_details2__c cod2 : showcod2nid) {
- codPageRecords.add(new ConsumableorderdetailsInfo(cod2,pandiandetailsMap.get(cod2.Id)));
+ codPageRecords.add(new ConsumableorderdetailsInfo(cod2, pandiandetailsMap.get(cod2.Id)));
}
iSinventory = true;
- if(codPageRecords.size() > 0) done = true;
+ if (codPageRecords.size() > 0)
+ done = true;
consumableorderdetailsRecordserrordummy.clear();
//pandiandetailsList = new list<Consumable_order_details2__c>();
- pandiandetailsList = [select Id, Bar_Code__c,Consumable_Product__r.Name__c,
- Box_Piece__c,Lose_reason__c
- FROM Consumable_order_details2__c
- WHERE Id in :pandiandetailsMap.keySet()
- order by Name];
- for(Consumable_order_details2__c codDet : pandiandetailsList){
+ pandiandetailsList = [
+ SELECT Id, Bar_Code__c, Consumable_Product__r.Name__c, Box_Piece__c, Lose_reason__c
+ FROM Consumable_order_details2__c
+ WHERE Id IN :pandiandetailsMap.keySet()
+ ORDER BY Name
+ ];
+ for (Consumable_order_details2__c codDet : pandiandetailsList) {
codDet.Lose_reason__c = pandiandetailsMap.get(codDet.Id);
}
List<Consumable_order_details2__c> pandiandetailsListMid = new List<Consumable_order_details2__c>();
- for(Consumable_order_details2__c cod2 : pandiandetailsList){
+ for (Consumable_order_details2__c cod2 : pandiandetailsList) {
pandiandetailsListMid.add(cod2);
- if(pandiandetailsListMid.size() == 1000){
+ if (pandiandetailsListMid.size() == 1000) {
pandiandetailsListShow.add(pandiandetailsListMid);
pandiandetailsListMid = new List<Consumable_order_details2__c>();
}
}
- if(pandiandetailsListMid.size() > 0){
- pandiandetailsListShow.add(pandiandetailsListMid);
- }
-
- //鍒嗛〉
- PaginatedAccounts paginatedAccounts = new PaginatedAccounts();
- totalCount = codPageRecords.size();
- paginatedAccounts.nextPageToken = (pageToken + pageSize < totalCount) ? pageToken + pageSize : null;
- paginatedAccounts.recordStart = pageToken + 1;
- paginatedAccounts.pageNumber = pageToken / pageSize + 1;
- Integer recordEnd = pageSize * paginatedAccounts.pageNumber;
- paginatedAccounts.recordEnd = totalCount >= recordEnd ? recordEnd : totalCount;
- paginatedAccounts.totalRecords = totalCount;
-
- Integer startIdx;
- Integer endIdx;
- List<ConsumableorderdetailsInfo> pageCodeRecords = new List<ConsumableorderdetailsInfo>();
- startIdx = pageToken;
- endIdx = startIdx + pageSize;
- if (endIdx > codPageRecords.size()) {
- endIdx = codPageRecords.size();
- }
- for (Integer i = startIdx; i < endIdx; i++) {
- pageCodeRecords.add(codPageRecords.get(i));
- }
-
- data.put('paginatedAccounts', paginatedAccounts);
- data.put('pageCodeRecords', pageCodeRecords);
-
- //end
- data.put('codPageRecords',JSON.serialize(codPageRecords));
- data.put('consumableorderdetailsRecords',JSON.serialize(consumableorderdetailsRecords));
- data.put('consumableorderdetailsRecordsview',JSON.serialize(consumableorderdetailsRecordsview));
- data.put('pandiandetailsMap',pandiandetailsMap);
- System.debug('iSinventory===>'+iSinventory);
- System.debug('codPageRecords===>'+codPageRecords);
- data.put('iSinventory',JSON.serialize(iSinventory));
- data.put('reSet1',reSet1);
- System.debug('reSet1===>'+reSet1);
- res.code = 200;
- res.status = 'Success1';
-
- return res;
-
- }
-
-
-
- //CHAN-B7J4NB 鍙湁涓�涓椂锛岀洏鐐逛笉鍒�
- //init();
- //CHAN-B7J4NB
- Map<String,String> showproductIdMap = new Map<String,String>();
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
- showproductIdMap.put(ass.prod.Id + ass.boxPiece, ass.prod.Id + ass.boxPiece);
- }
-// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCodeListP' + BarCodeListP));
- /***************************************************************************/
- // BarCode鐨勬绱� 鎵�鏈夊湪搴�
- reSet = [select Id,Consumable_Product__c,Consumable_Product__r.Name__c,
- Box_Piece__c,Bar_Code_search__c,Isoverdue__c
- from Consumable_order_details2__c
- where Bar_Code_search__c in :BarCodeListP
- AND Dealer_Arrive__c = true
- AND Dealer_Shipment__c = false
- AND Dealer_Saled__c = false
- AND Dealer_Returned__c = false
- AND Lose_Flag__c = false
- AND Cancellation_Date__c = null
- and Bar_Code__c !=null
- AND Product_Type__c like : sqlagencyProType
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Dealer_Info_text__c = :accountName
- order by Name];
- System.debug('reSet===>'+reSet);
- Map<String, Integer> pandianProdIdCountMap = new Map<String, Integer>(); // ProdId 鍗樹綅
- // 20200509 add gzw 璁板綍闇�瑕侀攢瀛樻暟閲�
- Map<String, Integer> pandianoverdueCountMap = new Map<String, Integer>(); // ProdId 鍗樹綅
- // 20200509 add gzw 璁板綍闇�瑕侀攢瀛樻暟閲�
- Map<String,ConsumableorderdetailsInfo> barCodeListPandianMap = new Map<String,ConsumableorderdetailsInfo>(); // 鏄庣窗銉愩兗銈炽兗銉� 鍗樹綅
- //鐩樼偣鍒扮殑鏄庣粏
- for(Consumable_order_details2__c rs : reSet){
- //BarCodeListPandian.add(rs.Bar_Code_search__c);
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
- if(rs.Consumable_Product__c == ass.Prod.Id && rs.Box_Piece__c == ass.boxPiece){
- ass.check = true;
- }
- }
-
- barCodeListPandianMap.put(rs.Bar_Code_search__c, new ConsumableorderdetailsInfo(rs));
- if (rs.Isoverdue__c == 0) {
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(rs,'璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��'));
- pandiandetailsMap.put(rs.Id, '璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��');
- if (pandianoverdueCountMap.containsKey(rs.Consumable_product__c + rs.Box_Piece__c) == false) {
- pandianoverdueCountMap.put(rs.Consumable_Product__c + rs.Box_Piece__c, 1);
- } else {
- pandianoverdueCountMap.put(rs.Consumable_Product__c + rs.Box_Piece__c, pandianoverdueCountMap.get(rs.Consumable_Product__c + rs.Box_Piece__c) + 1);
- }
- continue;
- }
- if (pandianProdIdCountMap.containsKey(rs.Consumable_product__c + rs.Box_Piece__c) == false) {
- pandianProdIdCountMap.put(rs.Consumable_Product__c + rs.Box_Piece__c, 1);
- } else {
- pandianProdIdCountMap.put(rs.Consumable_Product__c + rs.Box_Piece__c, pandianProdIdCountMap.get(rs.Consumable_Product__c + rs.Box_Piece__c) + 1);
- }
- }
-
- // 缁忛攢鍟嗕箣闂存垨鑰呭悓涓�缁忛攢鍟嗕笉鍚屽伐浣滃湴璋冭揣
- List<Consumable_order_details2__c> reSet1 = [SELECT Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,Dealer_Shipment__c,Dealer_Saled__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,Dealer_Arrive__c,
- Bar_Code_search__c,Dealer_Info_text__c
- FROM Consumable_order_details2__c
- WHERE (Dealer_Arrive__c = TRUE
- or Dealer_Shipment__c= TRUE
- or Dealer_Saled__c = TRUE)
- AND Dealer_Returned__c = FALSE
- AND Cancellation_Flag__c = FALSE
- AND Bar_Code_search__c in :BarCodeListP
- AND (Dealer_Info_text__c != :accountName
- OR (Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c != :userWorkLocation)
- )
- ORDER BY Name ];
- Map<String,Consumable_order_details2__c> otherAgProMap = new Map<String,Consumable_order_details2__c>();
- for(Consumable_order_details2__c cod2 :reSet1){
- otherAgProMap.put(cod2.Bar_Code__c,cod2);
- }
- // 闇�瑕佸叆搴撶殑浜у搧
- for(Consumable_order_details2__c cod2 : reSet1){
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
- if(cod2.Consumable_Product__c == ass.Prod.Id && cod2.Box_Piece__c == ass.boxPiece){
- ass.check = true;
- }
- }
- if(!showproductIdMap.containsKey(cod2.Consumable_product__c + cod2.Box_Piece__c)){
- reFindProductList.add(cod2);
- proIdNotinpage.put(cod2.Consumable_Product__c, cod2.Box_Piece__c);
- }
- if(!barCodeListPandianMap.containsKey(cod2.Bar_Code_search__c)
- && otherAgProMap.containsKey(cod2.Bar_Code__c)
- && (otherAgProMap.get(cod2.Bar_Code__c).Dealer_Saled__c == true
- || otherAgProMap.get(cod2.Bar_Code__c).Dealer_Shipment__c == true) ){
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(cod2,'鏃犳浜у搧鐨勫簱瀛橈紝璇峰叆搴撱��'));
- pandiandetailsMap.put(cod2.Id, '鏃犳浜у搧鐨勫簱瀛橈紝璇峰叆搴撱��');
- }
- }
- //瀵诲洖鏄庣粏
- List<Consumable_order_details2__c> productAdjust = new List<Consumable_order_details2__c>();
- productAdjust = [select Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,Lose_reason__c,
- Asset_Model_No__c,Box_Piece__c,Bar_Code_search__c,Isoverdue__c
- from Consumable_order_details2__c
- where Bar_Code_search__c in :BarCodeListP
- and Bar_Code__c !=null
- and Lose_Flag__c = true
- AND Product_Type__c like : sqlagencyProType
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- order by Name];
-
-
- for (Consumable_order_details2__c rs : productAdjust){
- // 杩囨湡搴撳瓨閿�瀛� 20200427 gzw add srart
- if (rs.Isoverdue__c == 0 || rs.Lose_reason__c == '杩囨湡搴撳瓨閿�瀛�' ) {
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(rs,'杩囨湡鎴栬�呴攢瀛樹骇鍝侊紝鏃犳硶瀵诲洖鍏ュ簱'));
- pandiandetailsMap.put(rs.Id, '杩囨湡鎴栬�呴攢瀛樹骇鍝侊紝鏃犳硶瀵诲洖鍏ュ簱');
- carCodeListLose.add(rs.Bar_Code_search__c);
- continue;
- }
- // 杩囨湡搴撳瓨閿�瀛� 20200427 gzw add end
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
- if(rs.Consumable_Product__c == ass.Prod.Id && rs.Box_Piece__c == ass.boxPiece){
- ass.check = true;
- }
- }
- if(!showproductIdMap.containsKey(rs.Consumable_product__c + rs.Box_Piece__c)){
- reFindProductList.add(rs);
- proIdNotinpage.put(rs.Consumable_Product__c, rs.Box_Piece__c);
- }
- if(barCodeListAdjustMap.containsKey(rs.Bar_Code_search__c)){
- continue;
- }else{
- barCodeListAdjustMap.put(rs.Bar_Code_search__c, new ConsumableorderdetailsInfo(rs));
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(rs,'瀵诲洖'));
- pandiandetailsMap.put(rs.Id, '瀵诲洖');
- consumableorderdetailsRecordsAdjust.add(new ConsumableorderdetailsInfo(rs));
- }
- }
- if(reFindProductList.size() > 0){
- Map<String,Product2__c> midMap = new Map<String,Product2__c>();
- List<ConsumableorderdetailsInfo> boxRecords = new List<ConsumableorderdetailsInfo>();
- Map<String,ConsumableorderdetailsInfo> newMidBoxMap = new Map<String,ConsumableorderdetailsInfo>();
- Map<String,ConsumableorderdetailsInfo> newMidPieceMap = new Map<String,ConsumableorderdetailsInfo>();
- List<Product2__c> product_Refind = [select Id, Name,Name__c,SFDA_Status__c,Packing_list_manual__c,Asset_Model_No__c
- from Product2__c
- WHERE Id in :proIdNotinpage.keySet()];
- for(Product2__c pro : product_Refind){
- midMap.put(pro.Id, pro);
- }
- for(Integer i = 0 ; i< reFindProductList.size();i++){
- //鐒跺悗寰幆CountDel鍋欱ox鍜宲iece2涓猰ap
- if(MidMap.containsKey(reFindProductList[i].Consumable_Product__c) && reFindProductList[i].Box_Piece__c == '鐩�'){
-
- if(newMidBoxMap.containsKey(reFindProductList[i].Consumable_Product__c+reFindProductList[i].Box_Piece__c)){
- ConsumableorderdetailsInfo Jstage = newMidBoxMap.get(reFindProductList[i].Consumable_Product__c+reFindProductList[i].Box_Piece__c).clone();
- Jstage.countid = 0 ;
- if(reFindProductList[i].Isoverdue__c == 1){
- Jstage.limitCount = 0;
- }
- Jstage.boxPiece = reFindProductList[i].Box_Piece__c;
- newMidBoxMap.put(reFindProductList[i].Consumable_Product__c+reFindProductList[i].Box_Piece__c, Jstage);
-}else{
- ConsumableorderdetailsInfo Jstage = new ConsumableorderdetailsInfo(MidMap.get(reFindProductList[i].Consumable_Product__c));
- Jstage.countid = 0 ;
- if(reFindProductList[i].Isoverdue__c == 1){
- Jstage.limitCount = 0;
- }
- Jstage.boxPiece = reFindProductList[i].Box_Piece__c;
- newMidBoxMap.put(reFindProductList[i].Consumable_Product__c+reFindProductList[i].Box_Piece__c, Jstage);
- }
- }else if(MidMap.containsKey(reFindProductList[i].Consumable_Product__c) && reFindProductList[i].Box_Piece__c == '涓�'){
- if(newMidPieceMap.containsKey(reFindProductList[i].Consumable_Product__c+reFindProductList[i].Box_Piece__c)){
- ConsumableorderdetailsInfo Jstage = newMidPieceMap.get(reFindProductList[i].Consumable_product__c+reFindProductList[i].Box_Piece__c).clone();
- Jstage.countid = 0 ;
- if(reFindProductList[i].Isoverdue__c == 1){
- Jstage.limitCount = 0;
- }
- Jstage.boxPiece = reFindProductList[i].Box_Piece__c;
- newMidPieceMap.put(reFindProductList[i].Consumable_Product__c+reFindProductList[i].Box_Piece__c, Jstage);
- }else{
- ConsumableorderdetailsInfo Jstage = new ConsumableorderdetailsInfo(MidMap.get(reFindProductList[i].Consumable_Product__c));
- Jstage.countid = 0 ;
- if(reFindProductList[i].Isoverdue__c == 1){
- Jstage.limitCount = 0;
- }
- Jstage.boxPiece = reFindProductList[i].Box_Piece__c;
- newMidPieceMap.put(reFindProductList[i].Consumable_Product__c+reFindProductList[i].Box_Piece__c, Jstage);
- }
- }
- }
- for(ConsumableorderdetailsInfo bss : newMidBoxMap.values()){
- bss.check = true;
- bss.overlimitCount = bss.countid - bss.limitCount;
- boxRecords.add(bss);
- }
- boxRecords.sort();
- for(ConsumableorderdetailsInfo bss : newMidPieceMap.values()){
- bss.check = true;
- bss.overlimitCount = bss.countid - bss.limitCount;
- }
- for(ConsumableorderdetailsInfo bss : boxRecords){
- consumableorderdetailsRecords.add(bss);
- if(newMidPieceMap.containsKey(bss.Prod.Id + '涓�')){
- consumableorderdetailsRecords.add(newMidPieceMap.get(bss.Prod.Id + '涓�'));
- //newMidPieceMap绉婚櫎宸茬粡娣诲姞鐨凱iece
- newMidPieceMap.remove(bss.Prod.Id + '涓�');
- }
- }
- for(ConsumableorderdetailsInfo bss : newMidPieceMap.values()){
- consumableorderdetailsRecords.add(newMidPieceMap.get(bss.Prod.Id + '涓�'));
- }
- }
-
- //鍏堝彇鍑烘湭鐩樼偣鍒扮殑浜у搧
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
- if(ass.check == true){
- for(integer i = 0 ; i<ProductCount_Res.size();i++){
- if(ProductCount_Res[i].Consumable_Product__c == ass.Prod.Id && ass.boxPiece == ProductCount_Res[i].Box_Piece__c){
- if(barCodeListPandianMap.get(ProductCount_Res[i].Bar_Code_search__c) != null){
- continue;
- }else{
- carCodeListLose.add(ProductCount_Res[i].Bar_Code__c);
- ////barCodeListLoseMap.put(ProductCount_Res[i].Id, new ConsumableorderdetailsInfo(ProductCount_Res[i]));
- //consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i],'涓㈠け'));
- //pandiandetailsMap.put(ProductCount_Res[i].Id, '涓㈠け');
- }
- }
- }
- }
- }
- //宸茬粡鍑哄簱鐨勪骇鍝�
- List<Consumable_order_details2__c> reSet2 = [SELECT Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,
- Bar_Code_search__c,Dealer_Info_text__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = TRUE
- AND (Dealer_Shipment__c= TRUE
- or Dealer_Saled__c = TRUE)
- AND Dealer_Returned__c = FALSE
- AND Cancellation_Flag__c = FALSE
- AND Bar_Code_search__c in :BarCodeListP
- AND Dealer_Info_text__c = :accountName
- ORDER BY Name ];
- Map<String,Consumable_order_details2__c> needreturnMap = new Map<String,Consumable_order_details2__c>();
- for(Consumable_order_details2__c cod2 :reSet2){
- needreturnMap.put(cod2.Bar_Code__c,cod2);
- }
- //// 缁忛攢鍟嗕箣闂存垨鑰呭悓涓�缁忛攢鍟嗕笉鍚屽伐浣滃湴璋冭揣
- //List<Consumable_order_details2__c> reSet1 = [SELECT Id, Name,Consumable_Product__c,
- // Bar_Code__c,Consumable_Product__r.Name__c,Dealer_Shipment__c,Dealer_Saled__c,
- // Asset_Model_No__c,Isoverdue__c,Box_Piece__c,Dealer_Arrive__c,
- // Bar_Code_search__c,Dealer_Info_text__c
- // FROM Consumable_order_details2__c
- // WHERE (Dealer_Arrive__c = TRUE
- // or Dealer_Shipment__c= TRUE
- // or Dealer_Saled__c = TRUE)
- // AND Dealer_Returned__c = FALSE
- // AND Cancellation_Flag__c = FALSE
- // AND Bar_Code_search__c in :BarCodeListP
- // AND (Dealer_Info_text__c != :accountName
- // OR (Dealer_Info_text__c = :accountName
- // AND Arrive_Owner_Work_Location__c != :userWorkLocation)
- // )
- // ORDER BY Name ];
- //Map<String,Consumable_order_details2__c> otherAgProMap = new Map<String,Consumable_order_details2__c>();
- //for(Consumable_order_details2__c cod2 :reSet1){
- // otherAgProMap.put(cod2.Bar_Code__c,cod2);
- //}
- carCodeListLose.clear();
- //鏈洏鐐瑰埌鐨勪骇鍝�
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
- if(ass.check == true){
- for(integer i = 0 ; i<ProductCount_Res.size();i++){
- if(ProductCount_Res[i].Consumable_Product__c == ass.Prod.Id && ass.boxPiece == ProductCount_Res[i].Box_Piece__c){
- if(barCodeListPandianMap.containsKey(ProductCount_Res[i].Bar_Code_search__c)){
- continue;
- }
- if (ProductCount_Res[i].Isoverdue__c == 0) {
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i],'璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��'));
- pandiandetailsMap.put(ProductCount_Res[i].Id, '璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��');
- if (pandianoverdueCountMap.containsKey(ProductCount_Res[i].Consumable_product__c + ProductCount_Res[i].Box_Piece__c) == false) {
- pandianoverdueCountMap.put(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c, 1);
- } else {
- pandianoverdueCountMap.put(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c, pandianoverdueCountMap.get(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c) + 1);
- }
- continue;
- }
-
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i],'涓㈠け'));
- pandiandetailsMap.put(ProductCount_Res[i].Id, '涓㈠け');
- }
- }
- // 鍚屾椂瀛樺湪鍏朵粬缁忛攢鍟嗗簱瀛樹骇鍝�
- for(Consumable_order_details2__c cod2 : reSet1){
- if(cod2.Consumable_Product__c == ass.Prod.Id && ass.boxPiece == cod2.Box_Piece__c){
- if(barCodeListPandianMap.containsKey(cod2.Bar_Code_search__c)
- && otherAgProMap.containsKey(cod2.Bar_Code__c)
- && otherAgProMap.get(cod2.Bar_Code__c).Dealer_Saled__c == false
- && otherAgProMap.get(cod2.Bar_Code__c).Dealer_Shipment__c == false ){
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(cod2,'璇ヤ骇鍝佸綊灞炰簬' + otherAgProMap.get(cod2.Bar_Code__c).Dealer_Info_text__c + '鐨勫簱瀛樸��'));
- pandiandetailsMap.put(cod2.Id, '璇ヤ骇鍝佸綊灞炰簬' + otherAgProMap.get(cod2.Bar_Code__c).Dealer_Info_text__c + '鐨勫簱瀛樸��');
- continue;
- }
- }
- }
- // 闇�瑕佽繑鍝佺殑浜у搧
- for(Consumable_order_details2__c cod2 : reSet2){
- if(cod2.Consumable_Product__c == ass.Prod.Id && ass.boxPiece == cod2.Box_Piece__c){
- if(needreturnMap.containsKey(cod2.Bar_Code__c)){
- consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(cod2,'璇ヤ骇鍝佺洰鍓嶅嚭搴撶姸鎬侊紝璇疯繑鍝併��'));
- pandiandetailsMap.put(cod2.Id, '璇ヤ骇鍝佺洰鍓嶅嚭搴撶姸鎬侊紝璇疯繑鍝併��');
- continue;
- }
- }
- }
- }
- }
-
- //鏇存柊涓绘槑缁嗗崟
- if(barCodeListPandianMap.size() > 0){
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
- if(ass.check == true){
- integer countSum = 0;
- if (pandianProdIdCountMap.containsKey(ass.Prod.Id + ass.boxPiece)) {
- countSum = pandianProdIdCountMap.get(ass.Prod.Id + ass.boxPiece);
- }
- integer overdueSum = 0;
- if (pandianoverdueCountMap.containsKey(ass.Prod.Id + ass.boxPiece)) {
- overdueSum = pandianoverdueCountMap.get(ass.Prod.Id + ass.boxPiece);
- }
- ass.Pandian = countSum;
- ass.Diff = ass.countid - countSum - overdueSum;
- ass.refind = 0;
- }
- }
- }else{
- for(ConsumableorderdetailsInfo ass : consumableorderdetailsRecords){
- if(ass.check == true){
- integer overdueSum = 0;
- if (pandianoverdueCountMap.containsKey(ass.Prod.Id + ass.boxPiece)) {
- overdueSum = pandianoverdueCountMap.get(ass.Prod.Id + ass.boxPiece);
- }
- ass.Diff = ass.countid - ass.Pandian - overdueSum;
- }
- }
- }
-
-
- //瀵诲洖鍋氭垚
- for(ConsumableorderdetailsInfo ass :consumableorderdetailsRecords){
- for(ConsumableorderdetailsInfo adjust :consumableorderdetailsRecordsAdjust){
- if(ass.Prod.Name__c == adjust.Prod.Name__c && ass.boxPiece == adjust.orderdetails2.Box_Piece__c){
- if(reFindProduct.containsKey(adjust.orderdetails2.Bar_Code_search__c)){
- continue;
- }else {
- ass.Pandian ++;
- ass.refind ++;
- reFindProduct.put(adjust.orderdetails2.Bar_Code_search__c,adjust.orderdetails2.Bar_Code_search__c);
- }
- }
- }
- }
- if (pandiandetailsMap.keySet().size() > 0) {
- List<Consumable_order_details2__c> showcod2 = [select Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,
- Bar_Code_search__c
- FROM Consumable_order_details2__c
- WHERE Id in :pandiandetailsMap.keySet()
- order by Name];
- initStandardController();
- showcod2nid = cod2s();
-
- }
- for (Consumable_order_details2__c cod2 : showcod2nid) {
- codPageRecords.add(new ConsumableorderdetailsInfo(cod2,pandiandetailsMap.get(cod2.Id)));
- }
- if(codPageRecords.size() > 0) done = true;
- iSinventory = true;
- consumableorderdetailsRecordserrordummy.clear();
- pandiandetailsList = [select Id, Bar_Code__c,Consumable_Product__r.Name__c,
- Box_Piece__c,Lose_reason__c
- FROM Consumable_order_details2__c
- WHERE Id in :pandiandetailsMap.keySet()
- order by Name];
- for(Consumable_order_details2__c codDet : pandiandetailsList){
- codDet.Lose_reason__c = pandiandetailsMap.get(codDet.Id);
- }
- List<Consumable_order_details2__c> pandiandetailsListMid = new List<Consumable_order_details2__c>();
- for(Consumable_order_details2__c cod2 : pandiandetailsList){
- pandiandetailsListMid.add(cod2);
- if(pandiandetailsListMid.size() == 1000){
- pandiandetailsListShow.add(pandiandetailsListMid);
- pandiandetailsListMid = new List<Consumable_order_details2__c>();
- }
- }
- if(pandiandetailsListMid.size() > 0){
+ if (pandiandetailsListMid.size() > 0) {
pandiandetailsListShow.add(pandiandetailsListMid);
}
+
//鍒嗛〉
PaginatedAccounts paginatedAccounts = new PaginatedAccounts();
totalCount = codPageRecords.size();
@@ -1020,101 +674,642 @@
data.put('pageCodeRecords', pageCodeRecords);
//end
-
- System.debug('=====>codPageRecords2'+codPageRecords);
- System.debug('=====>consumableorderdetailsRecords'+consumableorderdetailsRecords);
- data.put('codPageRecords',JSON.serialize(codPageRecords));
- data.put('consumableorderdetailsRecords',JSON.serialize(consumableorderdetailsRecords));
- System.debug('iSinventory===>'+iSinventory);
- data.put('iSinventory',JSON.serialize(iSinventory));
- System.debug('pandiandetailsMap===>'+pandiandetailsMap);
- data.put('pandiandetailsMap',pandiandetailsMap);
- data.put('reSet',reSet);
- data.put('consumableorderdetailsRecordsview',JSON.serialize(consumableorderdetailsRecordsview));
- System.debug('=====>consumableorderdetailsRecordsview'+consumableorderdetailsRecordsview);
+ data.put('codPageRecords', JSON.serialize(codPageRecords));
+ data.put('consumableorderdetailsRecords', JSON.serialize(consumableorderdetailsRecords));
+ data.put('consumableorderdetailsRecordsview', JSON.serialize(consumableorderdetailsRecordsview));
+ data.put('pandiandetailsMap', pandiandetailsMap);
+ System.debug('iSinventory===>' + iSinventory);
+ System.debug('codPageRecords===>' + codPageRecords);
+ data.put('iSinventory', JSON.serialize(iSinventory));
+ data.put('reSet1', reSet1);
+ System.debug('reSet1===>' + reSet1);
res.code = 200;
- res.status = 'Sucess';
+ res.status = 'Success1';
+
return res;
+ }
+
+ //CHAN-B7J4NB 鍙湁涓�涓椂锛岀洏鐐逛笉鍒�
+ //init();
+ //CHAN-B7J4NB
+ Map<String, String> showproductIdMap = new Map<String, String>();
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ showproductIdMap.put(ass.prod.Id + ass.boxPiece, ass.prod.Id + ass.boxPiece);
+ }
+ // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'BarCodeListP' + BarCodeListP));
+ /***************************************************************************/
+ // BarCode鐨勬绱� 鎵�鏈夊湪搴�
+ reSet = [
+ SELECT Id, Consumable_Product__c, Consumable_Product__r.Name__c, Box_Piece__c, Bar_Code_search__c, Isoverdue__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Bar_Code_search__c IN :BarCodeListP
+ AND Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Cancellation_Date__c = NULL
+ AND Bar_Code__c != NULL
+ AND Product_Type__c LIKE :sqlagencyProType
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ];
+ System.debug('reSet===>' + reSet);
+ Map<String, Integer> pandianProdIdCountMap = new Map<String, Integer>(); // ProdId 鍗樹綅
+ // 20200509 add gzw 璁板綍闇�瑕侀攢瀛樻暟閲�
+ Map<String, Integer> pandianoverdueCountMap = new Map<String, Integer>(); // ProdId 鍗樹綅
+ // 20200509 add gzw 璁板綍闇�瑕侀攢瀛樻暟閲�
+ Map<String, ConsumableorderdetailsInfo> barCodeListPandianMap = new Map<String, ConsumableorderdetailsInfo>(); // 鏄庣窗銉愩兗銈炽兗銉� 鍗樹綅
+ //鐩樼偣鍒扮殑鏄庣粏
+ for (Consumable_order_details2__c rs : reSet) {
+ //BarCodeListPandian.add(rs.Bar_Code_search__c);
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ if (rs.Consumable_Product__c == ass.Prod.Id && rs.Box_Piece__c == ass.boxPiece) {
+ ass.check = true;
+ }
+ }
+
+ barCodeListPandianMap.put(rs.Bar_Code_search__c, new ConsumableorderdetailsInfo(rs));
+ if (rs.Isoverdue__c == 0) {
+ consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(rs, '璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��'));
+ pandiandetailsMap.put(rs.Id, '璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��');
+ if (pandianoverdueCountMap.containsKey(rs.Consumable_product__c + rs.Box_Piece__c) == false) {
+ pandianoverdueCountMap.put(rs.Consumable_Product__c + rs.Box_Piece__c, 1);
+ } else {
+ pandianoverdueCountMap.put(
+ rs.Consumable_Product__c + rs.Box_Piece__c,
+ pandianoverdueCountMap.get(rs.Consumable_Product__c + rs.Box_Piece__c) + 1
+ );
+ }
+ continue;
+ }
+ if (pandianProdIdCountMap.containsKey(rs.Consumable_product__c + rs.Box_Piece__c) == false) {
+ pandianProdIdCountMap.put(rs.Consumable_Product__c + rs.Box_Piece__c, 1);
+ } else {
+ pandianProdIdCountMap.put(
+ rs.Consumable_Product__c + rs.Box_Piece__c,
+ pandianProdIdCountMap.get(rs.Consumable_Product__c + rs.Box_Piece__c) + 1
+ );
+ }
+ }
+
+ // 缁忛攢鍟嗕箣闂存垨鑰呭悓涓�缁忛攢鍟嗕笉鍚屽伐浣滃湴璋冭揣
+ List<Consumable_order_details2__c> reSet1 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Dealer_Shipment__c,
+ Dealer_Saled__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Dealer_Arrive__c,
+ Bar_Code_search__c,
+ Dealer_Info_text__c
+ FROM Consumable_order_details2__c
+ WHERE
+ (Dealer_Arrive__c = TRUE
+ OR Dealer_Shipment__c = TRUE
+ OR Dealer_Saled__c = TRUE)
+ AND Dealer_Returned__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code_search__c IN :BarCodeListP
+ AND (Dealer_Info_text__c != :accountName
+ OR (Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c != :userWorkLocation))
+ ORDER BY Name
+ ];
+ Map<String, Consumable_order_details2__c> otherAgProMap = new Map<String, Consumable_order_details2__c>();
+ for (Consumable_order_details2__c cod2 : reSet1) {
+ otherAgProMap.put(cod2.Bar_Code__c, cod2);
+ }
+ // 闇�瑕佸叆搴撶殑浜у搧
+ for (Consumable_order_details2__c cod2 : reSet1) {
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ if (cod2.Consumable_Product__c == ass.Prod.Id && cod2.Box_Piece__c == ass.boxPiece) {
+ ass.check = true;
+ }
+ }
+ if (!showproductIdMap.containsKey(cod2.Consumable_product__c + cod2.Box_Piece__c)) {
+ reFindProductList.add(cod2);
+ proIdNotinpage.put(cod2.Consumable_Product__c, cod2.Box_Piece__c);
+ }
+ if (
+ !barCodeListPandianMap.containsKey(cod2.Bar_Code_search__c) &&
+ otherAgProMap.containsKey(cod2.Bar_Code__c) &&
+ (otherAgProMap.get(cod2.Bar_Code__c).Dealer_Saled__c == true ||
+ otherAgProMap.get(cod2.Bar_Code__c).Dealer_Shipment__c == true)
+ ) {
+ consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(cod2, '鏃犳浜у搧鐨勫簱瀛橈紝璇峰叆搴撱��'));
+ pandiandetailsMap.put(cod2.Id, '鏃犳浜у搧鐨勫簱瀛橈紝璇峰叆搴撱��');
+ }
+ }
+ //瀵诲洖鏄庣粏
+ List<Consumable_order_details2__c> productAdjust = new List<Consumable_order_details2__c>();
+ productAdjust = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Lose_reason__c,
+ Asset_Model_No__c,
+ Box_Piece__c,
+ Bar_Code_search__c,
+ Isoverdue__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Bar_Code_search__c IN :BarCodeListP
+ AND Bar_Code__c != NULL
+ AND Lose_Flag__c = TRUE
+ AND Product_Type__c LIKE :sqlagencyProType
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ ORDER BY Name
+ ];
+
+ for (Consumable_order_details2__c rs : productAdjust) {
+ // 杩囨湡搴撳瓨閿�瀛� 20200427 gzw add srart
+ if (rs.Isoverdue__c == 0 || rs.Lose_reason__c == '杩囨湡搴撳瓨閿�瀛�') {
+ consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(rs, '杩囨湡鎴栬�呴攢瀛樹骇鍝侊紝鏃犳硶瀵诲洖鍏ュ簱'));
+ pandiandetailsMap.put(rs.Id, '杩囨湡鎴栬�呴攢瀛樹骇鍝侊紝鏃犳硶瀵诲洖鍏ュ簱');
+ carCodeListLose.add(rs.Bar_Code_search__c);
+ continue;
+ }
+ // 杩囨湡搴撳瓨閿�瀛� 20200427 gzw add end
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ if (rs.Consumable_Product__c == ass.Prod.Id && rs.Box_Piece__c == ass.boxPiece) {
+ ass.check = true;
+ }
+ }
+ if (!showproductIdMap.containsKey(rs.Consumable_product__c + rs.Box_Piece__c)) {
+ reFindProductList.add(rs);
+ proIdNotinpage.put(rs.Consumable_Product__c, rs.Box_Piece__c);
+ }
+ if (barCodeListAdjustMap.containsKey(rs.Bar_Code_search__c)) {
+ continue;
+ } else {
+ barCodeListAdjustMap.put(rs.Bar_Code_search__c, new ConsumableorderdetailsInfo(rs));
+ consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(rs, '瀵诲洖'));
+ pandiandetailsMap.put(rs.Id, '瀵诲洖');
+ consumableorderdetailsRecordsAdjust.add(new ConsumableorderdetailsInfo(rs));
+ }
+ }
+ if (reFindProductList.size() > 0) {
+ Map<String, Product2__c> midMap = new Map<String, Product2__c>();
+ List<ConsumableorderdetailsInfo> boxRecords = new List<ConsumableorderdetailsInfo>();
+ Map<String, ConsumableorderdetailsInfo> newMidBoxMap = new Map<String, ConsumableorderdetailsInfo>();
+ Map<String, ConsumableorderdetailsInfo> newMidPieceMap = new Map<String, ConsumableorderdetailsInfo>();
+ List<Product2__c> product_Refind = [
+ SELECT Id, Name, Name__c, SFDA_Status__c, Packing_list_manual__c, Asset_Model_No__c
+ FROM Product2__c
+ WHERE Id IN :proIdNotinpage.keySet()
+ ];
+ for (Product2__c pro : product_Refind) {
+ midMap.put(pro.Id, pro);
+ }
+ for (Integer i = 0; i < reFindProductList.size(); i++) {
+ //鐒跺悗寰幆CountDel鍋欱ox鍜宲iece2涓猰ap
+ if (MidMap.containsKey(reFindProductList[i].Consumable_Product__c) && reFindProductList[i].Box_Piece__c == '鐩�') {
+ if (newMidBoxMap.containsKey(reFindProductList[i].Consumable_Product__c + reFindProductList[i].Box_Piece__c)) {
+ ConsumableorderdetailsInfo Jstage = newMidBoxMap.get(
+ reFindProductList[i].Consumable_Product__c + reFindProductList[i].Box_Piece__c
+ )
+ .clone();
+ Jstage.countid = 0;
+ if (reFindProductList[i].Isoverdue__c == 1) {
+ Jstage.limitCount = 0;
+ }
+ Jstage.boxPiece = reFindProductList[i].Box_Piece__c;
+ newMidBoxMap.put(reFindProductList[i].Consumable_Product__c + reFindProductList[i].Box_Piece__c, Jstage);
+ } else {
+ ConsumableorderdetailsInfo Jstage = new ConsumableorderdetailsInfo(
+ MidMap.get(reFindProductList[i].Consumable_Product__c)
+ );
+ Jstage.countid = 0;
+ if (reFindProductList[i].Isoverdue__c == 1) {
+ Jstage.limitCount = 0;
+ }
+ Jstage.boxPiece = reFindProductList[i].Box_Piece__c;
+ newMidBoxMap.put(reFindProductList[i].Consumable_Product__c + reFindProductList[i].Box_Piece__c, Jstage);
+ }
+ } else if (MidMap.containsKey(reFindProductList[i].Consumable_Product__c) && reFindProductList[i].Box_Piece__c == '涓�') {
+ if (newMidPieceMap.containsKey(reFindProductList[i].Consumable_Product__c + reFindProductList[i].Box_Piece__c)) {
+ ConsumableorderdetailsInfo Jstage = newMidPieceMap.get(
+ reFindProductList[i].Consumable_product__c + reFindProductList[i].Box_Piece__c
+ )
+ .clone();
+ Jstage.countid = 0;
+ if (reFindProductList[i].Isoverdue__c == 1) {
+ Jstage.limitCount = 0;
+ }
+ Jstage.boxPiece = reFindProductList[i].Box_Piece__c;
+ newMidPieceMap.put(reFindProductList[i].Consumable_Product__c + reFindProductList[i].Box_Piece__c, Jstage);
+ } else {
+ ConsumableorderdetailsInfo Jstage = new ConsumableorderdetailsInfo(
+ MidMap.get(reFindProductList[i].Consumable_Product__c)
+ );
+ Jstage.countid = 0;
+ if (reFindProductList[i].Isoverdue__c == 1) {
+ Jstage.limitCount = 0;
+ }
+ Jstage.boxPiece = reFindProductList[i].Box_Piece__c;
+ newMidPieceMap.put(reFindProductList[i].Consumable_Product__c + reFindProductList[i].Box_Piece__c, Jstage);
+ }
+ }
+ }
+ for (ConsumableorderdetailsInfo bss : newMidBoxMap.values()) {
+ bss.check = true;
+ bss.overlimitCount = bss.countid - bss.limitCount;
+ boxRecords.add(bss);
+ }
+ boxRecords.sort();
+ for (ConsumableorderdetailsInfo bss : newMidPieceMap.values()) {
+ bss.check = true;
+ bss.overlimitCount = bss.countid - bss.limitCount;
+ }
+ for (ConsumableorderdetailsInfo bss : boxRecords) {
+ consumableorderdetailsRecords.add(bss);
+ if (newMidPieceMap.containsKey(bss.Prod.Id + '涓�')) {
+ consumableorderdetailsRecords.add(newMidPieceMap.get(bss.Prod.Id + '涓�'));
+ //newMidPieceMap绉婚櫎宸茬粡娣诲姞鐨凱iece
+ newMidPieceMap.remove(bss.Prod.Id + '涓�');
+ }
+ }
+ for (ConsumableorderdetailsInfo bss : newMidPieceMap.values()) {
+ consumableorderdetailsRecords.add(newMidPieceMap.get(bss.Prod.Id + '涓�'));
+ }
+ }
+
+ //鍏堝彇鍑烘湭鐩樼偣鍒扮殑浜у搧
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ if (ass.check == true) {
+ for (integer i = 0; i < ProductCount_Res.size(); i++) {
+ if (ProductCount_Res[i].Consumable_Product__c == ass.Prod.Id && ass.boxPiece == ProductCount_Res[i].Box_Piece__c) {
+ if (barCodeListPandianMap.get(ProductCount_Res[i].Bar_Code_search__c) != null) {
+ continue;
+ } else {
+ carCodeListLose.add(ProductCount_Res[i].Bar_Code__c);
+ ////barCodeListLoseMap.put(ProductCount_Res[i].Id, new ConsumableorderdetailsInfo(ProductCount_Res[i]));
+ //consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i],'涓㈠け'));
+ //pandiandetailsMap.put(ProductCount_Res[i].Id, '涓㈠け');
+ }
+ }
+ }
+ }
+ }
+ //宸茬粡鍑哄簱鐨勪骇鍝�
+ List<Consumable_order_details2__c> reSet2 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Bar_Code_search__c,
+ Dealer_Info_text__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND (Dealer_Shipment__c = TRUE
+ OR Dealer_Saled__c = TRUE)
+ AND Dealer_Returned__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code_search__c IN :BarCodeListP
+ AND Dealer_Info_text__c = :accountName
+ ORDER BY Name
+ ];
+ Map<String, Consumable_order_details2__c> needreturnMap = new Map<String, Consumable_order_details2__c>();
+ for (Consumable_order_details2__c cod2 : reSet2) {
+ needreturnMap.put(cod2.Bar_Code__c, cod2);
+ }
+ //// 缁忛攢鍟嗕箣闂存垨鑰呭悓涓�缁忛攢鍟嗕笉鍚屽伐浣滃湴璋冭揣
+ //List<Consumable_order_details2__c> reSet1 = [SELECT Id, Name,Consumable_Product__c,
+ // Bar_Code__c,Consumable_Product__r.Name__c,Dealer_Shipment__c,Dealer_Saled__c,
+ // Asset_Model_No__c,Isoverdue__c,Box_Piece__c,Dealer_Arrive__c,
+ // Bar_Code_search__c,Dealer_Info_text__c
+ // FROM Consumable_order_details2__c
+ // WHERE (Dealer_Arrive__c = TRUE
+ // or Dealer_Shipment__c= TRUE
+ // or Dealer_Saled__c = TRUE)
+ // AND Dealer_Returned__c = FALSE
+ // AND Cancellation_Flag__c = FALSE
+ // AND Bar_Code_search__c in :BarCodeListP
+ // AND (Dealer_Info_text__c != :accountName
+ // OR (Dealer_Info_text__c = :accountName
+ // AND Arrive_Owner_Work_Location__c != :userWorkLocation)
+ // )
+ // ORDER BY Name ];
+ //Map<String,Consumable_order_details2__c> otherAgProMap = new Map<String,Consumable_order_details2__c>();
+ //for(Consumable_order_details2__c cod2 :reSet1){
+ // otherAgProMap.put(cod2.Bar_Code__c,cod2);
+ //}
+ carCodeListLose.clear();
+ //鏈洏鐐瑰埌鐨勪骇鍝�
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ if (ass.check == true) {
+ for (integer i = 0; i < ProductCount_Res.size(); i++) {
+ if (ProductCount_Res[i].Consumable_Product__c == ass.Prod.Id && ass.boxPiece == ProductCount_Res[i].Box_Piece__c) {
+ if (barCodeListPandianMap.containsKey(ProductCount_Res[i].Bar_Code_search__c)) {
+ continue;
+ }
+ if (ProductCount_Res[i].Isoverdue__c == 0) {
+ consumableorderdetailsRecordserrordummy.add(
+ new ConsumableorderdetailsInfo(ProductCount_Res[i], '璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��')
+ );
+ pandiandetailsMap.put(ProductCount_Res[i].Id, '璇ヤ骇鍝佸凡缁忚繃鏈夋晥鏈燂紝璇烽攢瀛樸��');
+ if (
+ pandianoverdueCountMap.containsKey(
+ ProductCount_Res[i].Consumable_product__c + ProductCount_Res[i].Box_Piece__c
+ ) == false
+ ) {
+ pandianoverdueCountMap.put(ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c, 1);
+ } else {
+ pandianoverdueCountMap.put(
+ ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c,
+ pandianoverdueCountMap.get(
+ ProductCount_Res[i].Consumable_Product__c + ProductCount_Res[i].Box_Piece__c
+ ) + 1
+ );
+ }
+ continue;
+ }
+
+ consumableorderdetailsRecordserrordummy.add(new ConsumableorderdetailsInfo(ProductCount_Res[i], '涓㈠け'));
+ pandiandetailsMap.put(ProductCount_Res[i].Id, '涓㈠け');
+ }
+ }
+ // 鍚屾椂瀛樺湪鍏朵粬缁忛攢鍟嗗簱瀛樹骇鍝�
+ for (Consumable_order_details2__c cod2 : reSet1) {
+ if (cod2.Consumable_Product__c == ass.Prod.Id && ass.boxPiece == cod2.Box_Piece__c) {
+ if (
+ barCodeListPandianMap.containsKey(cod2.Bar_Code_search__c) &&
+ otherAgProMap.containsKey(cod2.Bar_Code__c) &&
+ otherAgProMap.get(cod2.Bar_Code__c).Dealer_Saled__c == false &&
+ otherAgProMap.get(cod2.Bar_Code__c).Dealer_Shipment__c == false
+ ) {
+ consumableorderdetailsRecordserrordummy.add(
+ new ConsumableorderdetailsInfo(
+ cod2,
+ '璇ヤ骇鍝佸綊灞炰簬' + otherAgProMap.get(cod2.Bar_Code__c).Dealer_Info_text__c + '鐨勫簱瀛樸��'
+ )
+ );
+ pandiandetailsMap.put(
+ cod2.Id,
+ '璇ヤ骇鍝佸綊灞炰簬' + otherAgProMap.get(cod2.Bar_Code__c).Dealer_Info_text__c + '鐨勫簱瀛樸��'
+ );
+ continue;
+ }
+ }
+ }
+ // 闇�瑕佽繑鍝佺殑浜у搧
+ for (Consumable_order_details2__c cod2 : reSet2) {
+ if (cod2.Consumable_Product__c == ass.Prod.Id && ass.boxPiece == cod2.Box_Piece__c) {
+ if (needreturnMap.containsKey(cod2.Bar_Code__c)) {
+ consumableorderdetailsRecordserrordummy.add(
+ new ConsumableorderdetailsInfo(cod2, '璇ヤ骇鍝佺洰鍓嶅嚭搴撶姸鎬侊紝璇疯繑鍝併��')
+ );
+ pandiandetailsMap.put(cod2.Id, '璇ヤ骇鍝佺洰鍓嶅嚭搴撶姸鎬侊紝璇疯繑鍝併��');
+ continue;
+ }
+ }
+ }
+ }
+ }
+
+ //鏇存柊涓绘槑缁嗗崟
+ if (barCodeListPandianMap.size() > 0) {
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ if (ass.check == true) {
+ integer countSum = 0;
+ if (pandianProdIdCountMap.containsKey(ass.Prod.Id + ass.boxPiece)) {
+ countSum = pandianProdIdCountMap.get(ass.Prod.Id + ass.boxPiece);
+ }
+ integer overdueSum = 0;
+ if (pandianoverdueCountMap.containsKey(ass.Prod.Id + ass.boxPiece)) {
+ overdueSum = pandianoverdueCountMap.get(ass.Prod.Id + ass.boxPiece);
+ }
+ ass.Pandian = countSum;
+ ass.Diff = ass.countid - countSum - overdueSum;
+ ass.refind = 0;
+ }
+ }
+ } else {
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ if (ass.check == true) {
+ integer overdueSum = 0;
+ if (pandianoverdueCountMap.containsKey(ass.Prod.Id + ass.boxPiece)) {
+ overdueSum = pandianoverdueCountMap.get(ass.Prod.Id + ass.boxPiece);
+ }
+ ass.Diff = ass.countid - ass.Pandian - overdueSum;
+ }
+ }
+ }
+
+ //瀵诲洖鍋氭垚
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
+ for (ConsumableorderdetailsInfo adjust : consumableorderdetailsRecordsAdjust) {
+ if (ass.Prod.Name__c == adjust.Prod.Name__c && ass.boxPiece == adjust.orderdetails2.Box_Piece__c) {
+ if (reFindProduct.containsKey(adjust.orderdetails2.Bar_Code_search__c)) {
+ continue;
+ } else {
+ ass.Pandian++;
+ ass.refind++;
+ reFindProduct.put(adjust.orderdetails2.Bar_Code_search__c, adjust.orderdetails2.Bar_Code_search__c);
+ }
+ }
+ }
+ }
+ if (pandiandetailsMap.keySet().size() > 0) {
+ List<Consumable_order_details2__c> showcod2 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Bar_Code_search__c
+ FROM Consumable_order_details2__c
+ WHERE Id IN :pandiandetailsMap.keySet()
+ ORDER BY Name
+ ];
+ initStandardController();
+ showcod2nid = cod2s();
+ }
+ for (Consumable_order_details2__c cod2 : showcod2nid) {
+ codPageRecords.add(new ConsumableorderdetailsInfo(cod2, pandiandetailsMap.get(cod2.Id)));
+ }
+ if (codPageRecords.size() > 0)
+ done = true;
+ iSinventory = true;
+ consumableorderdetailsRecordserrordummy.clear();
+ pandiandetailsList = [
+ SELECT Id, Bar_Code__c, Consumable_Product__r.Name__c, Box_Piece__c, Lose_reason__c
+ FROM Consumable_order_details2__c
+ WHERE Id IN :pandiandetailsMap.keySet()
+ ORDER BY Name
+ ];
+ for (Consumable_order_details2__c codDet : pandiandetailsList) {
+ codDet.Lose_reason__c = pandiandetailsMap.get(codDet.Id);
+ }
+ List<Consumable_order_details2__c> pandiandetailsListMid = new List<Consumable_order_details2__c>();
+ for (Consumable_order_details2__c cod2 : pandiandetailsList) {
+ pandiandetailsListMid.add(cod2);
+ if (pandiandetailsListMid.size() == 1000) {
+ pandiandetailsListShow.add(pandiandetailsListMid);
+ pandiandetailsListMid = new List<Consumable_order_details2__c>();
+ }
+ }
+ if (pandiandetailsListMid.size() > 0) {
+ pandiandetailsListShow.add(pandiandetailsListMid);
+ }
+ //鍒嗛〉
+ PaginatedAccounts paginatedAccounts = new PaginatedAccounts();
+ totalCount = codPageRecords.size();
+ paginatedAccounts.nextPageToken = (pageToken + pageSize < totalCount) ? pageToken + pageSize : null;
+ paginatedAccounts.recordStart = pageToken + 1;
+ paginatedAccounts.pageNumber = pageToken / pageSize + 1;
+ Integer recordEnd = pageSize * paginatedAccounts.pageNumber;
+ paginatedAccounts.recordEnd = totalCount >= recordEnd ? recordEnd : totalCount;
+ paginatedAccounts.totalRecords = totalCount;
+
+ Integer startIdx;
+ Integer endIdx;
+ List<ConsumableorderdetailsInfo> pageCodeRecords = new List<ConsumableorderdetailsInfo>();
+ startIdx = pageToken;
+ endIdx = startIdx + pageSize;
+ if (endIdx > codPageRecords.size()) {
+ endIdx = codPageRecords.size();
+ }
+ for (Integer i = startIdx; i < endIdx; i++) {
+ pageCodeRecords.add(codPageRecords.get(i));
+ }
+
+ data.put('paginatedAccounts', paginatedAccounts);
+ data.put('pageCodeRecords', pageCodeRecords);
+
+ //end
+
+ System.debug('=====>codPageRecords2' + codPageRecords);
+ System.debug('=====>consumableorderdetailsRecords' + consumableorderdetailsRecords);
+ data.put('codPageRecords', JSON.serialize(codPageRecords));
+ data.put('consumableorderdetailsRecords', JSON.serialize(consumableorderdetailsRecords));
+ System.debug('iSinventory===>' + iSinventory);
+ data.put('iSinventory', JSON.serialize(iSinventory));
+ System.debug('pandiandetailsMap===>' + pandiandetailsMap);
+ data.put('pandiandetailsMap', pandiandetailsMap);
+ data.put('reSet', reSet);
+ data.put('consumableorderdetailsRecordsview', JSON.serialize(consumableorderdetailsRecordsview));
+ System.debug('=====>consumableorderdetailsRecordsview' + consumableorderdetailsRecordsview);
+ res.code = 200;
+ res.status = 'Sucess';
+ return res;
}
-
+
// 淇濆瓨鎸夐挳
@AuraEnabled
- public static ResponseBodyLWC save(Boolean iSinventory,String consumableorderdetailsRecordsLWC,String accountid,String agencyProType,Map<Id,String> pandiandetailsMap,List<Consumable_order_details2__c> reSet) {
- List<ConsumableorderdetailsInfo> consumableorderdetailsRecords = (List<ConsumableorderdetailsInfo>)JSON.deserialize(consumableorderdetailsRecordsLWC,List<ConsumableorderdetailsInfo>.class);
+ public static ResponseBodyLWC save(
+ Boolean iSinventory,
+ String consumableorderdetailsRecordsLWC,
+ String accountid,
+ String agencyProType,
+ Map<Id, String> pandiandetailsMap,
+ List<Consumable_order_details2__c> reSet
+ ) {
+ List<ConsumableorderdetailsInfo> consumableorderdetailsRecords = (List<ConsumableorderdetailsInfo>) JSON.deserialize(
+ consumableorderdetailsRecordsLWC,
+ List<ConsumableorderdetailsInfo>.class
+ );
agencyProType = agencyProType;
- accountid =accountid;
+ accountid = accountid;
pandiandetailsMap = pandiandetailsMap;
- reSet =reSet;
- System.debug('pandiandetailsMap===>'+pandiandetailsMap);
+ reSet = reSet;
+ System.debug('pandiandetailsMap===>' + pandiandetailsMap);
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
res.entity = data;
// 璺宠繃鏄庣粏2涓嶅繀瑕佹洿鏂�
StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
- if(!iSinventory){
- return new ResponseBodyLWC('Error',500, '璇峰厛褰曞叆BarCode', '');
+ if (!iSinventory) {
+ return new ResponseBodyLWC('Error', 500, '璇峰厛褰曞叆BarCode', '');
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'璇峰厛鐐广�怋arCode褰曞叆銆�'));
// return null;
}
integer Lo = 0;
- for(ConsumableorderdetailsInfo header : consumableorderdetailsRecords){
- if(header.check==true){
+ for (ConsumableorderdetailsInfo header : consumableorderdetailsRecords) {
+ if (header.check == true) {
Lo++;
}
}
- if(Lo == 0){
+ if (Lo == 0) {
iSinventory = false;
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'璇烽�夋嫨瑕佺洏鐐圭殑鏄庣粏'));
// return null;
- return new ResponseBodyLWC('Error',500, '璇烽�夋嫨瑕佺洏鐐圭殑鏄庣粏', '');
+ return new ResponseBodyLWC('Error', 500, '璇烽�夋嫨瑕佺洏鐐圭殑鏄庣粏', '');
}
- for(ConsumableorderdetailsInfo header : consumableorderdetailsRecords){
- if(header.check==true){
+ for (ConsumableorderdetailsInfo header : consumableorderdetailsRecords) {
+ if (header.check == true) {
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, header.prod.Name__c + ' '+header.prod.Name__c));
//return null;
- if((header.DiffReason == ''||header.DiffReason ==null)&&header.Diff>0){
- return new ResponseBodyLWC('Error',500, header.prod.Name__c + '璇疯緭鍏ュ樊寮傚師鍥�', '');
+ if ((header.DiffReason == '' || header.DiffReason == null) && header.Diff > 0) {
+ return new ResponseBodyLWC('Error', 500, header.prod.Name__c + '璇疯緭鍏ュ樊寮傚師鍥�', '');
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, header.prod.Name__c + '璇疯緭鍏ュ樊寮傚師鍥�'));
// return null;
- }else if ((header.DiffReason != ''&&header.DiffReason !=null)&&header.Diff==0){
+ } else if ((header.DiffReason != '' && header.DiffReason != null) && header.Diff == 0) {
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '鏃犱涪澶变骇鍝侊紝涓嶉渶瑕佸~鍐欏樊寮傚師鍥�'));
// return null;
- return new ResponseBodyLWC('Error',500, header.prod.Name__c + '鏃犱涪澶变骇鍝侊紝涓嶉渶瑕佸~鍐欏樊寮傚師鍥�', '');
+ return new ResponseBodyLWC('Error', 500, header.prod.Name__c + '鏃犱涪澶变骇鍝侊紝涓嶉渶瑕佸~鍐欏樊寮傚師鍥�', '');
}
}
}
Integer orderDetNo = 1;
Savepoint sp = Database.setSavepoint();
Consumable_order__c Po = new Consumable_order__c();
- Po.Name ='*';
+ Po.Name = '*';
Po.Order_status__c = '鎵瑰噯';
Po.Inventory_date__c = Date.today();
Po.Order_type__c = '鐩樼偣';
Po.Dealer_Info__c = accountid;
Po.Order_ProType__c = agencyProType;
Po.RecordTypeid = System.Label.RT_ConOrder_Inventory;
- try{
- insert Po;
+ try {
+ insert Po;
eSetId = Po.id;
- List<Consumable_order__c> Consumable_order = [SELECT Name FROM Consumable_order__c WHERE id =:Po.id];
- List<Consumable_orderdetails__c> InsList = New List<Consumable_orderdetails__c>();
- List<Consumable_order_details2__c> InsListUp = New List<Consumable_order_details2__c>();
- List<Consumable_order_details2__c> updListAdjust = New List<Consumable_order_details2__c>();
- Map<String,String> ErrorName = new Map<String,String>();
- Map<String,Boolean> CheckTF = new Map<String,Boolean>();
- for(ConsumableorderdetailsInfo header : consumableorderdetailsRecords){
- if(header.check==true){
+ List<Consumable_order__c> Consumable_order = [
+ SELECT Name
+ FROM Consumable_order__c
+ WHERE id = :Po.id
+ ];
+ List<Consumable_orderdetails__c> InsList = new List<Consumable_orderdetails__c>();
+ List<Consumable_order_details2__c> InsListUp = new List<Consumable_order_details2__c>();
+ List<Consumable_order_details2__c> updListAdjust = new List<Consumable_order_details2__c>();
+ Map<String, String> ErrorName = new Map<String, String>();
+ Map<String, Boolean> CheckTF = new Map<String, Boolean>();
+ for (ConsumableorderdetailsInfo header : consumableorderdetailsRecords) {
+ if (header.check == true) {
Consumable_orderdetails__c insPan = new Consumable_orderdetails__c();
insPan = new Consumable_orderdetails__c();
String str = string.valueOf(orderDetNo);
- if(str.length() == 1){
- str = '0' + str;
+ if (str.length() == 1) {
+ str = '0' + str;
}
- insPan.Name = Consumable_order[0].Name + '-'+ str;
+ insPan.Name = Consumable_order[0].Name + '-' + str;
insPan.Consumable_Product__c = header.ProdId;
- ErrorName.put(insPan.Consumable_Product__c,header.DiffReason);
- CheckTF.put(insPan.Consumable_product__c,true);
+ ErrorName.put(insPan.Consumable_Product__c, header.DiffReason);
+ CheckTF.put(insPan.Consumable_product__c, true);
insPan.Consumable_order__c = Po.Id;
insPan.Lose_reason__c = header.DiffReason;
insPan.Diff__c = header.Diff;
@@ -1122,60 +1317,67 @@
insPan.inventory_sum__c = header.Pandian;
insPan.Count_Sum__c = header.countid;
insPan.RecordTypeId = System.Label.RT_ConOrderDetail1_Inventory;
- orderDetNo ++;
+ orderDetNo++;
InsList.add(insPan);
}
}
- if(InsList.size()>0){
+ if (InsList.size() > 0) {
insert InsList;
}
- List<Consumable_order_details2__c> showcod2 = [select Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,
- Bar_Code_search__c
- FROM Consumable_order_details2__c
- WHERE Id in :pandiandetailsMap.keySet()
- order by Name];
- for(Consumable_order_details2__c cod : showcod2){
+ List<Consumable_order_details2__c> showcod2 = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Bar_Code_search__c
+ FROM Consumable_order_details2__c
+ WHERE Id IN :pandiandetailsMap.keySet()
+ ORDER BY Name
+ ];
+ for (Consumable_order_details2__c cod : showcod2) {
Consumable_order_details2__c InsDetail = new Consumable_order_details2__c();
- InsDetail.Id =cod.Id;
+ InsDetail.Id = cod.Id;
InsDetail.Consumable_Inventory_order__c = po.Id;
InsDetail.Inventory_date__c = Date.today();
// 20210224 gzw CHAN-BXF3PG start
// if(pandiandetailsMap.get(cod.Id) == '涓㈠け' ){
- if(pandiandetailsMap.get(cod.Id) == '涓㈠け' && CheckTF.containsKey(cod.Consumable_product__c)){
- // 20210224 gzw CHAN-BXF3PG end
+ if (pandiandetailsMap.get(cod.Id) == '涓㈠け' && CheckTF.containsKey(cod.Consumable_product__c)) {
+ // 20210224 gzw CHAN-BXF3PG end
InsDetail.Lose_reason__c = ErrorName.get(cod.Consumable_product__c);
InsDetail.Lose_Flag__c = true;
- }else if(pandiandetailsMap.get(cod.Id) == '瀵诲洖' ){
+ } else if (pandiandetailsMap.get(cod.Id) == '瀵诲洖') {
InsDetail.Lose_reason__c = '';
InsDetail.Lose_Flag__c = false;
- }else{
+ } else {
continue;
}
InsListUp.add(InsDetail);
}
- for(Consumable_order_details2__c rs : reSet){
+ for (Consumable_order_details2__c rs : reSet) {
rs.Inventory_date__c = Date.today();
}
- if(reSet.size() > 0){
+ if (reSet.size() > 0) {
update reSet;
}
- if(InsListUp.size()>0){
- ControllerUtil.updateOrderDetailsSatus(InsListUp);// Commented By DTT - Li Jun for testing 20230407
+ if (InsListUp.size() > 0) {
+ ControllerUtil.updateOrderDetailsSatus(InsListUp); // Commented By DTT - Li Jun for testing 20230407
}
-
- }catch (Exception e) {
+ } catch (Exception e) {
Database.rollback(sp);
// ApexPages.addMessages(ex);
- return new ResponseBodyLWC('Error',500, e.getMessage()+e.getLineNumber(), '');
+ return new ResponseBodyLWC('Error', 500, e.getMessage() + e.getLineNumber(), '');
// return null;
}
// FIXME impliment BarCodeListAdjust
/************************************************************************************************/
// return ProS();
- data.put('eSetId',eSetId);
- data.put('InsListUp',InsListUp);
+ data.put('eSetId', eSetId);
+ data.put('InsListUp', InsListUp);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
@@ -1187,15 +1389,15 @@
// 杩斿洖鐩樼偣涓�瑙�
PageReference ref = new Pagereference('/apex/InventoryList?eSetId=' + eSetId);
ref.setRedirect(true);
- return ref;
+ return ref;
}
//CSV鍑哄姏
public PageReference doClick() {
Pagereference pr = page.InventoryCSV;
return pr;
}
- //鍒嗛〉Bean
- public class PaginatedAccounts {
+ //鍒嗛〉Bean
+ public class PaginatedAccounts {
@AuraEnabled
public Integer nextPageToken;
@AuraEnabled
@@ -1209,6 +1411,7 @@
}
// Data Bean
+ @TestVisible
class ConsumableorderdetailsInfo implements Comparable {
@AuraEnabled
public Boolean check { get; set; }
@@ -1221,7 +1424,7 @@
@AuraEnabled
public Decimal countid { get; set; }
@AuraEnabled
- public String ProdId{get;set;}
+ public String ProdId { get; set; }
@AuraEnabled
public Decimal Pandian { get; set; }
@AuraEnabled
@@ -1240,14 +1443,13 @@
public Decimal overlimitCount { get; set; }
@AuraEnabled
public String boxPiece { get; set; }
- public ConsumableorderdetailsInfo(Consumable_order_details2__c e,string str) {
-
+ public ConsumableorderdetailsInfo(Consumable_order_details2__c e, string str) {
orderdetails2 = e;
Prod = e.Consumable_Product__r;
//e.Lose_reason__c = str;
DiffReason = str;
}
-
+
// 宸插瓨鍦ㄦ秷鑰楀搧鏄庣粏鐢�
public ConsumableorderdetailsInfo(Consumable_order_details2__c e) {
check = false;
@@ -1259,9 +1461,9 @@
check = false;
//orderdetails1 = new Consumable_orderdetails__c();
Prod = e;
- canSelect = true;
+ canSelect = true;
ProdId = string.valueOf(e.id);
- countid =0;
+ countid = 0;
Pandian = 0;
refind = 0;
Diff = 0;
@@ -1270,14 +1472,14 @@
}
// 鎺掑簭
public Integer compareTo(Object compareTo) {
- ConsumableorderdetailsInfo compareToesd =(ConsumableorderdetailsInfo)compareTo;
+ ConsumableorderdetailsInfo compareToesd = (ConsumableorderdetailsInfo) compareTo;
Integer returnValue = 0;
- if (countid > compareToesd.countid ) {
+ if (countid > compareToesd.countid) {
returnValue = -1;
- } else if (countid < compareToesd.countid ) {
+ } else if (countid < compareToesd.countid) {
returnValue = 1;
}
return returnValue;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexInventoryControllerTest.cls b/force-app/main/default/classes/LexInventoryControllerTest.cls
new file mode 100644
index 0000000..140695d
--- /dev/null
+++ b/force-app/main/default/classes/LexInventoryControllerTest.cls
@@ -0,0 +1,1087 @@
+@isTest
+public class LexInventoryControllerTest {
+ static testMethod void InventoryControllerTest_PartBar() {
+ user myUser_test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeOrderDetail2Trigger = true;
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888'
+ );
+ insert myAccount1;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '涓婃捣'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod08 = new Product2(
+ Name = 'Test08',
+ ProductCode = 'Test08',
+ Asset_Model_No__c = 'Test08',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod09 = new Product2(
+ Name = 'Test09',
+ ProductCode = 'Test09',
+ Asset_Model_No__c = 'Test09',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+
+ insert new List<Product2>{ prod07, prod08, prod09 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod07.Id);
+ insert proG;
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod08.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod09.Id);
+ insert proF;
+
+ //棰勫埗澶存槑缁�
+ Consumable_order__c CreateId = new Consumable_order__c();
+ CreateId.Name = 'testMing';
+ CreateId.Order_status__c = '鑽夋涓�';
+ CreateId.RecordTypeid = System.Label.RT_ConOrder_Order;
+ CreateId.Dealer_Info__c = myAccount1.id;
+ CreateId.Inventory_date__c = Date.today();
+ CreateId.Order_type__c = '鐩樼偣';
+ CreateId.Order_ProType__c = 'ET';
+ insert CreateId;
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+
+ //鍒朵綔Consumable_order_details__c-------ProductCount
+ Consumable_order_details2__c dataForProductCount9 = new Consumable_order_details2__c();
+ dataForProductCount9.Bar_Code__c = '1234567890';
+ dataForProductCount9.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount9.Arrive_date__c = Date.today();
+ dataForProductCount9.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount9.Consumable_Product__c = proG.id;
+ dataForProductCount9.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount9.Box_Piece__c = '鐩�';
+ dataForProductCount9.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount9.Send_Date__c = null;
+ dataForProductCount9.Used_date__c = null;
+ dataForProductCount9.Lose_Flag__c = false;
+ conList.add(dataForProductCount9);
+
+ Consumable_order_details2__c dataForProductCount7 = new Consumable_order_details2__c();
+ dataForProductCount7.Bar_Code__c = '1234567892';
+ dataForProductCount7.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount7.Arrive_date__c = Date.today();
+ dataForProductCount7.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount7.Consumable_Product__c = proH.id;
+ dataForProductCount7.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount7.Box_Piece__c = '鐩�';
+ dataForProductCount7.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount7.Send_Date__c = null;
+ dataForProductCount7.Used_date__c = null;
+ dataForProductCount7.Lose_Flag__c = false;
+ conList.add(dataForProductCount7);
+
+ Consumable_order_details2__c dataForProductCount = new Consumable_order_details2__c();
+ dataForProductCount.Bar_Code__c = '1234567882';
+ dataForProductCount.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount.Arrive_date__c = Date.today();
+ dataForProductCount.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount.Consumable_Product__c = proG.id;
+ dataForProductCount.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount.Box_Piece__c = '鐩�';
+ dataForProductCount.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount.Send_Date__c = null;
+ dataForProductCount.Used_date__c = null;
+ dataForProductCount.Lose_Flag__c = true;
+ conList.add(dataForProductCount);
+
+ Consumable_order_details2__c dataForProductCount4 = new Consumable_order_details2__c();
+ dataForProductCount4.Bar_Code__c = '1234567884';
+ dataForProductCount4.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount4.Arrive_date__c = Date.today();
+ dataForProductCount4.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount4.Consumable_Product__c = proF.id;
+ dataForProductCount4.Asset_Model_No__c = proF.Asset_Model_No__c;
+ dataForProductCount4.Box_Piece__c = '涓�';
+ dataForProductCount4.Consumable_order_minor__c = CreateId.id;
+ //dataForProductCount4.Lose_Flag__c = true;
+ dataForProductCount4.RemoveBox_No__c = 1;
+
+ conList.add(dataForProductCount4);
+
+ Consumable_order_details2__c dataForProductCount5 = new Consumable_order_details2__c();
+ dataForProductCount5.Bar_Code__c = '1234567885';
+ dataForProductCount5.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount5.Arrive_date__c = Date.today();
+ dataForProductCount5.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount5.Consumable_Product__c = proH.id;
+ dataForProductCount5.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount5.Box_Piece__c = '涓�';
+ dataForProductCount5.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount5.Lose_Flag__c = true;
+ dataForProductCount5.RemoveBox_No__c = 1;
+ conList.add(dataForProductCount5);
+ insert conList;
+
+ List<Consumable_order_details2__c> productCount_Res = [
+ SELECT Id, Name
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Bar_Code__c != NULL
+ AND Dealer_Info_text__c = :myAccount1.Name
+ ];
+ //鏌ヨ搴撳瓨 杩藉姞杩斿搧搴撳瓨
+
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ Consumable_order_details2__c con = new Consumable_order_details2__c();
+ con.Arrive_date__c = Date.today();
+ con.Send_Date__c = null;
+ con.Used_date__c = null;
+ con.Return_date__c = null;
+ con.Lose_Flag__c = false;
+ con.Cancellation_Flag__c = false;
+ con.Consumable_Product__c = proG.Id;
+ con.Asset_Model_No__c = 'Mj-1001';
+ con.Sterilization_limit__c = Date.today().addDays(2);
+ con.Box_Piece__c = '鐩�';
+ con.Consumable_order_minor__c = CreateId.id;
+ con.Bar_Code__c = '1234567885';
+ conList1.add(con);
+
+ Consumable_order_details2__c con1 = new Consumable_order_details2__c();
+ con1.Arrive_date__c = Date.today();
+ con1.Send_Date__c = null;
+ con1.Used_date__c = null;
+ con1.Return_date__c = null;
+ con1.Lose_Flag__c = false;
+ con1.Cancellation_Flag__c = false;
+ con1.Consumable_Product__c = proG.Id;
+ con1.Asset_Model_No__c = 'Mj-1001';
+ con1.Sterilization_limit__c = Date.today().addDays(2);
+ con1.Box_Piece__c = '涓�';
+ con1.Consumable_order_minor__c = CreateId.id;
+ con1.Bar_Code__c = '12345678856';
+ conList1.add(con1);
+ insert conList1;
+
+ LexInventoryController OwnTest = new LexInventoryController();
+ LexInventoryController.init();
+ LexInventoryController controller = new LexInventoryController();
+ List<LexInventoryController.ConsumableorderdetailsInfo> testList = LexInventoryController.consumableorderdetailsRecords;
+ List<LexInventoryController.ConsumableorderdetailsInfo> testList1 = new List<LexInventoryController.ConsumableorderdetailsInfo>();
+ System.debug('testCount:' + testList.size());
+ for (LexInventoryController.ConsumableorderdetailsInfo ass : testList) {
+ System.debug(ass.check);
+ ass.check = true;
+ testList1.add(ass);
+ }
+ System.debug('testList1:' + testList1);
+ LexInventoryController.searchConsumableorderdetails(
+ 'ET',
+ '涓婃捣',
+ 'Testaccount001',
+ '12345678856\n1234567895\n1234567890\n12345678511\n1234567856\n1234567855\n1234567886\n12345678551\n1234567890\n1234567883\n1234567882\n1234567881\n1234567884\nn123456788412\n1234567885\n123456788512\n1234567891\n1234567892\n1234567893\n1234567894',
+ JSON.serialize(testList1),
+ 1,
+ 0,
+ 'Test',
+ 'ASC'
+ );
+ LexInventoryController.searchConsumableorderdetails(
+ 'ET',
+ '涓婃捣',
+ 'Testaccount001',
+ '1234567882',
+ JSON.serialize(testList1),
+ 1,
+ 0,
+ 'Test',
+ 'ASC'
+ );
+ LexInventoryController.barcode = '';
+ }
+ }
+ static testMethod void InventoryControllerTest_PartPan() {
+ user MyUser_Test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true
+ );
+ Product2 prod08 = new Product2(
+ Name = 'Test08',
+ ProductCode = 'Test08',
+ Asset_Model_No__c = 'Test08',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true
+ );
+ Product2 prod09 = new Product2(
+ Name = 'Test09',
+ ProductCode = 'Test09',
+ Asset_Model_No__c = 'Test09',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true
+ );
+ insert new List<Product2>{ prod07, prod08, prod09 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'Too001', OT_CODE_Text__c = 'Test001', Product2__c = prod07.Id);
+ insert proG;
+ Product2__c proH = new Product2__c(Name = 'Too002', OT_CODE_Text__c = 'Test002', Product2__c = prod08.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'Too003', OT_CODE_Text__c = 'Test001', Product2__c = prod09.Id);
+ insert proF;
+
+ myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 10, RecordTypeId = rectCo[0].Id);
+
+ insert myAccount1;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ InventoryController OwnTest = new InventoryController();
+ OwnTest.size = 2;
+ OwnTest.init();
+ OwnTest.setCon.next();
+ OwnTest.refreshPageSize();
+ OwnTest.ConsumableorderdetailsRecordsview.sort();
+ system.assertEquals(0, OwnTest.consumableorderdetailsCount);
+ OwnTest.save();
+ }
+ }
+ static testMethod void InventoryControllerTest_ge() {
+ user MyUser_Test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod08 = new Product2(
+ Name = 'Test08',
+ ProductCode = 'Test08',
+ Asset_Model_No__c = 'Test08',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod09 = new Product2(
+ Name = 'Test09',
+ ProductCode = 'Test09',
+ Asset_Model_No__c = 'Test09',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07, prod08, prod09 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod07.Id);
+ insert proG;
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod08.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod09.Id);
+ insert proF;
+
+ //棰勫埗澶存槑缁�
+ Consumable_order__c CreateId = new Consumable_order__c();
+ CreateId.Name = 'testMing';
+ CreateId.Order_status__c = '鑽夋涓�';
+ CreateId.RecordTypeid = System.Label.RT_ConOrder_Order;
+ CreateId.Dealer_Info__c = myAccount1.id;
+ CreateId.Inventory_date__c = Date.today();
+ CreateId.Order_type__c = '鐩樼偣';
+ CreateId.Order_ProType__c = 'ET';
+ insert CreateId;
+ List<Consumable_order_details2__c> orderList = new List<Consumable_order_details2__c>();
+
+ //鍒朵綔Consumable_order_details__c-------ProductCount
+ Consumable_order_details2__c dataForProductCount9 = new Consumable_order_details2__c();
+ dataForProductCount9.Bar_Code__c = '1234567890';
+ dataForProductCount9.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount9.Arrive_date__c = Date.today();
+ dataForProductCount9.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount9.Consumable_Product__c = proG.id;
+ dataForProductCount9.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount9.Box_Piece__c = '涓�';
+ dataForProductCount9.RemoveBox_No__c = 1;
+ orderList.add(dataForProductCount9);
+
+ Consumable_order_details2__c dataForProductCount8 = new Consumable_order_details2__c();
+ dataForProductCount8.Bar_Code__c = '1234567891';
+ dataForProductCount8.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount8.Arrive_date__c = Date.today();
+ dataForProductCount8.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount8.Consumable_Product__c = proG.id;
+ dataForProductCount8.Asset_Model_No__c = proG.Asset_Model_No__c;
+ orderList.add(dataForProductCount8);
+
+ Consumable_order_details2__c dataForProductCount7 = new Consumable_order_details2__c();
+ dataForProductCount7.Bar_Code__c = '1234567892';
+ dataForProductCount7.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount7.Arrive_date__c = Date.today();
+ dataForProductCount7.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount7.Consumable_Product__c = proH.id;
+ dataForProductCount7.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount7.Box_Piece__c = '涓�';
+ dataForProductCount7.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount7.Send_Date__c = null;
+ dataForProductCount7.Used_date__c = null;
+ dataForProductCount7.Lose_Flag__c = false;
+ dataForProductCount7.RemoveBox_No__c = 1;
+ orderList.add(dataForProductCount7);
+
+ Consumable_order_details2__c dataForProduct = new Consumable_order_details2__c();
+ dataForProduct.Bar_Code__c = '1234567894';
+ dataForProduct.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProduct.Arrive_date__c = Date.today();
+ dataForProduct.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProduct.Consumable_Product__c = proF.id;
+ dataForProduct.Asset_Model_No__c = proF.Asset_Model_No__c;
+ dataForProduct.Box_Piece__c = '涓�';
+ dataForProduct.Consumable_order_minor__c = CreateId.id;
+ dataForProduct.Send_Date__c = null;
+ dataForProduct.Used_date__c = null;
+ dataForProduct.Lose_Flag__c = false;
+ dataForProduct.RemoveBox_No__c = 1;
+ orderList.add(dataForProduct);
+
+ Consumable_order_details2__c dataForProductCount3 = new Consumable_order_details2__c();
+ dataForProductCount3.Bar_Code__c = '1234567883';
+ dataForProductCount3.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount3.Arrive_date__c = Date.today();
+ dataForProductCount3.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount3.Consumable_Product__c = proG.id;
+ dataForProductCount3.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount3.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount3.Lose_Flag__c = true;
+ //dataForProductCount3.RemoveBox_No__c = 1;
+ orderList.add(dataForProductCount3);
+
+ PageReference page = new Pagereference('/Inventory');
+ page.setRedirect(true);
+ System.Test.setCurrentPage(page);
+ System.Test.startTest();
+ LexInventoryController controller = new LexInventoryController();
+ LexInventoryController.init();
+ System.debug('===>鍊�1' + LexInventoryController.consumableorderdetailsRecords);
+ System.debug('===>鍊�2' + JSON.serialize(LexInventoryController.consumableorderdetailsRecords));
+ System.debug('===>2222222' + JSON.serialize(LexInventoryController.consumableorderdetailsRecords));
+ List<LexInventoryController.ConsumableorderdetailsInfo> testList = LexInventoryController.consumableorderdetailsRecords;
+ List<LexInventoryController.ConsumableorderdetailsInfo> testList1 = new List<LexInventoryController.ConsumableorderdetailsInfo>();
+ System.debug('testCount:' + testList.size());
+ for (LexInventoryController.ConsumableorderdetailsInfo ass : testList) {
+ System.debug(ass.check);
+ ass.check = true;
+ testList1.add(ass);
+ }
+ System.debug('testList1:' + testList1);
+
+ LexInventoryController.searchConsumableorderdetails(
+ 'ET',
+ '涓婃捣',
+ 'Testaccount001',
+ '12345678856\n1234567895\n1234567890\n12345678511\n1234567856\n1234567855\n1234567886\n12345678551\n1234567890\n1234567883\n1234567882\n1234567881\n1234567884\nn123456788412\n1234567885\n123456788512\n1234567891\n1234567892\n1234567893\n1234567894',
+ JSON.serialize(testList1),
+ 1,
+ 0,
+ 'Test',
+ 'ASC'
+ );
+ System.Test.stopTest();
+ }
+ }
+ static testMethod void InventoryControllerTest_xunhui() {
+ user MyUser_Test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeOrderDetail2Trigger = true;
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod08 = new Product2(
+ Name = 'Test08',
+ ProductCode = 'Test08',
+ Asset_Model_No__c = 'Test08',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod09 = new Product2(
+ Name = 'Test09',
+ ProductCode = 'Test09',
+ Asset_Model_No__c = 'Test09',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07, prod08, prod09 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod07.Id);
+ insert proG;
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod08.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod09.Id);
+ insert proF;
+
+ //棰勫埗澶存槑缁�
+ Consumable_order__c CreateId = new Consumable_order__c();
+ CreateId.Name = 'testMing';
+ CreateId.Order_status__c = '鑽夋涓�';
+ CreateId.RecordTypeid = System.Label.RT_ConOrder_Order;
+ CreateId.Dealer_Info__c = myAccount1.id;
+ CreateId.Inventory_date__c = Date.today();
+ CreateId.Order_type__c = '鐩樼偣';
+ CreateId.Order_ProType__c = 'ET';
+ insert CreateId;
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
+ //鍒拌揣
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '鍒拌揣';
+ Order1.Dealer_Info__c = myAccount1.Id;
+ Order1.RecordTypeid = '01210000000c9dqAAA';
+ Order1.Order_ProType__c = 'ENG';
+ orderList.add(Order1);
+ //鍙戣揣
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟 ';
+ Order2.Dealer_Info__c = myAccount1.Id;
+ Order2.RecordTypeid = '01210000000c9drAAA';
+ Order2.Order_ProType__c = 'ENG';
+ orderList.add(Order2);
+ insert orderList;
+
+ //鍒朵綔Consumable_order_details__c-------ProductCount
+ Consumable_order_details2__c dataForProductCount9 = new Consumable_order_details2__c();
+ dataForProductCount9.Bar_Code__c = '1234567890';
+ dataForProductCount9.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount9.Arrive_date__c = Date.today();
+ dataForProductCount9.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount9.Consumable_Product__c = proG.id;
+ dataForProductCount9.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount9.Box_Piece__c = '鐩�';
+ dataForProductCount9.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount9.Send_Date__c = null;
+ dataForProductCount9.Used_date__c = null;
+ dataForProductCount9.Lose_Flag__c = false;
+ dataForProductCount9.RemoveBox_No__c = 1;
+ insert dataForProductCount9;
+
+ Consumable_order_details2__c dataForProductCount8 = new Consumable_order_details2__c();
+ dataForProductCount8.Bar_Code__c = '1234567891';
+ dataForProductCount8.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount8.Arrive_date__c = Date.today();
+ dataForProductCount8.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount8.Consumable_Product__c = proG.id;
+ dataForProductCount8.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount8.Box_Piece__c = '鐩�';
+ dataForProductCount8.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount8.Send_Date__c = null;
+ dataForProductCount8.Used_date__c = null;
+ dataForProductCount8.Lose_Flag__c = false;
+ dataForProductCount8.RemoveBox_No__c = 1;
+ insert dataForProductCount8;
+
+ Consumable_order_details2__c dataForProductCount7 = new Consumable_order_details2__c();
+ dataForProductCount7.Bar_Code__c = '1234567892';
+ dataForProductCount7.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount7.Arrive_date__c = Date.today();
+ dataForProductCount7.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount7.Consumable_Product__c = proH.id;
+ dataForProductCount7.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount7.Box_Piece__c = '涓�';
+ dataForProductCount7.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount7.Send_Date__c = null;
+ dataForProductCount7.Used_date__c = null;
+ dataForProductCount7.Lose_Flag__c = false;
+ dataForProductCount7.RemoveBox_No__c = 1;
+ insert dataForProductCount7;
+
+ Consumable_order_details2__c dataForProductCount6 = new Consumable_order_details2__c();
+ dataForProductCount6.Bar_Code__c = '1234567893';
+ dataForProductCount6.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount6.Arrive_date__c = Date.today();
+ dataForProductCount6.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount6.Consumable_Product__c = proH.id;
+ dataForProductCount6.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount6.Box_Piece__c = '涓�';
+ dataForProductCount6.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount6.Send_Date__c = null;
+ dataForProductCount6.Used_date__c = null;
+ dataForProductCount6.Lose_Flag__c = false;
+ dataForProductCount6.RemoveBox_No__c = 1;
+ insert dataForProductCount6;
+
+ Consumable_order_details2__c dataForProductCount5 = new Consumable_order_details2__c();
+ dataForProductCount5.Bar_Code__c = '1234567894';
+ dataForProductCount5.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount5.Arrive_date__c = Date.today();
+ dataForProductCount5.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount5.Consumable_Product__c = proH.id;
+ dataForProductCount5.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount5.Box_Piece__c = '涓�';
+ dataForProductCount5.Consumable_order_minor__c = CreateId.id;
+ dataForProductCount5.Send_Date__c = null;
+ dataForProductCount5.Used_date__c = null;
+ dataForProductCount5.Lose_Flag__c = false;
+ dataForProductCount5.RemoveBox_No__c = 1;
+ insert dataForProductCount5;
+
+ List<Consumable_order_details2__c> conlist = new List<Consumable_order_details2__c>();
+ //Barcode妫�绱� 鎵�鏈夊湪搴�
+ Consumable_order_details2__c con1 = new Consumable_order_details2__c();
+ con1.Lose_Flag__c = false;
+ con1.Arrive_date__c = Date.today();
+ con1.Send_Date__c = null;
+ con1.Return_date__c = null;
+ con1.Lose_Flag__c = false;
+ con1.Cancellation_Date__c = null;
+ con1.Sterilization_limit__c = Date.today().addDays(2);
+ con1.Bar_Code__c = '123';
+ con1.Box_Piece__c = '鐩�';
+ con1.Bar_Code__c = '1234567894';
+ con1.Sterilization_limit__c = Date.today().addDays(2);
+ con1.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ con1.Consumable_Product__c = proH.id;
+ con1.Consumable_order_minor__c = CreateId.id;
+ conlist.add(con1);
+
+ //鏌ヨ搴撳瓨 杩藉姞杩斿搧搴撳瓨
+ Consumable_order_details2__c con3 = new Consumable_order_details2__c();
+ con3.Consumable_Product__c = proH.id;
+ con3.Bar_Code__c = '1001';
+ con3.Consumable_Arrived_order__c = Order1.id;
+ con3.Consumable_order_minor__c = Order2.id;
+ con3.Arrive_date__c = Date.today();
+ con3.Send_Date__c = null;
+ con3.Return_date__c = null;
+ con3.Lose_Flag__c = false;
+ con3.Cancellation_Flag__c = false;
+ con3.Consumable_order_minor__c = CreateId.id;
+ con3.Sterilization_limit__c = Date.today().addDays(2);
+ con3.Box_Piece__c = '涓�';
+ con3.RecordTypeid = '01210000000kUDKAA2';
+ conlist.add(con3);
+
+ //productAdjust
+ Consumable_order_details2__c con6 = new Consumable_order_details2__c();
+ con6.Consumable_Product__c = proH.id;
+ con6.Lose_reason__c = '杩囨湡搴撳瓨閿�瀛�';
+ con6.Box_Piece__c = '鐩�';
+ con6.Sterilization_limit__c = Date.today().addDays(-2);
+ con6.Bar_Code__c = '10011';
+ con6.Consumable_Arrived_order__c = Order1.id;
+ con6.Lose_Flag__c = true;
+ con6.RecordTypeid = '01210000000kUDKAA2';
+ conlist.add(con6);
+ System.debug('conlist===>' + conlist);
+
+ //reset592
+ Consumable_order_details2__c con4 = new Consumable_order_details2__c();
+ con4.Arrive_date__c = Date.today();
+ con4.Send_Date__c = null;
+ con4.Return_date__c = null;
+ con4.Lose_Flag__c = false;
+ con4.Cancellation_Date__c = null;
+ con4.Sterilization_limit__c = Date.today().addDays(2);
+ con4.Bar_Code__c = '123456';
+ con4.Box_Piece__c = '鐩�';
+ // con2.Bar_Code__c = '1234567894';
+ con4.Sterilization_limit__c = Date.today().addDays(2);
+ con4.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ con4.Consumable_Product__c = proH.id;
+ // con2.Asset_Model_No__c = proH.Asset_Model_No__c;
+ con4.Consumable_order_minor__c = CreateId.id;
+ conlist.add(con4);
+
+ //鏌ヨ搴撳瓨 杩藉姞杩斿搧搴撳瓨
+ Consumable_order_details2__c con5 = new Consumable_order_details2__c();
+ con5.Arrive_date__c = Date.today();
+ con5.Send_Date__c = null;
+ con5.Return_date__c = null;
+ con5.Lose_Flag__c = false;
+ con5.Cancellation_Flag__c = false;
+ con5.Consumable_Product__c = proH.id;
+ con5.Consumable_order_minor__c = Order2.id;
+ // con5.Sterilization_limit__c = Date.today().addDays(2);
+ con5.Box_Piece__c = '鐩�';
+ con5.Bar_Code__c = '1001';
+ conlist.add(con5);
+ insert conlist;
+
+ System.Test.startTest();
+ LexInventoryController inver = new LexInventoryController();
+ LexInventoryController.init();
+ List<LexInventoryController.ConsumableorderdetailsInfo> testList = LexInventoryController.consumableorderdetailsRecords;
+ List<LexInventoryController.ConsumableorderdetailsInfo> testList1 = new List<LexInventoryController.ConsumableorderdetailsInfo>();
+ System.debug('testCount:' + testList.size());
+ for (LexInventoryController.ConsumableorderdetailsInfo ass : testList) {
+ System.debug(ass.check);
+ ass.check = true;
+ testList1.add(ass);
+ }
+ System.debug('testList1:' + testList1);
+ LexInventoryController.searchConsumableorderdetails(
+ 'ET',
+ '涓婃捣',
+ 'Testaccount001',
+ '',
+ JSON.serialize(testList1),
+ 20,
+ 9,
+ 'Test',
+ 'ASC'
+ );
+ LexInventoryController.searchConsumableorderdetails(
+ 'ET',
+ '涓婃捣',
+ 'Testaccount001',
+ '01210000000kUDKAA2\n10011',
+ JSON.serialize(testList1),
+ 20,
+ 9,
+ 'Test',
+ 'ASC'
+ );
+ LexInventoryController.searchConsumableorderdetails(
+ 'ET',
+ '涓婃捣',
+ 'Testaccount001',
+ '12345678856\n1234567895\n1234567890\n12345678511\n1234567856\n1234567855\n1234567886\n12345678551\n1234567890\n1234567883\n1234567882\n1234567881\n1234567884\nn123456788412\n1234567885\n123456788512\n1234567891\n1234567892\n1234567893\n1234567894\n1001',
+ JSON.serialize(testList1),
+ 1,
+ 0,
+ 'Test',
+ 'ASC'
+ );
+ LexInventoryController.save(
+ true,
+ JSON.serialize(testList1),
+ myAccount1.Id,
+ 'ET',
+ LexInventoryController.pandiandetailsMap,
+ LexInventoryController.reSet
+ );
+ LexInventoryController.searchConsumableorderdetails(
+ 'ET',
+ '涓婃捣',
+ 'Testaccount001',
+ '',
+ '[{"sortBy": null,"refind": 0,"ProdId": "a0l0l000004EisKAAS","Prod": {"attributes": {"type": "Product2__c","url": "/services/data/v58.0/sobjects/Product2__c/a0l0l000004EisKAAS"},"Id": "a0l0l000004EisKAAS","Name": "MH-155:鐧藉钩琛″附","Name__c": "Test07","SFDA_Status__c": "鍋滄","Packing_list_manual__c": 1,"Asset_Model_No__c": "Test07"},"Pandian": 0,"overlimitCount": 0,"orderdetails2": null,"orderdetails1": null,"limitCount": 2,"DiffReason": null,"Diff": 0,"countid": 2,"check": true,"canSelect": true,"boxPiece": "鐩�"}]',
+ 20,
+ 9,
+ 'Test',
+ 'ASC'
+ );
+
+ System.Test.stopTest();
+ }
+ }
+
+ static testMethod void all() {
+ user MyUser_Test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeOrderDetail2Trigger = true;
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '涓婃捣'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod08 = new Product2(
+ Name = 'Test08',
+ ProductCode = 'Test08',
+ Asset_Model_No__c = 'Test08',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod09 = new Product2(
+ Name = 'Test09',
+ ProductCode = 'Test09',
+ Asset_Model_No__c = 'Test09',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07, prod08, prod09 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod07.Id);
+ insert proG;
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod08.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod09.Id);
+ insert proF;
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
+ //鍒拌揣
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '鍒拌揣';
+ Order1.Dealer_Info__c = myAccount1.Id;
+ Order1.RecordTypeid = '01210000000c9dqAAA';
+ Order1.Order_ProType__c = 'ET';
+ orderList.add(Order1);
+ //鍙戣揣
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟 ';
+ Order2.Dealer_Info__c = myAccount1.Id;
+ Order2.RecordTypeid = '01210000000c9drAAA';
+ Order2.Order_ProType__c = 'ET';
+ orderList.add(Order2);
+ insert orderList;
+ //鏌ヨ搴撳瓨 杩藉姞杩斿搧搴撳瓨
+ List<Consumable_order_details2__c> conlist = new List<Consumable_order_details2__c>();
+ Consumable_order_details2__c con3 = new Consumable_order_details2__c();
+ con3.Arrive_date__c = Date.today();
+ con3.Send_Date__c = null;
+ con3.Used_date__c = null;
+ con3.Return_date__c = null;
+ con3.Lose_Flag__c = false;
+ con3.Cancellation_Flag__c = false;
+ con3.Consumable_order_minor__c = Order1.id;
+ con3.Consumable_Arrived_order__c = Order1.id;
+ con3.Bar_Code__c = '1001';
+ con3.Consumable_Product__c = proH.id;
+ conlist.add(con3);
+ insert conlist;
+
+ //productAdjust
+ Consumable_order_details2__c con6 = new Consumable_order_details2__c();
+ // con6.Consumable_Product__c = proH.id;
+ con6.Lose_reason__c = '杩囨湡搴撳瓨閿�瀛�';
+ // con6.Box_Piece__c = '鐩�';
+ con6.Sterilization_limit__c = Date.today().addDays(-2);
+ con6.Bar_Code__c = '10011';
+ // con6.Consumable_Arrived_order__c = Order1.id;
+ con6.Lose_Flag__c = true;
+ // con6.RecordTypeid = '01210000000kUDKAA2';
+ conlist.add(con6);
+ System.debug('conlist===>' + conlist);
+ LexInventoryController.init();
+ List<LexInventoryController.ConsumableorderdetailsInfo> testList = LexInventoryController.consumableorderdetailsRecords;
+ List<LexInventoryController.ConsumableorderdetailsInfo> testList1 = new List<LexInventoryController.ConsumableorderdetailsInfo>();
+ System.debug('testCount:' + testList.size());
+ for (LexInventoryController.ConsumableorderdetailsInfo ass : testList) {
+ System.debug(ass.check);
+ ass.check = true;
+ testList1.add(ass);
+ }
+ System.debug('testList1:' + testList1);
+
+ LexInventoryController.searchConsumableorderdetails(
+ 'ET',
+ '涓婃捣',
+ 'Testaccount001',
+ '1001\n10011',
+ JSON.serialize(testList1),
+ 20,
+ 9,
+ 'Test',
+ 'ASC'
+ );
+ LexInventoryController.searchConsumableorderdetails(
+ 'ET',
+ '涓婃捣',
+ 'Testaccount001',
+ '',
+ JSON.serialize(testList1),
+ 20,
+ 9,
+ 'Test',
+ 'ASC'
+ );
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexInventoryControllerTest.cls-meta.xml b/force-app/main/default/classes/LexInventoryControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexInventoryControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexInventoryListController.cls b/force-app/main/default/classes/LexInventoryListController.cls
index a4e9395..c3328ec 100644
--- a/force-app/main/default/classes/LexInventoryListController.cls
+++ b/force-app/main/default/classes/LexInventoryListController.cls
@@ -1,7 +1,7 @@
public without sharing class LexInventoryListController {
/*****************妞滅储鐢�******************/
public static Consumable_order__c coc { get; set; }
- public static String baseUrl {get;private set;}
+ public static String baseUrl { get; private set; }
/*****************鐢婚潰琛ㄧずBean******************/
public static List<ConsumableorderdetailsInfo> consumableorderdetailsRecords { get; set; }
public static List<ConsumableorderdetailsInfo> consumableorderdetailsRecordsError { get; set; }
@@ -22,7 +22,7 @@
// 鐢婚潰鍒濆鍖�
@AuraEnabled
public static ResponseBodyLWC init(String eSetId) {
- system.debug('eSetId====>'+eSetId);
+ system.debug('eSetId====>' + eSetId);
ESetId = eSetId;
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
@@ -31,49 +31,74 @@
coc = new Consumable_order__c();
consumableorderdetailsRecords = new List<ConsumableorderdetailsInfo>();
- List<Consumable_order__c> qs = New List<Consumable_order__c>();
- qs = [select Name,Inventory_date__c,Order_date__c From Consumable_order__c Where Id =:ESetId];
- System.debug('qs===>'+qs);
- if (qs.size()>0){
+ List<Consumable_order__c> qs = new List<Consumable_order__c>();
+ qs = [
+ SELECT Name, Inventory_date__c, Order_date__c
+ FROM Consumable_order__c
+ WHERE Id = :ESetId
+ ];
+ System.debug('qs===>' + qs);
+ if (qs.size() > 0) {
coc = qs[0];
}
// 閬告姙娓堛伩銇槑缁嗐倰鍙栧緱
consumableorderdetailsSelected = [
- select Id, Name, Consumable_Product__c,
- Consumable_Product__r.Name, Sterilization_limit__c,
- Deliver_date__c,Consumable_Product__r.Name__c,
- Consumable_Product__r.Intra_Trade_List_RMB__c,Bar_Code__c,
- Consumable_Product__r.Asset_Model_No__c,Lose_Flag__c,
- recordtypeid,Lose_reason__c
- from Consumable_order_details2__c
- where Consumable_Inventory_order__c = :ESetId
- order by Name ];
- System.debug('consumableorderdetailsSelected==>'+consumableorderdetailsSelected);
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Intra_Trade_List_RMB__c,
+ Bar_Code__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Lose_Flag__c,
+ recordtypeid,
+ Lose_reason__c
+ FROM Consumable_order_details2__c
+ WHERE Consumable_Inventory_order__c = :ESetId
+ ORDER BY Name
+ ];
+ System.debug('consumableorderdetailsSelected==>' + consumableorderdetailsSelected);
for (Integer i = 0; i < consumableorderdetailsSelected.size(); i++) {
consumableorderdetailsRecordsError.add(new ConsumableorderdetailsInfo(consumableorderdetailsSelected[i]));
}
consumableorderdetails1 = [
- select Id, Name,Diff__c,inventory_sum__c,
- Count_Sum__c,Consumable_order__c,
- Consumable_Product__c,Consumable_Product__r.Name,Consumable_Count__c,
+ SELECT
+ Id,
+ Name,
+ Diff__c,
+ inventory_sum__c,
+ Count_Sum__c,
+ Consumable_order__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Count__c,
Consumable_Product__r.Intra_Trade_List_RMB__c,
- Consumable_Product__r.Asset_Model_No__c,Consumable_Product__r.Name__c,
- Sum_of_money__c,recordtypeid,Lose_reason__c,Product_Refind__c
- from Consumable_orderdetails__c
- where Consumable_order__c = :ESetId
- order by Name ];
+ Consumable_Product__r.Asset_Model_No__c,
+ Consumable_Product__r.Name__c,
+ Sum_of_money__c,
+ recordtypeid,
+ Lose_reason__c,
+ Product_Refind__c
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c = :ESetId
+ ORDER BY Name
+ ];
for (Integer i = 0; i < consumableorderdetails1.size(); i++) {
consumableorderdetailsRecords.add(new ConsumableorderdetailsInfo(consumableorderdetails1[i]));
}
- data.put('qs',qs);
- System.debug('consumableorderdetailsRecords====>'+consumableorderdetailsRecords);
- data.put('consumableorderdetailsRecords',JSON.serialize(consumableorderdetailsRecords));
- data.put('ConsumableorderdetailsRecordsError',JSON.serialize(ConsumableorderdetailsRecordsError));
+ data.put('qs', qs);
+ System.debug('consumableorderdetailsRecords====>' + consumableorderdetailsRecords);
+ data.put('consumableorderdetailsRecords', JSON.serialize(consumableorderdetailsRecords));
+ data.put('ConsumableorderdetailsRecordsError', JSON.serialize(ConsumableorderdetailsRecordsError));
// if(ConsumableorderdetailsRecordsError.size()!=null){
// data.put('ConsumableorderdetailsRecordsError',JSON.serialize(ConsumableorderdetailsRecordsError));
// }
- System.debug('ConsumableorderdetailsRecordsError====>'+ConsumableorderdetailsRecordsError);
+ System.debug('ConsumableorderdetailsRecordsError====>' + ConsumableorderdetailsRecordsError);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
@@ -81,6 +106,7 @@
}
// Data Bean
+ @TestVisible
class ConsumableorderdetailsInfo implements Comparable {
public Consumable_orderdetails__c orderdetails1 { get; set; }
public Consumable_order_details2__c orderdetails2 { get; set; }
@@ -100,4 +126,4 @@
return null;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexInventoryListControllerTest.cls b/force-app/main/default/classes/LexInventoryListControllerTest.cls
new file mode 100644
index 0000000..ada261b
--- /dev/null
+++ b/force-app/main/default/classes/LexInventoryListControllerTest.cls
@@ -0,0 +1,152 @@
+@isTest
+private class LexInventoryListControllerTest {
+ static testMethod void myUnitTest() {
+ Oly_TriggerHandler.bypass('ConsumableAssetHander');
+ Oly_TriggerHandler.bypass('Oly_TriggerHandler');
+ User myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ myAccount2 = new Account(name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
+ insert myAccount2;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Packing_list_manual__c = 12,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Packing_list_manual__c = 10,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200313',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert new List<Product2__c>{ pro1, pro2, pro3 };
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '鐩樼偣';
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Inventory;
+ insert Order1;
+
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_002';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Order;
+ insert Order2;
+
+ Consumable_order__c Order3 = new Consumable_order__c();
+ Order3.Name = 'OCM_01_004';
+ Order3.Order_status__c = '鎵瑰噯';
+ Order3.Order_type__c = '鍒拌揣';
+ Order3.RecordTypeid = '01210000000c9dqAAA';
+ insert Order3;
+
+ Consumable_orderdetails__c Orderdet1 = new Consumable_orderdetails__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order__c = Order1.Id;
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Inventory;
+
+ Consumable_orderdetails__c Orderdet2 = new Consumable_orderdetails__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order__c = Order1.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Inventory;
+ insert new List<Consumable_orderdetails__c>{ Orderdet1, Orderdet2 };
+
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ //浜у搧绫诲瀷涓嶅悓
+ Consumable_order_details2__c con = new Consumable_order_details2__c();
+ con.Name = 'OCM_01_001001';
+ con.Consumable_order_minor__c = Order1.Id;
+ con.Consumable_Product__c = pro2.Id;
+ con.Asset_Model_No__c = 'Test01';
+ con.Arrive_date__c = Date.today();
+ con.Bar_Code__c = '10011';
+ con.Used_date__c = null;
+ con.Lose_Flag__c = false;
+ con.Return_date__c = null;
+ con.Send_Date__c = null;
+ con.Box_Piece__c = '鐩�';
+ conList1.add(con);
+ insert conList1;
+ String eSetId = Order1.id;
+ System.Test.startTest();
+ LexInventoryListController.init(eSetId);
+
+ List<LexInventoryListController.ConsumableorderdetailsInfo> inList = LexInventoryListController.consumableorderdetailsRecords;
+ List<LexInventoryListController.ConsumableorderdetailsInfo> inList1 = new List<LexInventoryListController.ConsumableorderdetailsInfo>();
+ for (LexInventoryListController.ConsumableorderdetailsInfo ass : inList) {
+ ass.orderdetails1 = Orderdet1;
+ inList1.add(ass);
+ }
+ LexInventoryListController.ConsumableorderdetailsInfo c2 = new LexInventoryListController.ConsumableorderdetailsInfo(Orderdet1);
+ c2.orderdetails1 = Orderdet1;
+ c2.Prod = Orderdet1.Consumable_product__r;
+ LexInventoryListController.ConsumableorderdetailsInfo c1 = new LexInventoryListController.ConsumableorderdetailsInfo(con);
+ c1.orderdetails2 = con;
+ c1.Prod = con.Consumable_product__r;
+ c1.compareTo(c2);
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexInventoryListControllerTest.cls-meta.xml b/force-app/main/default/classes/LexInventoryListControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexInventoryListControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexInventoryViewController.cls b/force-app/main/default/classes/LexInventoryViewController.cls
index cc2ec34..4cdc3ff 100644
--- a/force-app/main/default/classes/LexInventoryViewController.cls
+++ b/force-app/main/default/classes/LexInventoryViewController.cls
@@ -32,7 +32,7 @@
// };
public static String[] proLimitAndDate = new List<String>{};
- private static Map<String, Date> productkucun = new Map<String, Date>();
+ public static Map<String, Date> productkucun = new Map<String, Date>();
public static List<SelectOption> categoryOptionList { get; set; }
@AuraEnabled
public static Map<String, String> categoryOptionMap { get; set; }
@@ -49,7 +49,7 @@
public static String category1 { get; set; }
public static Boolean editAble { get; set; }
// 缁忛攢鍟嗗湪搴撲骇鍝両D
- public static List<String> orderDetZaikuList = new List<String>();
+ public static List<String> orderDetZaikuList { get; set; }
// 浜у搧 ID
public static String ESetId { get; set; }
public static String idCheck { get; set; }
@@ -69,6 +69,7 @@
// add by rentx 2021-3-10
public LexInventoryViewController() {
+ orderDetZaikuList = new List<String>();
consumableorderdetailsRecords = new List<ConsumableorderdetailsInfo>();
consumableorderdetailsRecordsview = new List<List<ConsumableorderdetailsInfo>>();
editAble = false;
@@ -97,7 +98,6 @@
categoryOptionMap = new Map<String, String>();
category4OptionMap = new Map<String, String>();
category5OptionMap = new Map<String, String>();
-
// 鍙栫敤鎴稩D
String userId = UserInfo.getUserId();
@@ -239,9 +239,7 @@
}
if (newMidPieceMap.containsKey(CountDel[i].Consumable_Product__c + CountDel[i].Box_Piece__c + tex)) {
ConsumableorderdetailsInfo Jstage = newMidPieceMap.get(
- CountDel[i].Consumable_Product__c +
- CountDel[i].Box_Piece__c +
- tex
+ CountDel[i].Consumable_Product__c + CountDel[i].Box_Piece__c + tex
)
.clone();
Jstage.allnumber = Jstage.allnumber + 1;
@@ -406,23 +404,25 @@
data.put('pageRecords', pageRecords);
data.put('consumableorderdetailsRecords', consumableorderdetailsRecords);
data.put('hasHos', hasHos);
- data.put('productLimtAndDate',proLimitAndDate);
+ data.put('productLimtAndDate', proLimitAndDate);
+ data.put('productkucun', productkucun);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
+ System.debug('productkucun = ' + productkucun);
return res;
}
@AuraEnabled
- public static ResponseBodyLWC categoryAllload(String category3LWC,String agencyProTypeLWC) {
+ public static ResponseBodyLWC categoryAllload(String category3LWC, String agencyProTypeLWC) {
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
res.entity = data;
- category3 = category3LWC;
- agencyProType = '%' + agencyProTypeLWC + '%';
+ category3 = category3LWC;
+ agencyProType = '%' + agencyProTypeLWC + '%';
- System.debug('category3LWC===>'+category3LWC);
- System.debug('agencyProType===>'+agencyProType);
-
+ System.debug('category3LWC===>' + category3LWC);
+ System.debug('agencyProType===>' + agencyProType);
+
AggregateResult[] category4List = [
SELECT Count(id), Category4_text__c c4c
FROM Product2__c
@@ -466,8 +466,8 @@
category5OptionList.add(new SelectOption(deliverycnt5, deliverycnt5));
category5OptionMap.put(deliverycnt5, deliverycnt5);
}
- System.debug('绫诲埆4'+category4OptionList);
- System.debug('绫诲埆5'+category5OptionList);
+ System.debug('绫诲埆4' + category4OptionList);
+ System.debug('绫诲埆5' + category5OptionList);
data.put('category4OptionMap', category4OptionMap);
data.put('category5OptionMap', category5OptionMap);
res.status = 'Success';
@@ -528,15 +528,19 @@
Integer pageSizeLWC,
Integer pageTokenLWC,
String sortFieldLWC,
- String sortOrderLWC
+ String sortOrderLWC,
+ Map<String, Date> productkucunLWC
) {
try {
- System.debug('orderDetZaikuListLWC===>'+orderDetZaikuListLWC);
+ System.debug('orderDetZaikuListLWC===>' + orderDetZaikuListLWC);
+ System.debug('productkucun===>' + productkucun);
pageSize = pageSizeLWC;
pageToken = pageTokenLWC;
sortField = sortFieldLWC;
sortOrder = sortOrderLWC;
+ productkucun = new Map<String, Date>();
orderDetZaikuList = new List<String>();
+ productkucun = productkucunLWC;
orderDetZaikuList = orderDetZaikuListLWC;
sqlagencyProType = '%' + agencyProType + '%';
@@ -599,7 +603,7 @@
// if (String.isNotBlank(sortField) && String.isNotBlank(sortOrder)) {
// if(sortFieldLWC != 'limitCount'){
// soql += ' ORDER BY ' + sortField + ' ' + sortOrder;
-
+
// }
// }
System.debug('soql = ' + soql);
@@ -623,9 +627,7 @@
}
if (newMidBoxMap.containsKey(CountDel[i].Consumable_Product__c + CountDel[i].Box_Piece__c + tex)) {
ConsumableorderdetailsInfo Jstage = newMidBoxMap.get(
- CountDel[i].Consumable_Product__c +
- CountDel[i].Box_Piece__c +
- tex
+ CountDel[i].Consumable_Product__c + CountDel[i].Box_Piece__c + tex
)
.clone();
Jstage.allnumber = Jstage.allnumber + 1;
@@ -655,9 +657,7 @@
}
if (newMidPieceMap.containsKey(CountDel[i].Consumable_Product__c + CountDel[i].Box_Piece__c + tex)) {
ConsumableorderdetailsInfo Jstage = newMidPieceMap.get(
- CountDel[i].Consumable_Product__c +
- CountDel[i].Box_Piece__c +
- tex
+ CountDel[i].Consumable_Product__c + CountDel[i].Box_Piece__c + tex
)
.clone();
Jstage.allnumber = Jstage.allnumber + 1;
@@ -773,11 +773,11 @@
paginatedAccounts.recordEnd = totalCount >= recordEnd ? recordEnd : totalCount;
paginatedAccounts.totalRecords = totalCount;
- List<ConsumableorderdetailsInfo> pageRecordsCompare = new List<ConsumableorderdetailsInfo>();
+ List<ConsumableorderdetailsInfo> pageRecordsCompare = new List<ConsumableorderdetailsInfo>();
System.debug('queryList = ' + JSON.serialize(queryList));
for (Integer i = 0; i < queryList.size(); i++) {
- for(ConsumableorderdetailsInfo ci : pageRecords){
- if(queryList[i].Id == ci.Prod.Id){
+ for (ConsumableorderdetailsInfo ci : pageRecords) {
+ if (queryList[i].Id == ci.Prod.Id) {
System.debug('queryList[i].Id =' + queryList[i].Id);
System.debug('ci.Prod.Id =' + queryList[i].Id);
pageRecordsCompare.add(ci);
@@ -931,7 +931,6 @@
// }
// pageRecords.sort();
// }
-
//妫�绱ql鏂囧仛鎴�
private static String makeSoql(String CateName, String CateCode, String Category3, String Category4, String Category5) {
@@ -1051,6 +1050,7 @@
}
// Data Bean
+ @TestVisible
class ConsumableorderdetailsInfo implements Comparable {
@AuraEnabled
public Consumable_order_details2__c esd { get; set; }
@@ -1111,4 +1111,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexInventoryViewControllerTest.cls b/force-app/main/default/classes/LexInventoryViewControllerTest.cls
new file mode 100644
index 0000000..54a61da
--- /dev/null
+++ b/force-app/main/default/classes/LexInventoryViewControllerTest.cls
@@ -0,0 +1,1178 @@
+@isTest
+public class LexInventoryViewControllerTest {
+ static testMethod void testInnerClass() {
+ List<LexInventoryViewController.ConsumableorderdetailsInfo> cro = new List<LexInventoryViewController.ConsumableorderdetailsInfo>();
+ cro.sort();
+ }
+ static testMethod void LexInventoryViewControllerTest() {
+ user myUser_test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+
+ myAccount1 = new Account(
+ name = 'testaccount001',
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|2|4,Test02|3|5',
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '娣卞湷'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Product2 prod01 = new Product2(
+ Name = '3400PK:PK閽� 5mmx33cm',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = '3400PK:PK閽� 5mmx33cm',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test001',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'tset',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 12,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'tset',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(
+ Name = '3400PK:PK閽� 5mmx33cm',
+ OT_CODE_Text__c = 'Test001',
+ Product2__c = prod01.Id,
+ Category3_text__c = '鑵硅厰闀滄墜鏈�',
+ Category4_text__c = 'PK',
+ Category5_text__c = 'G400'
+ );
+ Product2__c pro2 = new Product2__c(
+ Name = 'Pro002',
+ OT_CODE_Text__c = 'Test002',
+ Product2__c = prod02.Id,
+ Category3_text__c = '鑵硅厰闀滄墜鏈�',
+ Category4_text__c = 'PK',
+ Category5_text__c = 'G400'
+ );
+ insert new List<Product2__c>{ pro1, pro2 };
+ System.debug('pro2===銆�' + pro2);
+ System.debug('pro1===銆�' + pro1);
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.Id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Inventory;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_001';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.Dealer_Info__c = myAccount1.Id;
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Inventory;
+ Order2.Order_ProType__c = 'ENg';
+ insert Order2;
+
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ //Orderdet1.Consumable_principal__c = Order1.Id;
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet1.IsArrival__c = true;
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '11111';
+ Orderdet1.Arrive_date__c = Date.today().addDays(1);
+ Orderdet1.Send_Date__c = null;
+ Orderdet1.Used_date__c = null;
+ Orderdet1.Lose_Flag__c = false;
+ Orderdet1.Box_Piece__c = '鐩�';
+
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ //Orderdet2.Consumable_principal__c = Order1.Id;
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '22222';
+ Orderdet2.Arrive_date__c = Date.today().addDays(1);
+ Orderdet2.Send_Date__c = null;
+ Orderdet2.Used_date__c = null;
+ Orderdet2.Lose_Flag__c = false;
+ Orderdet2.Box_Piece__c = '涓�';
+ Orderdet2.Sterilization_limit__c = Date.today();
+
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ //Orderdet3.Consumable_principal__c = Order1.Id;
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro2.Id;
+ Orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet3.IsArrival__c = true;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '33333';
+ Orderdet3.Arrive_date__c = Date.today().addDays(1);
+ Orderdet3.Send_Date__c = null;
+ Orderdet3.Used_date__c = null;
+ Orderdet3.Lose_Flag__c = false;
+ Orderdet3.Box_Piece__c = '涓�';
+ Orderdet3.Sterilization_limit__c = Date.today();
+
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ //Orderdet4.Consumable_principal__c = Order1.Id;
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet4.IsArrival__c = true;
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '44444';
+ Orderdet4.Arrive_date__c = Date.today().addDays(1);
+ Orderdet4.Send_Date__c = null;
+ Orderdet4.Used_date__c = null;
+ Orderdet4.Lose_Flag__c = false;
+ Orderdet4.Box_Piece__c = '涓�';
+
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4 };
+
+ //鍒朵綔鐩樼偣灞ュ巻
+ List<Consumable_order__c> InsPDlist = new List<Consumable_order__c>();
+ for (integer i = 1; i < 35; i++) {
+ String str = string.valueOf(i);
+ if (str.length() == 1) {
+ str = '0' + str;
+ }
+ Consumable_order__c PDlist = new Consumable_order__c(name = 'testPandianLVL_' + str);
+ //Date ThisDate = Date.newInstance(2016,4,20+i/5);
+ //PDlist.Inventory_date__c = ThisDate;
+ PDlist.Order_type__c = '鐩樼偣';
+ PDlist.RecordTypeid = System.Label.RT_ConOrder_Inventory;
+ PDlist.Inventory_date__c = Date.today().addDays(-i);
+ PDlist.Dealer_Info__c = myAccount1.Id;
+ InsPDlist.add(PDlist);
+ }
+ List<String> orderDetZaikuListLWC = new List<String>();
+ LexInventoryViewController controller = new LexInventoryViewController();
+ Integer pageSizeLWC = 1;
+ Integer pageTokenLWC = 0;
+ String sortFieldLWC = '';
+ String sortOrderLWC = '';
+ String category1 = '3400PK:PK閽� 5mm脳33cm';
+ String Category3 = '鑵硅厰闀滄墜鏈�';
+ String Category4 = 'PK';
+ String Category5 = 'G400';
+ String accountName = '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�';
+ string agencyProType = 'ENG';
+ string userWorkLocation = '娣卞湷';
+ LexInventoryViewController.category1 = category1;
+ LexInventoryViewController.Category3 = Category3;
+ LexInventoryViewController.Category4 = Category4;
+ LexInventoryViewController.Category5 = Category5;
+ LexInventoryViewController.orderDetZaikuList = new List<String>();
+ LexInventoryViewController.init(pageSizeLWC, pageTokenLWC, sortFieldLWC, sortOrderLWC);
+ system.debug('order detail:' + JSON.serialize(LexInventoryViewController.orderDetZaikuList));
+ orderDetZaikuListLWC = LexInventoryViewController.orderDetZaikuList;
+ System.debug('orderDetZaikuListLWC' + orderDetZaikuListLWC);
+ Map<String, Date> productkucunLWC = LexInventoryViewController.productkucun;
+ LexInventoryViewController.searchConsumableorderdetails(
+ category1,
+ '',
+ '',
+ '',
+ orderDetZaikuListLWC,
+ accountName,
+ agencyProType,
+ userWorkLocation,
+ pageSizeLWC,
+ pageTokenLWC,
+ sortFieldLWC,
+ sortOrderLWC,
+ productkucunLWC
+ );
+ LexInventoryViewController.searchConsumableorderdetails(
+ category1,
+ Category3,
+ Category4,
+ Category5,
+ orderDetZaikuListLWC,
+ accountName,
+ agencyProType,
+ userWorkLocation,
+ pageSizeLWC,
+ pageTokenLWC,
+ sortFieldLWC,
+ sortOrderLWC,
+ productkucunLWC
+ );
+ }
+ }
+
+ static testMethod void InventoryViewSearchTest() {
+ user myUser_test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ myAccount1 = new Account(
+ name = 'testaccount001',
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|2|4,Test02|3|5',
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert myUser_test;
+ }
+
+ System.runAs(myUser_test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Category3__c = 'CDS',
+ Category4__c = 'OER',
+ Category5__c = '鍏跺畠',
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Category3__c = 'ENT',
+ Category4__c = 'Celon',
+ Category5__c = 'Celon',
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Category3__c = 'US',
+ Category4__c = 'ALOKA',
+ Category5__c = '浣撳瓒呭0',
+ Manual_Entry__c = false
+ );
+ Product2 prod04 = new Product2(
+ Name = 'Test04',
+ ProductCode = 'Test04',
+ Asset_Model_No__c = 'Test04',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Category3__c = 'OCS',
+ Category4__c = '闄勫睘鍝�',
+ Category5__c = 'S45',
+ Manual_Entry__c = false
+ );
+ Product2 prod05 = new Product2(
+ Name = 'Test05',
+ ProductCode = 'Test05',
+ Asset_Model_No__c = 'Test05',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Category3__c = '鍏夋簮',
+ Category4__c = '闄勫睘鍝�',
+ Category5__c = 'OCS',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03, prod04, prod05 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ Product2__c pro4 = new Product2__c(Name = 'Pro004', OT_CODE_Text__c = 'Test004', Product2__c = prod04.Id);
+ Product2__c pro5 = new Product2__c(Name = 'Pro005', OT_CODE_Text__c = 'Test005', Product2__c = prod05.Id);
+ insert new List<Product2__c>{ pro1, pro2, pro3, pro4, pro5 };
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.Id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Inventory;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet1.Sterilization_limit__c = Date.today();
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '11111';
+ Orderdet1.Arrive_date__c = Date.today().addDays(1);
+ Orderdet1.Send_Date__c = null;
+ Orderdet1.Used_date__c = null;
+ Orderdet1.Lose_Flag__c = false;
+
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet2.Sterilization_limit__c = Date.today();
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '22222';
+ Orderdet2.Arrive_date__c = Date.today().addDays(1);
+ Orderdet2.Send_Date__c = null;
+ Orderdet2.Used_date__c = null;
+ Orderdet2.Lose_Flag__c = false;
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2 };
+ Integer pageSizeLWC = 1;
+ Integer pageTokenLWC = 0;
+ String sortFieldLWC = '';
+ String sortOrderLWC = '';
+ String category3LWC = 'CDS';
+ String agencyProTypeLWC = 'ENG';
+ String category1 = '3400PK:PK閽� 5mm脳33cm';
+ String Category3 = '鑵硅厰闀滄墜鏈�';
+ String Category4 = 'PK';
+ String Category5 = 'G400';
+ String accountName = '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�';
+ string agencyProType = 'ENG';
+ string userWorkLocation = '娣卞湷';
+ List<String> orderDetZaikuListLWC = new List<String>();
+
+ LexInventoryViewController.init(pageSizeLWC, pageTokenLWC, sortFieldLWC, sortOrderLWC);
+ LexInventoryViewController.categoryAllload(category3LWC, agencyProTypeLWC);
+ LexInventoryViewController.categoryload();
+ // LexInventoryViewController.searchConsumableorderdetails(category1,category3,category4,category5,orderDetZaikuListLWC,accountName,agencyProType,userWorkLocation,pageSizeLWC,pageTokenLWC,sortFieldLWC,sortOrderLWC);
+ }
+ }
+
+ //add by rentx 2020-12-25 start 鏌ヨ闈炲尰闄㈢壒浠风洅 /涓�
+ static testMethod void InventoryViewTest2() {
+ user myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ //Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�'];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ]; //20200916 ljh update
+
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|5|55,Test02|2|4',
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount2;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET',
+ Work_Location__c = '鍖椾含'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ System.Test.startTest();
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = '12124',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = '12124',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c createId = new Consumable_order__c();
+ createId.Name = 'testMing';
+ createId.Order_status__c = '鎵瑰噯';
+ createId.Deliver_date__c = Date.today();
+ createId.Dealer_Info__c = myAccount2.Id;
+ createId.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createId.Order_type__c = '璁㈠崟';
+ createId.Order_ProType__c = 'ET';
+ createId.Dealer_Info__c = myAccount2.Id;
+ createId.Delivery_detail_count__c = 5;
+ insert createId;
+ //pro1 鐩� 鍦ㄥ簱
+ List<Consumable_order_details2__c> codListTemp = new List<Consumable_order_details2__c>();
+ Consumable_order_details2__c createDetail2 = new Consumable_order_details2__c();
+ createDetail2 = new Consumable_order_details2__c();
+ createDetail2.Consumable_Product__c = pro1.id;
+ createDetail2.Asset_Model_No__c = 'Test01';
+ createDetail2.Consumable_order_minor__c = createId.id;
+ createDetail2.Consumable_Arrived_order__c = createId.id;
+ createDetail2.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetail2.Asset_Model_No__c = pro1.Asset_Model_No__c;
+ createDetail2.Bar_Code__c = '123';
+ createDetail2.Box_Piece__c = '鐩�';
+ createDetail2.Arrive_date__c = Date.today();
+ codListTemp.add(createDetail2);
+ //insert createDetail2;
+ Consumable_order_details2__c createDetailpro1 = new Consumable_order_details2__c();
+ createDetailpro1.Consumable_Product__c = pro1.id;
+ createDetailpro1.Asset_Model_No__c = 'Test02';
+ createDetailpro1.Consumable_order_minor__c = createId.id;
+ createDetailpro1.Consumable_Arrived_order__c = createId.id;
+ createDetailpro1.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetailpro1.Asset_Model_No__c = pro1.Asset_Model_No__c;
+ createDetailpro1.Bar_Code__c = '12322';
+ createDetailpro1.Box_Piece__c = '鐩�';
+ createDetailpro1.Arrive_date__c = Date.today();
+ codListTemp.add(createDetailpro1);
+ //insert createDetailpro1;
+ //pro1 涓� 鍦ㄥ簱
+ Consumable_order_details2__c createDetailPiece1 = new Consumable_order_details2__c();
+ createDetailPiece1.Consumable_Product__c = pro1.id;
+ createDetailPiece1.Asset_Model_No__c = 'Test03';
+ createDetailPiece1.Consumable_order_minor__c = createId.id;
+ createDetailPiece1.Consumable_Arrived_order__c = createId.id;
+ createDetailPiece1.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetailPiece1.Asset_Model_No__c = pro1.Asset_Model_No__c;
+ createDetailPiece1.Bar_Code__c = '23456';
+ createDetailPiece1.Box_Piece__c = '涓�';
+ createDetailPiece1.Arrive_date__c = Date.today();
+ codListTemp.add(createDetailPiece1);
+ //insert createDetailPiece1;
+ Consumable_order_details2__c createDetailPiece2 = new Consumable_order_details2__c();
+ createDetailPiece2.Consumable_Product__c = pro1.id;
+ createDetailPiece2.Asset_Model_No__c = 'Test04';
+ createDetailPiece2.Consumable_order_minor__c = createId.id;
+ createDetailPiece2.Consumable_Arrived_order__c = createId.id;
+ createDetailPiece2.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetailPiece2.Asset_Model_No__c = pro1.Asset_Model_No__c;
+ createDetailPiece2.Bar_Code__c = '122345';
+ createDetailPiece2.Box_Piece__c = '涓�';
+ createDetailPiece2.Arrive_date__c = Date.today();
+ codListTemp.add(createDetailPiece2);
+ //insert createDetailPiece2;
+
+ //pro1 鐩� 鍦ㄥ簱 杩囨湡
+ Consumable_order_details2__c createDetail21 = new Consumable_order_details2__c();
+ createDetail21.Consumable_Product__c = pro1.id;
+ createDetail21.Asset_Model_No__c = 'Test01';
+ createDetail21.Sterilization_limit__c = Date.today();
+ createDetail21.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ //createDetail.IsArrival__c = true;
+ createDetail21.Asset_Model_No__c = prod02.Asset_Model_No__c;
+ createDetail21.Bar_Code__c = '1223';
+ createDetail21.Box_Piece__c = '鐩�';
+ createDetail21.Arrive_date__c = Date.today();
+ createDetail21.Deliver_date__c = Date.today().addDays(-8);
+ createDetail21.Sterilization_limit__c = Date.today().addDays(-8);
+ codListTemp.add(createDetail21);
+ //insert createDetail2;
+ insert codListTemp;
+
+ PageReference page = new PageReference('/apex/TopPage');
+ System.Test.setCurrentPage(page);
+ TopPageController lPCTest = new TopPageController();
+ lPCTest.pagesize = 1;
+ List<Consumable_Orderdetails__c> coListTest = new List<Consumable_Orderdetails__c>();
+ Consumable_Orderdetails__c conOrderDetail1 = new Consumable_Orderdetails__c();
+ conOrderDetail1.Consumable_count__c = 10;
+ conOrderDetail1.Consumable_Arrivecount__c = 5;
+ conOrderDetail1.Consumable_product__c = pro2.id;
+ conOrderDetail1.Consumable_order__c = createId.Id;
+ coListTest.add(conOrderDetail1);
+
+ Consumable_Orderdetails__c conOrderDetail2 = new Consumable_Orderdetails__c();
+ conOrderDetail2.Consumable_product__c = pro2.id;
+ conOrderDetail2.Consumable_order__c = createId.Id;
+ coListTest.add(conOrderDetail2);
+ insert coListTest;
+
+ Integer pageSizeLWC = 1;
+ Integer pageTokenLWC = 0;
+ String sortFieldLWC = '';
+ String sortOrderLWC = '';
+ String category3LWC = 'CDS';
+ String agencyProTypeLWC = 'ENG';
+ // LexInventoryViewController.init(pageSizeLWC,pageTokenLWC,sortFieldLWC,sortOrderLWC);
+ LexInventoryViewController.categoryAllload('CDS', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�');
+ LexInventoryViewController.categoryload();
+ LexInventoryViewController.categoryAllload('鍏夋簮', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�');
+ LexInventoryViewController.categoryload();
+ System.Test.stopTest();
+ }
+ }
+
+ static testMethod void InventoryViewTest3() {
+ user myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ //Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�'];
+ // Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(Email)'];//20200916 ljh update
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ]; //20210329 RTX update
+
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|5|55,Test02|2|4',
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount2;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ System.Test.startTest();
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = '12124',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = '12124',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c createId = new Consumable_order__c();
+ createId.Name = 'testMing1';
+ createId.Order_status__c = '鎵瑰噯';
+ createId.Deliver_date__c = Date.today();
+ createId.Dealer_Info__c = myAccount2.Id;
+ createId.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createId.Order_type__c = '璁㈠崟';
+ createId.Order_ProType__c = 'ENG';
+ createId.Dealer_Info__c = myAccount2.Id;
+ createId.Delivery_detail_count__c = 5;
+ createId.orderPattern__c = 'hospitalorder';
+ insert createId;
+ //pro1 鐩� 鍦ㄥ簱
+ Consumable_order_details2__c createDetail2 = new Consumable_order_details2__c();
+ createDetail2.Consumable_Product__c = pro1.id;
+ createDetail2.Asset_Model_No__c = 'Test01';
+ createDetail2.Consumable_order_minor__c = createId.id;
+ createDetail2.Consumable_Arrived_order__c = createId.id;
+ createDetail2.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetail2.Asset_Model_No__c = pro1.Asset_Model_No__c;
+ createDetail2.Bar_Code__c = '123';
+ createDetail2.Box_Piece__c = '鐩�';
+ createDetail2.Arrive_date__c = Date.today();
+ insert createDetail2;
+ List<Consumable_order_details2__c> codListTemp = new List<Consumable_order_details2__c>();
+ Consumable_order_details2__c createDetailpro1 = new Consumable_order_details2__c();
+ createDetailpro1.Consumable_Product__c = pro1.id;
+ createDetailpro1.Asset_Model_No__c = 'Test02';
+ createDetailpro1.Consumable_order_minor__c = createId.id;
+ createDetailpro1.Consumable_Arrived_order__c = createId.id;
+ createDetailpro1.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetailpro1.Asset_Model_No__c = pro1.Asset_Model_No__c;
+ createDetailpro1.Bar_Code__c = '12322';
+ createDetailpro1.Box_Piece__c = '鐩�';
+ createDetailpro1.Arrive_date__c = Date.today();
+ //insert createDetailpro1;
+ codListTemp.add(createDetailpro1);
+ //pro1 涓� 鍦ㄥ簱
+ Consumable_order_details2__c createDetailPiece1 = new Consumable_order_details2__c();
+ createDetailPiece1.Consumable_Product__c = pro1.id;
+ createDetailPiece1.Asset_Model_No__c = 'Test03';
+ createDetailPiece1.Consumable_order_minor__c = createId.id;
+ createDetailPiece1.Consumable_Arrived_order__c = createId.id;
+ createDetailPiece1.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetailPiece1.Asset_Model_No__c = pro1.Asset_Model_No__c;
+ createDetailPiece1.Bar_Code__c = '23456';
+ createDetailPiece1.Box_Piece__c = '涓�';
+ createDetailPiece1.Arrive_date__c = Date.today();
+ codListTemp.add(createDetailPiece1);
+ //insert createDetailPiece1;
+ Consumable_order_details2__c createDetailPiece2 = new Consumable_order_details2__c();
+ createDetailPiece2.Consumable_Product__c = pro1.id;
+ createDetailPiece2.Asset_Model_No__c = 'Test04';
+ createDetailPiece2.Consumable_order_minor__c = createId.id;
+ createDetailPiece2.Consumable_Arrived_order__c = createId.id;
+ createDetailPiece2.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ createDetailPiece2.Asset_Model_No__c = pro1.Asset_Model_No__c;
+ createDetailPiece2.Bar_Code__c = '122345';
+ createDetailPiece2.Box_Piece__c = '涓�';
+ createDetailPiece2.Arrive_date__c = Date.today();
+ codListTemp.add(createDetailPiece2);
+ //insert createDetailPiece2;
+
+ //pro1 鐩� 鍦ㄥ簱 杩囨湡
+ Consumable_order_details2__c createDetail21 = new Consumable_order_details2__c();
+ createDetail21.Consumable_Product__c = pro1.id;
+ createDetail21.Asset_Model_No__c = 'Test01';
+ createDetail21.Sterilization_limit__c = Date.today();
+ createDetail21.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ //createDetail.IsArrival__c = true;
+ createDetail21.Asset_Model_No__c = prod02.Asset_Model_No__c;
+ createDetail21.Bar_Code__c = '1223';
+ createDetail21.Box_Piece__c = '鐩�';
+ createDetail21.Arrive_date__c = Date.today();
+ createDetail21.Deliver_date__c = Date.today().addDays(-8);
+ createDetail21.Sterilization_limit__c = Date.today().addDays(-8);
+ codListTemp.add(createDetail21);
+ //insert createDetail21;
+ insert codListTemp;
+
+ PageReference page = new PageReference('/apex/TopPage');
+ System.Test.setCurrentPage(page);
+ TopPageController lPCTest = new TopPageController();
+ lPCTest.pagesize = 1;
+ List<Consumable_Orderdetails__c> coListTest = new List<Consumable_Orderdetails__c>();
+ Consumable_Orderdetails__c conOrderDetail1 = new Consumable_Orderdetails__c();
+ conOrderDetail1.Consumable_count__c = 10;
+ conOrderDetail1.Consumable_Arrivecount__c = 5;
+ conOrderDetail1.Consumable_product__c = pro2.id;
+ conOrderDetail1.Consumable_order__c = createId.Id;
+ coListTest.add(conOrderDetail1);
+
+ Consumable_Orderdetails__c conOrderDetail2 = new Consumable_Orderdetails__c();
+ conOrderDetail2.Consumable_product__c = pro2.id;
+ conOrderDetail2.Consumable_order__c = createId.Id;
+ coListTest.add(conOrderDetail2);
+ insert coListTest;
+
+ Integer pageSizeLWC = 1;
+ Integer pageTokenLWC = 0;
+ String sortFieldLWC = '';
+ String sortOrderLWC = '';
+ String category1 = '3400PK:PK閽� 5mm脳33cm';
+ String Category3 = '鑵硅厰闀滄墜鏈�';
+ String Category4 = 'PK';
+ String Category5 = 'G400';
+ List<String> orderDetZaikuListLWC = new List<String>();
+ String accountName = '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�';
+ string agencyProType = 'ET';
+ string userWorkLocation = '娣卞湷';
+ LexInventoryViewController.category1 = category1;
+ LexInventoryViewController.Category3 = Category3;
+ LexInventoryViewController.Category4 = Category4;
+ LexInventoryViewController.Category5 = Category5;
+ // LexInventoryViewController.init(pageSizeLWC,pageTokenLWC,sortFieldLWC,sortOrderLWC);
+ // LexInventoryViewController.searchConsumableorderdetails(category1,category3,category4,category5,orderDetZaikuListLWC,accountName,agencyProType,userWorkLocation,pageSizeLWC,pageTokenLWC,sortFieldLWC,sortOrderLWC);
+ LexInventoryViewController.categoryAllload('CDS', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�');
+ LexInventoryViewController.categoryload();
+ LexInventoryViewController.categoryAllload('鍏夋簮', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�');
+ LexInventoryViewController.categoryload();
+ }
+ }
+ static testMethod void InventoryViewTest4() {
+ user myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ]; //20210329 RTX update
+
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|5|55,Test02|2|4',
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount2;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET',
+ Work_Location__c = '娴庡崡'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ Integer pageSizeLWC = 1;
+ Integer pageTokenLWC = 0;
+ String sortFieldLWC = '';
+ String sortOrderLWC = '';
+ String category1 = '3400PK:PK閽� 5mm脳33cm';
+ String Category3 = '鑵硅厰闀滄墜鏈�';
+ String Category4 = 'PK';
+ String Category5 = 'G400';
+ String accountName = 'Testaccount002';
+ string agencyProType = 'ET';
+ string userWorkLocation = '娴庡崡';
+ List<String> orderDetZaikuListLWC = new List<String>();
+ List<String> productCodeList = new List<String>();
+
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = '12124',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = '12124',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ENG';
+ insert Order1;
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_003';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.Dealer_Info__c = myAccount2.Id;
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order2.Order_ProType__c = 'ET';
+ insert Order2;
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ //Orderdet2.Consumable_principal__c = Order1.Id;
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ //Orderdet2.IsArrival__c = true;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '22222';
+ Orderdet2.Arrive_date__c = Date.today().addDays(1);
+ Orderdet2.Send_Date__c = null;
+ Orderdet2.Used_date__c = Date.today();
+ Orderdet2.Lose_Flag__c = false;
+ Orderdet2.Box_Piece__c = '涓�';
+ Orderdet2.Sterilization_limit__c = Date.today();
+ Orderdet2.Return_date__c = Date.today();
+ Orderdet2.Bar_Code__c = '1683272847250250WZIOF';
+ Orderdet2.Cancellation_Flag__c = false;
+ conList.add(Orderdet2);
+
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.Send_Date__c = null;
+ Orderdet3.Used_date__c = null;
+ Orderdet3.Return_date__c = null;
+ Orderdet3.Lose_Flag__c = false;
+ Orderdet3.Cancellation_Flag__c = false;
+ Orderdet3.Bar_Code__c = '1234';
+ Orderdet3.Consumable_order_minor__c = Order2.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet3.Consumable_Arrived_order__c = Order2.Id;
+ Orderdet3.Recordtypeid = '01210000000kUDKAA2';
+ Orderdet3.Sterilization_limit__c = Date.today().addDays(1);
+ conList.add(Orderdet3);
+ insert conList;
+ System.debug('conList==>' + conList);
+
+ LexInventoryViewController.category1 = category1;
+ LexInventoryViewController.Category3 = Category3;
+ LexInventoryViewController.Category4 = Category4;
+ LexInventoryViewController.Category5 = Category5;
+ // LexInventoryViewController.init(pageSizeLWC,pageTokenLWC,sortFieldLWC,sortOrderLWC);
+ Map<String, Date> productkucunLWC = LexInventoryViewController.productkucun;
+ LexInventoryViewController.searchConsumableorderdetails(
+ category1,
+ category3,
+ category4,
+ category5,
+ orderDetZaikuListLWC,
+ accountName,
+ agencyProType,
+ userWorkLocation,
+ pageSizeLWC,
+ pageTokenLWC,
+ sortFieldLWC,
+ sortOrderLWC,
+ productkucunLWC
+ );
+ LexInventoryViewController.categoryAllload('CDS', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�');
+ LexInventoryViewController.categoryload();
+ LexInventoryViewController.categoryAllload('鍏夋簮', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�');
+ LexInventoryViewController.categoryload();
+ // LexInventoryViewController.searchConsumableorderdetails(category1,category3,category4,category5,orderDetZaikuListLWC ,accountName,agencyProType,
+ // userWorkLocation,pageSizeLWC,pageTokenLWC,sortFieldLWC,sortOrderLWC);
+ }
+
+ }
+ static testMethod void supplementTest() {
+ user myUser_test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+
+ myAccount1 = new Account(
+ name = 'testaccount001',
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|2|4,Test02|3|5',
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '娣卞湷'
+ );
+ insert myUser_test;
+ }
+ System.runAs(myUser_test) {
+ Product2 prod05 = new Product2(
+ Name = '3400PK:PK閽� 5mmx33cm',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = '3400PK:PK閽� 5mmx33cm',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test001',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ Product2 prod06 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 12,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'tset',
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod05, prod06 };
+ Product2__c pro11 = new Product2__c(
+ Name = 'Pro001',
+ OT_CODE_Text__c = 'Test001',
+ Product2__c = prod05.Id,
+ Category3_text__c = '鍒嗙被3'
+ );
+ Product2__c pro22 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod06.Id);
+ insert new List<Product2__c>{ pro11, pro22 };
+ System.debug('pro11===>' + pro11);
+
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
+ //鍙戣揣
+ Consumable_order__c Order4 = new Consumable_order__c();
+ Order4.Name = 'OCM_0122';
+ Order4.Order_status__c = '鎵瑰噯';
+ Order4.Order_type__c = '璁㈠崟';
+ Order4.Dealer_Info__c = myAccount1.Id;
+ Order4.RecordTypeid = '01210000000c9drAAA';
+ Order4.Order_ProType__c = 'ET';
+ Order4.ContractNo__c = '';
+ orderList.add(Order4);
+ insert orderList;
+
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+ //orderDetZaiku init
+ Consumable_order_details2__c con1 = new Consumable_order_details2__c();
+ con1.Arrive_date__c = Date.today();
+ con1.Send_Date__c = null;
+ con1.Used_date__c = null;
+ con1.Return_date__c = null;
+ con1.Lose_Flag__c = false;
+ con1.Cancellation_Flag__c = false;
+ con1.Bar_Code__c = '1234';
+ // con1.Consumable_order_minor__c = Order2.Id;
+ con1.Consumable_Product__c = pro11.Id;
+ con1.Consumable_Arrived_order__c = Order4.Id;
+ con1.Recordtypeid = '01210000000kUDKAA2';
+ // con1.Sterilization_limit__c = Date.today().addDays(1);
+ conList.add(con1);
+
+ Consumable_order_details2__c con2 = new Consumable_order_details2__c();
+ con2.Arrive_date__c = Date.today();
+ con2.Send_Date__c = null;
+ con2.Used_date__c = null;
+ con2.Return_date__c = null;
+ con2.Lose_Flag__c = false;
+ con2.Cancellation_Flag__c = false;
+ con2.Bar_Code__c = '1234';
+ // con1.Consumable_order_minor__c = Order2.Id;
+ con2.Consumable_Product__c = pro11.Id;
+ con2.Consumable_Arrived_order__c = Order4.Id;
+ con2.Recordtypeid = '01210000000kUDKAA2';
+ con2.Box_Piece__c = '涓�';
+ // con1.Sterilization_limit__c = Date.today().addDays(1);
+ conList.add(con2);
+
+ insert conList;
+
+ LexInventoryViewController.ESetId = '1111';
+ LexInventoryViewController.idCheck = '2222';
+ List<String> orderDetZaikuListLWC = new List<String>();
+ LexInventoryViewController.init(1, 0, '', '');
+ orderDetZaikuListLWC = LexInventoryViewController.orderDetZaikuList;
+ LexInventoryViewController.categoryAllload('CDS', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�');
+ LexInventoryViewController.categoryload();
+ LexInventoryViewController.categoryAllload('鍏夋簮', '鎹峰皵鍖荤枟(娴峰崡锛夋湁闄愬叕鍙�');
+ LexInventoryViewController.categoryload();
+ Map<String, Date> productkucunLWC = LexInventoryViewController.productkucun;
+ LexInventoryViewController.searchConsumableorderdetails(
+ '3400PK:PK閽� 5mmx33cm',
+ '',
+ '',
+ '',
+ orderDetZaikuListLWC,
+ 'testaccount001',
+ 'ET',
+ '娣卞湷',
+ 1,
+ 0,
+ '',
+ '',
+ productkucunLWC
+ );
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexInventoryViewControllerTest.cls-meta.xml b/force-app/main/default/classes/LexInventoryViewControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexInventoryViewControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexLicenceReminderControllerTest.cls b/force-app/main/default/classes/LexLicenceReminderControllerTest.cls
new file mode 100644
index 0000000..780a11b
--- /dev/null
+++ b/force-app/main/default/classes/LexLicenceReminderControllerTest.cls
@@ -0,0 +1,199 @@
+@IsTest
+private class LexLicenceReminderControllerTest {
+ @IsTest
+ static void testMethod1() {
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ LicenceReminderDate__c l = new LicenceReminderDate__c(Name = '180Days', ReminderDays__c = 180);
+ insert l;
+ Test.startTest();
+ System.runAs(currentUser) {
+ LexLicenceReminderController.initReminder();
+ }
+ Test.stopTest();
+ }
+
+ @IsTest
+ static void testMethod2() {
+ Account myAccount1 = new Account();
+ Contact core = new Contact();
+ User myUser_test = new User();
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ LicenceReminderDate__c l = new LicenceReminderDate__c(Name = '180Days', ReminderDays__c = 180);
+ insert l;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+
+ myAccount1 = new Account(
+ name = 'testaccount001',
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|2|4,Test02|3|5',
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert myUser_test;
+ }
+ Test.startTest();
+ System.runAs(myUser_test) {
+ LexLicenceReminderController.initReminder();
+ }
+ Test.stopTest();
+ }
+
+ @IsTest
+ static void testMethod3() {
+ Account myAccount1 = new Account();
+ Contact core = new Contact();
+ User myUser_test = new User();
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ LicenceReminderDate__c l = new LicenceReminderDate__c(Name = '180Days', ReminderDays__c = 180);
+ insert l;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+
+ myAccount1 = new Account(
+ name = 'testaccount001',
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|2|4,Test02|3|5',
+ AgentCode_Ext__c = '9999900',
+ Medical_Equipment_Expiration_Date__c = Date.newInstance(2023, 6, 10)
+ );
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert myUser_test;
+ }
+ Test.startTest();
+ System.runAs(myUser_test) {
+ LexLicenceReminderController.initReminder();
+ }
+ Test.stopTest();
+ }
+
+ @IsTest
+ static void testMethod4() {
+ Account myAccount1 = new Account();
+ Contact core = new Contact();
+ User myUser_test = new User();
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ LicenceReminderDate__c l = new LicenceReminderDate__c(Name = '180Days', ReminderDays__c = 180);
+ insert l;
+ System.runAs(currentUser) {
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+
+ myAccount1 = new Account(
+ name = 'testaccount001',
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|2|4,Test02|3|5',
+ AgentCode_Ext__c = '9999900',
+ Medical_Equipment_Expiration_Date__c = Date.newInstance(2025, 6, 10)
+ );
+ insert myAccount1;
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'testUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert myUser_test;
+ }
+ Test.startTest();
+ System.runAs(myUser_test) {
+ LexLicenceReminderController.initReminder();
+ }
+ Test.stopTest();
+ }
+}
diff --git a/force-app/main/default/classes/LexLicenceReminderControllerTest.cls-meta.xml b/force-app/main/default/classes/LexLicenceReminderControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexLicenceReminderControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexNewAndEditBasePIPLController.cls b/force-app/main/default/classes/LexNewAndEditBasePIPLController.cls
new file mode 100644
index 0000000..2f1f6eb
--- /dev/null
+++ b/force-app/main/default/classes/LexNewAndEditBasePIPLController.cls
@@ -0,0 +1,215 @@
+public without sharing class LexNewAndEditBasePIPLController {
+ public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
+ // 瀛楁淇℃伅
+ public static Map<string, SObjectField> fieldMap = new Map<string, SObjectField>();
+
+ public static ResponseBodyLWC initData(Id rid, String recordTypeId, String sobjectType) {
+ try {
+ System.debug('rid = ' + rid);
+ System.debug('recordTypeId = ' + recordTypeId);
+ System.debug('sobjectType = ' + sobjectType);
+ fieldMap = schemaMap.get(sobjectType).getDescribe().fields.getMap();
+ ResponseBodyLWC res = new ResponseBodyLWC();
+ Map<String, object> data = new Map<String, object>();
+ res.entity = data;
+
+ if (String.isBlank(recordTypeId)) {
+ data.put('recordTypeId', LayoutDescriberHelper.getDefaultRecordType(sobjectType));
+ }
+
+ //缂栬緫
+ if (!String.isBlank(rid)) {
+ //鑾峰彇瀵瑰簲瀵硅薄鐨勫瓧娈� List<Sobject> lso = Database.query('select id from RecordType where SobjectType = :sobjectType');
+ String sql = 'select ';
+ DescribeSObjectResult objectType = rid.getSobjectType().getDescribe();
+ List<String> objectFields = new List<String>(objectType.fields.getMap().keySet());
+ sql += String.join(objectFields, ',') + ' from ' + sobjectType + ' where id =\'' + rid + '\' limit 1';
+ System.debug('sql = ' + sql);
+ Sobject leadData = Database.query(sql);
+ if (leadData == null) {
+ return new ResponseBodyLWC('Error', 500, 'id涓嶅瓨鍦�', '');
+ }
+ if (objectFields.contains('recordtypeid')) {
+ recordTypeId = (String) leadData.get('RecordTypeId');
+ System.debug('recordTypeId: ' + recordTypeId);
+ }
+ List<Metadata.LayoutSection> layout = MetaDataUtility.GetRecordTypePageLayout(recordTypeId, sobjectType);
+ data.put('layout', Json.serialize(reviseMetaLayouts(layout)));
+ data.put('recordTypeId', recordTypeId);
+ System.debug('data.recordTypeId: ' + data.get('recordTypeId'));
+ data.put('AWSDataId', (String) leadData.get('AWS_Data_Id__c'));
+ //鑾峰彇鍊�
+ System.debug('leadData = ' + JSON.serialize(leadData));
+ data.put('data', leadData);
+ } else {
+ List<Metadata.LayoutSection> layout = MetaDataUtility.GetRecordTypePageLayout(recordTypeId, sobjectType);
+ data.put('layout', Json.serialize(reviseMetaLayouts(layout)));
+ }
+ //鑾峰彇PI瀛楁
+ PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo(sobjectType);
+ Map<String, String> AWSToSobjectNonEncryptedMap = new Map<String, String>();
+ List<String> AWSToSobjectNonEncryptedMapKeySet = new List<String>();
+ for (PI_Field_Policy_Detail__c PIDetail : piIntegration.PIDetails) {
+ AWSToSobjectNonEncryptedMap.put(PIDetail.AWS_Field_API__c, PIDetail.SF_Field_API_Name__c);
+ AWSToSobjectNonEncryptedMapKeySet.add(PIDetail.AWS_Field_API__c);
+ }
+ data.put('AWSToSobjectNonEncryptedMap', AWSToSobjectNonEncryptedMap);
+ data.put('AWSToSobjectNonEncryptedMapKeySet', AWSToSobjectNonEncryptedMapKeySet);
+ data.put('staticResource', Json.serialize(PIHelper.getPIIntegrationInfo(sobjectType)));
+ res.status = 'Success';
+ res.code = 200;
+ res.msg = '';
+ return res;
+ } catch (Exception e) {
+ System.debug('error = ' + e.getMessage() + ' line = ' + e.getLineNumber());
+ return new ResponseBodyLWC('Error', 500, e.getMessage() + ' ' + e.getLineNumber(), '');
+ }
+ }
+
+ public static ResponseBodyLWC queryAccount(String accountTypes, String accountId) {
+ ResponseBodyLWC res = new ResponseBodyLWC();
+ Map<String, object> data = new Map<String, object>();
+ res.entity = data;
+ System.debug('accountType = ' + accountTypes);
+ System.debug('accountId = ' + accountId);
+ try {
+ List<Object> types = (List<Object>) JSON.deserializeUntyped(accountTypes);
+ System.debug('types=' + types);
+ String soql = 'select Id,Name,';
+ for (Object t : types) {
+ soql += (String) t + ',';
+ }
+ soql = soql.substring(0, soql.length() - 1);
+ soql += ' from Account where id=\'' + accountId + '\'';
+ System.debug('soql=' + soql);
+ Sobject account = new Account();
+ if (!Test.isRunningTest()) {
+ account = Database.query(soql);
+ } else {
+ account.put('Id', '000000000000000');
+ }
+ Map<String, Map<String, String>> m = new Map<String, Map<String, String>>();
+ System.debug('account=' + account);
+ for (Object ty : types) {
+ String t = (String) ty;
+ if (account.get(t) != null || Test.isRunningTest()) {
+ Sobject acc = new Account();
+ if (Test.isRunningTest()) {
+ acc.put('Id', '000000000000000');
+ acc.put('Name', 'Name');
+ } else {
+ acc = Database.query('select Id,Name from Account where id=\'' + account.get(t) + '\'');
+ }
+ Map<String, String> n = new Map<String, String>();
+ n.put('Id', (String) acc.get('Id'));
+ n.put('Name', (String) acc.get('Name'));
+ m.put(t, n);
+ }
+ }
+ System.debug('m=' + m);
+ data.put('m', m);
+ data.put('account', account);
+ res.status = 'Success';
+ res.code = 200;
+ res.msg = '';
+ return res;
+ } catch (Exception e) {
+ return new ResponseBodyLWC('Error', 500, e.getMessage() + ' ' + e.getLineNumber(), '');
+ }
+ }
+
+ public static ResponseBodyLWC searchContactInit(String accountId, String searchKeyWord) {
+ ResponseBodyLWC res = new ResponseBodyLWC();
+ Map<String, object> data = new Map<String, object>();
+ res.entity = data;
+ System.debug('accountId = ' + accountId);
+ System.debug('searchKeyWord = ' + searchKeyWord);
+ try {
+ List<Contact> conList = new List<Contact>();
+ List<Contact> noPIContactList = new List<Contact>();
+ if (checkNullString(accountId) && checkNullString(searchKeyWord)) {
+ conList = new List<Contact>();
+ } else {
+ if (checkNullString(accountId)) {
+ conList = new List<Contact>();
+ } else {
+ //2022-5-12 yjk 灏嗙瀹ゅ尮閰嶆敼涓哄尰闄㈠尮閰嶆煡璇㈣仈绯讳汉 statt
+ Account act = [SELECT id, Hospital__c FROM Account WHERE id = :accountId];
+ conList = new List<Contact>(
+ [
+ SELECT Id, AWS_Data_Id__c, Account.Name
+ FROM Contact
+ WHERE Account.Hospital__c = :act.Hospital__c AND AWS_Data_Id__c != ''
+ ]
+ );
+ noPIContactList = AWSServiceTool.getNoPIContact(searchKeyWord, accountId);
+ //2022-5-12 yjk 灏嗙瀹ゅ尮閰嶆敼涓哄尰闄㈠尮閰嶆煡璇㈣仈绯讳汉 end
+ }
+ }
+ Map<String, Contact> awsIdToContactMap = new Map<String, Contact>();
+ List<String> conAWSIds = new List<String>();
+ for (Contact con : conList) {
+ conAWSIds.add(con.AWS_Data_Id__c);
+ awsIdToContactMap.put(con.AWS_Data_Id__c, con);
+ }
+ data.put('awsIdToContactMap', awsIdToContactMap);
+ data.put('conAWSIds', conAWSIds);
+ data.put('noPIContactList', noPIContactList);
+ data.put('contactStaticResource', JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')));
+ res.status = 'Success';
+ res.code = 200;
+ res.msg = '';
+ return res;
+ } catch (Exception e) {
+ return new ResponseBodyLWC('Error', 500, e.getMessage() + ' ' + e.getLineNumber(), '');
+ }
+ }
+
+ public static Boolean checkNullString(String inputString) {
+ if (String.isEmpty(inputString) || String.isBlank(inputString)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ *@description 杞崲layout
+ *@param sections 榛樿metalayout
+ *@return List<Metadata.LayoutSection> 鏍囧噯metalayout
+ */
+ public static List<Metadata.LayoutSection> reviseMetaLayouts(List<Metadata.LayoutSection> sections) {
+ List<Metadata.LayoutSection> result = new List<Metadata.LayoutSection>();
+ if (sections == null) {
+ return null;
+ }
+ for (Metadata.LayoutSection s : sections) {
+ Metadata.LayoutSection section = new Metadata.LayoutSection();
+ section.customLabel = s.customLabel;
+ section.detailHeading = s.detailHeading;
+ section.editHeading = s.editHeading;
+ section.label = s.label;
+ section.style = s.style;
+ result.add(section);
+ for (Metadata.LayoutColumn c : s.layoutColumns) {
+ if (c.layoutItems == null) {
+ break;
+ }
+ Metadata.LayoutColumn col = new Metadata.LayoutColumn();
+ col.reserved = col.reserved;
+ section.layoutColumns.add(col);
+ for (Metadata.layoutItem item : c.layoutItems) {
+ if (!fieldMap.containsKey(item.field) || !isUpdateable(fieldMap.get(item.field).getDescribe())) {
+ System.debug(item.field);
+ continue;
+ }
+ col.layoutItems.add(item);
+ }
+ }
+ }
+ return result;
+ }
+
+ private static Boolean isUpdateable(Schema.DescribeFieldResult dfr) {
+ return (new List<String>{ 'Id', 'Name' }).contains(dfr.getName()) || dfr.isUpdateable();
+ }
+}
diff --git a/force-app/main/default/classes/LexNewAndEditBasePIPLController.cls-meta.xml b/force-app/main/default/classes/LexNewAndEditBasePIPLController.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexNewAndEditBasePIPLController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexNewAndEditContactPIPLController.cls b/force-app/main/default/classes/LexNewAndEditContactPIPLController.cls
new file mode 100644
index 0000000..5844afa
--- /dev/null
+++ b/force-app/main/default/classes/LexNewAndEditContactPIPLController.cls
@@ -0,0 +1,59 @@
+public with sharing class LexNewAndEditContactPIPLController {
+ public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
+ // 瀛楁淇℃伅
+ public static Map<string, SObjectField> fieldMap = new Map<string, SObjectField>();
+
+ @AuraEnabled
+ public static ResponseBodyLWC initData(Id rid, String recordTypeId, String sobjectType, String accid) {
+ ResponseBodyLWC res = new ResponseBodyLWC();
+ Map<String, object> data = new Map<String, object>();
+ res.entity = data;
+
+ Boolean isDoctor = true;
+ string s = null;
+
+ //濡傛灉鏈夎褰曠被鍨嬶紝鍒ゆ柇鏄笉鏄尰闄㈢被鍨�
+ if (String.isNotBlank(recordTypeId)) {
+ System.debug('recordTypeId = ' + recordTypeId);
+ s = Schema.SObjectType.Contact.getRecordTypeInfosById().get(recordTypeId).getDeveloperName();
+ //璇存槑鏃犻渶鍔犲瘑
+ if (s == 'Agency' || s == 'Internal_staff') {
+ isDoctor = false;
+ data.put('isDoctor', isDoctor);
+ return new ResponseBodyLWC('Success', 200, '', data);
+ }
+ }
+ //璇存槑鏃犻渶鍔犲瘑
+ if (String.isNotBlank(accid)) {
+ List<Account> accs = [SELECT RecordType.DeveloperName FROM account WHERE id = :accid];
+ if (accs.size() > 0) {
+ s = accs[0].RecordType.DeveloperName;
+ if (s == 'Office' || s == 'AgencyContact' || s == 'Agency') {
+ isDoctor = false;
+ data.put('isDoctor', isDoctor);
+ return new ResponseBodyLWC('Success', 200, '', data);
+ }
+ }
+ }
+
+ //璇存槑鏃犻渶鍔犲瘑
+ if (String.isNotBlank(rid)) {
+ List<Contact> contact = [SELECT Id, RecordTypeId FROM Contact WHERE Id = :rid];
+ if (String.isNotBlank(contact[0].RecordTypeId)) {
+ s = Schema.SObjectType.Contact.getRecordTypeInfosById().get(contact[0].RecordTypeId).getDeveloperName();
+ if (s == 'Agency' || s == 'Internal_staff') {
+ isDoctor = false;
+ data.put('isDoctor', isDoctor);
+ return new ResponseBodyLWC('Success', 200, '', data);
+ }
+ }
+ }
+ ResponseBodyLWC rbl = LexNewAndEditBasePIPLController.initData(rid, recordTypeId, sobjectType);
+ if (rbl.status == 'Success') {
+ data = (Map<String, Object>) rbl.entity;
+ data.put('isDoctor', isDoctor);
+ rbl.entity = data;
+ }
+ return rbl;
+ }
+}
diff --git a/force-app/main/default/classes/LexNewAndEditContactPIPLController.cls-meta.xml b/force-app/main/default/classes/LexNewAndEditContactPIPLController.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexNewAndEditContactPIPLController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexOutboundorderImportController.cls b/force-app/main/default/classes/LexOutboundorderImportController.cls
index a1f00f6..548bc31 100644
--- a/force-app/main/default/classes/LexOutboundorderImportController.cls
+++ b/force-app/main/default/classes/LexOutboundorderImportController.cls
@@ -31,7 +31,11 @@
messageCount = 0;
errorflg = false;
errorMessage = null;
- User useracc = [SELECT accountid, Work_Location__c, UserPro_Type__c FROM user WHERE id = :UserInfo.getUserId()];
+ User useracc = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :UserInfo.getUserId()
+ ];
accountid = Useracc.accountid;
userWorkLocation = Useracc.Work_Location__c;
agencyProType = Useracc.UserPro_Type__c;
@@ -50,6 +54,7 @@
res.status = 'Success';
res.code = 200;
res.msg = '';
+ System.debug('res:' + res);
return res;
}
@@ -102,7 +107,7 @@
barcodePieceMap.put(csvRecordData[6], Integer.valueOf(csvRecordData[7]));
}
}
- String[] csvRecordDataStr = new List<String>(13);
+ String[] csvRecordDataStr = new String[13];
for (Integer j = 0; j < csvRecordData.size(); j++) {
csvRecordDataStr[j] = csvRecordData[j];
}
@@ -190,8 +195,8 @@
data.put('saveFLGbln', saveFLGbln);
data.put('csvRecordStr', csvRecordStr);
data.put('barcodeList', barcodeList);
- data.put('secondAgencyMap',secondAgencyMap);
- data.put('hospitalSysMap',hospitalSysMap);
+ data.put('secondAgencyMap', secondAgencyMap);
+ data.put('hospitalSysMap', hospitalSysMap);
res.status = 'Success';
res.code = 200;
res.msg = errorMsg;
@@ -587,7 +592,7 @@
res.entity = data;
csvRecordStr = csvRecordStrLwc;
- orderRecords = (List<ConsumableorderdetailsInfo>)JSON.deserialize(orderRecordsLwc, List<ConsumableorderdetailsInfo>.class);
+ orderRecords = (List<ConsumableorderdetailsInfo>) JSON.deserialize(orderRecordsLwc, List<ConsumableorderdetailsInfo>.class);
System.debug('orderRecords = ' + orderRecords);
sqlagencyProType = sqlagencyProTypeLwc;
userWorkLocation = userWorkLocationLwc;
@@ -753,9 +758,7 @@
string[] csvRecordData = csvRecordStr[i];
if (orderdetMap.containsKey(csvRecordData[0] + csvRecordData[12] + csvRecordData[9])) {
orderdetMap.put(
- csvRecordData[0] +
- csvRecordData[12] +
- csvRecordData[9],
+ csvRecordData[0] + csvRecordData[12] + csvRecordData[9],
orderdetMap.get(csvRecordData[0] + csvRecordData[12] + csvRecordData[9]) + Decimal.valueOf(csvRecordData[7])
);
continue;
@@ -786,7 +789,7 @@
// ApexPages.addMessages(e);
// return null;
errorMsg += e.getMessage() + ' ' + e.getLineNumber() + ';';
- System.debug('orderdetRecords = null ' + e.getLineNumber());
+ System.debug('orderdetRecords = null ' + e.getLineNumber());
return null;
}
}
@@ -864,7 +867,7 @@
return null;
}
}
-
+ @TestVisible
class ConsumableorderdetailsInfo implements Comparable {
@AuraEnabled
public Consumable_order__c order { get; set; }
@@ -916,4 +919,4 @@
return null;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexOutboundorderImportControllerTest.cls b/force-app/main/default/classes/LexOutboundorderImportControllerTest.cls
new file mode 100644
index 0000000..63826fb
--- /dev/null
+++ b/force-app/main/default/classes/LexOutboundorderImportControllerTest.cls
@@ -0,0 +1,612 @@
+@isTest
+private class LexOutboundorderImportControllerTest {
+ static testMethod void myUnitTest() {
+ user myUser_test;
+ Account myAccount1;
+ List<RecordType> rectHos;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount1;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+ // TO DO: implement unit test
+
+ System.runAs(myUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Order;
+ Order1.Dealer_Info__c = myAccount1.Id;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet4.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdet4.Bar_Code__c = '123456789';
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Arrive_date__c = Date.today().addDays(-1);
+ Orderdet4.Box_Piece__c = '鐩�';
+
+ Consumable_order_details2__c orderdet3 = new Consumable_order_details2__c();
+ orderdet3.Name = 'OCM_01_001004';
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ orderdet3.Sterilization_limit__c = Date.today().addDays(-1);
+ orderdet3.Bar_Code__c = '123456788';
+ orderdet3.Consumable_Product__c = pro1.Id;
+ orderdet3.Arrive_date__c = Date.today().addDays(-1);
+ orderdet3.Box_Piece__c = '鐩�';
+
+ Consumable_order_details2__c orderdet2 = new Consumable_order_details2__c();
+ orderdet2.Name = 'OCM_01_001004';
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ orderdet2.Sterilization_limit__c = Date.today().addDays(-1);
+ orderdet2.Bar_Code__c = '123456787';
+ orderdet2.Consumable_Product__c = pro1.Id;
+ orderdet2.Arrive_date__c = Date.today().addDays(-1);
+ orderdet2.Box_Piece__c = '涓�';
+
+ Consumable_order_details2__c orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001004';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet1.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdet1.Bar_Code__c = '123456786';
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Arrive_date__c = Date.today().addDays(-1);
+ Orderdet1.Box_Piece__c = '涓�';
+ insert new List<Consumable_order_details2__c>{ orderdet1, orderdet2, orderdet3, orderdet4 };
+ Account hosp1 = new Account(name = 'Testhosp001', RecordTypeId = rectHos[0].Id);
+ insert hosp1;
+ Agency_Hospital_Link__c jxs = new Agency_Hospital_Link__c(name = 'jxs001', Agency__c = myAccount1.Id, Hospital__c = hosp1.Id);
+ insert jxs;
+ List<Agency_Hospital_Link__c> jxsList = [
+ SELECT Name, Hospital__r.Management_Code__c
+ FROM Agency_Hospital_Link__c
+ WHERE Name = 'Testhosp001'
+ ];
+
+ List<LexOutboundorderImportController.ConsumableorderdetailsInfo> orderRecords1 = new List<LexOutboundorderImportController.ConsumableorderdetailsInfo>();
+ //鍑哄簱鍗�
+ Consumable_order__c cocObj = new Consumable_order__c();
+ cocObj.Name = 'DB-FY2024-06-Z310002';
+ cocObj.SummonsForDirction__c = '閿�鍞粰浜岀骇缁忛攢鍟�';
+ cocObj.Order_Attachment__c = 'Test';
+ cocObj.Order_Indication__c = '12233';
+ cocObj.Order_ForCustomerText__c = '娑堝寲绉�';
+ cocObj.Invoice_Note__c = 'test';
+ cocObj.Outbound_Date__c = Date.today();
+ insert cocObj;
+ orderRecords1.add(new LexOutboundorderImportController.ConsumableorderdetailsInfo(cocObj));
+
+ system.assertEquals(1, jxsList.size());
+ PageReference page = new PageReference('/apex/OutboundorderImport');
+ System.Test.setCurrentPage(page);
+ OutboundorderImportController ctrl = new OutboundorderImportController();
+ System.Test.startTest();
+ String csvBody = '';
+ csvBody = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
+ csvBody +=
+ 'CS-S0001,閿�鍞粰浜岀骇缁忛攢鍟�,' +
+ jxsList[0].Hospital__r.Management_Code__c +
+ ',Testhosp001,test,娴嬭瘯浜岀骇缁忛攢鍟�1,123456789,1,230,鐩�,230,2017-02-17\n';
+ csvBody +=
+ 'CS-S0001,閿�鍞粰浜岀骇缁忛攢鍟�,' +
+ jxsList[0].Hospital__r.Management_Code__c +
+ ',Testhosp001,test,娴嬭瘯浜岀骇缁忛攢鍟�1,123456788,1,230,鐩�,230,2017-02-17\n';
+ csvBody +=
+ 'CS-S0001,閿�鍞粰浜岀骇缁忛攢鍟�,' +
+ jxsList[0].Hospital__r.Management_Code__c +
+ ',Testhosp001,test,娴嬭瘯浜岀骇缁忛攢鍟�1,123456787,1,230,涓�,230,2017-02-17\n';
+ csvBody +=
+ 'CS-S0001,閿�鍞粰浜岀骇缁忛攢鍟�,' +
+ jxsList[0].Hospital__r.Management_Code__c +
+ ',Testhosp001,test,娴嬭瘯浜岀骇缁忛攢鍟�1,123456786,1,230,涓�,230,2017-02-17\n';
+
+ LexOutboundorderImportController.importCSVFile(
+ 'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCznm5IsMjAsMjAyMy82Lzgs5Lii5aSx5Y6f5ZugDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOebkiwyMCwyMDIzLzYvOCzkuKLlpLHljp%2Flm6ANCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiwxLDQwMDAs55uSLDIwLDIwMjMvNi84LOS4ouWkseWOn%2BWboA0K',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ //鍑哄簱鏃ユ湡涓虹┖
+ LexOutboundorderImportController.importCSVFile(
+ '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIsLDgxMDU2NDAs54C555WM5pW75raT5ruEy4nmkLTls7DumLLpjZblqZrmq4ws5aiR5aCd5a%2By57uJPywxNjg2MjAzMjU0NDY4MjUwVlZHSVUsMSwyMDAwLOmQqT8yMCw4LzYvMjAyMyzmtpPjiKDjgZHpjZjnhrfmtJwsLA0KREItRlkyMDI0LTA2LVozMTAwMDMs6ZCp5a2Y5bi06Za%2F4oKs6Y2e7oa%2B57Kw6Y2W5ama5quMLDgxMDU2NDAs54C555WM5pW75raT5ruEy4nmkLTls7DumLLpjZblqZrmq4ws5aiR5aCd5a%2By57uJPywxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOmQqT8yMCw4LzYvMjAyMyzmtpPjiKDjgZHpjZjnhrfmtJwsLA0KREItRlkyMDI0LTA2LVozMTAwMDQs6ZCp5a2Y5bi06Za%2F4oKs6Y2e7oa%2B57Kw6Y2W5ama5quMLDgxMDU2NDAs54C555WM5pW75raT5ruEy4nmkLTls7DumLLpjZblqZrmq4ws5aiR5aCd5a%2By57uJPywxNjg2MjAzMjU3NjU3MjUwR1NGU0IsMSw0MDAwLOmQqT8yMCw4LzYvMjAyMyzmtpPjiKDjgZHpjZjnhrfmtJwsLA0K',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ //鍐呭涓虹┖
+ //涓嶉渶瑕佷簩绾х粡閿�鍟�
+ LexOutboundorderImportController.importCSVFile(
+ '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYywNCkRCLUZZMjAyNC0wNi1aMzEwMDAyLOmUgOWUrue7meS6jOe6p%2Be7j%2BmUgOWVhiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCwyMCw4LzYvMjAyMywsLCwNCkRCLUZZMjAyNC0wNi1aMzEwMDAzLOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsMTY4NjIwMzI1NjA5ODI1MFJFSk9RLDEsNDAwMCwyMCw4LzYvMjAyMywsLCwNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pyw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDEsNTAwMCwyMCw4LzYvMjAyMywsLCwNCg%3D%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ LexOutboundorderImportController.importCSVFile(
+ '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwxNjg2MjAzMjU0NDY4MjUwVlZHSVUsMSwyMDAwLDIwLDgvNi8yMDIzLCwsDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLDE2ODYyMDMyNTYwOTgyNTBSRUpPUSwxLDQwMDAsMjAsOC82LzIwMjMsLCwNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pywsLCwsMSw1MDAwLDIwLDgvNi8yMDIzLCwsDQo%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ //barcode 涓嶅瓨鍦� 鎴栧崟浣嶉敊璇�
+ LexOutboundorderImportController.importCSVFile(
+ '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsODAwLOebkiwsOC82LzIwMjMsDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMiw1MDAs5LiqLCw4LzYvMjAyMywNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pyw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiw0LDkwMDAs55uSLCw4LzYvMjAyMywNCg%3D%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ //涓嶅瓨鍦ㄥ嚭搴撳崟浣�
+ LexOutboundorderImportController.importCSVFile(
+ '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsODAwLCwsOC82LzIwMjMsDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxMjM0NTY3ODYsMiw1MDAs5LiqLCw4LzYvMjAyMywNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pyw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiw0LDkwMDAs55uSLCw4LzYvMjAyMywNCg%3D%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+
+ //瀵煎叆
+ List<String[]> csvRecordStr = LexOutboundorderImportController.csvRecordStr;
+ List<LexOutboundorderImportController.ConsumableorderdetailsInfo> orderRecords = LexOutboundorderImportController.orderRecords;
+ String orderRecordsLwc = JSON.serialize(orderRecords);
+
+ Map<String, String> secondAgencyMap = LexOutboundorderImportController.secondAgencyMap;
+ Map<String, String> hospitalSysMap = LexOutboundorderImportController.hospitalSysMap;
+ LexOutboundorderImportController.dataImport(
+ csvRecordStr,
+ orderRecordsLwc,
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001',
+ 'myAccount1.Id',
+ 'ET',
+ secondAgencyMap,
+ hospitalSysMap
+ );
+ LexOutboundorderImportController.dataImport(
+ csvRecordStr,
+ orderRecordsLwc,
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001',
+ 'myAccount1.Id',
+ 'ET',
+ secondAgencyMap,
+ hospitalSysMap
+ );
+ LexOutboundorderImportController.dataImport(
+ csvRecordStr,
+ '[{"agencyName": "","hospitalCode": "8215356","hospitalName": "瀹界敻涓滄ˉ搴峰鍖婚櫌","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "鐩存帴閿�鍞粰鍖婚櫌","Order_ForHospital__c":"娴嬭瘯鍖婚櫌","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "娑堝寲绉�","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001',
+ 'myAccount1.Id',
+ 'ET',
+ secondAgencyMap,
+ hospitalSysMap
+ );
+
+ LexOutboundorderImportController ctrls = new LexOutboundorderImportController();
+ LexOutboundorderImportController.init();
+ Blob blobData = Blob.valueOf(csvBody);
+ String base64Data = EncodingUtil.base64Encode(blobData);
+ LexOutboundorderImportController.importCSVFile('base64Data', '%ET%', '閲嶅簡', 'Testaccount001');
+ String csvBody1 = '';
+ csvBody1 = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,product,Outbound_Date__c\n';
+ csvBody1 += 'CS-S0001,鍖婚櫌璇曠敤,,,,鍖婚櫌璇曠敤1,123456789,1,,鐩�,230,2017-02-17\n';
+ csvBody1 += 'CS-S0001,鍖婚櫌璇曠敤,,,,鍖婚櫌璇曠敤1,123456788,1,,鐩�,230,2017-02-17\n';
+ csvBody1 += 'CS-S0001,鍖婚櫌璇曠敤,,,,娴嬪尰闄㈣瘯鐢�1,123456787,1,,鐩�,230,2017-02-17\n';
+ csvBody1 += 'CS-S0001,鍖婚櫌璇曠敤,,,,鍖婚櫌璇曠敤1,123456786,1,,鐩�,230,2017-02-17\n';
+ Blob blobData1 = Blob.valueOf(csvBody1);
+ String base64Data1 = EncodingUtil.base64Encode(blobData1);
+ LexOutboundorderImportController.importCSVFile('base64Data1', '%ET%', '閲嶅簡', 'Testaccount001');
+ String csvBody2 = '';
+ csvBody2 = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
+ csvBody2 += 'CS-S0001,鍖婚櫌璇曠敤,,,,鍖婚櫌璇曠敤1,,1,230,鐩�,230,2017-02-17\n';
+ csvBody2 += 'CS-S0001,鍖婚櫌璇曠敤,,,,鍖婚櫌璇曠敤1,,1,230,鐩�,230,2017-02-17\n';
+ csvBody2 += 'CS-S0001,鍖婚櫌璇曠敤,,,,娴嬪尰闄㈣瘯鐢�1,,1,230,鐩�,230,2017-02-17\n';
+ csvBody2 += 'CS-S0001,鍖婚櫌璇曠敤,,,,鍖婚櫌璇曠敤1,,1,230,鐩�,230,2017-02-17\n';
+ Blob blobData2 = Blob.valueOf(csvBody2);
+ String base64Data2 = EncodingUtil.base64Encode(blobData1);
+ LexOutboundorderImportController.importCSVFile('base64Data2', '%ET%', '閲嶅簡', 'Testaccount001');
+
+ String csvBody3 = '';
+ csvBody3 = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
+ csvBody3 += 'CS-S0001,鍖婚櫌璇曠敤,,,,鍖婚櫌璇曠敤1,123456789,1,230,鐩�,230,2017-02-17\n';
+ csvBody3 += 'CS-S0001,鍖婚櫌璇曠敤,,,,鍖婚櫌璇曠敤1,123456788,1,230,鐩�,230,2017-02-17\n';
+ csvBody3 += 'CS-S0001,鍖婚櫌璇曠敤,,,,娴嬪尰闄㈣瘯鐢�1,123456787,1,230,鐩�,230,2017-02-17\n';
+ csvBody3 += 'CS-S0001,鍖婚櫌璇曠敤,,,,鍖婚櫌璇曠敤1,123456786,12,230,鐩�,230,2017-02-17\n';
+ Blob blobData3 = Blob.valueOf(csvBody3);
+ String base64Data3 = EncodingUtil.base64Encode(blobData3);
+ LexOutboundorderImportController.importCSVFile('base64Data3', '%ET%', '閲嶅簡', 'Testaccount001');
+ System.Test.stopTest();
+ }
+ }
+
+ static testMethod void allTest() {
+ user myUser_test;
+ Account myAccount1;
+ List<RecordType> rectHos;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ rectHos = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHos.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount1;
+
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Order;
+ Order1.Dealer_Info__c = myAccount1.Id;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01_001';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '浼犵エ';
+ order2.SummonsStatus_c__c = '宸插畬鎴�';
+ Order2.Dealer_Info__c = myAccount1.Id;
+ Order2.Order_ProType__c = 'ET';
+ Order2.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ insert Order2;
+
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet4.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdet4.Bar_Code__c = '123456789';
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Arrive_date__c = Date.today().addDays(-1);
+ Orderdet4.Box_Piece__c = '鐩�';
+
+ Consumable_order_details2__c orderdet3 = new Consumable_order_details2__c();
+ orderdet3.Name = 'OCM_01_001004';
+ orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ orderdet3.Consumable_Arrived_order__c = Order1.Id;
+ orderdet3.Sterilization_limit__c = Date.today().addDays(-1);
+ orderdet3.Bar_Code__c = '1686203254468250VVGIU';
+ orderdet3.Consumable_Product__c = pro1.Id;
+ orderdet3.Arrive_date__c = Date.today().addDays(-1);
+ orderdet3.Box_Piece__c = '鐩�';
+ orderdet3.Lose_Flag__c = false;
+
+ Consumable_order_details2__c orderdet2 = new Consumable_order_details2__c();
+ orderdet2.Name = 'OCM_01_001004';
+ orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ orderdet2.Consumable_Arrived_order__c = Order1.Id;
+ orderdet2.Sterilization_limit__c = Date.today().addDays(-1);
+ orderdet2.Bar_Code__c = '1686203256098250REJOQ';
+ orderdet2.Consumable_Product__c = pro1.Id;
+ orderdet2.Arrive_date__c = Date.today().addDays(-1);
+ orderdet2.Box_Piece__c = '涓�';
+
+ Consumable_order_details2__c orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001004';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet1.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdet1.Bar_Code__c = '1686203257657250GSFSB';
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Arrive_date__c = Date.today().addDays(-1);
+ Orderdet1.Box_Piece__c = '涓�';
+ insert new List<Consumable_order_details2__c>{ orderdet1, orderdet2, orderdet3, orderdet4 };
+ Account hosp1 = new Account(name = 'Testhosp001', RecordTypeId = rectHos[0].Id);
+ insert hosp1;
+ Agency_Hospital_Link__c jxs = new Agency_Hospital_Link__c(name = 'jxs001', Agency__c = myAccount1.Id, Hospital__c = hosp1.Id);
+ insert jxs;
+ List<Agency_Hospital_Link__c> jxsList = [
+ SELECT Name, Hospital__r.Management_Code__c
+ FROM Agency_Hospital_Link__c
+ WHERE Name = 'Testhosp001'
+ ];
+ //杩愯鏁版嵁
+ System.Test.startTest();
+ LexOutboundorderImportController.init();
+ String csvBody = '';
+ //hospitalCode=null,hospitalName!=null
+ csvBody = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
+ csvBody +=
+ 'CS-S0001,閿�鍞粰浜岀骇缁忛攢鍟�,' +
+ jxsList[0].Hospital__r.Management_Code__c +
+ ',Testhosp001,test,娴嬭瘯浜岀骇缁忛攢鍟�1,123456789,1,230,鐩�,230,2017-02-17\n';
+ csvBody +=
+ 'CS-S0001,閿�鍞粰浜岀骇缁忛攢鍟�,' +
+ jxsList[0].Hospital__r.Management_Code__c +
+ ',Testhosp001,test,娴嬭瘯浜岀骇缁忛攢鍟�1,123456788,1,230,鐩�,230,2017-02-17\n';
+ csvBody +=
+ 'CS-S0001,閿�鍞粰浜岀骇缁忛攢鍟�,' +
+ jxsList[0].Hospital__r.Management_Code__c +
+ ',Testhosp001,test,娴嬭瘯浜岀骇缁忛攢鍟�1,123456787,1,230,涓�,230,2017-02-17\n';
+ csvBody +=
+ 'CS-S0001,閿�鍞粰浜岀骇缁忛攢鍟�,' +
+ jxsList[0].Hospital__r.Management_Code__c +
+ ',Testhosp001,test,娴嬭瘯浜岀骇缁忛攢鍟�1,123456786,1,230,涓�,230,2017-02-17\n';
+ String base64Content = EncodingUtil.Base64Encode(Blob.valueOf(csvBody));
+ System.debug('base64Content==>' + base64Content);
+ Blob blobContent = EncodingUtil.base64Decode(base64Content);
+ System.debug('blobContent==>' + blobContent.toString());
+ LexOutboundorderImportController.importCSVFile(base64Content, '%ET%', '閲嶅簡', 'Testaccount001');
+ LexOutboundorderImportController.importCSVFile(
+ 'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCznm5IsMjAsMjAyMy82Lzgs5Lii5aSx5Y6f5ZugDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOebkiwyMCwyMDIzLzYvOCzkuKLlpLHljp%2Flm6ANCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiwxLDQwMDAs55uSLDIwLDIwMjMvNi84LOS4ouWkseWOn%2BWboA0K',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ LexOutboundorderImportController.importCSVFile(
+ '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLCwxNjg2MjAzMjU0NDY4MjUwVlZHSVUsMSwyMDAwLDIwLOebkiwsLA0KREItRlkyMDI0LTA2LVozMTAwMDMs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSw0MDAwLDIwLOS4qiwsLA0KREItRlkyMDI0LTA2LVozMTAwMDQs5LqS55u46LCD6LSnLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMSw1MDAwLDIwLOS4qiwsLA0K',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ LexOutboundorderImportController.importCSVFile('', '', '', '');
+
+ //瀵煎叆
+ List<String[]> csvRecordStr = LexOutboundorderImportController.csvRecordStr;
+ List<LexOutboundorderImportController.ConsumableorderdetailsInfo> orderRecords = LexOutboundorderImportController.orderRecords;
+ System.debug('111===>' + JSON.serialize(LexOutboundorderImportController.orderRecords));
+ String orderRecordsLwc = JSON.serialize(orderRecords);
+ Map<String, String> secondAgencyMap = LexOutboundorderImportController.secondAgencyMap;
+ Map<String, String> hospitalSysMap = LexOutboundorderImportController.hospitalSysMap;
+ // hospitalSysMap.put('8105640',myAccount1.Id);
+ // hospitalSysMap.put('8106864','0011000001g02glAAA');
+ // hospitalSysMap.put('8106867','0011000001g02hUAAQ');
+ // hospitalSysMap.put('8107348','0011000001g09fDAAQ');
+ System.debug('hospitalSysMap==' + hospitalSysMap);
+ LexOutboundorderImportController.dataImport(
+ csvRecordStr,
+ orderRecordsLwc,
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001',
+ 'myAccount1.Id',
+ 'ET',
+ secondAgencyMap,
+ hospitalSysMap
+ );
+ LexOutboundorderImportController.dataImport(
+ csvRecordStr,
+ '[{"agencyName": "","hospitalCode": "8215356","hospitalName": "娴嬭瘯鍖婚櫌","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "閿�鍞粰浜岀骇缁忛攢鍟�","Order_ForHospital__c":"娴嬭瘯鍖婚櫌","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "娑堝寲绉�","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001',
+ 'myAccount1.Id',
+ 'ET',
+ secondAgencyMap,
+ hospitalSysMap
+ );
+ LexOutboundorderImportController.dataImport(
+ csvRecordStr,
+ '[{"agencyName": "Test","hospitalCode": "8215356","hospitalName": "娴嬭瘯鍖婚櫌","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "鐩存帴閿�鍞粰鍖婚櫌","Order_ForHospital__c":"娴嬭瘯鍖婚櫌","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "娑堝寲绉�","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001',
+ 'myAccount1.Id',
+ 'ET',
+ secondAgencyMap,
+ hospitalSysMap
+ );
+ //浜у搧鍑鸿揣鏁伴噺涓虹┖
+ LexOutboundorderImportController.importCSVFile(
+ 'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LUQzMTg5MDYs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDg2MTMs6YeR5Lmh5Y6%2F5Y2c6ZuG6ZWH5Y2r55Sf6ZmiLOa2iOWMluenkSwsMTY4NzMxNDIzMDEzMTI1MFdVUlhFLCw1MDAs55uSLDE1LDIwMjMvNS8zMCzkuKLlpLHljp%2Flm6ANCg%3D%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ //鍗曚綅鐩� 鏁伴噺澶т簬1(鏃犳晥)
+ LexOutboundorderImportController.importCSVFile(
+ 'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVMzMTc4MTMtMDEs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NzMyMjQ0NDUwOTI1MFVZR01QLDUsNTAwLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ static testMethod void allTest1() {
+ List<String[]> csvRecordStr = LexOutboundorderImportController.csvRecordStr;
+ Map<String, String> secondAgencyMap = LexOutboundorderImportController.secondAgencyMap;
+ Map<String, String> hospitalSysMap = LexOutboundorderImportController.hospitalSysMap;
+ System.debug('===>secondAgencyMap' + secondAgencyMap);
+ System.debug('===>hospitalSysMap' + hospitalSysMap);
+ LexOutboundorderImportController.dataImport(
+ csvRecordStr,
+ '[{"agencyName": "","hospitalCode": "8215356","hospitalName": "娴嬭瘯鍖婚櫌","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "閿�鍞粰浜岀骇缁忛攢鍟�","Order_ForHospital__c":"娴嬭瘯鍖婚櫌","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "娑堝寲绉�","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001',
+ 'myAccount1.Id',
+ 'ET',
+ secondAgencyMap,
+ hospitalSysMap
+ );
+ LexOutboundorderImportController.importCSVFile(
+ '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA1LVozMTcxMDcs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDg4MDI1MCzlpKfov57lpYfliqDlpI3lgaXljLvpmaIs5aSW56eRLCwxMjM0NTYsNzAwLCznm5IsLDI3LzUvMjAwMiwNCkRCLUZZMjAyNC0wNS1aMzE3MTA3LOmUgOWUrue7meS6jOe6p%2Be7j%2BmUgOWVhiw4ODAyNTAs5aSn6L%2Be5aWH5Yqg5aSN5YGl5Yy76ZmiLOWkluenkSwsMTIzNDU2LDcwMCwwLOebkiwsMjcvNS8yMDAyLA0K',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ LexOutboundorderImportController.importCSVFile(
+ '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA1LVozMTcxMDcs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDg4MDI1MCzlpKfov57lpYfliqDlpI3lgaXljLvpmaIs5aSW56eRLCwxMjM0NTYsNzAwLDAs55uSLCwyNy81LzIwMDIsDQpEQi1GWTIwMjQtMDUtWjMxNzEwNyzplIDllK7nu5nkuoznuqfnu4%2FplIDllYYsODgwMjUwLOWkp%2Bi%2FnuWlh%2BWKoOWkjeWBpeWMu%2BmZoizlpJbnp5EsLDEyMzQ1Niw3MDAsMCznm5IsLDI3LzUvMjAwMiwNCiwsLCwsLCwsLCwsLA0KLCwsLCwsLCwsLCwsDQosLCwsLCwsLCwsLCwNCiwsLCwsLCwsLCwsLA0KLCwscywsLCwsLCwsLA0K',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ LexOutboundorderImportController.importCSVFile(
+ 'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LUQzMTg5MDYs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDg2MTMs6YeR5Lmh5Y6%2F5Y2c6ZuG6ZWH5Y2r55Sf6ZmiLOa2iOWMluenkSwsMTY4NzMxNDIzMDEzMTI1MFdVUlhFLDEsLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ //瀛樺湪Barcode涓虹┖
+ LexOutboundorderImportController.importCSVFile(
+ 'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LUQzMTg5MDYs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDg2MTMs6YeR5Lmh5Y6%2F5Y2c6ZuG6ZWH5Y2r55Sf6ZmiLOa2iOWMluenkSwsLDUsNTAwLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ //浜у搧鍑鸿揣鏁伴噺涓虹┖(鏃犳晥)
+ LexOutboundorderImportController.importCSVFile(
+ 'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVMzMTc4MTMtMDEs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NzMyMjQ0NDUwOTI1MFVZR01QLCw1MDAs55uSLDE1LDIwMjMvNS8zMCzkuKLlpLHljp%2Flm6ANCg%3D%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ //浜岀骇缁忛攢鍟嗕笉涓虹┖
+ LexOutboundorderImportController.importCSVFile(
+ 'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVMzMTc4MTMtMDEs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NzMyMjQ0NDUwOTI1MFVZR01QLDUsNTAwLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D',
+ '%ET%',
+ '閲嶅簡',
+ 'Testaccount001'
+ );
+ }
+}
diff --git a/force-app/main/default/classes/LexOutboundorderImportControllerTest.cls-meta.xml b/force-app/main/default/classes/LexOutboundorderImportControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexOutboundorderImportControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexOverdueStockController.cls b/force-app/main/default/classes/LexOverdueStockController.cls
index adbaaa7..9777f3c 100644
--- a/force-app/main/default/classes/LexOverdueStockController.cls
+++ b/force-app/main/default/classes/LexOverdueStockController.cls
@@ -1,5 +1,4 @@
public with sharing class LexOverdueStockController {
-
/*****************妞滅储鐢�******************/
public static String barcode { get; set; }
@@ -17,19 +16,18 @@
// 缁忛攢鍟嗕俊鎭�
private static Account accountInfo;
- //鍒ゆ柇鎿嶄綔浜哄憳鏄惁閿�瀛�
+ //鍒ゆ柇鎿嶄綔浜哄憳鏄惁閿�瀛�
public static Boolean iSinventory = false;
public static List<Consumable_order_details2__c> overdueList = new List<Consumable_order_details2__c>();
- public static Integer pageRecordsSize {
+ public static Integer pageRecordsSize {
get {
return codPageRecords == null ? 0 : codPageRecords.size();
}
}
public LexOverdueStockController() {
-
}
// 鐢婚潰鍒濆鍖�
@@ -42,103 +40,134 @@
codPageRecords = new List<orderBean>();
overduePageRecords = new List<orderBean>();
// 鑾峰彇鐢ㄦ埛鍜岀粡閿�鍟嗕俊鎭�
- user Useracc = [select Accountid, Work_Location__c,UserPro_Type__c from user where id =: UserInfo.getUserId()];
+ user Useracc = [
+ SELECT Accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :UserInfo.getUserId()
+ ];
userWorkLocation = Useracc.Work_Location__c;
agencyProType = Useracc.UserPro_Type__c;
- if(String.isBlank(Useracc.UserPro_Type__c)){
+ if (String.isBlank(Useracc.UserPro_Type__c)) {
agencyProType = 'ET';
}
sqlagencyProType = '%' + agencyProType + '%';
- accountInfo = [SELECT id,Name,Dealer_discount__c FROM account WHERE id =:Useracc.accountid];
+ accountInfo = [
+ SELECT id, Name, Dealer_discount__c
+ FROM account
+ WHERE id = :Useracc.accountid
+ ];
// 杩囨湡搴撳瓨姹囨�讳俊鎭�
- List<AggregateResult> orderDetZaiku = [SELECT count(Id) countsum,
- Consumable_Product__c prodid,
- Consumable_Product__r.Name_Text__c prodname,
- Box_Piece__c boxPiece
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c = false
- AND Dealer_Saled__c = false
- AND Lose_Flag__c = false
- AND Isoverdue__c = 0
- AND Dealer_Returned__c = false
- AND Cancellation_Flag__c = false
- AND Bar_Code__c !=null
- AND Product_Type__c like : sqlagencyProType
- AND Dealer_Info_text__c = :accountInfo.Name
- AND Arrive_Owner_Work_Location__c = :userWorkLocation
- group by Consumable_Product__c,Box_Piece__c,Consumable_Product__r.Name_Text__c];
+ List<AggregateResult> orderDetZaiku = [
+ SELECT count(Id) countsum, Consumable_Product__c prodid, Consumable_Product__r.Name_Text__c prodname, Box_Piece__c boxPiece
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Isoverdue__c = 0
+ AND Dealer_Returned__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c != NULL
+ AND Product_Type__c LIKE :sqlagencyProType
+ AND Dealer_Info_text__c = :accountInfo.Name
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ GROUP BY Consumable_Product__c, Box_Piece__c, Consumable_Product__r.Name_Text__c
+ ];
- for(AggregateResult overdue : orderDetZaiku){
+ for (AggregateResult overdue : orderDetZaiku) {
codPageRecords.add(new orderBean(overdue));
}
- system.debug('codPageRecords====>'+codPageRecords);
- data.put('codPageRecords',JSON.serialize(codPageRecords));
- data.put('userWorkLocation',userWorkLocation);
- data.put('accountName',accountInfo.Name);
- data.put('agencyProType',agencyProType);
- data.put('orderDetZaiku',JSON.serialize(orderDetZaiku));
+ system.debug('codPageRecords====>' + codPageRecords);
+ data.put('codPageRecords', JSON.serialize(codPageRecords));
+ data.put('userWorkLocation', userWorkLocation);
+ data.put('accountName', accountInfo.Name);
+ data.put('agencyProType', agencyProType);
+ data.put('orderDetZaiku', JSON.serialize(orderDetZaiku));
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
return res;
-
}
// BarCode褰曞叆
@AuraEnabled
- public static ResponseBodyLWC searchorderBean(String agencyProTypeLWC,String userWorkLocationLWC,String accountNameLWC,String barcodeLWC,String codPageRecordsLWC){
+ public static ResponseBodyLWC searchorderBean(
+ String agencyProTypeLWC,
+ String userWorkLocationLWC,
+ String accountNameLWC,
+ String barcodeLWC,
+ String codPageRecordsLWC
+ ) {
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
res.entity = data;
- List<orderBean> codPageRecords = (List<orderBean>)JSON.deserialize(codPageRecordsLWC,List<orderBean>.class);
+ List<orderBean> codPageRecords = (List<orderBean>) JSON.deserialize(codPageRecordsLWC, List<orderBean>.class);
sqlagencyProType = '%' + agencyProTypeLWC + '%';
- system.debug('sqlagencyProType==>'+ sqlagencyProType);
+ system.debug('sqlagencyProType==>' + sqlagencyProType);
barcode = barcodeLWC;
- system.debug('barcode==>'+ barcode);
+ system.debug('barcode==>' + barcode);
userWorkLocation = userWorkLocationLWC;
// add by Wang Xueqin 2023/04/12
// 鑾峰彇鐢ㄦ埛鍜岀粡閿�鍟嗕俊鎭�
- user Useracc = [select Accountid, Work_Location__c,UserPro_Type__c from user where id =: UserInfo.getUserId()];
- accountInfo = [SELECT id,Name,Dealer_discount__c FROM account WHERE id =:Useracc.accountid];
-
-
+ user Useracc = [
+ SELECT Accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :UserInfo.getUserId()
+ ];
+ accountInfo = [
+ SELECT id, Name, Dealer_discount__c
+ FROM account
+ WHERE id = :Useracc.accountid
+ ];
+
iSinventory = true;
Set<String> barCodeoverdue = new Set<String>();
overduePageRecords = new List<orderBean>();
- List<String> barCodeListP = ParseBarCode( barcode );
+ List<String> barCodeListP = ParseBarCode(barcode);
// 椤甸潰鏄剧ず鏁版嵁鍒濆鍖�
for (orderBean codPage : codPageRecords) {
codPage.pandian = 0;
}
// 鏌ヨ鎵�鏈夎繃鏈熷簱瀛�
- List<Consumable_order_details2__c> orderDetZaiku = [select Id, Name,Consumable_Product__c,
- Bar_Code__c,Consumable_Product__r.Name__c,Dealer_Info_text__c,
- Asset_Model_No__c,Isoverdue__c,Box_Piece__c,Sterilization_limit__c,
- Bar_Code_search__c
- FROM Consumable_order_details2__c
- WHERE Dealer_Arrive__c = true
- AND Dealer_Shipment__c = false
- AND Dealer_Saled__c = false
- AND Lose_Flag__c = false
- AND Isoverdue__c = 0
- AND Dealer_Returned__c = false
- AND Cancellation_Flag__c = false
- AND Bar_Code__c !=null
- AND Product_Type__c like : sqlagencyProType
- AND Dealer_Info_text__c = :accountInfo.Name
- AND Arrive_Owner_Work_Location__c = :userWorkLocation];
+ List<Consumable_order_details2__c> orderDetZaiku = [
+ SELECT
+ Id,
+ Name,
+ Consumable_Product__c,
+ Bar_Code__c,
+ Consumable_Product__r.Name__c,
+ Dealer_Info_text__c,
+ Asset_Model_No__c,
+ Isoverdue__c,
+ Box_Piece__c,
+ Sterilization_limit__c,
+ Bar_Code_search__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Isoverdue__c = 0
+ AND Dealer_Returned__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c != NULL
+ AND Product_Type__c LIKE :sqlagencyProType
+ AND Dealer_Info_text__c = :accountInfo.Name
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ ];
// 娌℃湁杈撳叆鏉$爜鏃讹紝寰幆椤甸潰锛屾墍鏈夋墦閽╀骇鍝佸叏閮ㄩ攢瀛�
// 鍙栧緱鎵�鏈�
overdueList = new List<Consumable_order_details2__c>();
if (String.isBlank(barcode)) {
System.debug('barcode绌�');
- for(orderBean codPage : codPageRecords){
+ for (orderBean codPage : codPageRecords) {
if (codPage.check) {
- for(Consumable_order_details2__c cod2 : orderDetZaiku){
- if(cod2.Consumable_Product__c == codPage.prodid && codPage.boxPiece == cod2.Box_Piece__c){
- overduePageRecords.add(new orderBean(cod2,'杩囨湡搴撳瓨閿�瀛�'));
+ for (Consumable_order_details2__c cod2 : orderDetZaiku) {
+ if (cod2.Consumable_Product__c == codPage.prodid && codPage.boxPiece == cod2.Box_Piece__c) {
+ overduePageRecords.add(new orderBean(cod2, '杩囨湡搴撳瓨閿�瀛�'));
overdueList.add(cod2);
}
}
@@ -147,162 +176,187 @@
}
// return;
System.debug('overduePageRecords = ' + overduePageRecords);
- data.put('overduePageRecords',JSON.serialize(overduePageRecords));
- data.put('codPageRecords',JSON.serialize(codPageRecords));
- data.put('iSinventory',iSinventory);
- data.put('overdueList',overdueList);
- res.status = 'Success';
- res.code = 200;
- // res.msg = '璇疯緭鍏arCode鍙�';
- System.debug('res = ' + res);
- return res;
+ System.debug('overdueList = ' + overdueList);
+ data.put('overduePageRecords', JSON.serialize(overduePageRecords));
+ data.put('codPageRecords', JSON.serialize(codPageRecords));
+ data.put('iSinventory', iSinventory);
+ data.put('overdueList', overdueList);
+ res.status = 'Success1';
+ res.code = 200;
+ // res.msg = '璇疯緭鍏arCode鍙�';
+ System.debug('res = ' + res);
+ return res;
}
// 杈撳叆barcode鏃�
// BarCode鐨勬绱� 鎵�鏈夊湪搴�
- List<Consumable_order_details2__c> reSet = [select Id,Consumable_Product__c,
- Consumable_Product__r.Name__c,Box_Piece__c,Bar_Code_search__c,
- Dealer_Shipment__c,Dealer_Saled__c,Lose_Flag__c,Bar_Code__c,
- Cancellation_Flag__c,Isoverdue__c,Sterilization_limit__c
- from Consumable_order_details2__c
- where Bar_Code_search__c in :BarCodeListP
- AND Dealer_Arrive__c = true
- AND Cancellation_Flag__c = false
- and Dealer_Returned__c = false
- and Bar_Code__c !=null
- AND Product_Type__c like : sqlagencyProType
- AND Arrive_Owner_Work_Location__c =: userWorkLocation
- AND Dealer_Info_text__c = :accountInfo.Name
- order by Name];
-
- System.debug('reSet===>'+reSet);
+ List<Consumable_order_details2__c> reSet = [
+ SELECT
+ Id,
+ Consumable_Product__c,
+ Consumable_Product__r.Name__c,
+ Box_Piece__c,
+ Bar_Code_search__c,
+ Dealer_Shipment__c,
+ Dealer_Saled__c,
+ Lose_Flag__c,
+ Bar_Code__c,
+ Cancellation_Flag__c,
+ Isoverdue__c,
+ Sterilization_limit__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Bar_Code_search__c IN :BarCodeListP
+ AND Dealer_Arrive__c = TRUE
+ AND Cancellation_Flag__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Bar_Code__c != NULL
+ AND Product_Type__c LIKE :sqlagencyProType
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Dealer_Info_text__c = :accountInfo.Name
+ ORDER BY Name
+ ];
+ System.debug('reSet===>' + reSet);
- for(Consumable_order_details2__c cod2 : reSet){
- if ((cod2.Dealer_Shipment__c == false && cod2.Dealer_Saled__c == false
- && cod2.Lose_Flag__c == false && cod2.Cancellation_Flag__c == false) && cod2.Isoverdue__c == 0) {
+ for (Consumable_order_details2__c cod2 : reSet) {
+ if (
+ (cod2.Dealer_Shipment__c == false &&
+ cod2.Dealer_Saled__c == false &&
+ cod2.Lose_Flag__c == false &&
+ cod2.Cancellation_Flag__c == false) && cod2.Isoverdue__c == 0
+ ) {
for (orderBean codPage : codPageRecords) {
- if(cod2.Consumable_Product__c == codPage.prodid && cod2.Box_Piece__c == codPage.boxPiece){
- overduePageRecords.add(new orderBean(cod2,'杩囨湡搴撳瓨閿�瀛�'));
+ if (cod2.Consumable_Product__c == codPage.prodid && cod2.Box_Piece__c == codPage.boxPiece) {
+ overduePageRecords.add(new orderBean(cod2, '杩囨湡搴撳瓨閿�瀛�'));
overdueList.add(cod2);
- codPage.pandian ++;
+ codPage.pandian++;
codPage.check = true;
}
}
- }else if (cod2.Dealer_Shipment__c || cod2.Dealer_Saled__c) {
- overduePageRecords.add(new orderBean(cod2,'浜у搧宸茬粡鍑哄簱'));
- }else{
- overduePageRecords.add(new orderBean(cod2,'涓嶆槸杩囨湡搴撳瓨'));
+ } else if (cod2.Dealer_Shipment__c || cod2.Dealer_Saled__c) {
+ overduePageRecords.add(new orderBean(cod2, '浜у搧宸茬粡鍑哄簱'));
+ } else {
+ overduePageRecords.add(new orderBean(cod2, '涓嶆槸杩囨湡搴撳瓨'));
}
}
System.debug('overduePageRecords = ' + overduePageRecords);
- data.put('overduePageRecords',JSON.serialize(overduePageRecords));
- data.put('codPageRecords',JSON.serialize(codPageRecords));
- data.put('iSinventory',iSinventory);
- data.put('overdueList',overdueList);
+ data.put('overduePageRecords', JSON.serialize(overduePageRecords));
+ data.put('codPageRecords', JSON.serialize(codPageRecords));
+ data.put('iSinventory', iSinventory);
+ data.put('overdueList', overdueList);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
return res;
}
-
// 淇濆瓨鎸夐挳
@AuraEnabled
- public static ResponseBodyLWC save(Boolean iSinventory,string saveCodPageRecords,List<Consumable_order_details2__c> saveoverdueList) {
+ public static ResponseBodyLWC save(Boolean iSinventory, string saveCodPageRecords, List<Consumable_order_details2__c> saveoverdueList) {
ResponseBodyLWC res = new ResponseBodyLWC();
Map<String, object> data = new Map<String, object>();
res.entity = data;
- system.debug('saveCodPageRecords=============>'+saveCodPageRecords);
- system.debug('saveoverdueList'+saveoverdueList);
- overdueList = saveoverdueList;
+ system.debug('saveCodPageRecords=============>' + saveCodPageRecords);
+ system.debug('saveoverdueList' + saveoverdueList);
+ overdueList = saveoverdueList;
// if(saveoverdueList==null){
// return new ResponseBodyLWC('Error',500, '璇烽�夋嫨瑕侀攢瀛樼殑鏄庣粏', '');
// }
- List<orderBean> codPageRecords = (List<orderBean>)JSON.deserialize(saveCodPageRecords,List<orderBean>.class);
+ List<orderBean> codPageRecords = (List<orderBean>) JSON.deserialize(saveCodPageRecords, List<orderBean>.class);
// List<Consumable_order_details2__c> overdueList = (List<Consumable_order_details2__c>)JSON.deserialize(saveoverdueList,List<Consumable_order_details2__c>.class);
- // add by Wang Xueqin 2023/04/12
+ // add by Wang Xueqin 2023/04/12
// 鑾峰彇鐢ㄦ埛鍜岀粡閿�鍟嗕俊鎭�
- user Useracc = [select Accountid, Work_Location__c,UserPro_Type__c from user where id =: UserInfo.getUserId()];
- accountInfo = [SELECT id,Name,Dealer_discount__c FROM account WHERE id =:Useracc.accountid];
+ user Useracc = [
+ SELECT Accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :UserInfo.getUserId()
+ ];
+ accountInfo = [
+ SELECT id, Name, Dealer_discount__c
+ FROM account
+ WHERE id = :Useracc.accountid
+ ];
// 璺宠繃鏄庣粏2涓嶅繀瑕佹洿鏂�
StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
- if(!iSinventory){
+ if (!iSinventory) {
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'璇峰厛鐐广�怋arCode褰曞叆銆�'));
- return new ResponseBodyLWC('Error',500, '璇峰厛褰曞叆BarCode', '');
+ return new ResponseBodyLWC('Error', 500, '璇峰厛褰曞叆BarCode', '');
// return null;
}
integer Lo = 0;
- for(orderBean header : codPageRecords){
- if(header.check==true){
+ for (orderBean header : codPageRecords) {
+ if (header.check == true) {
Lo++;
}
}
- if(Lo == 0){
+ if (Lo == 0) {
iSinventory = false;
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'璇烽�夋嫨瑕侀攢瀛樼殑鏄庣粏銆�'));
- return new ResponseBodyLWC('Error',500, '璇烽�夋嫨瑕侀攢瀛樼殑鏄庣粏', '');
+ return new ResponseBodyLWC('Error', 500, '璇烽�夋嫨瑕侀攢瀛樼殑鏄庣粏', '');
// return null;
}
Integer orderDetNo = 1;
Savepoint sp = Database.setSavepoint();
Consumable_order__c po = new Consumable_order__c();
- po.Name ='*';
+ po.Name = '*';
po.Order_status__c = '鎵瑰噯';
po.Inventory_date__c = Date.today();
po.Order_type__c = '閿�瀛�';
po.Dealer_Info__c = accountInfo.Id;
po.Order_ProType__c = agencyProType;
po.RecordTypeid = System.Label.RT_ConOrder_Overdue;
- try{
- insert po;
- Consumable_order__c order = [SELECT Name FROM Consumable_order__c WHERE id =:po.id];
- List<Consumable_orderdetails__c> InsList = New List<Consumable_orderdetails__c>();
- for(orderBean header : codPageRecords){
- if(header.check==true){
+ try {
+ insert po;
+ Consumable_order__c order = [
+ SELECT Name
+ FROM Consumable_order__c
+ WHERE id = :po.id
+ ];
+ List<Consumable_orderdetails__c> InsList = new List<Consumable_orderdetails__c>();
+ for (orderBean header : codPageRecords) {
+ if (header.check == true) {
Consumable_orderdetails__c insPan = new Consumable_orderdetails__c();
String str = string.valueOf(orderDetNo);
- if(str.length() == 1){
- str = '0' + str;
+ if (str.length() == 1) {
+ str = '0' + str;
}
- insPan.Name = order.Name + '-'+ str;
+ insPan.Name = order.Name + '-' + str;
insPan.Consumable_Product__c = header.prodId;
insPan.Consumable_order__c = po.Id;
insPan.Lose_reason__c = '杩囨湡搴撳瓨閿�瀛�';
insPan.Overdue_count__c = header.pandian;
insPan.Overdue_SUM__c = header.overlimitCount;
insPan.RecordTypeId = System.Label.RT_ConOrderDetail1_Inventory;
- orderDetNo ++;
+ orderDetNo++;
InsList.add(insPan);
}
}
// 鐢熸垚鏄庣粏1
- if(InsList.size()>0){
+ if (InsList.size() > 0) {
insert InsList;
}
- for(Consumable_order_details2__c cod : overdueList){
+ for (Consumable_order_details2__c cod : overdueList) {
cod.Consumable_Inventory_order__c = po.Id;
cod.Inventory_date__c = Date.today();
cod.Lose_reason__c = '杩囨湡搴撳瓨閿�瀛�';
cod.Lose_Flag__c = true;
-
}
- if(overdueList.size()>0){
+ if (overdueList.size() > 0) {
ControllerUtil.updateOrderDetailsSatus(overdueList);
}
-
- }catch (Exception ex) {
+ } catch (Exception ex) {
Database.rollback(sp);
ApexPages.addMessages(ex);
return null;
}
// return new Pagereference('/' + po.Id);
- data.put('Id',po.Id);
+ data.put('Id', po.Id);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
@@ -310,24 +364,25 @@
}
// 灏嗛〉闈㈡垨鍙栧緱BarCode鍘绘帀閲嶅鐨勶紝杞崲鎴怢ist
- public static List<String> ParseBarCode(String Code){
- Map<String,Integer> barcodeCountMap = new Map<String,Integer>();
- String[] Cache = new String[]{};
+ public static List<String> ParseBarCode(String Code) {
+ Map<String, Integer> barcodeCountMap = new Map<String, Integer>();
+ String[] Cache = new List<String>{};
Cache = Code.split('\n');
- List <String> Buff = new List<String>();
- for(String A : Cache){
+ List<String> Buff = new List<String>();
+ for (String A : Cache) {
A = A.trim().toUpperCase();
- if(barcodeCountMap.containsKey(A)){
- barcodeCountMap.put(A,barcodeCountMap.get(A) + 1);
- }else{
- barcodeCountMap.put(A,1);
+ if (barcodeCountMap.containsKey(A)) {
+ barcodeCountMap.put(A, barcodeCountMap.get(A) + 1);
+ } else {
+ barcodeCountMap.put(A, 1);
}
Buff.add(A + barcodeCountMap.get(A));
}
return Buff;
}
- // Data Bean
+ // Data Bean
+ @TestVisible
class orderBean implements Comparable {
@AuraEnabled
public Consumable_order_details2__c orderdetails2 { get; set; }
@@ -335,7 +390,7 @@
public Product2__c Prod { get; set; }
@AuraEnabled
public Boolean check { get; set; }
-
+
// 杩囨湡搴撳瓨
@AuraEnabled
public Integer overlimitCount { get; set; }
@@ -352,7 +407,7 @@
public String prodname { get; set; }
@AuraEnabled
public String prodid { get; set; }
- orderBean(Consumable_order_details2__c e,string str) {
+ orderBean(Consumable_order_details2__c e, string str) {
orderdetails2 = e;
Prod = e.Consumable_Product__r;
DiffReason = str;
@@ -367,14 +422,14 @@
}
// 鎺掑簭
public Integer compareTo(Object compareTo) {
- orderBean compareToesd =(orderBean)compareTo;
+ orderBean compareToesd = (orderBean) compareTo;
Integer returnValue = 0;
- if (overlimitCount > compareToesd.overlimitCount ) {
+ if (overlimitCount > compareToesd.overlimitCount) {
returnValue = -1;
- } else if (overlimitCount < compareToesd.overlimitCount ) {
+ } else if (overlimitCount < compareToesd.overlimitCount) {
returnValue = 1;
}
return returnValue;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexOverdueStockControllerTest.cls b/force-app/main/default/classes/LexOverdueStockControllerTest.cls
new file mode 100644
index 0000000..48281e5
--- /dev/null
+++ b/force-app/main/default/classes/LexOverdueStockControllerTest.cls
@@ -0,0 +1,219 @@
+@isTest
+private class LexOverdueStockControllerTest {
+ static testMethod void testMethod1() {
+ user MyUser_Test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ //浜у搧鏁版嵁
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod08 = new Product2(
+ Name = 'Test08',
+ ProductCode = 'Test08',
+ Asset_Model_No__c = 'Test08',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod09 = new Product2(
+ Name = 'Test09',
+ ProductCode = 'Test09',
+ Asset_Model_No__c = 'Test09',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07, prod08, prod09 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod07.Id);
+ insert proG;
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod08.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod09.Id);
+ insert proF;
+
+ //璁㈠崟
+ Consumable_order__c order = new Consumable_order__c();
+ order.Name = 'testMing';
+ order.Order_status__c = '鎵瑰噯';
+ order.RecordTypeid = System.Label.RT_ConOrder_Order;
+ order.Dealer_Info__c = myAccount1.id;
+ order.Inventory_date__c = Date.today();
+ order.Order_type__c = '璁㈠崟';
+ order.Order_ProType__c = 'ET';
+ insert order;
+ //鍒拌揣
+ Consumable_order__c order2 = new Consumable_order__c();
+ order2.Name = 'testMing1';
+ order2.Order_status__c = '鎵瑰噯';
+ order2.RecordTypeid = '01210000000c9dqAAA';
+ order2.Dealer_Info__c = myAccount1.id;
+ order2.Order_type__c = '鍒拌揣';
+ order2.Order_ProType__c = 'ET';
+ insert order2;
+
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+ //鍒朵綔Consumable_order_details__c-------ProductCount
+ // 閿�鍞�
+ Consumable_order_details2__c dataForProductCount7 = new Consumable_order_details2__c();
+ dataForProductCount7.Bar_Code__c = '123456789298k250AAAAA';
+ dataForProductCount7.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount7.Arrive_date__c = Date.today();
+ dataForProductCount7.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount7.Consumable_Product__c = proH.id;
+ dataForProductCount7.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount7.Box_Piece__c = '鐩�';
+ dataForProductCount7.Used_date__c = Date.today();
+ dataForProductCount7.Consumable_order_minor__c = order.id;
+
+ conList.add(dataForProductCount7);
+ // 鍦ㄥ簱 杩囨湡 鐩�
+ Consumable_order_details2__c dataForProduct = new Consumable_order_details2__c();
+ dataForProduct.Bar_Code__c = '123456789498k250BBBBB';
+ dataForProduct.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProduct.Arrive_date__c = Date.today();
+ dataForProduct.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProduct.Consumable_Product__c = proF.id;
+ dataForProduct.Asset_Model_No__c = proF.Asset_Model_No__c;
+ dataForProduct.Box_Piece__c = '鐩�';
+ dataForProduct.Consumable_order_minor__c = order.id;
+
+ conList.add(dataForProduct);
+ // 鍦ㄥ簱 杩囨湡 涓�
+ Consumable_order_details2__c dataForProductCount3 = new Consumable_order_details2__c();
+ dataForProductCount3.Bar_Code__c = '123456788398k250CCCCC';
+ dataForProductCount3.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount3.Arrive_date__c = Date.today();
+ dataForProductCount3.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount3.Consumable_Product__c = proG.id;
+ dataForProductCount3.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount3.Box_Piece__c = '涓�';
+ dataForProductCount3.RemoveBox_No__c = 1;
+ dataForProductCount3.Consumable_order_minor__c = order.id;
+ conList.add(dataForProductCount3);
+ insert conList;
+
+ //杩囨湡搴撳瓨姹囨�讳俊鎭� add by Wang Xueqin
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ Consumable_order_details2__c dataForProductCount4 = new Consumable_order_details2__c();
+ dataForProductCount4.Bar_Code__c = '1001';
+ dataForProductCount4.Arrive_date__c = Date.today();
+ dataForProductCount4.Send_Date__c = null;
+ dataForProductCount4.Used_date__c = null;
+ dataForProductCount4.Return_date__c = null;
+ dataForProductCount4.Lose_Flag__c = false;
+ dataForProductCount4.Cancellation_Flag__c = false;
+ dataForProductCount4.Consumable_Product__c = proG.Id;
+ dataForProductCount4.Consumable_Arrived_order__c = order2.id;
+ dataForProductCount4.Used_account__c = myAccount1.Id;
+ dataForProductCount4.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount4.Box_Piece__c = '鐩�';
+ conList1.add(dataForProductCount4);
+ System.debug('conList1==>' + conList1);
+ //鏌ヨ鎵�鏈夎繃鏈熷簱瀛�
+ Consumable_order_details2__c dataForProductCount5 = new Consumable_order_details2__c();
+ dataForProductCount5.Bar_Code__c = '1002';
+ dataForProductCount5.Arrive_date__c = Date.today();
+ dataForProductCount5.Send_Date__c = Date.today();
+ dataForProductCount5.Used_date__c = Date.today();
+ dataForProductCount5.Return_date__c = null;
+ dataForProductCount5.Lose_Flag__c = false;
+ dataForProductCount5.Cancellation_Flag__c = false;
+ dataForProductCount5.Consumable_Product__c = proG.Id;
+ dataForProductCount5.Consumable_Arrived_order__c = order2.id;
+ dataForProductCount5.Used_account__c = myAccount1.Id;
+ dataForProductCount5.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount5.Box_Piece__c = '鐩�';
+ conList1.add(dataForProductCount5);
+ insert conList1;
+
+ System.Test.startTest();
+ List<Consumable_order_details2__c> overdueList = new List<Consumable_order_details2__c>();
+ LexOverdueStockController overCon = new LexOverdueStockController();
+ LexOverdueStockController.init();
+ List<LexOverdueStockController.orderBean> cro = new List<LexOverdueStockController.orderBean>();
+ List<LexOverdueStockController.orderBean> croList = LexOverdueStockController.codPageRecords;
+ for (LexOverdueStockController.orderBean i : croList) {
+ i.check = true;
+ }
+
+ String codPageRecordsLWC = JSON.serialize(LexOverdueStockController.codPageRecords);
+ System.debug('codPageRecordsLWC===>test' + LexOverdueStockController.codPageRecords);
+ LexOverdueStockController.searchorderBean(
+ 'ET',
+ '閲嶅簡',
+ 'Testaccount001',
+ '123456789298k250AAAAA\n123456789498k250BBBBB\n123456788398k250CCCCC\n1001',
+ codPageRecordsLWC
+ );
+ LexOverdueStockController.searchorderBean('ET', '閲嶅簡', 'Testaccount001', '', codPageRecordsLWC); //barcode涓虹┖
+ LexOverdueStockController.save(true, codPageRecordsLWC, overdueList);
+ // LexOverdueStockController.save(false,codPageRecordsLWC,overdueList);
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexOverdueStockControllerTest.cls-meta.xml b/force-app/main/default/classes/LexOverdueStockControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexOverdueStockControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexProductLimitEditControllerTest.cls b/force-app/main/default/classes/LexProductLimitEditControllerTest.cls
new file mode 100644
index 0000000..bc53eab
--- /dev/null
+++ b/force-app/main/default/classes/LexProductLimitEditControllerTest.cls
@@ -0,0 +1,62 @@
+@isTest
+private class LexProductLimitEditControllerTest {
+ @isTest
+ static void unittest() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Account myAccount2 = new Account(
+ name = 'Testaccount005',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|5|55,Test02|2|4'
+ );
+ insert myAccount2;
+ String myAccount2Id = myAccount2.Id;
+ LexProductLimitEditController.init(myAccount2Id, 'ENG');
+ LexProductLimitEditController.init(myAccount2Id, '');
+ LexProductLimitEditController.accountid = myAccount2Id;
+ LexProductLimitEditController controllerLimit = new LexProductLimitEditController();
+
+ // Given
+ // PageReference page = new PageReference('/apex/ProductLimitEdit?accountid=' + myAccount2.id);
+ // page.setRedirect(true);
+ // System.Test.setCurrentPage(page);
+ // ProductLimitEditController conTest = new ProductLimitEditController();
+ // conTest.init();
+ // System.assertEquals('Test01|5|55,Test02|2|4', conTest.product_Limit);
+
+ // When
+
+ // Then
+ }
+}
diff --git a/force-app/main/default/classes/LexProductLimitEditControllerTest.cls-meta.xml b/force-app/main/default/classes/LexProductLimitEditControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexProductLimitEditControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexRemoveBoxControllerTest.cls b/force-app/main/default/classes/LexRemoveBoxControllerTest.cls
new file mode 100644
index 0000000..a318af8
--- /dev/null
+++ b/force-app/main/default/classes/LexRemoveBoxControllerTest.cls
@@ -0,0 +1,713 @@
+@isTest
+private class LexRemoveBoxControllerTest {
+ static testMethod void myUnitTest() {
+ user myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount2;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(myUser_Test) {
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ StaticParameter.EscapeNFM007Trigger = true;
+ StaticParameter.EscapeOpportunityBefUpdTrigger = true;
+ StaticParameter.EscapeOpportunityHpDeptUpdTrigger = true;
+ StaticParameter.EscapeSyncOpportunityTrigger = true;
+ StaticParameter.EscapeSyncProduct2Trigger = true;
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Packing_list_manual__c = 12,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Packing_list_manual__c = 10,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200313',
+ Packing_list_manual__c = 1,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert new List<Product2__c>{ pro1, pro2, pro3 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+
+ //daoku
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001001';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.Arrive_date__c = Date.today();
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet2.Used_date__c = null;
+ Orderdet2.Lose_Flag__c = false;
+ Orderdet2.Return_date__c = null;
+ Orderdet2.Send_Date__c = null;
+ Orderdet2.Box_Piece__c = '鐩�';
+ conList1.add(Orderdet2);
+
+ //chuhe
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001002';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Product__c = pro2.Id;
+ Orderdet3.Asset_Model_No__c = 'Test02';
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.Send_Date__c = Date.today();
+ Orderdet3.Box_Piece__c = '涓�';
+ Orderdet3.RemoveBox_date__c = Date.today();
+ Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA';
+ Orderdet3.Used_date__c = null;
+ Orderdet3.Lose_Flag__c = false;
+ Orderdet3.Return_date__c = null;
+ conList1.add(Orderdet3);
+
+ //sale
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = Order1.Id;
+ Orderdet4.Consumable_Product__c = pro2.Id;
+ Orderdet4.Asset_Model_No__c = 'Test02';
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.Box_Piece__c = '涓�';
+ Orderdet4.RemoveBox_date__c = Date.today();
+ Orderdet4.Bar_Code__c = '011495317020843711170400172003311074K250CXSDS';
+ Orderdet4.Lose_Flag__c = false;
+ Orderdet4.Return_date__c = null;
+ Orderdet4.Used_date__c = Date.today();
+ conList1.add(Orderdet4);
+
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+ //ProductPacking_list_manual__c=1
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001004';
+ Orderdet5.Consumable_order_minor__c = Order1.Id;
+ Orderdet5.Consumable_Product__c = pro3.Id;
+ Orderdet5.Asset_Model_No__c = 'Test03';
+ Orderdet5.Arrive_date__c = Date.today();
+ //Orderdet5.Used_date__c = Date.today();
+ Orderdet5.Box_Piece__c = '鐩�';
+ Orderdet5.RemoveBox_date__c = Date.today();
+ Orderdet5.Used_date__c = null;
+ Orderdet5.Lose_Flag__c = false;
+ Orderdet5.Return_date__c = null;
+ Orderdet5.Send_Date__c = null;
+ Orderdet5.Bar_Code__c = '010495317014059411170400172203311074K250DCWQW';
+ conList.add(Orderdet5);
+ //pandian
+ Consumable_order_details2__c Orderdet7 = new Consumable_order_details2__c();
+ Orderdet7.Name = 'OCM_01_001004';
+ Orderdet7.Consumable_order_minor__c = Order1.Id;
+ Orderdet7.Consumable_Product__c = pro2.Id;
+ Orderdet7.Asset_Model_No__c = 'Test02';
+ Orderdet7.Box_Piece__c = '鐩�';
+ Orderdet7.Lose_Flag__c = false;
+ Orderdet7.Bar_Code__c = '010495317014059411170400172203311074K250DBVUD';
+ Orderdet7.RemoveBox_date__c = Date.today();
+ Orderdet7.Inventory_date__c = Date.today();
+ conList.add(Orderdet7);
+
+ Consumable_order_details2__c Orderdet8 = new Consumable_order_details2__c();
+ Orderdet8.Name = 'OCM_01_001004';
+ Orderdet8.Consumable_order_minor__c = Order1.Id;
+ Orderdet8.Consumable_Product__c = pro2.Id;
+ Orderdet8.Asset_Model_No__c = 'Test02';
+ Orderdet8.Arrive_date__c = Date.today();
+ Orderdet8.Box_Piece__c = '涓�';
+ Orderdet8.Lose_Flag__c = false;
+ Orderdet8.Bar_Code__c = '010495317014059411170400172203311074K250DBVUC';
+ Orderdet8.Used_date__c = null;
+ Orderdet8.Lose_Flag__c = false;
+ Orderdet8.Return_date__c = null;
+ Orderdet8.RemoveBox_date__c = Date.today();
+ Orderdet8.Send_Date__c = null;
+ Orderdet8.RemoveBox_No__c = 3;
+ conList.add(Orderdet8);
+ insert conList1;
+ insert conList;
+
+ System.Test.startTest();
+ LexRemoveBoxController Controller = new LexRemoveBoxController();
+ LexRemoveBoxController.init();
+ LexRemoveBoxController.searchConsumableorderdetails(
+ '01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRA\n011495317020843711170400172003311074K250CXSDS\n010495317014059411170400172203311074K250DCWQW\n010495317014059411170400172203311074K250DBVUD\n010495317014059411170400172203311074K250DBVUC',
+ myAccount2.Id,
+ '娣卞湷',
+ 'ET'
+ );
+ LexRemoveBoxController.searchConsumableorderdetails('', myAccount2.Id, '閲嶅簡', 'ET');
+ LexRemoveBoxController.barcode = '1004\n1003\n1002\n1001';
+ LexRemoveBoxController.getinventorysize();
+ LexRemoveBoxController.removeBoxConfirm(JSON.serialize(conList), 'Testaccount002', '閲嶅簡', 'ENG');
+ List<Consumable_order_details2__c> orderDetaList = new List<Consumable_order_details2__c>();
+ LexRemoveBoxController.removeBoxConfirm(JSON.serialize(orderDetaList), 'Testaccount002', '閲嶅簡', 'ENG');
+ System.Test.stopTest();
+ }
+ }
+ static testMethod void testMethod1() {
+ user myUser_test;
+ Account myAccount2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount2;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(myUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Packing_list_manual__c = 12,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Packing_list_manual__c = 10,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200313',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert new List<Product2__c>{ pro1, pro2, pro3 };
+ //璁㈠崟
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ insert Order1;
+ //鍙戣揣
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟 ';
+ Order2.Dealer_Info__c = myAccount2.Id;
+ Order2.RecordTypeid = '01210000000c9drAAA';
+ Order2.Order_ProType__c = 'ENG';
+ insert Order2;
+
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ //浜у搧绫诲瀷涓嶅悓
+ Consumable_order_details2__c con = new Consumable_order_details2__c();
+ con.Name = 'OCM_01_001001';
+ con.Consumable_order_minor__c = Order1.Id;
+ con.Consumable_Product__c = pro1.Id;
+ con.Asset_Model_No__c = 'Test01';
+ con.Arrive_date__c = Date.today();
+ con.Bar_Code__c = '10011';
+ con.Used_date__c = null;
+ con.Lose_Flag__c = false;
+ con.Return_date__c = null;
+ con.Send_Date__c = null;
+ con.Box_Piece__c = '鐩�';
+ conList1.add(con);
+
+ // 鏈埌璐�
+ Consumable_order_details2__c con2 = new Consumable_order_details2__c();
+ con2.Arrive_date__c = null;
+ con2.Send_Date__c = null;
+ con2.Used_date__c = null;
+ con2.Return_date__c = null;
+ con2.Lose_Flag__c = false;
+ con2.Box_Piece__c = '鐩�';
+ con2.Consumable_Arrived_order__c = Order2.Id;
+ con2.Consumable_Product__c = pro2.Id;
+ con2.Consumable_order_minor__c = Order2.Id;
+ con2.Bar_Code__c = '10031';
+ conList1.add(con2);
+ //瑙勬牸=1
+ Consumable_order_details2__c con3 = new Consumable_order_details2__c();
+ con3.Arrive_date__c = Date.today();
+ con3.Send_Date__c = null;
+ con3.Used_date__c = null;
+ con3.Return_date__c = null;
+ con3.Lose_Flag__c = false;
+ con3.Box_Piece__c = '鐩�';
+ con3.Consumable_Arrived_order__c = Order2.Id;
+ con3.Consumable_Product__c = pro3.Id;
+ con3.Consumable_order_minor__c = Order2.Id;
+ con3.RemoveBox_date__c = Date.today();
+ con3.Bar_Code__c = '10032';
+ conList1.add(con3);
+
+ insert conList1;
+ System.Test.startTest();
+ LexRemoveBoxController.searchConsumableorderdetails('10011', 'Testaccount002', '閲嶅簡', 'ET');
+ LexRemoveBoxController.searchConsumableorderdetails('10031\n10032', 'Testaccount002', '閲嶅簡', 'ENG');
+ System.Test.stopTest();
+ }
+ }
+ static testMethod void testMethod2() {
+ // TO DO: implement unit test
+ user myUser_test;
+ Account myAccount2;
+ Product2__c pro2;
+ Product2__c pro3;
+ Product2__c pro1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount2;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(myUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Packing_list_manual__c = 12,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Packing_list_manual__c = 10,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200313',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+ pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ pro3 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert new List<Product2__c>{ pro1, pro2, pro3 };
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
+ List<Consumable_order__c> orderList1 = new List<Consumable_order__c>();
+ //鍒拌揣
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '鍒拌揣';
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.RecordTypeid = '01210000000c9dqAAA';
+ Order1.Order_ProType__c = 'ET';
+ orderList.add(Order1);
+ //閿�鍞�
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_0144';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '閿�鍞�';
+ Order2.Dealer_Info__c = myAccount2.Id;
+ Order2.RecordTypeid = '01210000000c9duAAA';
+ Order2.Order_ProType__c = 'ENG';
+ orderList.add(Order2);
+ insert orderList;
+
+ //鍑鸿揣
+ Consumable_order__c Order3 = new Consumable_order__c();
+ Order3.Name = 'OCM_03';
+ Order3.Order_status__c = '鎵瑰噯';
+ Order3.Order_type__c = '鍑鸿揣';
+ Order3.Dealer_Info__c = myAccount2.Id;
+ Order3.RecordTypeid = '012100000006Jx9AAE';
+ Order3.Order_ProType__c = 'ENG';
+ orderList1.add(Order3);
+
+ //鍙戣揣
+ Consumable_order__c Order4 = new Consumable_order__c();
+ Order4.Name = 'OCM_03';
+ Order4.Order_status__c = '鎵瑰噯';
+ Order4.Order_type__c = '鍙戣揣';
+ Order4.Dealer_Info__c = myAccount2.Id;
+ Order4.RecordTypeid = '01210000000c9drAAA';
+ Order4.Order_ProType__c = 'ENG';
+ orderList1.add(Order4);
+ insert orderList1;
+
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ //浜у搧绫诲瀷涓嶅悓
+ Consumable_order_details2__c con = new Consumable_order_details2__c();
+ con.Name = 'OCM_01_001001';
+ con.Consumable_order_minor__c = Order1.Id;
+ con.Consumable_Product__c = pro1.Id;
+ con.Asset_Model_No__c = 'Test01';
+ con.Arrive_date__c = Date.today();
+ con.Bar_Code__c = '10011';
+ con.Used_date__c = null;
+ con.Lose_Flag__c = false;
+ con.Return_date__c = null;
+ con.Send_Date__c = null;
+ con.Box_Piece__c = '鐩�';
+ conList1.add(con);
+
+ // // 鏈埌璐�
+ Consumable_order_details2__c con2 = new Consumable_order_details2__c();
+ con2.Arrive_date__c = null;
+ con2.Send_Date__c = null;
+ con2.Used_date__c = null;
+ con2.Return_date__c = null;
+ con2.Lose_Flag__c = false;
+ con2.Box_Piece__c = '鐩�';
+ con2.Consumable_Arrived_order__c = Order2.Id;
+ con2.Consumable_Product__c = pro2.Id;
+ con2.Consumable_order_minor__c = Order2.Id;
+ con2.Bar_Code__c = '10031';
+ conList1.add(con2);
+ //瑙勬牸=1
+ Consumable_order_details2__c con3 = new Consumable_order_details2__c();
+ con3.Arrive_date__c = Date.today();
+ con3.Send_Date__c = null;
+ con3.Used_date__c = null;
+ con3.Return_date__c = null;
+ con3.Lose_Flag__c = false;
+ con3.Box_Piece__c = '鐩�';
+ con3.Consumable_Arrived_order__c = Order2.Id;
+ con3.Consumable_Product__c = pro3.Id;
+ con3.Consumable_order_minor__c = Order2.Id;
+ con3.RemoveBox_date__c = Date.today();
+ con3.Bar_Code__c = '10032';
+ conList1.add(con3);
+
+ insert conList1;
+ System.Test.startTest();
+ LexRemoveBoxController.searchConsumableorderdetails('10031\n10032\n', 'Testaccount002', '閲嶅簡', 'ENG');
+ System.Test.stopTest();
+ }
+ }
+ static testMethod void testMethod3() {
+ // TO DO: implement unit test
+ user myUser_test;
+ Account myAccount2;
+ Product2__c pro2;
+ Product2__c pro3;
+ Product2__c pro1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ insert myAccount2;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(myUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Packing_list_manual__c = 12,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Packing_list_manual__c = 10,
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200313',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+ pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ pro3 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert new List<Product2__c>{ pro1, pro2, pro3 };
+ List<Consumable_order__c> orderList = new List<Consumable_order__c>();
+ //鍒拌揣
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '鍒拌揣';
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.RecordTypeid = '01210000000c9dqAAA';
+ Order1.Order_ProType__c = 'ENG';
+ orderList.add(Order1);
+ //鍙戣揣
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_01';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟 ';
+ Order2.Dealer_Info__c = myAccount2.Id;
+ Order2.RecordTypeid = '01210000000c9drAAA';
+ Order2.Order_ProType__c = 'ENG';
+ orderList.add(Order2);
+ insert orderList;
+
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ //浜у搧绫诲瀷涓嶅悓
+ Consumable_order_details2__c con = new Consumable_order_details2__c();
+ con.Name = 'OCM_01_001001';
+ con.Consumable_order_minor__c = Order1.Id;
+ con.Consumable_Product__c = pro1.Id;
+ con.Asset_Model_No__c = 'Test01';
+ con.Arrive_date__c = Date.today();
+ con.Bar_Code__c = '10011';
+ con.Used_date__c = null;
+ con.Lose_Flag__c = false;
+ con.Return_date__c = null;
+ con.Send_Date__c = null;
+ con.Box_Piece__c = '鐩�';
+ conList1.add(con);
+
+ // 鏈埌璐�
+ Consumable_order_details2__c con2 = new Consumable_order_details2__c();
+ con2.Arrive_date__c = null;
+ con2.Send_Date__c = null;
+ con2.Used_date__c = null;
+ con2.Return_date__c = null;
+ con2.Lose_Flag__c = false;
+ con2.Box_Piece__c = '鐩�';
+ con2.Consumable_Arrived_order__c = Order2.Id;
+ con2.Consumable_Product__c = pro2.Id;
+ con2.Consumable_order_minor__c = Order2.Id;
+ con2.Bar_Code__c = '10031';
+ conList1.add(con2);
+ //瑙勬牸=1
+ Consumable_order_details2__c con3 = new Consumable_order_details2__c();
+ con3.Arrive_date__c = Date.today();
+ con3.Send_Date__c = null;
+ con3.Used_date__c = null;
+ con3.Return_date__c = null;
+ con3.Lose_Flag__c = false;
+ con3.Box_Piece__c = '鐩�';
+ con3.Consumable_Arrived_order__c = Order2.Id;
+ con3.Consumable_Product__c = pro3.Id;
+ con3.Consumable_order_minor__c = Order2.Id;
+ con3.RemoveBox_date__c = Date.today();
+ con3.Bar_Code__c = '10032';
+ conList1.add(con3);
+
+ insert conList1;
+ System.Test.startTest();
+ LexRemoveBoxController.searchConsumableorderdetails('10011\n10031', 'Testaccount002', '閲嶅簡', 'ENG');
+ LexRemoveBoxController.searchConsumableorderdetails('10032', 'Testaccount002', '涓婃捣', 'ENG');
+ LexRemoveBoxController.removeBoxConfirm(JSON.serialize(conList1), 'Testaccount002', '閲嶅簡', 'ENG');
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexRemoveBoxControllerTest.cls-meta.xml b/force-app/main/default/classes/LexRemoveBoxControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexRemoveBoxControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexSaleAndDeliveryControllerTest.cls b/force-app/main/default/classes/LexSaleAndDeliveryControllerTest.cls
new file mode 100644
index 0000000..e202d9b
--- /dev/null
+++ b/force-app/main/default/classes/LexSaleAndDeliveryControllerTest.cls
@@ -0,0 +1,97 @@
+@isTest
+private class LexSaleAndDeliveryControllerTest {
+ @isTest
+ static void testInit() {
+ User myUser_test;
+ Account myAccount2;
+ Product2__c pro2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ Product2 prod02 = new Product2(
+ Name = 'Test02181',
+ ProductCode = 'Test0218',
+ Asset_Model_No__c = 'Test0218',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 12,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'tset8',
+ Manual_Entry__c = false
+ );
+ pro2 = new Product2__c(Name = 'Pro002181', OT_CODE_Text__c = 'Test002181', Product2__c = prod02.Id);
+ insert pro2;
+ myAccount2 = new Account(name = 'Testaccount003', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '2');
+ insert myAccount2;
+
+ Contact core = new Contact(email = 'wan@salesforce.com', firstname = 'wan', lastname = 'Plumbers', accountid = myAccount2.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ myUser_test.UserPro_Type__c = '';
+ update myUser_test;
+ }
+ System.runAs(MyUser_Test) {
+ String accountId = myUser_test.accountid;
+ String agencyProType = myUser_test.UserPro_Type__c;
+ String userWorkLocation = myUser_test.Work_Location__c;
+ System.Test.startTest();
+ LexSaleAndDeliveryController.init();
+ LexSaleAndDeliveryController.searchOrderInstatus(
+ '2023/01/01',
+ '2023/12/31',
+ accountId,
+ agencyProType,
+ userWorkLocation,
+ 'DB',
+ '澶ц繛'
+ );
+ LexSaleAndDeliveryController.searchConsumableorderdetails(
+ '2023/01/01',
+ '2023/12/31',
+ accountId,
+ agencyProType,
+ userWorkLocation,
+ 'DB',
+ '澶ц繛'
+ );
+ LexSaleAndDeliveryController.searchConsumableorFinish(
+ '2023/01/01',
+ '2023/12/31',
+ accountId,
+ agencyProType,
+ userWorkLocation,
+ 'DB',
+ '澶ц繛'
+ );
+ LexSaleAndDeliveryController.cleanUp(accountId, agencyProType, userWorkLocation);
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexSaleAndDeliveryControllerTest.cls-meta.xml b/force-app/main/default/classes/LexSaleAndDeliveryControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexSaleAndDeliveryControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexSaleOrderController.cls b/force-app/main/default/classes/LexSaleOrderController.cls
index d967cc7..d9693a9 100644
--- a/force-app/main/default/classes/LexSaleOrderController.cls
+++ b/force-app/main/default/classes/LexSaleOrderController.cls
@@ -32,7 +32,11 @@
res.entity = data;
String UserName = UserInfo.getUserId();
- user useracc = [SELECT Accountid, Work_Location__c FROM user WHERE id = :UserName];
+ user useracc = [
+ SELECT Accountid, Work_Location__c
+ FROM user
+ WHERE id = :UserName
+ ];
accountid = useracc.Accountid;
userWorkLocation = useracc.Work_Location__c;
Account accountInfo = [SELECT Name FROM account WHERE id = :accountid];
@@ -201,6 +205,7 @@
//BarCodelist鍋氭垚
barCodeListP = ParseBarCode(barcode);
+ System.debug('barCodeListP:' + barCodeListP);
//閽堝鎵�鏈夊晢鍝佸埌璐х‘璁�
reSet1 = [
SELECT
@@ -235,6 +240,7 @@
AND Arrive_Owner_Work_Location__c = :userWorkLocation
ORDER BY RemoveBox_No__c DESC
];
+ System.debug('reSet1:' + reSet1);
List<Consumable_order_details2__c> newdet2 = new List<Consumable_order_details2__c>();
Set<Id> proIds = new Set<Id>();
@@ -242,6 +248,7 @@
Integer idx = 0;
for (Consumable_order_details2__c cod2 : reSet1) {
if (cod2.Bar_Code__c == barcode) {
+ System.debug('cod2.Bar_Code__c:' + cod2.Bar_Code__c);
newdet2.add(cod2);
reSet1.remove(idx);
proIds.add(cod2.Consumable_product__c);
@@ -252,7 +259,11 @@
}
Map<String, String> proHosMap = new Map<String, String>();
Map<String, String> proIdMap = new Map<String, String>();
- List<hospitalprice__c> hpList = [SELECT id, hospital__c, product__c FROM hospitalprice__c WHERE account__c = :accountid];
+ List<hospitalprice__c> hpList = [
+ SELECT id, hospital__c, product__c
+ FROM hospitalprice__c
+ WHERE account__c = :accountid
+ ];
if (hpList != null && hpList.size() > 0) {
for (hospitalprice__c hp : hpList) {
if (hp.product__c != null && String.valueof(hp.product__c).length() >= 15) {
@@ -274,6 +285,7 @@
errorIdMap.put(newdet2[j].Bar_Code__c, newdet2[j].Bar_Code__c);
}
if (coc.OutPattern__c == true) {
+ System.debug('testPattern:' + newdet2[j].Product_Pattern__c + '---' + orderdetails[i].Product_Pattern__c);
if (newdet2[j].Product_Pattern__c == orderdetails[i].Product_Pattern__c) {
//add by rentx 2021-03-22 start
if (newdet2[j].exchangeOutPattern__c == true) {
@@ -678,13 +690,13 @@
if (n.find()) {
if (newdet2[j].TracingCode__c.length() == 5) {
String tr = newdet2[j].TracingCode__c;
- String Ctr = tr.substring(tr.length() - 3,tr.length());
- String Btr = tr.substring(tr.length() - 4,tr.length()-3);
- String Atr = tr.substring(tr.length() - 5,tr.length()-4);
+ String Ctr = tr.substring(tr.length() - 3, tr.length());
+ String Btr = tr.substring(tr.length() - 4, tr.length() - 3);
+ String Atr = tr.substring(tr.length() - 5, tr.length() - 4);
if (Pattern.compile('[0-9]').matcher(Atr).find() || Pattern.compile('[0-9]').matcher(Ctr).find()) {
String str = '绠$悊缂栫爜鏈夎锛岃妫�鏌ユ潯褰㈢爜鏁版嵁銆�';
- consumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(newdet2[j],str));
- errorIdMap.put(newdet2[j].Bar_Code__c,newdet2[j].Bar_Code__c);
+ consumableorderdetailsRecordserror.add(new ConsumableorderdetailsInfo(newdet2[j], str));
+ errorIdMap.put(newdet2[j].Bar_Code__c, newdet2[j].Bar_Code__c);
continue;
}
}
@@ -1076,11 +1088,16 @@
for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecords) {
String key = '' + ass.orderdetails2.Bar_Code__c;
Integer deliverycnt = BarcodeCntMap.get(key);
- if (ass.orderdetails2.Box_Piece__c == '涓�' &&(ass.outboundCount == null || String.valueof(ass.outboundCount) == '' || ass.outboundCount <= 0)) {
+ if (
+ ass.orderdetails2.Box_Piece__c == '涓�' &&
+ (ass.outboundCount == null ||
+ String.valueof(ass.outboundCount) == '' ||
+ ass.outboundCount <= 0)
+ ) {
// ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '璇疯緭鍏ヤ骇鍝� '+ ass.Prod.Name +' 鐨勫嚭璐ф暟閲�'));
// return null;
- System.debug('ass.orderdetails2.Box_Piece__c = ' + ass.orderdetails2.Box_Piece__c);
- System.debug('ass.outboundCount = ' + ass.outboundCount);
+ System.debug('ass.orderdetails2.Box_Piece__c = ' + ass.orderdetails2.Box_Piece__c);
+ System.debug('ass.outboundCount = ' + ass.outboundCount);
return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ヤ骇鍝� ' + ass.Prod.Name + ' 鐨勫嚭璐ф暟閲�', '');
}
if (ass.outboundCount > deliverycnt) {
@@ -1265,6 +1282,7 @@
return consumableorderdetails2Nobox.size();
}
+ @TestVisible
class ConsumableorderdetailsInfo implements Comparable {
@AuraEnabled
public Consumable_orderdetails__c orderdetails1 { get; set; }
@@ -1307,4 +1325,4 @@
return null;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexSaleOrderControllerTest.cls b/force-app/main/default/classes/LexSaleOrderControllerTest.cls
new file mode 100644
index 0000000..ea7b9ce
--- /dev/null
+++ b/force-app/main/default/classes/LexSaleOrderControllerTest.cls
@@ -0,0 +1,1665 @@
+@isTest
+private class LexSaleOrderControllerTest {
+ public static Map<String, String> orderpieceorboxMap;
+ public static Map<String, Decimal> orderpriceMap;
+ public static Map<String, Decimal> orderagencypriceMap;
+ public static Map<String, Decimal> orderdetCountMap;
+ public static Map<String, String> existIdMap;
+ public static Map<String, String> errorIdMap;
+ public static Map<String, String> allMap;
+ @isTest
+ static void testInit() {
+ Account accountItem1;
+ Account accountItem2;
+ User userTest;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectHp = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectHp.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ accountItem1 = new Account(Name = 'Testaccount001', RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '9999900');
+ insert accountItem1;
+ accountItem2 = new Account(Name = 'Testaccount002', RecordTypeId = rectHp[0].Id, AgentCode_Ext__c = '9999999');
+ insert accountItem2;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountId = accountItem1.Id
+ );
+ insert core;
+ userTest = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '澶ц繛'
+ );
+ insert userTest;
+ }
+ System.runAs(userTest) {
+ String Id = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, ContactId, Contact.AccountId, Work_Location__c
+ FROM User
+ WHERE id = :Id
+ ];
+ String accountId = thisUserInfo.Contact.AccountId;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ String accountName;
+ Account[] accountInfo = [
+ SELECT Name
+ FROM account
+ WHERE id = :accountId
+ LIMIT 1
+ ];
+ if (accountInfo.size() > 0) {
+ accountName = accountInfo[0].Name;
+ }
+
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Deliver_date__c = Date.today();
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Order;
+ Order1.Order_ForDealerText__c = 'Test';
+ Order1.Order_ProType__c = 'ENG';
+ Order1.Delivery_detail_count__c = 5;
+ Order1.IsShipment__c = true;
+ insert Order1;
+ //鍒拌揣
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'testMing2';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Deliver_date__c = Date.today();
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Arrive;
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.Order_ProType__c = 'ENG';
+ Order2.Arrive_Order__c = Order1.Id;
+ Order2.Delivery_detail_count__c = 5;
+ insert Order2;
+
+ List<Consumable_order_details2__c> newdet2 = new List<Consumable_order_details2__c>();
+ //鍦ㄥ簱 鐩�
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001002';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '11111250AAAAA';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Box_Piece__c = '鐩�';
+ Orderdet1.TracingCode__c = 'AAAAA';
+ //鏈埌璐�
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_02_001002';
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '22222250BBBBB';
+ Orderdet2.Consumable_Product__c = pro2.Id;
+ Orderdet2.Box_Piece__c = '鐩�';
+ Orderdet2.TracingCode__c = 'BBBBB';
+ //閿�鍞�
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '33333250CCCCC';
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Used_date__c = Date.today();
+ Orderdet3.Send_Date__c = Date.today();
+ Orderdet3.Arrive_date__c = Date.today();
+ Orderdet3.Box_Piece__c = '鐩�';
+ Orderdet3.TracingCode__c = 'CCCCC';
+
+ //鍦ㄥ簱 涓�
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Bar_Code__c = '44444250DDDDD';
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.Box_Piece__c = '涓�';
+ Orderdet4.TracingCode__c = 'DDDDD';
+
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_01_001004';
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '55555250EEEEE';
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Arrive_date__c = Date.today();
+ Orderdet5.TracingCode__c = 'EEEEE';
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5 };
+
+ Consumable_order__c zsd01 = new Consumable_order__c();
+ zsd01.Name = 'ZSD_01_001';
+ zsd01.Order_type__c = '浼犵エ';
+ zsd01.SummonsStatus_c__c = '宸插畬鎴�';
+ zsd01.Order_type__c = '璁㈠崟';
+ zsd01.RecordTypeid = System.Label.RT_ConOrder_Order;
+ zsd01.Summons_Sale_Status__c = '閿�鍞�';
+ zsd01.Outbound_Date__c = Date.today();
+ zsd01.IsShipment__c = true;
+ insert zsd01;
+ System.debug('zsd01:' + zsd01.Id);
+
+ List<Consumable_orderdetails__c> orderdetails = new List<Consumable_orderdetails__c>();
+ Consumable_orderdetails__c Orderdet6 = new Consumable_orderdetails__c();
+ Orderdet6.Name = 'ZSD_01_001001';
+ Orderdet6.Consumable_order__c = zsd01.Id;
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet6.Consumable_Count__c = 12;
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Delivery_List_RMB__c = 1;
+ Orderdet6.Shipment_Count__c = 1;
+ Orderdet6.Unitprice_To_agency__c = 1.00;
+ Orderdet6.Dealer_Custom_Price__c = 999.00;
+ Orderdet6.isOutPattern__c = true;
+ Orderdet6.Box_Piece__c = '涓�';
+ orderdetails.add(Orderdet6);
+ Consumable_orderdetails__c Orderdetc6 = new Consumable_orderdetails__c();
+ Orderdetc6.Name = 'ZSD_01_001001';
+ Orderdetc6.Consumable_order__c = zsd01.Id;
+ Orderdetc6.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdetc6.Consumable_Count__c = 12;
+ Orderdetc6.Consumable_Product__c = pro2.Id;
+ Orderdetc6.Delivery_List_RMB__c = 1;
+ Orderdetc6.Unitprice_To_agency__c = 1.00;
+ Orderdetc6.Dealer_Custom_Price__c = 999.00;
+ Orderdetc6.Shipment_Count__c = 1;
+ Orderdetc6.isOutPattern__c = true;
+ Orderdetc6.Box_Piece__c = '鐩�';
+ orderdetails.add(Orderdetc6);
+ insert orderdetails;
+ System.debug('orderdetails:' + orderdetails.size());
+
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = accountId;
+ hp1.account__c = accountId;
+ hp1.product__c = pro1.Id;
+ insert hp1;
+
+ orderpieceorboxMap = new Map<String, String>();
+ orderagencypriceMap = new Map<String, Decimal>();
+ orderpriceMap = new Map<String, Decimal>();
+ orderdetCountMap = new Map<String, Decimal>();
+ if (orderdetails.size() > 0) {
+ for (Integer i = 0; i < orderdetails.size(); i++) {
+ orderpieceorboxMap.put(orderdetails[i].Product_Pattern__c, orderdetails[i].Box_Piece__c);
+ if (orderdetails[i].Unitprice_To_agency__c != null && orderdetails[i].Unitprice_To_agency__c != 0) {
+ orderagencypriceMap.put(orderdetails[i].Product_Pattern__c, orderdetails[i].Unitprice_To_agency__c);
+ }
+ orderpriceMap.put(orderdetails[i].Product_Pattern__c, orderdetails[i].Delivery_List_RMB__c);
+ orderdetCountMap.put(orderdetails[i].Product_Pattern__c, orderdetails[i].Shipment_Count__c);
+ }
+ }
+ String ESetId = Order2.Id;
+ System.Test.startTest();
+ LexSaleOrderController.GoodsDeliveryInit(ESetId);
+ String barcode1 = '';
+ String key = '';
+ String baseUrl = '';
+ Integer a = 0;
+ List<LexSaleOrderController.ConsumableorderdetailsInfo> consumableorderdetailsRecords = new List<LexSaleOrderController.ConsumableorderdetailsInfo>();
+ Map<String, Integer> msiMap = new Map<String, Integer>();
+ LexSaleOrderController.SearchPro(Order1, barcode1, accountName, userWorkLocation, accountId, orderdetails, orderpieceorboxMap);
+ String barcode = '11111250AAAAA\n22222250BBBBB\n33333250CCCCC\n44444250DDDDD\n55555250EEEEE\n666666\n777777\naaa';
+ LexSaleOrderController.ParseBarCode(barcode);
+ LexSaleOrderController.SearchPro(Order2, barcode, accountName, userWorkLocation, accountId, orderdetails, orderpieceorboxMap);
+ LexSaleOrderController.ProdElivery(
+ ESetId,
+ Order2,
+ barcode,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+ LexSaleOrderController.ProSale(
+ ESetId,
+ Order2,
+ barcode,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+ LexSaleOrderController.Getconsumableorderdetails2Nobox();
+
+ List<LexSaleOrderController.ConsumableorderdetailsInfo> inList = LexSaleOrderController.consumableorderdetailsRecords;
+ List<LexSaleOrderController.ConsumableorderdetailsInfo> inList1 = new List<LexSaleOrderController.ConsumableorderdetailsInfo>();
+ for (LexSaleOrderController.ConsumableorderdetailsInfo ass : inList) {
+ ass.orderdetails2 = Orderdet1;
+ inList1.add(ass);
+ }
+
+ String errorReason = 'success';
+ LexSaleOrderController.ConsumableorderdetailsInfo c2 = new LexSaleOrderController.ConsumableorderdetailsInfo(
+ Orderdet1,
+ errorReason
+ );
+ c2.orderdetails1 = null;
+ c2.orderdetails2 = Orderdet1;
+ c2.Prod = Orderdet1.Consumable_product__r;
+ c2.oldConsumableCount = Orderdet1.Name;
+ c2.ErrorReason = errorReason;
+
+ LexSaleOrderController.ConsumableorderdetailsInfo c1 = new LexSaleOrderController.ConsumableorderdetailsInfo(Orderdet2);
+ c1.orderdetails1 = null;
+ c1.orderdetails2 = Orderdet2;
+ c1.Prod = Orderdet2.Consumable_product__r;
+ c1.oldConsumableCount = Orderdet2.Name;
+ c1.compareTo(c2);
+
+ LexSaleOrderController.ConsumableorderdetailsInfo c3 = new LexSaleOrderController.ConsumableorderdetailsInfo(Orderdet6);
+ c3.orderdetails1 = Orderdet6;
+ c3.Prod = Orderdet6.Consumable_product__r;
+ c3.outboundCount = Orderdet6.Shipment_Count__c;
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void testArriveOrder() {
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ Account myAccount2;
+ Account olympus;
+ User MyUser_Test;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ RecordType hosCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ olympus = new Account(RecordTypeId = hosCo.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount2 = new Account(Name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
+ insert myAccount2;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount2.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '澶ц繛'
+ );
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ String Id = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, ContactId, Contact.AccountId, Work_Location__c
+ FROM User
+ WHERE id = :Id
+ ];
+ String accountId = thisUserInfo.Contact.AccountId;
+ String userWorkLocation1 = thisUserInfo.Work_Location__c;
+ String accountName = myAccount2.Name;
+ System.debug('accountName = ' + accountName);
+ System.debug('userWorkLocation1 = ' + userWorkLocation1);
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Order;
+ Order1.IsShipment__c = true;
+ Order1.OwnerId = MyUser_Test.Id;
+ insert Order1;
+
+ Consumable_order__c Order2 = new Consumable_order__c();
+ Order2.Name = 'OCM_02_001';
+ Order2.Order_status__c = '鎵瑰噯';
+ Order2.Order_type__c = '璁㈠崟';
+ Order2.RecordTypeid = System.Label.RT_ConOrder_Order;
+ Order2.Dealer_Info__c = myAccount2.Id;
+ Order2.IsShipment__c = true;
+ insert Order2;
+
+ Consumable_order__c Order3 = new Consumable_order__c();
+ Order3.Name = 'OCM_02_005';
+ Order3.Order_status__c = '鎵瑰噯';
+ Order3.Order_type__c = '浼犵エ';
+ Order3.RecordTypeid = System.Label.RT_ConOrder_Order;
+ Order3.Arrive_Order__c = Order1.Id;
+ Order3.Dealer_Info__c = myAccount2.Id;
+ Order3.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ Order3.IsShipment__c = true;
+ insert Order3;
+
+ Consumable_order_details2__c Orderdet = new Consumable_order_details2__c();
+ Orderdet.Name = 'OCM_01_001001';
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_order_minor__c = Order1.Id;
+ Orderdet.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet.Consumable_ZS_order__c = Order3.Id;
+ Orderdet.Consumable_Return_order__c = Order1.Id;
+ Orderdet.Consumable_Sale_order__c = null;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet.RemoveBox_No__c = 3;
+ Orderdet.Bar_Code__c = '1111111111250AAAAA';
+ Orderdet.Arrive_date__c = Date.today();
+ Orderdet.Delivery_List_RMB__c = 11.11;
+ Orderdet.Box_Piece__c = '鐩�';
+ Orderdet.Return_date__c = null;
+ Orderdet.TracingCode__c = '';
+ Orderdet.Cancellation_Flag__c = true;
+ Orderdet.Sterilization_limit__c = Date.today().addDays(-1);
+ //鍙戣揣
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_ZS_order__c = Order3.Id;
+ Orderdet1.Consumable_Return_order__c = Order1.Id;
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.RemoveBox_No__c = 3;
+ Orderdet1.Bar_Code__c = '2222222222250BBBBB';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.Return_reason__c = null;
+ Orderdet1.Return_date__c = null;
+ Orderdet1.Delivery_List_RMB__c = 11.11;
+ Orderdet1.Box_Piece__c = '涓�';
+ Orderdet1.TracingCode__c = '';
+ Orderdet1.Cancellation_Flag__c = true;
+ Orderdet1.Sterilization_limit__c = Date.today().addDays(-1);
+ //閿�鍞�
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order3.Id;
+ Orderdet2.Consumable_Shipment_order__c = Order3.Id;
+ Orderdet2.Consumable_Sale_order__c = Order3.Id;
+ Orderdet2.Consumable_ZS_order__c = Order3.Id;
+ Orderdet2.Consumable_Return_order__c = Order3.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.RemoveBox_No__c = 3;
+ Orderdet2.Bar_Code__c = '3333333333250CCCCC';
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Send_Date__c = null;
+ Orderdet2.Used_date__c = null;
+ Orderdet2.Lose_Flag__c = false;
+ Orderdet2.Return_reason__c = null;
+ Orderdet2.Return_date__c = null;
+ Orderdet2.Delivery_List_RMB__c = 11;
+ Orderdet2.Box_Piece__c = '鐩�';
+ Orderdet2.TracingCode__c = null;
+ Orderdet2.Cancellation_Flag__c = true;
+ Orderdet2.Arrive_date__c = Date.today();
+ Orderdet2.Sterilization_limit__c = Date.today().addDays(-1);
+ //閿�鍞�
+ Consumable_order_details2__c Orderdet9 = new Consumable_order_details2__c();
+ Orderdet9.Name = 'OCM_01_001002';
+ Orderdet9.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet9.RemoveBox_No__c = 3;
+ Orderdet9.Bar_Code__c = '4444444444250DDDDD';
+ Orderdet9.Consumable_Product__c = pro1.Id;
+ Orderdet9.Arrive_date__c = Date.today();
+ Orderdet9.Used_date__c = Date.today();
+ Orderdet9.Box_Piece__c = '涓�';
+ Orderdet9.TracingCode__c = 'DDDDD';
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet3.Consumable_Sale_order__c = null;
+ Orderdet3.Consumable_ZS_order__c = Order1.Id;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '5555555555250EEEEE';
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Send_Date__c = Date.today();
+ Orderdet3.Box_Piece__c = '鐩�';
+ Orderdet3.Return_date__c = null;
+ Orderdet3.Lose_Flag__c = true;
+ Orderdet3.TracingCode__c = 'EEEEE';
+
+ //鍒拌揣
+ Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
+ Orderdet4.Name = 'OCM_01_001004';
+ Orderdet4.Consumable_order_minor__c = null;
+ Orderdet4.Consumable_Sale_order__c = null;
+ Orderdet4.Consumable_ZS_order__c = Order1.Id;
+ Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet4.Consumable_Arrived_order__c = Order1.Id;
+ Orderdet4.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdet4.Bar_Code__c = '6666666666250FFFFF';
+ Orderdet4.Consumable_Product__c = pro1.Id;
+ Orderdet4.Arrive_date__c = Date.today();
+ Orderdet4.Box_Piece__c = '涓�';
+ Orderdet4.TracingCode__c = 'FFFFF';
+ //鍙戣揣
+ Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c();
+ Orderdet5.Name = 'OCM_02_001001';
+ Orderdet5.Consumable_order_minor__c = Order2.Id;
+ Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet5.Bar_Code__c = '7777777777250GGGGG';
+ Orderdet5.Consumable_Product__c = pro1.Id;
+ Orderdet5.Deliver_date__c = Date.today();
+ Orderdet5.RemoveBox_No__c = 3;
+ Orderdet5.Box_Piece__c = '鐩�';
+ Orderdet5.TracingCode__c = 'GGGGG';
+
+ Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c();
+ Orderdet6.Name = 'OCM_02_001001';
+ Orderdet6.Consumable_order_minor__c = Order2.Id;
+ Orderdet6.Consumable_ZS_order__c = Order2.Id;
+ Orderdet6.Consumable_Return_order__c = Order2.Id;
+ Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet6.Bar_Code__c = '8888888888250HHHHH';
+ Orderdet6.Consumable_Product__c = pro1.Id;
+ Orderdet6.Arrive_date__c = Date.today();
+ Orderdet6.RemoveBox_No__c = 3;
+ Orderdet6.Sterilization_limit__c = Date.today().addDays(-2);
+ Orderdet6.TracingCode__c = 'HHHHH';
+
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = accountId;
+ hp1.account__c = accountId;
+ hp1.product__c = pro1.Id;
+ insert hp1;
+
+ List<Consumable_order_details2__c> newdet2 = new List<Consumable_order_details2__c>();
+ newdet2.add(Orderdet);
+ insert newdet2;
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet4, Orderdet5, Orderdet6, Orderdet9 };
+
+ List<Consumable_order_details2__c> cod2 = [
+ SELECT Id, Arrive_Owner_Work_Location__c
+ FROM Consumable_order_details2__c
+ WHERE Id = :Orderdet.Id
+ ];
+ System.debug('cod2:' + cod2);
+ String userWorkLocation = cod2[0].Arrive_Owner_Work_Location__c;
+ System.debug('userWorkLocation:' + userWorkLocation);
+
+ Map<String, object> data = new Map<String, object>();
+ String ESetId = Order2.Id;
+ System.Test.startTest();
+ LexSaleOrderController.GoodsDeliveryInit(ESetId);
+ String barcode1 = '';
+ String key = '';
+ orderpieceorboxMap = new Map<String, String>();
+ List<Consumable_orderdetails__c> orderdetails = new List<Consumable_orderdetails__c>();
+ LexSaleOrderController.SearchPro(Order1, barcode1, accountName, userWorkLocation, accountId, orderdetails, orderpieceorboxMap);
+ String barcode = '1111111111250AAAAA\n2222222222250BBBBB\n3333333333250CCCCC\n4444444444250DDDDD\n5555555555250EEEEE\n6666666666250FFFFF\n7777777777250GGGGG\n8888888888250HHHHH';
+ LexSaleOrderController.SearchPro(Order2, barcode, accountName, userWorkLocation, accountId, orderdetails, orderpieceorboxMap);
+ String barcode2 = '111111111250AAAAA';
+ LexSaleOrderController.SearchPro(Order2, barcode2, accountName, userWorkLocation, accountId, orderdetails, orderpieceorboxMap);
+ LexSaleOrderController.ProdElivery(
+ ESetId,
+ Order2,
+ barcode2,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+ LexSaleOrderController.ProSale(
+ ESetId,
+ Order2,
+ barcode2,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+ String barcode3 = '3333333333250CCCCC';
+ LexSaleOrderController.SearchPro(Order3, barcode3, accountName, userWorkLocation, accountId, orderdetails, orderpieceorboxMap);
+ LexSaleOrderController.ProdElivery(
+ ESetId,
+ Order3,
+ barcode3,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+ LexSaleOrderController.ProSale(
+ ESetId,
+ Order3,
+ barcode3,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+ LexSaleOrderController.Getconsumableorderdetails2Nobox();
+
+ List<LexSaleOrderController.ConsumableorderdetailsInfo> inList = LexSaleOrderController.consumableorderdetailsRecords;
+ List<LexSaleOrderController.ConsumableorderdetailsInfo> inList1 = new List<LexSaleOrderController.ConsumableorderdetailsInfo>();
+ for (LexSaleOrderController.ConsumableorderdetailsInfo ass : inList) {
+ ass.orderdetails2 = Orderdet1;
+ inList1.add(ass);
+ }
+
+ String errorReason = 'success';
+ LexSaleOrderController.ConsumableorderdetailsInfo c2 = new LexSaleOrderController.ConsumableorderdetailsInfo(
+ Orderdet1,
+ errorReason
+ );
+ c2.orderdetails1 = null;
+ c2.orderdetails2 = Orderdet1;
+ c2.Prod = Orderdet1.Consumable_product__r;
+ c2.oldConsumableCount = Orderdet1.Name;
+ c2.ErrorReason = errorReason;
+
+ LexSaleOrderController.ConsumableorderdetailsInfo c1 = new LexSaleOrderController.ConsumableorderdetailsInfo(Orderdet2);
+ c1.orderdetails1 = null;
+ c1.orderdetails2 = Orderdet2;
+ c1.Prod = Orderdet2.Consumable_product__r;
+ c1.oldConsumableCount = Orderdet2.Name;
+ c1.compareTo(c2);
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void testProSale() {
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ RecordType hosCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = hosCo.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ Account myAccount2 = new Account(name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
+ insert myAccount2;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount2.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '澶ц繛'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+ System.runAs(MyUser_Test) {
+ String Id = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, ContactId, Contact.AccountId, Work_Location__c
+ FROM User
+ WHERE id = :Id
+ ];
+ String accountId = thisUserInfo.Contact.AccountId;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ String accountName;
+ Account[] accountInfo = [
+ SELECT Name
+ FROM account
+ WHERE id = :accountId
+ LIMIT 1
+ ];
+ if (accountInfo.size() > 0) {
+ accountName = accountInfo[0].Name;
+ }
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Order;
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.IsShipment__c = true;
+ insert Order1;
+
+ Consumable_order__c Order3 = new Consumable_order__c();
+ Order3.Name = 'OCM_02_005';
+ Order3.Order_status__c = '鎵瑰噯';
+ Order3.Order_type__c = '浼犵エ';
+ Order3.RecordTypeid = System.Label.RT_ConOrder_Order;
+ Order3.Arrive_Order__c = Order1.Id;
+ Order3.Dealer_Info__c = myAccount2.Id;
+ Order3.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ Order3.IsShipment__c = true;
+ insert Order3;
+
+ List<Consumable_orderdetails__c> orderdetails = new List<Consumable_orderdetails__c>();
+ //鏄庣粏1
+ Consumable_orderdetails__c conOrder1 = new Consumable_orderdetails__c();
+ conOrder1.Name = 'OCM_01_001001';
+ conOrder1.Consumable_order__c = Order1.Id;
+ conOrder1.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ conOrder1.Consumable_Count__c = 12;
+ conOrder1.Consumable_Product__c = pro1.Id;
+ conOrder1.Delivery_List_RMB__c = 1;
+ conOrder1.Shipment_Count__c = 1;
+ conOrder1.Box_Piece__c = '鐩�';
+
+ Consumable_orderdetails__c conOrder2 = new Consumable_orderdetails__c();
+ conOrder2.Name = 'OCM_01_001002';
+ conOrder2.Consumable_order__c = Order1.Id;
+ conOrder2.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ conOrder2.Consumable_Count__c = 12;
+ conOrder2.Consumable_Product__c = pro1.Id;
+ conOrder2.Delivery_List_RMB__c = 1;
+ conOrder2.Shipment_Count__c = 1;
+ conOrder2.Box_Piece__c = '涓�';
+
+ orderdetails.add(conOrder1);
+ orderdetails.add(conOrder2);
+ insert orderdetails;
+ System.debug('orderdetails.size() = ' + orderdetails.size());
+
+ Consumable_order_details2__c Orderdet = new Consumable_order_details2__c();
+ Orderdet.Name = 'OCM_01_001001';
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_order_minor__c = Order1.Id;
+ Orderdet.Consumable_ZS_order__c = Order3.Id;
+ Orderdet.Consumable_Return_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet.RemoveBox_No__c = 3;
+ Orderdet.Bar_Code__c = '1111111111250AAAAA';
+ Orderdet.Arrive_date__c = Date.today();
+ Orderdet.Delivery_List_RMB__c = 11.11;
+ Orderdet.Box_Piece__c = '鐩�';
+ Orderdet.Return_date__c = null;
+ Orderdet.TracingCode__c = '';
+ Orderdet.Cancellation_Flag__c = true;
+ Orderdet.Sterilization_limit__c = Date.today().addDays(-1);
+
+ //鍙戣揣
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_ZS_order__c = Order3.Id;
+ Orderdet1.Consumable_Return_order__c = Order1.Id;
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.RemoveBox_No__c = 3;
+ Orderdet1.Bar_Code__c = '2222222222250BBBBB';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.Return_reason__c = null;
+ Orderdet1.Return_date__c = null;
+ Orderdet1.Delivery_List_RMB__c = 11.11;
+ Orderdet1.Box_Piece__c = '涓�';
+ Orderdet1.TracingCode__c = '';
+ Orderdet1.Cancellation_Flag__c = true;
+ Orderdet1.Sterilization_limit__c = Date.today().addDays(-1);
+ //閿�鍞�
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order_minor__c = Order3.Id;
+ Orderdet2.Consumable_Shipment_order__c = Order3.Id;
+ Orderdet2.Consumable_Sale_order__c = Order3.Id;
+ Orderdet2.Consumable_ZS_order__c = Order3.Id;
+ Orderdet2.Consumable_Return_order__c = Order3.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.RemoveBox_No__c = 3;
+ Orderdet2.Bar_Code__c = '3333333333250CCCCC';
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Send_Date__c = null;
+ Orderdet2.Used_date__c = null;
+ Orderdet2.Lose_Flag__c = false;
+ Orderdet2.Return_reason__c = null;
+ Orderdet2.Return_date__c = null;
+ Orderdet2.Delivery_List_RMB__c = 11;
+ Orderdet2.Box_Piece__c = '鐩�';
+ Orderdet2.TracingCode__c = null;
+ Orderdet2.Cancellation_Flag__c = true;
+ Orderdet2.Arrive_date__c = Date.today();
+ Orderdet2.Sterilization_limit__c = Date.today().addDays(-1);
+ //閿�鍞�
+ Consumable_order_details2__c Orderdet9 = new Consumable_order_details2__c();
+ Orderdet9.Name = 'OCM_01_001002';
+ Orderdet9.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet9.RemoveBox_No__c = 3;
+ Orderdet9.Bar_Code__c = '4444444444250DDDDD';
+ Orderdet9.Consumable_Product__c = pro1.Id;
+ Orderdet9.Arrive_date__c = Date.today();
+ Orderdet9.Used_date__c = Date.today();
+ Orderdet9.Box_Piece__c = '涓�';
+ Orderdet9.TracingCode__c = 'DDDDD';
+ //鍑哄簱
+ Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c();
+ Orderdet3.Name = 'OCM_01_001003';
+ Orderdet3.Consumable_order_minor__c = Order1.Id;
+ Orderdet3.Consumable_Shipment_order__c = Order1.Id;
+ Orderdet3.Consumable_order_minor__c = null;
+ Orderdet3.Consumable_Sale_order__c = null;
+ Orderdet3.Consumable_ZS_order__c = Order1.Id;
+ Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet3.Bar_Code__c = '5555555555250EEEEE';
+ Orderdet3.Consumable_Product__c = pro1.Id;
+ Orderdet3.Send_Date__c = Date.today();
+ Orderdet3.Box_Piece__c = '鐩�';
+ Orderdet3.Return_date__c = null;
+ Orderdet3.Lose_Flag__c = true;
+ Orderdet3.TracingCode__c = 'EEEEE';
+
+ List<Consumable_order_details2__c> newdet2 = new List<Consumable_order_details2__c>();
+ newdet2.add(Orderdet);
+ insert newdet2;
+ insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2, Orderdet3, Orderdet9 };
+
+ Map<String, object> data = new Map<String, object>();
+ String ESetId = Order3.Id;
+ System.Test.startTest();
+ LexSaleOrderController.GoodsDeliveryInit(ESetId);
+ String barcode1 = '';
+ String key = '';
+ Integer i = 0;
+ Decimal a = 0;
+ orderpieceorboxMap = new Map<String, String>();
+ LexSaleOrderController.SearchPro(Order1, barcode1, accountName, userWorkLocation, accountId, orderdetails, orderpieceorboxMap);
+ String barcode = '1111111111250AAAAA\n2222222222250BBBBB\n3333333333250CCCCC\n4444444444250DDDDD\n5555555555250EEEEE';
+ LexSaleOrderController.SearchPro(Order3, barcode, accountName, userWorkLocation, accountId, orderdetails, orderpieceorboxMap);
+ LexSaleOrderController.ProdElivery(
+ ESetId,
+ Order3,
+ barcode,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+ LexSaleOrderController.ProSale(
+ ESetId,
+ Order3,
+ barcode,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+
+ List<LexSaleOrderController.ConsumableorderdetailsInfo> inList = LexSaleOrderController.consumableorderdetailsRecords;
+ List<LexSaleOrderController.ConsumableorderdetailsInfo> inList1 = new List<LexSaleOrderController.ConsumableorderdetailsInfo>();
+ for (LexSaleOrderController.ConsumableorderdetailsInfo ass : inList) {
+ ass.orderdetails2 = Orderdet1;
+ inList1.add(ass);
+ }
+
+ String errorReason = 'success';
+ LexSaleOrderController.ConsumableorderdetailsInfo c2 = new LexSaleOrderController.ConsumableorderdetailsInfo(
+ Orderdet1,
+ errorReason
+ );
+ c2.orderdetails1 = null;
+ c2.orderdetails2 = Orderdet1;
+ c2.Prod = Orderdet1.Consumable_product__r;
+ c2.oldConsumableCount = Orderdet1.Name;
+ c2.ErrorReason = errorReason;
+
+ LexSaleOrderController.ConsumableorderdetailsInfo c1 = new LexSaleOrderController.ConsumableorderdetailsInfo(Orderdet2);
+ c1.orderdetails1 = null;
+ c1.orderdetails2 = Orderdet2;
+ c1.Prod = Orderdet2.Consumable_product__r;
+ c1.oldConsumableCount = Orderdet2.Name;
+ c1.compareTo(c2);
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void testProdError() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ RecordType hosCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = hosCo.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ Account myAccount2 = new Account(name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
+ insert myAccount2;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount2.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '澶ц繛'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+ //璁㈠崟
+ System.runAs(MyUser_Test) {
+ String Id = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, ContactId, Contact.AccountId, Work_Location__c
+ FROM User
+ WHERE id = :Id
+ ];
+ String accountId = thisUserInfo.Contact.AccountId;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ String accountName;
+ Account[] accountInfo = [
+ SELECT Name
+ FROM account
+ WHERE id = :accountId
+ LIMIT 1
+ ];
+ if (accountInfo.size() > 0) {
+ accountName = accountInfo[0].Name;
+ }
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ Product2 prod03 = new Product2(
+ Name = 'Test03',
+ ProductCode = 'Test03',
+ Asset_Model_No__c = 'Test03',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 12,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02, prod03 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ Product2__c pro3 = new Product2__c(Name = 'Pro003', OT_CODE_Text__c = 'Test003', Product2__c = prod03.Id);
+ insert new List<Product2__c>{ pro1, pro2, pro3 };
+ //鍑哄簱鍗�
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '浼犵エ';
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Order;
+ Order1.Dealer_Info__c = myAccount2.Id;
+ Order1.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ Order1.IsShipment__c = true;
+ insert Order1;
+
+ List<Consumable_orderdetails__c> orderdetails = new List<Consumable_orderdetails__c>();
+ //鏄庣粏1
+ Consumable_orderdetails__c Orderdet1 = new Consumable_orderdetails__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order__c = Order1.Id;
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet1.Consumable_Count__c = 12;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Unitprice_To_agency__c = 1;
+ Orderdet1.Delivery_List_RMB__c = 1;
+ Orderdet1.Shipment_Count__c = 1;
+ Orderdet1.Box_Piece__c = '鐩�';
+ Consumable_orderdetails__c Orderdet2 = new Consumable_orderdetails__c();
+ Orderdet2.Name = 'OCM_01_001002';
+ Orderdet2.Consumable_order__c = Order1.Id;
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet2.Consumable_Count__c = 12;
+ Orderdet2.Consumable_Product__c = pro2.Id;
+ Orderdet2.Unitprice_To_agency__c = 1;
+ Orderdet2.Delivery_List_RMB__c = 1;
+ Orderdet2.Shipment_Count__c = 1;
+ Orderdet2.Box_Piece__c = '涓�';
+ orderdetails.add(Orderdet1);
+ orderdetails.add(Orderdet2);
+ insert orderdetails;
+
+ //鏄庣粏2
+ Consumable_order_details2__c Orderdets1 = new Consumable_order_details2__c();
+ Orderdets1.Name = 'OCM_01_0010001';
+ Orderdets1.Consumable_order_minor__c = Order1.Id;
+ Orderdets1.Consumable_ZS_order__c = Order1.Id;
+ Orderdets1.Consumable_Return_order__c = null;
+ Orderdets1.Consumable_Sale_order__c = null;
+ Orderdets1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets1.Bar_Code__c = '11111250AAAAA';
+ Orderdets1.Consumable_Product__c = pro1.Id;
+ Orderdets1.Arrive_date__c = Date.today();
+ Orderdets1.Return_date__c = null;
+ Orderdets1.RemoveBox_No__c = 3;
+ Orderdets1.Delivery_List_RMB__c = 11.11;
+ Orderdets1.Box_Piece__c = '鐩�';
+ Orderdets1.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdets1.TracingCode__c = 'AAAAA';
+
+ Consumable_order_details2__c Orderdets2 = new Consumable_order_details2__c();
+ Orderdets2.Name = 'OCM_01_0010002';
+ Orderdets2.Consumable_Return_order__c = null;
+ Orderdets2.Consumable_Sale_order__c = null;
+ Orderdets2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets2.Bar_Code__c = '22222250BBBBB';
+ Orderdets2.Consumable_Product__c = pro2.Id;
+ Orderdets2.Arrive_date__c = Date.today();
+ Orderdets2.Return_date__c = null;
+ Orderdets2.RemoveBox_No__c = 3;
+ Orderdets2.Delivery_List_RMB__c = 11.11;
+ Orderdets2.Box_Piece__c = '涓�';
+ Orderdets2.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdets2.TracingCode__c = '';
+
+ Consumable_order_details2__c Orderdets3 = new Consumable_order_details2__c();
+ Orderdets3.Name = 'OCM_01_0010003';
+ Orderdets3.Consumable_order_minor__c = Order1.Id;
+ Orderdets3.Consumable_ZS_order__c = Order1.Id;
+ Orderdets3.Consumable_Return_order__c = null;
+ Orderdets2.Consumable_Sale_order__c = null;
+ Orderdets3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets3.Bar_Code__c = '33333250CCCCC';
+ Orderdets3.Consumable_Product__c = pro3.Id;
+ Orderdets3.Arrive_date__c = Date.today();
+ Orderdets3.Return_date__c = null;
+ Orderdets3.RemoveBox_No__c = 3;
+ Orderdets3.Delivery_List_RMB__c = 11.11;
+ Orderdets3.Box_Piece__c = '鐩�';
+ Orderdets3.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdets3.TracingCode__c = 'CCCCC';
+ //鏈埌璐�
+ Consumable_order_details2__c Orderdets4 = new Consumable_order_details2__c();
+ Orderdets4.Name = 'OCM_01_0010001';
+ Orderdets4.Consumable_order_minor__c = Order1.Id;
+ Orderdets4.Consumable_ZS_order__c = Order1.Id;
+ Orderdets4.Consumable_Return_order__c = null;
+ Orderdets4.Consumable_Sale_order__c = null;
+ Orderdets4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets4.Bar_Code__c = '44444250DDDDD';
+ Orderdets4.Arrive_date__c = Date.today();
+ Orderdets4.Return_date__c = null;
+ Orderdets4.Consumable_Product__c = pro1.Id;
+ Orderdets4.Delivery_List_RMB__c = 11.11;
+ Orderdets4.RemoveBox_No__c = 3;
+ Orderdets4.Box_Piece__c = '鐩�';
+ Orderdets4.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdets4.TracingCode__c = 'DDDDD';
+
+ Consumable_order_details2__c Orderdets5 = new Consumable_order_details2__c();
+ Orderdets5.Name = 'OCM_01_0010003';
+ Orderdets5.Consumable_order_minor__c = Order1.Id;
+ Orderdets5.Consumable_ZS_order__c = Order1.Id;
+ Orderdets5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdets5.Bar_Code__c = '33333250EEEEE';
+ Orderdets5.Consumable_Product__c = pro3.Id;
+ Orderdets5.Arrive_date__c = Date.today();
+ Orderdets5.Return_date__c = null;
+ Orderdets5.RemoveBox_No__c = 3;
+ Orderdets5.Delivery_List_RMB__c = 11.11;
+ Orderdets5.Box_Piece__c = '涓�';
+ Orderdets5.Sterilization_limit__c = Date.today().addDays(-1);
+ Orderdets5.TracingCode__c = 'EEEEE';
+
+ List<Consumable_order_details2__c> newdet2 = new List<Consumable_order_details2__c>();
+ newdet2.add(Orderdets1);
+ insert newdet2;
+ insert new List<Consumable_order_details2__c>{ Orderdets2, Orderdets3, Orderdets4, Orderdets5 };
+
+ List<String> barCodeListP = new List<String>();
+ Map<String, object> data = new Map<String, object>();
+ String ESetId = Order1.Id;
+ System.Test.startTest();
+ LexSaleOrderController.GoodsDeliveryInit(ESetId);
+ String barcode = '11111250AAAAA\n22222250BBBBB\n33333250CCCCC\n44444250DDDDD\n33333250EEEEE';
+ barCodeListP = LexSaleOrderController.ParseBarCode(barcode);
+ System.debug('barCodeListP:' + barCodeListP);
+ System.debug('accountName:' + accountName);
+ System.debug('userWorkLocation:' + userWorkLocation);
+ String key = '';
+ Integer idx = 0;
+ orderpieceorboxMap = new Map<String, String>();
+ LexSaleOrderController.SearchPro(Order1, barcode, accountName, userWorkLocation, accountId, orderdetails, orderpieceorboxMap);
+ LexSaleOrderController.ProdElivery(
+ ESetId,
+ Order1,
+ barcode,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+ LexSaleOrderController.ProSale(
+ ESetId,
+ Order1,
+ barcode,
+ accountName,
+ userWorkLocation,
+ JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords),
+ orderdetails,
+ orderpriceMap,
+ orderagencypriceMap
+ );
+
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void searchTest1() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET',
+ Work_Location__c = '鍖椾含'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'N3047730', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = myAccount1.Id;
+ hp1.account__c = myAccount1.Id;
+ hp1.product__c = pro1.Id;
+ insert hp1;
+
+ Consumable_order__c Order0 = new Consumable_order__c();
+ Order0.Name = 'OCM_01_000';
+ Order0.Order_status__c = '鎵瑰噯';
+ Order0.Order_type__c = '璁㈠崟';
+ Order0.Dealer_Info__c = myAccount1.id;
+ Order0.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order0.Order_ProType__c = 'ET';
+ Order0.OutPattern__c = true;
+ insert Order0;
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ Order1.OutPattern__c = true;
+ Order1.Arrive_Order__c = Order0.Id;
+ insert Order1;
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ Orderdet.Shipment_Count__c = 1;
+ Orderdet.isOutPattern__c = true;
+ insert Orderdet;
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.Cancellation_Date__c = null;
+ Orderdet1.TracingCode__c = 'BXJRF';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.exchangeOutPattern__c = true;
+ Orderdet1.Consumable_ZS_order__c = Order1.Id;
+ insert Orderdet1;
+ System.debug('Orderdet1:' + Orderdet1);
+ Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
+ Orderdet2.Name = 'OCM_01_001001';
+ Orderdet2.Consumable_order_minor__c = Order1.Id;
+ Orderdet2.Consumable_Product__c = pro1.Id;
+ Orderdet2.Asset_Model_No__c = 'Test01';
+ Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet2.Bar_Code__c = '01049531702003111115120017181234105ZK250BXJRF';
+ Orderdet1.Cancellation_Date__c = null;
+ Orderdet2.TracingCode__c = 'BXJRF';
+ Orderdet2.SerialLotNo__c = '5ZK';
+ // Orderdet2.Consumable_ZS_order__c = Order1.Id;
+ // Orderdet2.Box_Piece__c = '涓�';
+ insert Orderdet2;
+ System.Test.startTest();
+ String a = LexSaleOrderController.baseUrl;
+ LexSaleOrderController.msiMap = new Map<String, Integer>();
+ List<Consumable_orderdetails__c> orderdetails = new List<Consumable_orderdetails__c>();
+ orderdetails.add(Orderdet);
+ LexSaleOrderController.GoodsDeliveryInit(Order1.Id);
+ String condetailList = JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords);
+ Order1.Arrive_Order__c = null;
+ LexSaleOrderController.SearchPro(
+ Order1,
+ '01049531702003111115120017181000105ZK250BXJRF',
+ myAccount1.Name,
+ '',
+ myAccount1.Id,
+ LexSaleOrderController.orderdetails,
+ LexSaleOrderController.orderpieceorboxMap
+ );
+ LexSaleOrderController.ProdElivery(
+ Order1.Id,
+ LexSaleOrderController.coc,
+ '01049531702003111115120017181000105ZK250BXJRF',
+ myAccount1.Name,
+ '',
+ condetailList,
+ LexSaleOrderController.orderdetails,
+ LexSaleOrderController.orderpriceMap,
+ LexSaleOrderController.orderagencypriceMap
+ );
+ LexSaleOrderController.ProSale(
+ Order1.Id,
+ LexSaleOrderController.coc,
+ '01049531702003111115120017181000105ZK250BXJRF',
+ myAccount1.Name,
+ '',
+ condetailList,
+ LexSaleOrderController.orderdetails,
+ LexSaleOrderController.orderpriceMap,
+ LexSaleOrderController.orderagencypriceMap
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void searchTest2() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET',
+ Work_Location__c = '鍖椾含'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'N3047730', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = myAccount1.Id;
+ hp1.account__c = myAccount1.Id;
+ hp1.product__c = pro1.Id;
+ insert hp1;
+
+ Consumable_order__c Order0 = new Consumable_order__c();
+ Order0.Name = 'OCM_01_000';
+ Order0.Order_status__c = '鎵瑰噯';
+ Order0.Order_type__c = '璁㈠崟';
+ Order0.Dealer_Info__c = myAccount1.id;
+ Order0.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order0.Order_ProType__c = 'ET';
+ Order0.OutPattern__c = true;
+ insert Order0;
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ Order1.OutPattern__c = true;
+ Order1.Arrive_Order__c = Order0.Id;
+ insert Order1;
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ Orderdet.Shipment_Count__c = 1;
+ Orderdet.isOutPattern__c = true;
+ insert Orderdet;
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.Cancellation_Date__c = null;
+ Orderdet1.TracingCode__c = 'BXJRF';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.exchangeOutPattern__c = true;
+ Orderdet1.Consumable_ZS_order__c = Order1.Id;
+ Orderdet1.Box_Piece__c = '涓�';
+ insert Orderdet1;
+ System.debug('Orderdet1:' + Orderdet1);
+ System.Test.startTest();
+ String a = LexSaleOrderController.baseUrl;
+ LexSaleOrderController.msiMap = new Map<String, Integer>();
+ List<Consumable_orderdetails__c> orderdetails = new List<Consumable_orderdetails__c>();
+ orderdetails.add(Orderdet);
+ LexSaleOrderController.GoodsDeliveryInit(Order1.Id);
+ LexSaleOrderController.consumableorderdetailsRecords[0].outboundCount = 1;
+ String condetailList = JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords);
+ LexSaleOrderController.ProdElivery(
+ Order1.Id,
+ LexSaleOrderController.coc,
+ '01049531702003111115120017181000105ZK250BXJRF',
+ myAccount1.Name,
+ '',
+ condetailList,
+ LexSaleOrderController.orderdetails,
+ LexSaleOrderController.orderpriceMap,
+ LexSaleOrderController.orderagencypriceMap
+ );
+ // LexSaleOrderController.ProSale(Order1.Id, LexSaleOrderController.coc, '01049531702003111115120017181000105ZK250BXJRF', myAccount1.Name, '', condetailList, LexSaleOrderController.orderdetails, LexSaleOrderController.orderpriceMap, LexSaleOrderController.orderagencypriceMap);
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void searchTest3() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ Account myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '9999900'
+ );
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET',
+ Work_Location__c = '鍖椾含'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'N3047730', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = myAccount1.Id;
+ hp1.account__c = myAccount1.Id;
+ hp1.product__c = pro1.Id;
+ insert hp1;
+
+ Consumable_order__c Order0 = new Consumable_order__c();
+ Order0.Name = 'OCM_01_000';
+ Order0.Order_status__c = '鎵瑰噯';
+ Order0.Order_type__c = '璁㈠崟';
+ Order0.Dealer_Info__c = myAccount1.id;
+ Order0.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order0.Order_ProType__c = 'ET';
+ Order0.OutPattern__c = true;
+ insert Order0;
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ Order1.OutPattern__c = true;
+ Order1.Arrive_Order__c = Order0.Id;
+ insert Order1;
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ Orderdet.Shipment_Count__c = 1;
+ Orderdet.isOutPattern__c = true;
+ insert Orderdet;
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.Cancellation_Date__c = null;
+ Orderdet1.TracingCode__c = 'BXJRF';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.exchangeOutPattern__c = true;
+ Orderdet1.Consumable_ZS_order__c = Order1.Id;
+ Orderdet1.Box_Piece__c = '涓�';
+ insert Orderdet1;
+ System.debug('Orderdet1:' + Orderdet1);
+ System.Test.startTest();
+ String a = LexSaleOrderController.baseUrl;
+ LexSaleOrderController.msiMap = new Map<String, Integer>();
+ List<Consumable_orderdetails__c> orderdetails = new List<Consumable_orderdetails__c>();
+ orderdetails.add(Orderdet);
+ LexSaleOrderController.GoodsDeliveryInit(Order1.Id);
+ LexSaleOrderController.consumableorderdetailsRecords[0].outboundCount = 1;
+ String condetailList = JSON.serialize(LexSaleOrderController.consumableorderdetailsRecords);
+ // LexSaleOrderController.ProdElivery(Order1.Id, LexSaleOrderController.coc, '01049531702003111115120017181000105ZK250BXJRF', myAccount1.Name, '', condetailList, LexSaleOrderController.orderdetails, LexSaleOrderController.orderpriceMap, LexSaleOrderController.orderagencypriceMap);
+ LexSaleOrderController.ProSale(
+ Order1.Id,
+ LexSaleOrderController.coc,
+ '01049531702003111115120017181000105ZK250BXJRF',
+ myAccount1.Name,
+ '',
+ condetailList,
+ LexSaleOrderController.orderdetails,
+ LexSaleOrderController.orderpriceMap,
+ LexSaleOrderController.orderagencypriceMap
+ );
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexSaleOrderControllerTest.cls-meta.xml b/force-app/main/default/classes/LexSaleOrderControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexSaleOrderControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexSearchContractControllerTest.cls b/force-app/main/default/classes/LexSearchContractControllerTest.cls
new file mode 100644
index 0000000..6bc8dae
--- /dev/null
+++ b/force-app/main/default/classes/LexSearchContractControllerTest.cls
@@ -0,0 +1,74 @@
+@istest
+public class LexSearchContractControllerTest {
+ @IsTest
+ static void lexSearchContractController1() {
+ User myUser_test = new User();
+ Account myAccount2;
+ Account contact;
+ Contact core;
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(currentUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ List<RecordType> rectCotac = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '濂戠磩'
+ ];
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ myAccount2 = new Account(
+ name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|5|55,Test02|2|4',
+ ET_SP_Dealer__c = true
+ );
+ insert myAccount2;
+ contact = new Account(
+ name = 'Testaccount002',
+ RecordTypeId = rectCotac[0].Id,
+ SpecialDealerName__c = 'Testaccount002',
+ ParentId = myAccount2.Id,
+ Agent_Ref__c = myAccount2.Id,
+ Delete_Flag__c = false,
+ Contract_Department_Class__c = 'ET',
+ Contract_Decide_Start_Date__c = Date.today().addDays(-1),
+ Contract_Decide_End_Date__c = Date.today().addDays(1),
+ AgentCode_Ext__c = '9999900',
+ ET_SP_Dealer__c = true
+ );
+ insert contact;
+
+ core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount2.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com'
+ );
+ insert myUser_test;
+ }
+
+ System.runAs(myUser_test) {
+ LexSearchContractController.init('ET');
+ String accountId = myAccount2.Id;
+ LexSearchContractController.searchContract('Testaccount002', accountId, 'ET', false);
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexSearchContractControllerTest.cls-meta.xml b/force-app/main/default/classes/LexSearchContractControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexSearchContractControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexSearchHospitalControllerTest.cls b/force-app/main/default/classes/LexSearchHospitalControllerTest.cls
new file mode 100644
index 0000000..d2b6280
--- /dev/null
+++ b/force-app/main/default/classes/LexSearchHospitalControllerTest.cls
@@ -0,0 +1,9 @@
+@istest
+public class LexSearchHospitalControllerTest {
+ @IsTest
+ static void lexSearchHospitalControllerTest1() {
+ LexSearchHospitalController.init();
+ LexSearchHospitalController.searchHospital('', '');
+ LexSearchHospitalController.searchHospital('test', '');
+ }
+}
diff --git a/force-app/main/default/classes/LexSearchHospitalControllerTest.cls-meta.xml b/force-app/main/default/classes/LexSearchHospitalControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexSearchHospitalControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexSummonsCreatController.cls b/force-app/main/default/classes/LexSummonsCreatController.cls
index f83dc7a..9d25889 100644
--- a/force-app/main/default/classes/LexSummonsCreatController.cls
+++ b/force-app/main/default/classes/LexSummonsCreatController.cls
@@ -245,265 +245,530 @@
// 鐢婚潰鍒濆鍖�
@AuraEnabled
- public static ResponseBodyLWC init(String ESetidJs, String statusEdit, Integer pageSizeLWC, Integer pageTokenLWC) {
- // try {
- firstInit(ESetidJs);
- statusEdit = statusEdit;
- arriveorder = '';
- HospitalName = '';
- provinceOpts = new List<SelectOption>();
- provinceOptsMap = new Map<String, String>();
- ResponseBodyLWC res = new ResponseBodyLWC();
- Map<String, object> data = new Map<String, object>();
- res.entity = data;
- // public static Integer pagesize { get; set; }
- // public static Integer pageToken { get; set; }
- // public static String sortField { get; set; }
- // public static String sortOrder { get; set; }
- pagesize = pageSizeLWC;
- pageToken = pageTokenLWC > 2000 ? 2000 : pageTokenLWC;
+ public static ResponseBodyLWC init(
+ String ESetidJs,
+ String statusEdit,
+ Integer pageSizeLWC,
+ Integer pageTokenLWC,
+ String arriveorderLWC
+ ) {
+ try {
+ firstInit(ESetidJs);
+ statusEdit = statusEdit;
+ arriveorder = arriveorderLWC;
+ HospitalName = '';
+ provinceOpts = new List<SelectOption>();
+ provinceOptsMap = new Map<String, String>();
+ ResponseBodyLWC res = new ResponseBodyLWC();
+ Map<String, object> data = new Map<String, object>();
+ res.entity = data;
+ // public static Integer pagesize { get; set; }
+ // public static Integer pageToken { get; set; }
+ // public static String sortField { get; set; }
+ // public static String sortOrder { get; set; }
+ pagesize = pageSizeLWC;
+ pageToken = pageTokenLWC > 2000 ? 2000 : pageTokenLWC;
- // sortKey = '1';
- // preSortKey = '1';
- // sortOrderAsc = false;
- // sortOrder = new List<String>(8);
- // sortOrder = new List<String>{ ' ', ' ', ' ', ' ', '鈫�', '', '', '' };
- //cate1ForSort = '';
- sumPrice = 0;
- IdCheck = EsetId;
- if (ESetId != null && ESetId != '' && (statusEdit == '' || statusEdit == null)) {
- editAble = false;
- } else if ((ESetId == null || ESetId == '') && (statusEdit == '' || statusEdit == null)) {
- editAble = true;
- } else if (ESetId != null && ESetId != '' && statusEdit != '' && statusEdit != null) {
- editAble = true;
- }
- userId = UserInfo.getUserId();
- localuser = [SELECT id, State_Hospital__c FROM User WHERE id = :UserInfo.getUserId()];
- //userId = '00510000005QO75';
- user Useracc = [SELECT accountid, Work_Location__c, UserPro_Type__c FROM user WHERE id = :userId];
- accountid = Useracc.accountid;
- userWorkLocation = Useracc.Work_Location__c;
- agencyProType = Useracc.UserPro_Type__c;
- if (String.isBlank(Useracc.UserPro_Type__c)) {
- agencyProType = 'ET';
- }
- Account accountInfo = [SELECT Name FROM account WHERE id = :accountid];
- accountName = accountInfo.Name;
- //coc.Order_date__c = Date.today();
- list<Dealer_elationship__c> Dealerelationship = new List<Dealer_elationship__c>();
- Dealerelationship = [
- SELECT Dealer_subordinate__c, Dealer_subordinate__r.Name
- FROM Dealer_elationship__c
- WHERE Dealer_principal__c = :accountid
- ];
-
- List<Agency_Hospital_Link__c> AgencyHospitalLink = new List<Agency_Hospital_Link__c>();
- AgencyHospitalLink = [SELECT Id, Hospital__c, Hospital__r.Name FROM Agency_Hospital_Link__c WHERE Agency__c = :accountid];
-
- //add by rentx 2021-3-1 start
- //鍒ゆ柇褰撳墠缁忛攢鍟嗕笅鏄惁鏈夌壒浠峰尰闄�
- List<hospitalprice__c> hlist = [SELECT id, product__c FROM hospitalprice__c WHERE account__c = :accountid];
- if (hlist == null || hlist.size() == 0) {
- hasHos = false;
- } else {
- for (hospitalprice__c hp : hlist) {
- HosProMap.put(hp.product__c, '');
+ // sortKey = '1';
+ // preSortKey = '1';
+ // sortOrderAsc = false;
+ // sortOrder = new List<String>(8);
+ // sortOrder = new List<String>{ ' ', ' ', ' ', ' ', '鈫�', '', '', '' };
+ //cate1ForSort = '';
+ sumPrice = 0;
+ IdCheck = EsetId;
+ if (ESetId != null && ESetId != '' && (statusEdit == '' || statusEdit == null)) {
+ editAble = false;
+ } else if ((ESetId == null || ESetId == '') && (statusEdit == '' || statusEdit == null)) {
+ editAble = true;
+ } else if (ESetId != null && ESetId != '' && statusEdit != '' && statusEdit != null) {
+ editAble = true;
}
- hasHos = true;
- }
- //add by rentx 2021-3-1 end
+ userId = UserInfo.getUserId();
+ localuser = [
+ SELECT id, State_Hospital__c
+ FROM User
+ WHERE id = :UserInfo.getUserId()
+ ];
+ //userId = '00510000005QO75';
+ user Useracc = [
+ SELECT accountid, Work_Location__c, UserPro_Type__c
+ FROM user
+ WHERE id = :userId
+ ];
+ accountid = Useracc.accountid;
+ userWorkLocation = Useracc.Work_Location__c;
+ agencyProType = Useracc.UserPro_Type__c;
+ if (String.isBlank(Useracc.UserPro_Type__c)) {
+ agencyProType = 'ET';
+ }
+ Account accountInfo = [SELECT Name FROM account WHERE id = :accountid];
+ accountName = accountInfo.Name;
+ //coc.Order_date__c = Date.today();
+ list<Dealer_elationship__c> Dealerelationship = new List<Dealer_elationship__c>();
+ Dealerelationship = [
+ SELECT Dealer_subordinate__c, Dealer_subordinate__r.Name
+ FROM Dealer_elationship__c
+ WHERE Dealer_principal__c = :accountid
+ ];
- saveBtnDisabled = false;
- SorderBtnDisabled = false;
- String sqlagencyProType = '%' + agencyProType + '%';
- coc = new Consumable_order__c();
- consumableorderdetailsSelectRecords = new List<ConsumableorderdetailsInfo>();
- Map<String, ConsumableorderdetailsInfo> MidMap = new Map<String, ConsumableorderdetailsInfo>();
- //add by rentx 2021-01-29
- Map<String, ConsumableorderdetailsInfo> MidMap2 = new Map<String, ConsumableorderdetailsInfo>();
- //add by rentx 2021-01-29
+ List<Agency_Hospital_Link__c> AgencyHospitalLink = new List<Agency_Hospital_Link__c>();
+ AgencyHospitalLink = [
+ SELECT Id, Hospital__c, Hospital__r.Name
+ FROM Agency_Hospital_Link__c
+ WHERE Agency__c = :accountid
+ ];
- List<AggregateResult> orderdetailCount = [
- SELECT count(id), Consumable_Product__c cpc, Box_Piece__c
- FROM Consumable_order_details2__c
- WHERE
- Dealer_Arrive__c = TRUE
- AND Dealer_Shipment__c = FALSE
- AND Dealer_Saled__c = FALSE
- AND Lose_Flag__c = FALSE
- AND Cancellation_Flag__c = FALSE
- AND Bar_Code__c != NULL
- AND Isoverdue__c = 1
- AND Product_Type__c LIKE :sqlagencyProType
- AND Dealer_Info_text__c = :accountName
- AND Arrive_Owner_Work_Location__c = :userWorkLocation
- GROUP BY Consumable_Product__c, Box_Piece__c
- ];
- for (AggregateResult orderdetail : orderdetailCount) {
- zaikuId.add(String.valueOf(orderdetail.get('cpc')));
- }
- System.debug('sqlagencyProType = ' + sqlagencyProType);
- System.debug('userWorkLocation = ' + userWorkLocation);
- System.debug('accountName = ' + accountName);
- List<Consumable_order_details2__c> CountDel = [
- SELECT
- Id,
- Bar_Code__c,
- Name,
- Inventory_date__c,
- Consumable_Product__c,
- Consumable_Product__r.Asset_Model_No__c,
- Recordtypeid,
- Box_Piece__c,
- ProductPacking_list_manual__c,
- //add by rentx 2020-11-27 start
- hospitalSpecialOffer__c
- //add by rentx 2020-11-27 end
- FROM Consumable_order_details2__c
- WHERE
- Dealer_Arrive__c = TRUE
- AND Dealer_Shipment__c = FALSE
- AND Dealer_Saled__c = FALSE
- AND Dealer_Returned__c = FALSE
- AND Lose_Flag__c = FALSE
- AND Cancellation_Flag__c = FALSE
- AND Bar_Code__c != NULL
- AND Isoverdue__c = 1
- AND Product_Type__c LIKE :sqlagencyProType
- AND Arrive_Owner_Work_Location__c = :userWorkLocation
- AND Dealer_Info_text__c = :accountName
- ];
- // 鏂拌
- if (ESetId == null || ESetId == '') {
- SummonsFlag = 'hidden';
- String msoql = makeSoqlinventory();
- initStandardController(msoql);
- System.debug('msoql = ' + msoql);
- product2Selected = Database.query(msoql);
- if (String.isBlank(arriveorder)) {
- EditDelCommitBtnDisabled = true;
- for (Integer i = 0; i < product2Selected.size(); i++) {
- MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i]));
+ //add by rentx 2021-3-1 start
+ //鍒ゆ柇褰撳墠缁忛攢鍟嗕笅鏄惁鏈夌壒浠峰尰闄�
+ List<hospitalprice__c> hlist = [
+ SELECT id, product__c
+ FROM hospitalprice__c
+ WHERE account__c = :accountid
+ ];
+ if (hlist == null || hlist.size() == 0) {
+ hasHos = false;
+ } else {
+ for (hospitalprice__c hp : hlist) {
+ HosProMap.put(hp.product__c, '');
}
- for (Integer i = 0; i < CountDel.size(); i++) {
- String str = '';
- if (CountDel[i].hospitalSpecialOffer__c) {
- str = 'isHos';
- } else {
- str = 'notHos';
+ hasHos = true;
+ }
+ //add by rentx 2021-3-1 end
+
+ saveBtnDisabled = false;
+ SorderBtnDisabled = false;
+ String sqlagencyProType = '%' + agencyProType + '%';
+ coc = new Consumable_order__c();
+ consumableorderdetailsSelectRecords = new List<ConsumableorderdetailsInfo>();
+ Map<String, ConsumableorderdetailsInfo> MidMap = new Map<String, ConsumableorderdetailsInfo>();
+ //add by rentx 2021-01-29
+ Map<String, ConsumableorderdetailsInfo> MidMap2 = new Map<String, ConsumableorderdetailsInfo>();
+ //add by rentx 2021-01-29
+
+ List<AggregateResult> orderdetailCount = [
+ SELECT count(id), Consumable_Product__c cpc, Box_Piece__c
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c != NULL
+ AND Isoverdue__c = 1
+ AND Product_Type__c LIKE :sqlagencyProType
+ AND Dealer_Info_text__c = :accountName
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ GROUP BY Consumable_Product__c, Box_Piece__c
+ ];
+ for (AggregateResult orderdetail : orderdetailCount) {
+ zaikuId.add(String.valueOf(orderdetail.get('cpc')));
+ }
+ System.debug('sqlagencyProType = ' + sqlagencyProType);
+ System.debug('userWorkLocation = ' + userWorkLocation);
+ System.debug('accountName = ' + accountName);
+ List<Consumable_order_details2__c> CountDel = [
+ SELECT
+ Id,
+ Bar_Code__c,
+ Name,
+ Inventory_date__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Recordtypeid,
+ Box_Piece__c,
+ ProductPacking_list_manual__c,
+ //add by rentx 2020-11-27 start
+ hospitalSpecialOffer__c
+ //add by rentx 2020-11-27 end
+ FROM Consumable_order_details2__c
+ WHERE
+ Dealer_Arrive__c = TRUE
+ AND Dealer_Shipment__c = FALSE
+ AND Dealer_Saled__c = FALSE
+ AND Dealer_Returned__c = FALSE
+ AND Lose_Flag__c = FALSE
+ AND Cancellation_Flag__c = FALSE
+ AND Bar_Code__c != NULL
+ AND Isoverdue__c = 1
+ AND Product_Type__c LIKE :sqlagencyProType
+ AND Arrive_Owner_Work_Location__c = :userWorkLocation
+ AND Dealer_Info_text__c = :accountName
+ ];
+ // 鏂拌
+ if (ESetId == null || ESetId == '') {
+ SummonsFlag = 'hidden';
+ String msoql = makeSoqlinventory();
+ initStandardController(msoql);
+ System.debug('msoql = ' + msoql);
+ product2Selected = Database.query(msoql);
+ if (String.isBlank(arriveorder)) {
+ EditDelCommitBtnDisabled = true;
+ for (Integer i = 0; i < product2Selected.size(); i++) {
+ MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i]));
}
- //鏄庣粏2瀵瑰簲鐨勪骇鍝佸瓨鍦ㄤ簬MidMap涓�
- if (MidMap.containsKey(CountDel[i].Consumable_Product__c)) {
- //璁剧疆map涓璳ey鐨勫悗缂� 鐢ㄤ簬鍖哄垎鍖婚櫌鐗逛环鍜岄潪鍖婚櫌鐗逛环
- if (MidMap2.containsKey(CountDel[i].Consumable_Product__c + str)) {
- ConsumableorderdetailsInfo Jstage = MidMap2.get(CountDel[i].Consumable_Product__c + str);
- Jstage.allnumber = Jstage.allnumber + 1;
- if (CountDel[i].Box_Piece__c == '鐩�') {
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- } else if (CountDel[i].Box_Piece__c == '涓�') {
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- if (CountDel[i].hospitalSpecialOffer__c) {
- Jstage.hospitalSpecialOffer = true;
- } else {
- Jstage.hospitalSpecialOffer = false;
- }
- if (HosProMap.containsKey(Jstage.Prod.Id)) {
- Jstage.hosPro = true;
- }
- MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
+ for (Integer i = 0; i < CountDel.size(); i++) {
+ String str = '';
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ str = 'isHos';
} else {
- //midmap2涓病鏈夊搴旂殑浜у搧
- ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c).clone();
- Jstage.allnumber = Jstage.allnumber + 1;
- if (CountDel[i].Box_Piece__c == '鐩�') {
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- } else if (CountDel[i].Box_Piece__c == '涓�') {
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- if (CountDel[i].hospitalSpecialOffer__c) {
- Jstage.hospitalSpecialOffer = true;
+ str = 'notHos';
+ }
+ //鏄庣粏2瀵瑰簲鐨勪骇鍝佸瓨鍦ㄤ簬MidMap涓�
+ if (MidMap.containsKey(CountDel[i].Consumable_Product__c)) {
+ //璁剧疆map涓璳ey鐨勫悗缂� 鐢ㄤ簬鍖哄垎鍖婚櫌鐗逛环鍜岄潪鍖婚櫌鐗逛环
+ if (MidMap2.containsKey(CountDel[i].Consumable_Product__c + str)) {
+ ConsumableorderdetailsInfo Jstage = MidMap2.get(CountDel[i].Consumable_Product__c + str);
+ Jstage.allnumber = Jstage.allnumber + 1;
+ if (CountDel[i].Box_Piece__c == '鐩�') {
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ } else if (CountDel[i].Box_Piece__c == '涓�') {
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ Jstage.hospitalSpecialOffer = true;
+ } else {
+ Jstage.hospitalSpecialOffer = false;
+ }
+ if (HosProMap.containsKey(Jstage.Prod.Id)) {
+ Jstage.hosPro = true;
+ }
+ MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
} else {
- Jstage.hospitalSpecialOffer = false;
+ //midmap2涓病鏈夊搴旂殑浜у搧
+ ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c).clone();
+ Jstage.allnumber = Jstage.allnumber + 1;
+ if (CountDel[i].Box_Piece__c == '鐩�') {
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ } else if (CountDel[i].Box_Piece__c == '涓�') {
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ Jstage.hospitalSpecialOffer = true;
+ } else {
+ Jstage.hospitalSpecialOffer = false;
+ }
+ if (HosProMap.containsKey(Jstage.Prod.Id)) {
+ Jstage.hosPro = true;
+ }
+ //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
+ MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
}
- if (HosProMap.containsKey(Jstage.Prod.Id)) {
- Jstage.hosPro = true;
- }
- //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
- MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
+ }
+ System.debug('MidMap2.size() = ' + MidMap2.size());
+ /*//鐒跺悗寰幆CountDel鍘讳慨鏀筸ap閲岀殑allnumber
+ if(MidMap.containsKey(CountDel[i].Consumable_Product__c)){
+ ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c);
+ Jstage.allnumber = Jstage.allnumber+1 ;
+ if(CountDel[i].Box_Piece__c == '鐩�'){
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ }else if(CountDel[i].Box_Piece__c == '涓�'){
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ Jstage.hospitalSpecialOffer = true;
+ }else{
+ Jstage.hospitalSpecialOffer = false;
+ }
+ //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
+ MidMap.put(CountDel[i].Consumable_Product__c+str, Jstage);
+ }*/
+ }
+
+ //update by rentx 2021-01-29 end
+
+ //鍐嶆妸map閲岀殑鍊间粠鏂拌祴缁機onsumableorderdetailsRecords
+ //update by rentx 2021-01-29
+ // for(ConsumableorderdetailsInfo bss : MidMap.values()){
+ for (ConsumableorderdetailsInfo bss : MidMap2.values()) {
+ //update by rentx 2021-01-29
+ //if(bss.allnumber>0){
+ bss.packinglist = Integer.valueOf(bss.Prod.Product2__r.Packing_list_manual__c);
+ bss.approbation_No = bss.Prod.Product2__r.SFDA_Approbation_No__c;
+ bss.expiration_Date = bss.Prod.Product2__r.SFDA_Expiration_Date__c;
+ consumableorderdetailsSelectRecords.add(bss);
+ //}
+ }
+
+ Integer ishosnum = 0;
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsSelectRecords) {
+ //ass.sortBy = sortOrderAsc;
+ //add by rentx 2021-3-10
+ if (ass.hospitalSpecialOffer) {
+ ishosnum = ishosnum + 1;
}
}
- System.debug('MidMap2.size() = ' + MidMap2.size());
- /*//鐒跺悗寰幆CountDel鍘讳慨鏀筸ap閲岀殑allnumber
- if(MidMap.containsKey(CountDel[i].Consumable_Product__c)){
- ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c);
- Jstage.allnumber = Jstage.allnumber+1 ;
- if(CountDel[i].Box_Piece__c == '鐩�'){
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- }else if(CountDel[i].Box_Piece__c == '涓�'){
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- if (CountDel[i].hospitalSpecialOffer__c) {
- Jstage.hospitalSpecialOffer = true;
- }else{
- Jstage.hospitalSpecialOffer = false;
- }
- //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
- MidMap.put(CountDel[i].Consumable_Product__c+str, Jstage);
- }*/
- }
-
- //update by rentx 2021-01-29 end
-
- //鍐嶆妸map閲岀殑鍊间粠鏂拌祴缁機onsumableorderdetailsRecords
- //update by rentx 2021-01-29
- // for(ConsumableorderdetailsInfo bss : MidMap.values()){
- for (ConsumableorderdetailsInfo bss : MidMap2.values()) {
+ if (ishosnum > 0) {
+ hasHosPro = true;
+ } else {
+ hasHosPro = false;
+ }
+ consumableorderdetailsSelectRecords.sort();
+ //add by rentx
+ noOfRecords = consumableorderdetailsSelectRecords.size();
+ //add by rentx
+ System.debug('makepagerecords1');
+ makepagerecords();
+ //listCut();
+ } else {
+ if (statusEdit == '' || statusEdit == null) {
+ editAble = false;
+ } else if (statusEdit != '' && statusEdit != null) {
+ editAble = true;
+ }
+ // upadte start by vivek 2019-7-15
+ // coc = [SELECT Id,Name,Summons_Order_type__c,SummonsStatus_c__c,Order_ForDealerText__c,
+ // Dealer_Info__c,Order_ForDealer__c,Order_ForDealer__r.Name,Order_ForDealerTextID__c,
+ // Order_ForHospital__c,SummonsForDirction__c,Order_date__c,Arrive_Order__c,
+ // Order_status__c,Shipment_total_amount__c,Offers_Price__c,
+ // Billed_Status__c,ShipmentAccount__c,Order_Dealer_Info__c,Order_ForCustomerText__c,ConInvoice_Code__c,Onchange_order__c
+ // FROM Consumable_order__c
+ // WHERE Id =:arriveorder AND Order_Owner_WorkLocal__c =: userWorkLocation
+ // AND recordtypeid = :System.Label.RT_ConOrder_Arrive];
+ coc = [
+ SELECT
+ Id,
+ Name,
+ Summons_Order_type__c,
+ NoConfirmedPrice__c,
+ SummonsStatus_c__c,
+ Order_ForDealerText__c,
+ Dealer_Info__c,
+ Order_ForDealer__c,
+ Order_ForDealer__r.Name,
+ Order_ForDealerTextID__c,
+ Order_ForHospital__c,
+ SummonsForDirction__c,
+ Order_date__c,
+ Arrive_Order__c,
+ Order_status__c,
+ Shipment_total_amount__c,
+ Offers_Price__c,
+ Billed_Status__c,
+ ShipmentAccount__c,
+ Order_Dealer_Info__c,
+ Order_ForCustomerText__c,
+ ConInvoice_Code__c,
+ Onchange_order__c,
+ OutPattern__c
+ FROM Consumable_order__c
+ WHERE
+ Id = :arriveorder
+ AND Order_Owner_WorkLocal__c = :userWorkLocation
+ AND recordtypeid = :System.Label.RT_ConOrder_Arrive
+ ];
+ // update end by vivek 2019-7-15
+ //鏄庣粏1鑾峰彇
+ consumableorderdetailsSelected = [
+ SELECT
+ Id,
+ Dealer_Custom_Price__c,
+ Delivery_List_RMB__c,
+ Consumable_Product__r.Name__c,
+ Name,
+ Consumable_order__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Category3__c,
+ Consumable_Product__r.Category4__c,
+ Consumable_Product__r.Category5__c,
+ Shipment_Count__c,
+ Consumable_Product__r.Intra_Trade_List_RMB__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Sum_of_money__c,
+ Box_Piece__c,
+ ProductPacking_list_manual__c,
+ Consumable_Product__r.SFDA_Status__c,
+ Consumable_count__c,
+ Invoiced_Procount__c,
+ RrturnPro_count__c,
+ InvoiceProNot_count__c,
+ //Unitprice_To_agency__c,
+ Consumable_Product__r.Product2__r.SFDA_Approbation_No__c,
+ Consumable_Product__r.Product2__r.SFDA_Expiration_Date__c
+ FROM Consumable_Orderdetails__c
+ WHERE Consumable_order__c = :coc.Arrive_Order__c
+ ORDER BY Name
+ ];
+ for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
+ orderzaikuId.add(cdc1.Consumable_Product__c);
+ }
+ msoql = makeSoqlorderdet();
+ product2Selected = Database.query(msoql);
+ size = product2Selected.size();
+ initStandardController(msoql);
+ for (Integer i = 0; i < product2Selected.size(); i++) {
+ MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i]));
+ }
//update by rentx 2021-01-29
- //if(bss.allnumber>0){
- bss.packinglist = Integer.valueOf(bss.Prod.Product2__r.Packing_list_manual__c);
- bss.approbation_No = bss.Prod.Product2__r.SFDA_Approbation_No__c;
- bss.expiration_Date = bss.Prod.Product2__r.SFDA_Expiration_Date__c;
- consumableorderdetailsSelectRecords.add(bss);
- //}
- }
+ /*for(Integer i = 0 ; i< CountDel.size();i++){
+ //鐒跺悗寰幆CountDel鍘讳慨鏀筸ap閲岀殑allnumber
+ if(MidMap.containsKey(CountDel[i].Consumable_Product__c)){
+ ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c);
+ Jstage.allnumber = Jstage.allnumber+1 ;
+ if(CountDel[i].Box_Piece__c == '鐩�'){
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ }else if(CountDel[i].Box_Piece__c == '涓�'){
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
+ MidMap.put(CountDel[i].Consumable_Product__c, Jstage);
+ }
- Integer ishosnum = 0;
- for (ConsumableorderdetailsInfo ass : consumableorderdetailsSelectRecords) {
- //ass.sortBy = sortOrderAsc;
- //add by rentx 2021-3-10
- if (ass.hospitalSpecialOffer) {
- ishosnum = ishosnum + 1;
+ }*/
+ for (Integer i = 0; i < CountDel.size(); i++) {
+ String str = '';
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ str = 'isHos';
+ } else {
+ str = 'notHos';
+ }
+ //鏄庣粏2瀵瑰簲鐨勪骇鍝佸瓨鍦ㄤ簬MidMap涓�
+ if (MidMap.containsKey(CountDel[i].Consumable_Product__c)) {
+ //璁剧疆map涓璳ey鐨勫悗缂� 鐢ㄤ簬鍖哄垎鍖婚櫌鐗逛环鍜岄潪鍖婚櫌鐗逛环
+ if (MidMap2.containsKey(CountDel[i].Consumable_Product__c + str)) {
+ ConsumableorderdetailsInfo Jstage = MidMap2.get(CountDel[i].Consumable_Product__c + str);
+ Jstage.allnumber = Jstage.allnumber + 1;
+ if (CountDel[i].Box_Piece__c == '鐩�') {
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ } else if (CountDel[i].Box_Piece__c == '涓�') {
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ Jstage.hospitalSpecialOffer = true;
+ } else {
+ Jstage.hospitalSpecialOffer = false;
+ }
+
+ if (HosProMap.containsKey(Jstage.Prod.Id)) {
+ Jstage.hosPro = true;
+ }
+ MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
+ } else {
+ //midmap2涓病鏈夊搴旂殑浜у搧
+ ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c).clone();
+ Jstage.allnumber = Jstage.allnumber + 1;
+ if (CountDel[i].Box_Piece__c == '鐩�') {
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ } else if (CountDel[i].Box_Piece__c == '涓�') {
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ Jstage.hospitalSpecialOffer = true;
+ } else {
+ Jstage.hospitalSpecialOffer = false;
+ }
+
+ if (HosProMap.containsKey(Jstage.Prod.Id)) {
+ Jstage.hosPro = true;
+ }
+ //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
+ MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
+ }
+ }
+ }
+
+ //鍐嶆妸map閲岀殑鍊间粠鏂拌祴缁機onsumableorderdetailsRecords
+ //update by rentx 2021-01-29
+ // for(ConsumableorderdetailsInfo bss : MidMap.values()){
+ for (ConsumableorderdetailsInfo bss : MidMap2.values()) {
+ //update by rentx 2021-01-29
+ bss.packinglist = Integer.valueOf(bss.Prod.Product2__r.Packing_list_manual__c);
+ bss.approbation_No = bss.Prod.Product2__r.SFDA_Approbation_No__c;
+ bss.expiration_Date = bss.Prod.Product2__r.SFDA_Expiration_Date__c;
+ consumableorderdetailsSelectRecords.add(bss);
+ }
+ //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'test11111' + consumableorderdetailsSelected.size()));
+ //return;
+
+ Integer ishosnum = 0;
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsSelectRecords) {
+ //ass.sortBy = sortOrderAsc;
+ for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
+ cdc1.Shipment_Count__c = cdc1.Consumable_count__c;
+ if (ass.prod.Id == cdc1.Consumable_Product__c) {
+ ass.check = true;
+ ass.orderdetails1 = cdc1;
+ }
+ }
+ if (ass.hospitalSpecialOffer == true) {
+ ishosnum = ishosnum + 1;
+ }
+ }
+ if (ishosnum > 0) {
+ hasHosPro = true;
+ } else {
+ hasHosPro = false;
+ }
+
+ consumableorderdetailsSelectRecords.sort();
+ //add by rentx
+ noOfRecords = consumableorderdetailsSelectRecords.size();
+ //add by rentx
+ System.debug('makepagerecords2');
+ makepagerecords();
+ consumablearriveproductdetailsSelected = [
+ SELECT
+ Id,
+ Name,
+ Intra_Trade_List_RMB__c,
+ Asset_Model_No__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.Category3__c,
+ Consumable_Product__r.Category4__c,
+ Consumable_Product__r.Category5__c,
+ Sterilization_limit__c,
+ Deliver_date__c,
+ Bar_Code__c,
+ Arrive_date__c,
+ Send_Date__c,
+ Consumable_order_minor__r.Name,
+ Consumable_order_minor__c,
+ Dealer_Arrive__c,
+ Delivery_List_RMB__c,
+ Box_Piece__c,
+ ProductPacking_list_manual__c,
+ //add by rentx start
+ hospitalSpecialOffer__c
+ //add by rentx end
+ FROM Consumable_order_details2__c
+ WHERE
+ Consumable_order_minor__c = :coc.Arrive_Order__c
+ AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
+ AND Dealer_Arrive__c = TRUE
+ ORDER BY Name
+ ];
+ for (Integer i = 0; i < consumablearriveproductdetailsSelected.size(); i++) {
+ if (
+ consumablearriveproductdetailsSelected[i].hospitalSpecialOffer__c &&
+ HosProMap.containsKey(consumablearriveproductdetailsSelected[i].Consumable_product__c)
+ ) {
+ coc.OutPattern__c = true;
+ }
+ consumableproductdetailsRecords.add(new ConsumableorderdetailsInfo(consumablearriveproductdetailsSelected[i]));
}
}
- if (ishosnum > 0) {
- hasHosPro = true;
- } else {
- hasHosPro = false;
- }
- consumableorderdetailsSelectRecords.sort();
- //add by rentx
- noOfRecords = consumableorderdetailsSelectRecords.size();
- //add by rentx
- System.debug('makepagerecords1');
- makepagerecords();
- //listCut();
} else {
- if (statusEdit == '' || statusEdit == null) {
- editAble = false;
- } else if (statusEdit != '' && statusEdit != null) {
- editAble = true;
- }
- // upadte start by vivek 2019-7-15
- // coc = [SELECT Id,Name,Summons_Order_type__c,SummonsStatus_c__c,Order_ForDealerText__c,
- // Dealer_Info__c,Order_ForDealer__c,Order_ForDealer__r.Name,Order_ForDealerTextID__c,
- // Order_ForHospital__c,SummonsForDirction__c,Order_date__c,Arrive_Order__c,
- // Order_status__c,Shipment_total_amount__c,Offers_Price__c,
- // Billed_Status__c,ShipmentAccount__c,Order_Dealer_Info__c,Order_ForCustomerText__c,ConInvoice_Code__c,Onchange_order__c
- // FROM Consumable_order__c
- // WHERE Id =:arriveorder AND Order_Owner_WorkLocal__c =: userWorkLocation
- // AND recordtypeid = :System.Label.RT_ConOrder_Arrive];
+ // 鏇存柊銆�
+ SummonsFlag = 'visible';
+ // update start by vivek 2019-7-15 add 鈥淣oConfirmedPrice__c鈥� in select
+ consumableInvoiceRecords = [
+ SELECT Id, Name, Invoice_Date__c, NoConfirmedPrice__c, Invoice_total_amount__c, Invoice_status__c
+ FROM Consumable_order__c
+ WHERE
+ Id IN (
+ SELECT Invoice_Code_link__c
+ FROM Consumable_order_LinkTable__c
+ WHERE Outboundorder_Code_link__c = :ESetId
+ )
+ AND Invoice_status__c != '鑽夋涓�'
+ ];
+
+ System.debug('coc ESetId = ' + ESetId);
+ System.debug('coc userWorkLocation = ' + userWorkLocation);
coc = [
SELECT
Id,
@@ -531,871 +796,636 @@
Onchange_order__c,
OutPattern__c
FROM Consumable_order__c
- WHERE
- Id = :arriveorder
- AND Order_Owner_WorkLocal__c = :userWorkLocation
- AND recordtypeid = :System.Label.RT_ConOrder_Arrive
+ WHERE Id = :ESetId AND Order_Owner_WorkLocal__c = :userWorkLocation AND Order_type__c = '浼犵エ'
];
- // update end by vivek 2019-7-15
- //鏄庣粏1鑾峰彇
- consumableorderdetailsSelected = [
- SELECT
- Id,
- Dealer_Custom_Price__c,
- Delivery_List_RMB__c,
- Consumable_Product__r.Name__c,
- Name,
- Consumable_order__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Category3__c,
- Consumable_Product__r.Category4__c,
- Consumable_Product__r.Category5__c,
- Shipment_Count__c,
- Consumable_Product__r.Intra_Trade_List_RMB__c,
- Consumable_Product__r.Asset_Model_No__c,
- Sum_of_money__c,
- Box_Piece__c,
- ProductPacking_list_manual__c,
- Consumable_Product__r.SFDA_Status__c,
- Consumable_count__c,
- Invoiced_Procount__c,
- RrturnPro_count__c,
- InvoiceProNot_count__c,
- //Unitprice_To_agency__c,
- Consumable_Product__r.Product2__r.SFDA_Approbation_No__c,
- Consumable_Product__r.Product2__r.SFDA_Expiration_Date__c
- FROM Consumable_Orderdetails__c
- WHERE Consumable_order__c = :coc.Arrive_Order__c
- ORDER BY Name
- ];
- for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
- orderzaikuId.add(cdc1.Consumable_Product__c);
+ // update start by vivek 2019-7-15
+ if (getExistarrive()) {
+ arriveorder = coc.Arrive_Order__c;
}
- msoql = makeSoqlorderdet();
- product2Selected = Database.query(msoql);
- size = product2Selected.size();
- initStandardController(msoql);
- for (Integer i = 0; i < product2Selected.size(); i++) {
- MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i]));
- }
- //update by rentx 2021-01-29
- /*for(Integer i = 0 ; i< CountDel.size();i++){
- //鐒跺悗寰幆CountDel鍘讳慨鏀筸ap閲岀殑allnumber
- if(MidMap.containsKey(CountDel[i].Consumable_Product__c)){
- ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c);
- Jstage.allnumber = Jstage.allnumber+1 ;
- if(CountDel[i].Box_Piece__c == '鐩�'){
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- }else if(CountDel[i].Box_Piece__c == '涓�'){
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
- MidMap.put(CountDel[i].Consumable_Product__c, Jstage);
- }
-
- }*/
- for (Integer i = 0; i < CountDel.size(); i++) {
- String str = '';
- if (CountDel[i].hospitalSpecialOffer__c) {
- str = 'isHos';
- } else {
- str = 'notHos';
+ // 鍒拌揣璁㈠崟鏉ョ殑鏃跺��
+ if (getExistarrive()) {
+ if (editAble) {
+ alertMessage = '鍒拌揣璁㈠崟鐩存帴鍑哄簱锛屽嚭搴撳崟鏄庣粏涓嶅彲缂栬緫';
}
- //鏄庣粏2瀵瑰簲鐨勪骇鍝佸瓨鍦ㄤ簬MidMap涓�
- if (MidMap.containsKey(CountDel[i].Consumable_Product__c)) {
- //璁剧疆map涓璳ey鐨勫悗缂� 鐢ㄤ簬鍖哄垎鍖婚櫌鐗逛环鍜岄潪鍖婚櫌鐗逛环
- if (MidMap2.containsKey(CountDel[i].Consumable_Product__c + str)) {
- ConsumableorderdetailsInfo Jstage = MidMap2.get(CountDel[i].Consumable_Product__c + str);
- Jstage.allnumber = Jstage.allnumber + 1;
- if (CountDel[i].Box_Piece__c == '鐩�') {
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- } else if (CountDel[i].Box_Piece__c == '涓�') {
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- if (CountDel[i].hospitalSpecialOffer__c) {
- Jstage.hospitalSpecialOffer = true;
- } else {
- Jstage.hospitalSpecialOffer = false;
- }
-
- if (HosProMap.containsKey(Jstage.Prod.Id)) {
- Jstage.hosPro = true;
- }
- MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
- } else {
- //midmap2涓病鏈夊搴旂殑浜у搧
- ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c).clone();
- Jstage.allnumber = Jstage.allnumber + 1;
- if (CountDel[i].Box_Piece__c == '鐩�') {
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- } else if (CountDel[i].Box_Piece__c == '涓�') {
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- if (CountDel[i].hospitalSpecialOffer__c) {
- Jstage.hospitalSpecialOffer = true;
- } else {
- Jstage.hospitalSpecialOffer = false;
- }
-
- if (HosProMap.containsKey(Jstage.Prod.Id)) {
- Jstage.hosPro = true;
- }
- //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
- MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
- }
+ if (coc.SummonsStatus_c__c == '宸叉彁浜�' || coc.SummonsStatus_c__c == '鎵瑰噯') {
+ system.debug('coc.SummonsStatus_c__c : ' + coc.SummonsStatus_c__c);
+ saveBtnDisabled = true;
+ SorderBtnDisabled = true;
+ EditDelCommitBtnDisabled = false;
}
- }
+ //鍖婚櫌浜岀骇缁忛攢鍟嗗垎绫�
+ Integer io = 0;
+ while (io < Dealerelationship.size()) {
+ if (coc.Order_ForDealer__c == Dealerelationship[io].Dealer_subordinate__c) {
+ SecondDealer = Dealerelationship[io].Dealer_subordinate__c;
+ coc.Order_ForDealer__c = null;
+ io = io + Dealerelationship.size();
+ }
+ io++;
+ }
- //鍐嶆妸map閲岀殑鍊间粠鏂拌祴缁機onsumableorderdetailsRecords
- //update by rentx 2021-01-29
- // for(ConsumableorderdetailsInfo bss : MidMap.values()){
- for (ConsumableorderdetailsInfo bss : MidMap2.values()) {
- //update by rentx 2021-01-29
- bss.packinglist = Integer.valueOf(bss.Prod.Product2__r.Packing_list_manual__c);
- bss.approbation_No = bss.Prod.Product2__r.SFDA_Approbation_No__c;
- bss.expiration_Date = bss.Prod.Product2__r.SFDA_Expiration_Date__c;
- consumableorderdetailsSelectRecords.add(bss);
- }
- //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'test11111' + consumableorderdetailsSelected.size()));
- //return;
+ Integer ik = 0;
+ while (ik < AgencyHospitalLink.size()) {
+ if (coc.Order_ForHospital__c == AgencyHospitalLink[ik].Hospital__c) {
+ HospitalInfo = AgencyHospitalLink[ik].Hospital__c;
+ HospitalName = AgencyHospitalLink[ik].Hospital__r.Name;
+ coc.Order_ForHospital__c = null;
+ ik = ik + AgencyHospitalLink.size();
+ }
+ ik++;
+ }
+ //鍑哄簱鍗曟槑缁�1鍙栧緱
+ consumableorderdetailsSelected = [
+ SELECT
+ Id,
+ Dealer_Custom_Price__c,
+ Delivery_List_RMB__c,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.SFDA_Status__c,
+ Name,
+ Consumable_order__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Shipment_Count__c,
+ Consumable_Product__r.Intra_Trade_List_RMB__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Consumable_Product__r.Category3__c,
+ Consumable_Product__r.Category4__c,
+ Consumable_Product__r.Category5__c,
+ Shipment_amount__c,
+ //Unitprice_To_agency__c,
+ Box_Piece__c,
+ ProductPacking_list_manual__c,
+ Invoiced_Procount__c,
+ RrturnPro_count__c,
+ InvoiceProNot_count__c,
+ Consumable_Product__r.Product2__r.SFDA_Approbation_No__c,
+ Consumable_Product__r.Product2__r.SFDA_Expiration_Date__c,
+ isOutPattern__c
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c = :ESetId AND Consumable_order__r.Order_Owner_WorkLocal__c = :userWorkLocation
+ ORDER BY Name
+ ];
+ Map<String, Consumable_Orderdetails__c> cocMap = new Map<String, Consumable_Orderdetails__c>();
- Integer ishosnum = 0;
- for (ConsumableorderdetailsInfo ass : consumableorderdetailsSelectRecords) {
- //ass.sortBy = sortOrderAsc;
for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
- cdc1.Shipment_Count__c = cdc1.Consumable_count__c;
- if (ass.prod.Id == cdc1.Consumable_Product__c) {
- ass.check = true;
- ass.orderdetails1 = cdc1;
+ sumPrice += cdc1.Shipment_amount__c;
+ orderzaikuId.add(cdc1.Consumable_Product__c);
+ //add by rentx 2021-2-26
+ String tempId = cdc1.Consumable_product__c;
+ if (cdc1.isOutPattern__c) {
+ cocMap.put(tempId + 'ishos', cdc1);
+ } else {
+ cocMap.put(tempId + 'nothos', cdc1);
+ }
+ //add by rentx 2021-2-26
+ }
+ String msoql = makeSoqlorderdet();
+ product2Selected = Database.query(msoql);
+ size = product2Selected.size();
+ initStandardController(msoql);
+
+ for (Integer i = 0; i < product2Selected.size(); i++) {
+ MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i]));
+ }
+ //update by rentx 2021-01-29
+ /*for(Integer i = 0 ; i< CountDel.size();i++){
+ //鐒跺悗寰幆CountDel鍘讳慨鏀筸ap閲岀殑allnumber
+ if(MidMap.containsKey(CountDel[i].Consumable_Product__c)){
+ ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c);
+ Jstage.allnumber = Jstage.allnumber+1 ;
+ if(CountDel[i].Box_Piece__c == '鐩�'){
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ }else if(CountDel[i].Box_Piece__c == '涓�'){
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
+ MidMap.put(CountDel[i].Consumable_Product__c, Jstage);
+ }
+ }*/
+
+ for (Integer i = 0; i < CountDel.size(); i++) {
+ String str = '';
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ str = 'isHos';
+ } else {
+ str = 'notHos';
+ }
+ //鏄庣粏2瀵瑰簲鐨勪骇鍝佸瓨鍦ㄤ簬MidMap涓�
+ if (MidMap.containsKey(CountDel[i].Consumable_Product__c)) {
+ //璁剧疆map涓璳ey鐨勫悗缂� 鐢ㄤ簬鍖哄垎鍖婚櫌鐗逛环鍜岄潪鍖婚櫌鐗逛环
+ if (MidMap2.containsKey(CountDel[i].Consumable_Product__c + str)) {
+ ConsumableorderdetailsInfo Jstage = MidMap2.get(CountDel[i].Consumable_Product__c + str);
+ Jstage.allnumber = Jstage.allnumber + 1;
+ if (CountDel[i].Box_Piece__c == '鐩�') {
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ } else if (CountDel[i].Box_Piece__c == '涓�') {
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ Jstage.hospitalSpecialOffer = true;
+ } else {
+ Jstage.hospitalSpecialOffer = false;
+ }
+
+ if (HosProMap.containsKey(Jstage.Prod.Id)) {
+ Jstage.hosPro = true;
+ }
+ MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
+ } else {
+ //midmap2涓病鏈夊搴旂殑浜у搧
+ ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c).clone();
+ Jstage.allnumber = Jstage.allnumber + 1;
+ if (CountDel[i].Box_Piece__c == '鐩�') {
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ } else if (CountDel[i].Box_Piece__c == '涓�') {
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ Jstage.hospitalSpecialOffer = true;
+ } else {
+ Jstage.hospitalSpecialOffer = false;
+ }
+ if (HosProMap.containsKey(Jstage.Prod.Id)) {
+ Jstage.hosPro = true;
+ }
+ //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
+ MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
+ }
}
}
- if (ass.hospitalSpecialOffer == true) {
- ishosnum = ishosnum + 1;
- }
- }
- if (ishosnum > 0) {
- hasHosPro = true;
- } else {
- hasHosPro = false;
- }
+ //update by rentx 2021-01-29
+ consumableorderdetailsSelectRecords = new List<ConsumableorderdetailsInfo>();
+ //鍐嶆妸map閲岀殑鍊间粠鏂拌祴缁機onsumableorderdetailsRecords
+ //update by rentx 2021-01-29
+ // for(ConsumableorderdetailsInfo bss : MidMap.values()){
+ for (ConsumableorderdetailsInfo bss : MidMap2.values()) {
+ //update by rentx 2021-01-29
- consumableorderdetailsSelectRecords.sort();
- //add by rentx
- noOfRecords = consumableorderdetailsSelectRecords.size();
- //add by rentx
- System.debug('makepagerecords2');
- makepagerecords();
- consumablearriveproductdetailsSelected = [
- SELECT
- Id,
- Name,
- Intra_Trade_List_RMB__c,
- Asset_Model_No__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Name__c,
- Consumable_Product__r.Category3__c,
- Consumable_Product__r.Category4__c,
- Consumable_Product__r.Category5__c,
- Sterilization_limit__c,
- Deliver_date__c,
- Bar_Code__c,
- Arrive_date__c,
- Send_Date__c,
- Consumable_order_minor__r.Name,
- Consumable_order_minor__c,
- Dealer_Arrive__c,
- Delivery_List_RMB__c,
- Box_Piece__c,
- ProductPacking_list_manual__c,
- //add by rentx start
- hospitalSpecialOffer__c
- //add by rentx end
- FROM Consumable_order_details2__c
- WHERE
- Consumable_order_minor__c = :coc.Arrive_Order__c
- AND recordtypeid = :System.Label.RT_ConOrderDetail2_Delivery
- AND Dealer_Arrive__c = TRUE
- ORDER BY Name
- ];
- for (Integer i = 0; i < consumablearriveproductdetailsSelected.size(); i++) {
- if (
- consumablearriveproductdetailsSelected[i].hospitalSpecialOffer__c &&
- HosProMap.containsKey(consumablearriveproductdetailsSelected[i].Consumable_product__c)
- ) {
- coc.OutPattern__c = true;
+ //if(bss.allnumber > 0){
+ //bss.UnitpriceToagency = bss.orderdetails1.Unitprice_To_agency__c == null || bss.orderdetails1.Unitprice_To_agency__c == 0 ? '' :bss.orderdetails1.Unitprice_To_agency__c.format();
+ bss.packinglist = Integer.valueOf(bss.Prod.Product2__r.Packing_list_manual__c);
+ bss.approbation_No = bss.Prod.Product2__r.SFDA_Approbation_No__c;
+ bss.expiration_Date = bss.Prod.Product2__r.SFDA_Expiration_Date__c;
+
+ //update by rentx 2021-2-26 start
+ if (cocMap.containsKey(bss.Prod.Id + 'ishos') && bss.hospitalSpecialOffer == true) {
+ consumableorderdetailsSelectRecords.add(bss);
+ } else if (cocMap.containsKey(bss.Prod.Id + 'nothos') && bss.hospitalSpecialOffer == false) {
+ consumableorderdetailsSelectRecords.add(bss);
+ }
+ //update by rentx 2021-2-26 end
+ // consumableorderdetailsSelectRecords.add(bss);
+ //}
}
- consumableproductdetailsRecords.add(new ConsumableorderdetailsInfo(consumablearriveproductdetailsSelected[i]));
+ Integer ishosnum = 0;
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsSelectRecords) {
+ for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
+ //update by rentx 2012-3-1 start
+ // if(ass.prod.Id == cdc1.Consumable_Product__c){
+ // ass.check = true;
+ // ass.orderdetails1 = cdc1;
+ // }
+ if (ass.Prod.Id == cdc1.Consumable_Product__c && ass.hospitalSpecialOffer == cdc1.isOutPattern__c) {
+ ass.check = true;
+ ass.orderdetails1 = cdc1;
+ }
+ //update by rentx 2012-3-1 end
+ }
+ if (ass.hospitalSpecialOffer == true) {
+ ishosnum = ishosnum + 1;
+ }
+ }
+ if (ishosnum > 0) {
+ hasHosPro = true;
+ } else {
+ hasHosPro = false;
+ }
+
+ //add by rentx
+ noOfRecords = consumableorderdetailsSelectRecords.size();
+ //add by rentx
+ System.debug('makepagerecords3');
+ makepagerecords();
+ //listCut();
+ // 娑堣�楀搧鏄庣粏2銈掑彇寰�
+ consumableorderdetails2RecordsList = [
+ SELECT
+ Id,
+ Name,
+ SerialLotNo__c,
+ Consumable_Product__r.Name__c,
+ TracingCode__c,
+ Sterilization_limit__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Category3__c,
+ Consumable_Product__r.Category4__c,
+ Consumable_Product__r.Category5__c,
+ Return_date__c,
+ Invoice_Date__c,
+ Box_Piece__c,
+ ProductPacking_list_manual__c,
+ //add by rentx start
+ hospitalSpecialOffer__c
+ //add by rentx end
+ FROM Consumable_order_details2__c
+ WHERE Consumable_ZS_order__c = :ESetId
+ ORDER BY Name
+ ];
+ for (Integer i = 0; i < consumableorderdetails2RecordsList.size(); i++) {
+ consumableorderdetails2Records.add(new ConsumableorderdetailsInfo(consumableorderdetails2RecordsList[i]));
+ }
+ //浜у搧鏄庣粏鍙栧緱
+ consumablearriveproductdetailsSelected = [
+ SELECT
+ Id,
+ Delivery_List_RMB__c,
+ Consumable_Product__r.Name__c,
+ Name,
+ Consumable_Product__r.SFDA_Status__c,
+ Consumable_Product__r.Category3__c,
+ Consumable_Product__r.Category4__c,
+ Consumable_Product__r.Category5__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Sterilization_limit__c,
+ Consumable_Product__r.Intra_Trade_List_RMB__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Box_Piece__c,
+ ProductPacking_list_manual__c,
+ //add by rentx start
+ hospitalSpecialOffer__c
+ //add by rentx end
+ FROM Consumable_order_details2__c
+ WHERE Consumable_ZS_order__c = :ESetId
+ ORDER BY Name
+ ];
+ for (Integer i = 0; i < consumablearriveproductdetailsSelected.size(); i++) {
+ consumableproductdetailsRecords.add(new ConsumableorderdetailsInfo(consumablearriveproductdetailsSelected[i]));
+ }
+ } else {
+ // 涓嶆槸鍒拌揣璁㈠崟鏉ョ殑鏃跺��
+ if (coc.SummonsStatus_c__c == '宸叉彁浜�' || coc.SummonsStatus_c__c == '鎵瑰噯') {
+ system.debug('coc.SummonsStatus_c__c : ' + coc.SummonsStatus_c__c);
+ saveBtnDisabled = true;
+ SorderBtnDisabled = true;
+ EditDelCommitBtnDisabled = false;
+ }
+ //鍖婚櫌浜岀骇缁忛攢鍟嗗垎绫�
+ Integer io = 0;
+ while (io < Dealerelationship.size()) {
+ if (coc.Order_ForDealer__c == Dealerelationship[io].Dealer_subordinate__c) {
+ SecondDealer = Dealerelationship[io].Dealer_subordinate__c;
+ coc.Order_ForDealer__c = null;
+ io = io + Dealerelationship.size();
+ }
+ io++;
+ }
+ Integer ik = 0;
+ while (ik < AgencyHospitalLink.size()) {
+ if (coc.Order_ForHospital__c == AgencyHospitalLink[ik].Hospital__c) {
+ HospitalInfo = AgencyHospitalLink[ik].Hospital__c;
+ HospitalName = AgencyHospitalLink[ik].Hospital__r.Name;
+ coc.Order_ForHospital__c = null;
+ ik = ik + AgencyHospitalLink.size();
+ }
+ ik++;
+ }
+ // 娑堣�楀搧鏄庣粏1銈掑彇寰�
+ consumableorderdetailsSelected = [
+ SELECT
+ Id,
+ Dealer_Custom_Price__c,
+ Delivery_List_RMB__c,
+ Consumable_Product__r.Name__c,
+ Consumable_Product__r.SFDA_Status__c,
+ Name,
+ Consumable_order__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Shipment_Count__c,
+ Consumable_Product__r.Intra_Trade_List_RMB__c,
+ Consumable_Product__r.Asset_Model_No__c,
+ Shipment_amount__c,
+ Box_Piece__c,
+ ProductPacking_list_manual__c,
+ Invoiced_Procount__c,
+ RrturnPro_count__c,
+ //Unitprice_To_agency__c,
+ InvoiceProNot_count__c,
+ Consumable_Product__r.Category3__c,
+ Consumable_Product__r.Category4__c,
+ Consumable_Product__r.Category5__c,
+ Consumable_Product__r.Product2__r.SFDA_Approbation_No__c,
+ Consumable_Product__r.Product2__r.SFDA_Expiration_Date__c,
+ isOutPattern__c
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c = :ESetId AND Consumable_order__r.Order_Owner_WorkLocal__c = :userWorkLocation
+ ORDER BY Name
+ ];
+ //add by rentx 202-2-26
+ Map<String, Consumable_Orderdetails__c> cocMap = new Map<String, Consumable_Orderdetails__c>();
+
+ for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
+ sumPrice += cdc1.Shipment_amount__c;
+ orderzaikuId.add(cdc1.Consumable_Product__c);
+ //add by rentx 2021-2-26
+ String tempId = cdc1.Consumable_product__c;
+ if (cdc1.isOutPattern__c) {
+ cocMap.put(tempId + 'ishos', cdc1);
+ } else {
+ cocMap.put(tempId + 'nothos', cdc1);
+ }
+ //add by rentx 2021-2-26
+ }
+
+ String msoql = makeSoqlorderdet();
+ product2Selected = Database.query(msoql);
+ size = product2Selected.size();
+ initStandardController(msoql);
+ for (Integer i = 0; i < product2Selected.size(); i++) {
+ MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i]));
+ }
+
+ for (Integer i = 0; i < CountDel.size(); i++) {
+ String str = '';
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ str = 'isHos';
+ } else {
+ str = 'notHos';
+ }
+ //鏄庣粏2瀵瑰簲鐨勪骇鍝佸瓨鍦ㄤ簬MidMap涓�
+ if (MidMap.containsKey(CountDel[i].Consumable_Product__c)) {
+ //璁剧疆map涓璳ey鐨勫悗缂� 鐢ㄤ簬鍖哄垎鍖婚櫌鐗逛环鍜岄潪鍖婚櫌鐗逛环
+ if (MidMap2.containsKey(CountDel[i].Consumable_Product__c + str)) {
+ ConsumableorderdetailsInfo Jstage = MidMap2.get(CountDel[i].Consumable_Product__c + str);
+ Jstage.allnumber = Jstage.allnumber + 1;
+ if (CountDel[i].Box_Piece__c == '鐩�') {
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ } else if (CountDel[i].Box_Piece__c == '涓�') {
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ Jstage.hospitalSpecialOffer = true;
+ } else {
+ Jstage.hospitalSpecialOffer = false;
+ }
+ if (HosProMap.containsKey(Jstage.Prod.Id)) {
+ Jstage.hosPro = true;
+ }
+ MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
+ } else {
+ //midmap2涓病鏈夊搴旂殑浜у搧
+ ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c).clone();
+ Jstage.allnumber = Jstage.allnumber + 1;
+ if (CountDel[i].Box_Piece__c == '鐩�') {
+ Jstage.Boxnumber = Jstage.Boxnumber + 1;
+ } else if (CountDel[i].Box_Piece__c == '涓�') {
+ Jstage.Piecenumber = Jstage.Piecenumber + 1;
+ }
+
+ if (CountDel[i].hospitalSpecialOffer__c) {
+ Jstage.hospitalSpecialOffer = true;
+ } else {
+ Jstage.hospitalSpecialOffer = false;
+ }
+ if (HosProMap.containsKey(Jstage.Prod.Id)) {
+ Jstage.hosPro = true;
+ }
+ Jstage.BoxPiece = CountDel[i].Box_Piece__c;
+ MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
+ }
+ }
+ }
+
+ //鍐嶆妸map閲岀殑鍊间粠鏂拌祴缁機onsumableorderdetailsRecords
+ //update by rentx 2021-01-29
+ // for(ConsumableorderdetailsInfo bss : MidMap.values()){
+ for (ConsumableorderdetailsInfo bss : MidMap2.values()) {
+ //update by rentx 2021-01-29
+
+ //if(bss.allnumber>0){
+ bss.packinglist = Integer.valueOf(bss.Prod.Product2__r.Packing_list_manual__c);
+ bss.approbation_No = bss.Prod.Product2__r.SFDA_Approbation_No__c;
+ bss.expiration_Date = bss.Prod.Product2__r.SFDA_Expiration_Date__c;
+
+ //update by rentx 2021-2-26 start
+ if (cocMap.containsKey(bss.Prod.Id + 'ishos') && bss.hospitalSpecialOffer == true) {
+ consumableorderdetailsSelectRecords.add(bss);
+ } else if (cocMap.containsKey(bss.Prod.Id + 'nothos') && bss.hospitalSpecialOffer == false) {
+ consumableorderdetailsSelectRecords.add(bss);
+ }
+ // consumableorderdetailsSelectRecords.add(bss);
+ //}
+ }
+ // return null;
+ Integer ishosnum = 0;
+ for (ConsumableorderdetailsInfo ass : consumableorderdetailsSelectRecords) {
+ //ass.sortBy = sortOrderAsc;
+ for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
+ //update by rentx 2012-3-1 start
+ // if(ass.prod.Id == cdc1.Consumable_Product__c){
+ // ass.check = true;
+ // ass.orderdetails1 = cdc1;
+ // }
+ if (ass.Prod.Id == cdc1.Consumable_Product__c && ass.hospitalSpecialOffer == cdc1.isOutPattern__c) {
+ ass.check = true;
+ ass.orderdetails1 = cdc1;
+ }
+ //update by rentx 2012-3-1 end
+ }
+
+ if (ass.hospitalSpecialOffer == true) {
+ ishosnum = ishosnum + 1;
+ }
+ }
+
+ if (ishosnum > 0) {
+ hasHosPro = true;
+ } else {
+ hasHosPro = false;
+ }
+
+ consumableorderdetailsSelectRecords.sort();
+ //add by rentx
+ noOfRecords = consumableorderdetailsSelectRecords.size();
+ //add by rentx
+ System.debug('makepagerecords4');
+ makepagerecords();
+
+ // 娑堣�楀搧鏄庣粏2銈掑彇寰�
+ consumableorderdetails2RecordsList = [
+ SELECT
+ Id,
+ Name,
+ SerialLotNo__c,
+ Consumable_Product__r.Name__c,
+ TracingCode__c,
+ Sterilization_limit__c,
+ Consumable_Product__c,
+ Consumable_Product__r.Name,
+ Consumable_Product__r.Category3__c,
+ Consumable_Product__r.Category4__c,
+ Consumable_Product__r.Category5__c,
+ Return_date__c,
+ Invoice_Date__c,
+ Box_Piece__c,
+ ProductPacking_list_manual__c,
+ //add by rentx start
+ hospitalSpecialOffer__c
+ //add by rentx end
+
+ FROM Consumable_order_details2__c
+ WHERE Consumable_ZS_order__c = :ESetId
+ ORDER BY Name
+ ];
+ for (Integer i = 0; i < consumableorderdetails2RecordsList.size(); i++) {
+ consumableorderdetails2Records.add(new ConsumableorderdetailsInfo(consumableorderdetails2RecordsList[i]));
+ }
}
}
- } else {
- // 鏇存柊銆�
- SummonsFlag = 'visible';
- // update start by vivek 2019-7-15 add 鈥淣oConfirmedPrice__c鈥� in select
- consumableInvoiceRecords = [
- SELECT Id, Name, Invoice_Date__c, NoConfirmedPrice__c, Invoice_total_amount__c, Invoice_status__c
- FROM Consumable_order__c
- WHERE
- Id IN (SELECT Invoice_Code_link__c FROM Consumable_order_LinkTable__c WHERE Outboundorder_Code_link__c = :ESetId)
- AND Invoice_status__c != '鑽夋涓�'
- ];
-
- System.debug('coc ESetId = ' + ESetId);
- System.debug('coc userWorkLocation = ' + userWorkLocation);
- coc = [
- SELECT
- Id,
- Name,
- Summons_Order_type__c,
- NoConfirmedPrice__c,
- SummonsStatus_c__c,
- Order_ForDealerText__c,
- Dealer_Info__c,
- Order_ForDealer__c,
- Order_ForDealer__r.Name,
- Order_ForDealerTextID__c,
- Order_ForHospital__c,
- SummonsForDirction__c,
- Order_date__c,
- Arrive_Order__c,
- Order_status__c,
- Shipment_total_amount__c,
- Offers_Price__c,
- Billed_Status__c,
- ShipmentAccount__c,
- Order_Dealer_Info__c,
- Order_ForCustomerText__c,
- ConInvoice_Code__c,
- Onchange_order__c,
- OutPattern__c
- FROM Consumable_order__c
- WHERE Id = :ESetId AND Order_Owner_WorkLocal__c = :userWorkLocation AND Order_type__c = '浼犵エ'
- ];
- // update start by vivek 2019-7-15
- if (getExistarrive()) {
- arriveorder = coc.Arrive_Order__c;
- }
- // 鍒拌揣璁㈠崟鏉ョ殑鏃跺��
- if (getExistarrive()) {
- if (editAble) {
- alertMessage = '鍒拌揣璁㈠崟鐩存帴鍑哄簱锛屽嚭搴撳崟鏄庣粏涓嶅彲缂栬緫';
- }
- if (coc.SummonsStatus_c__c == '宸叉彁浜�' || coc.SummonsStatus_c__c == '鎵瑰噯') {
- system.debug('coc.SummonsStatus_c__c : ' + coc.SummonsStatus_c__c);
- saveBtnDisabled = true;
- SorderBtnDisabled = true;
- EditDelCommitBtnDisabled = false;
- }
- //鍖婚櫌浜岀骇缁忛攢鍟嗗垎绫�
- Integer io = 0;
- while (io < Dealerelationship.size()) {
- if (coc.Order_ForDealer__c == Dealerelationship[io].Dealer_subordinate__c) {
- SecondDealer = Dealerelationship[io].Dealer_subordinate__c;
- coc.Order_ForDealer__c = null;
- io = io + Dealerelationship.size();
- }
- io++;
- }
-
- Integer ik = 0;
- while (ik < AgencyHospitalLink.size()) {
- if (coc.Order_ForHospital__c == AgencyHospitalLink[ik].Hospital__c) {
- HospitalInfo = AgencyHospitalLink[ik].Hospital__c;
- HospitalName = AgencyHospitalLink[ik].Hospital__r.Name;
- coc.Order_ForHospital__c = null;
- ik = ik + AgencyHospitalLink.size();
- }
- ik++;
- }
- //鍑哄簱鍗曟槑缁�1鍙栧緱
- consumableorderdetailsSelected = [
- SELECT
- Id,
- Dealer_Custom_Price__c,
- Delivery_List_RMB__c,
- Consumable_Product__r.Name__c,
- Consumable_Product__r.SFDA_Status__c,
- Name,
- Consumable_order__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Shipment_Count__c,
- Consumable_Product__r.Intra_Trade_List_RMB__c,
- Consumable_Product__r.Asset_Model_No__c,
- Consumable_Product__r.Category3__c,
- Consumable_Product__r.Category4__c,
- Consumable_Product__r.Category5__c,
- Shipment_amount__c,
- //Unitprice_To_agency__c,
- Box_Piece__c,
- ProductPacking_list_manual__c,
- Invoiced_Procount__c,
- RrturnPro_count__c,
- InvoiceProNot_count__c,
- Consumable_Product__r.Product2__r.SFDA_Approbation_No__c,
- Consumable_Product__r.Product2__r.SFDA_Expiration_Date__c,
- isOutPattern__c
- FROM Consumable_orderdetails__c
- WHERE Consumable_order__c = :ESetId AND Consumable_order__r.Order_Owner_WorkLocal__c = :userWorkLocation
- ORDER BY Name
- ];
- Map<String, Consumable_Orderdetails__c> cocMap = new Map<String, Consumable_Orderdetails__c>();
-
- for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
- sumPrice += cdc1.Shipment_amount__c;
- orderzaikuId.add(cdc1.Consumable_Product__c);
- //add by rentx 2021-2-26
- String tempId = cdc1.Consumable_product__c;
- if (cdc1.isOutPattern__c) {
- cocMap.put(tempId + 'ishos', cdc1);
- } else {
- cocMap.put(tempId + 'nothos', cdc1);
- }
- //add by rentx 2021-2-26
- }
- String msoql = makeSoqlorderdet();
- product2Selected = Database.query(msoql);
- size = product2Selected.size();
- initStandardController(msoql);
-
- for (Integer i = 0; i < product2Selected.size(); i++) {
- MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i]));
- }
- //update by rentx 2021-01-29
- /*for(Integer i = 0 ; i< CountDel.size();i++){
- //鐒跺悗寰幆CountDel鍘讳慨鏀筸ap閲岀殑allnumber
- if(MidMap.containsKey(CountDel[i].Consumable_Product__c)){
- ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c);
- Jstage.allnumber = Jstage.allnumber+1 ;
- if(CountDel[i].Box_Piece__c == '鐩�'){
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- }else if(CountDel[i].Box_Piece__c == '涓�'){
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
- MidMap.put(CountDel[i].Consumable_Product__c, Jstage);
- }
- }*/
-
- for (Integer i = 0; i < CountDel.size(); i++) {
- String str = '';
- if (CountDel[i].hospitalSpecialOffer__c) {
- str = 'isHos';
- } else {
- str = 'notHos';
- }
- //鏄庣粏2瀵瑰簲鐨勪骇鍝佸瓨鍦ㄤ簬MidMap涓�
- if (MidMap.containsKey(CountDel[i].Consumable_Product__c)) {
- //璁剧疆map涓璳ey鐨勫悗缂� 鐢ㄤ簬鍖哄垎鍖婚櫌鐗逛环鍜岄潪鍖婚櫌鐗逛环
- if (MidMap2.containsKey(CountDel[i].Consumable_Product__c + str)) {
- ConsumableorderdetailsInfo Jstage = MidMap2.get(CountDel[i].Consumable_Product__c + str);
- Jstage.allnumber = Jstage.allnumber + 1;
- if (CountDel[i].Box_Piece__c == '鐩�') {
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- } else if (CountDel[i].Box_Piece__c == '涓�') {
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- if (CountDel[i].hospitalSpecialOffer__c) {
- Jstage.hospitalSpecialOffer = true;
- } else {
- Jstage.hospitalSpecialOffer = false;
- }
-
- if (HosProMap.containsKey(Jstage.Prod.Id)) {
- Jstage.hosPro = true;
- }
- MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
- } else {
- //midmap2涓病鏈夊搴旂殑浜у搧
- ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c).clone();
- Jstage.allnumber = Jstage.allnumber + 1;
- if (CountDel[i].Box_Piece__c == '鐩�') {
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- } else if (CountDel[i].Box_Piece__c == '涓�') {
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- if (CountDel[i].hospitalSpecialOffer__c) {
- Jstage.hospitalSpecialOffer = true;
- } else {
- Jstage.hospitalSpecialOffer = false;
- }
- if (HosProMap.containsKey(Jstage.Prod.Id)) {
- Jstage.hosPro = true;
- }
- //Jstage.BoxPiece = CountDel[i].Box_Piece__c;
- MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
- }
- }
- }
- //update by rentx 2021-01-29
- consumableorderdetailsSelectRecords = new List<ConsumableorderdetailsInfo>();
- //鍐嶆妸map閲岀殑鍊间粠鏂拌祴缁機onsumableorderdetailsRecords
- //update by rentx 2021-01-29
- // for(ConsumableorderdetailsInfo bss : MidMap.values()){
- for (ConsumableorderdetailsInfo bss : MidMap2.values()) {
- //update by rentx 2021-01-29
-
- //if(bss.allnumber > 0){
- //bss.UnitpriceToagency = bss.orderdetails1.Unitprice_To_agency__c == null || bss.orderdetails1.Unitprice_To_agency__c == 0 ? '' :bss.orderdetails1.Unitprice_To_agency__c.format();
- bss.packinglist = Integer.valueOf(bss.Prod.Product2__r.Packing_list_manual__c);
- bss.approbation_No = bss.Prod.Product2__r.SFDA_Approbation_No__c;
- bss.expiration_Date = bss.Prod.Product2__r.SFDA_Expiration_Date__c;
-
- //update by rentx 2021-2-26 start
- if (cocMap.containsKey(bss.Prod.Id + 'ishos') && bss.hospitalSpecialOffer == true) {
- consumableorderdetailsSelectRecords.add(bss);
- } else if (cocMap.containsKey(bss.Prod.Id + 'nothos') && bss.hospitalSpecialOffer == false) {
- consumableorderdetailsSelectRecords.add(bss);
- }
- //update by rentx 2021-2-26 end
- // consumableorderdetailsSelectRecords.add(bss);
- //}
- }
- Integer ishosnum = 0;
- for (ConsumableorderdetailsInfo ass : consumableorderdetailsSelectRecords) {
- for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
- //update by rentx 2012-3-1 start
- // if(ass.prod.Id == cdc1.Consumable_Product__c){
- // ass.check = true;
- // ass.orderdetails1 = cdc1;
- // }
- if (ass.Prod.Id == cdc1.Consumable_Product__c && ass.hospitalSpecialOffer == cdc1.isOutPattern__c) {
- ass.check = true;
- ass.orderdetails1 = cdc1;
- }
- //update by rentx 2012-3-1 end
- }
- if (ass.hospitalSpecialOffer == true) {
- ishosnum = ishosnum + 1;
- }
- }
- if (ishosnum > 0) {
- hasHosPro = true;
- } else {
- hasHosPro = false;
- }
-
- //add by rentx
- noOfRecords = consumableorderdetailsSelectRecords.size();
- //add by rentx
- System.debug('makepagerecords3');
- makepagerecords();
- //listCut();
- // 娑堣�楀搧鏄庣粏2銈掑彇寰�
- consumableorderdetails2RecordsList = [
- SELECT
- Id,
- Name,
- SerialLotNo__c,
- Consumable_Product__r.Name__c,
- TracingCode__c,
- Sterilization_limit__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Category3__c,
- Consumable_Product__r.Category4__c,
- Consumable_Product__r.Category5__c,
- Return_date__c,
- Invoice_Date__c,
- Box_Piece__c,
- ProductPacking_list_manual__c,
- //add by rentx start
- hospitalSpecialOffer__c
- //add by rentx end
- FROM Consumable_order_details2__c
- WHERE Consumable_ZS_order__c = :ESetId
- ORDER BY Name
- ];
- for (Integer i = 0; i < consumableorderdetails2RecordsList.size(); i++) {
- consumableorderdetails2Records.add(new ConsumableorderdetailsInfo(consumableorderdetails2RecordsList[i]));
- }
- //浜у搧鏄庣粏鍙栧緱
- consumablearriveproductdetailsSelected = [
- SELECT
- Id,
- Delivery_List_RMB__c,
- Consumable_Product__r.Name__c,
- Name,
- Consumable_Product__r.SFDA_Status__c,
- Consumable_Product__r.Category3__c,
- Consumable_Product__r.Category4__c,
- Consumable_Product__r.Category5__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Sterilization_limit__c,
- Consumable_Product__r.Intra_Trade_List_RMB__c,
- Consumable_Product__r.Asset_Model_No__c,
- Box_Piece__c,
- ProductPacking_list_manual__c,
- //add by rentx start
- hospitalSpecialOffer__c
- //add by rentx end
- FROM Consumable_order_details2__c
- WHERE Consumable_ZS_order__c = :ESetId
- ORDER BY Name
- ];
- for (Integer i = 0; i < consumablearriveproductdetailsSelected.size(); i++) {
- consumableproductdetailsRecords.add(new ConsumableorderdetailsInfo(consumablearriveproductdetailsSelected[i]));
+ //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'test++++++' + SecondDealer));
+ if (SecondDealer == null || SecondDealer == '') {
+ provinceOpts.add(new SelectOption('', '-鏃�-'));
+ provinceOptsMap.put('', '-鏃�-');
+ for (Integer i = 0; i < Dealerelationship.size(); i++) {
+ provinceOpts.add(
+ new SelectOption(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name)
+ );
+ provinceOptsMap.put(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name);
}
} else {
- // 涓嶆槸鍒拌揣璁㈠崟鏉ョ殑鏃跺��
- if (coc.SummonsStatus_c__c == '宸叉彁浜�' || coc.SummonsStatus_c__c == '鎵瑰噯') {
- system.debug('coc.SummonsStatus_c__c : ' + coc.SummonsStatus_c__c);
- saveBtnDisabled = true;
- SorderBtnDisabled = true;
- EditDelCommitBtnDisabled = false;
- }
- //鍖婚櫌浜岀骇缁忛攢鍟嗗垎绫�
- Integer io = 0;
- while (io < Dealerelationship.size()) {
- if (coc.Order_ForDealer__c == Dealerelationship[io].Dealer_subordinate__c) {
- SecondDealer = Dealerelationship[io].Dealer_subordinate__c;
- coc.Order_ForDealer__c = null;
- io = io + Dealerelationship.size();
- }
- io++;
- }
- Integer ik = 0;
- while (ik < AgencyHospitalLink.size()) {
- if (coc.Order_ForHospital__c == AgencyHospitalLink[ik].Hospital__c) {
- HospitalInfo = AgencyHospitalLink[ik].Hospital__c;
- HospitalName = AgencyHospitalLink[ik].Hospital__r.Name;
- coc.Order_ForHospital__c = null;
- ik = ik + AgencyHospitalLink.size();
- }
- ik++;
- }
- // 娑堣�楀搧鏄庣粏1銈掑彇寰�
- consumableorderdetailsSelected = [
- SELECT
- Id,
- Dealer_Custom_Price__c,
- Delivery_List_RMB__c,
- Consumable_Product__r.Name__c,
- Consumable_Product__r.SFDA_Status__c,
- Name,
- Consumable_order__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Shipment_Count__c,
- Consumable_Product__r.Intra_Trade_List_RMB__c,
- Consumable_Product__r.Asset_Model_No__c,
- Shipment_amount__c,
- Box_Piece__c,
- ProductPacking_list_manual__c,
- Invoiced_Procount__c,
- RrturnPro_count__c,
- //Unitprice_To_agency__c,
- InvoiceProNot_count__c,
- Consumable_Product__r.Category3__c,
- Consumable_Product__r.Category4__c,
- Consumable_Product__r.Category5__c,
- Consumable_Product__r.Product2__r.SFDA_Approbation_No__c,
- Consumable_Product__r.Product2__r.SFDA_Expiration_Date__c,
- isOutPattern__c
- FROM Consumable_orderdetails__c
- WHERE Consumable_order__c = :ESetId AND Consumable_order__r.Order_Owner_WorkLocal__c = :userWorkLocation
- ORDER BY Name
- ];
- //add by rentx 202-2-26
- Map<String, Consumable_Orderdetails__c> cocMap = new Map<String, Consumable_Orderdetails__c>();
-
- for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
- sumPrice += cdc1.Shipment_amount__c;
- orderzaikuId.add(cdc1.Consumable_Product__c);
- //add by rentx 2021-2-26
- String tempId = cdc1.Consumable_product__c;
- if (cdc1.isOutPattern__c) {
- cocMap.put(tempId + 'ishos', cdc1);
- } else {
- cocMap.put(tempId + 'nothos', cdc1);
- }
- //add by rentx 2021-2-26
- }
-
- String msoql = makeSoqlorderdet();
- product2Selected = Database.query(msoql);
- size = product2Selected.size();
- initStandardController(msoql);
- for (Integer i = 0; i < product2Selected.size(); i++) {
- MidMap.put(product2Selected[i].Id, new ConsumableorderdetailsInfo(product2Selected[i]));
- }
-
- for (Integer i = 0; i < CountDel.size(); i++) {
- String str = '';
- if (CountDel[i].hospitalSpecialOffer__c) {
- str = 'isHos';
- } else {
- str = 'notHos';
- }
- //鏄庣粏2瀵瑰簲鐨勪骇鍝佸瓨鍦ㄤ簬MidMap涓�
- if (MidMap.containsKey(CountDel[i].Consumable_Product__c)) {
- //璁剧疆map涓璳ey鐨勫悗缂� 鐢ㄤ簬鍖哄垎鍖婚櫌鐗逛环鍜岄潪鍖婚櫌鐗逛环
- if (MidMap2.containsKey(CountDel[i].Consumable_Product__c + str)) {
- ConsumableorderdetailsInfo Jstage = MidMap2.get(CountDel[i].Consumable_Product__c + str);
- Jstage.allnumber = Jstage.allnumber + 1;
- if (CountDel[i].Box_Piece__c == '鐩�') {
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- } else if (CountDel[i].Box_Piece__c == '涓�') {
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
- if (CountDel[i].hospitalSpecialOffer__c) {
- Jstage.hospitalSpecialOffer = true;
- } else {
- Jstage.hospitalSpecialOffer = false;
- }
- if (HosProMap.containsKey(Jstage.Prod.Id)) {
- Jstage.hosPro = true;
- }
- MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
- } else {
- //midmap2涓病鏈夊搴旂殑浜у搧
- ConsumableorderdetailsInfo Jstage = MidMap.get(CountDel[i].Consumable_Product__c).clone();
- Jstage.allnumber = Jstage.allnumber + 1;
- if (CountDel[i].Box_Piece__c == '鐩�') {
- Jstage.Boxnumber = Jstage.Boxnumber + 1;
- } else if (CountDel[i].Box_Piece__c == '涓�') {
- Jstage.Piecenumber = Jstage.Piecenumber + 1;
- }
-
- if (CountDel[i].hospitalSpecialOffer__c) {
- Jstage.hospitalSpecialOffer = true;
- } else {
- Jstage.hospitalSpecialOffer = false;
- }
- if (HosProMap.containsKey(Jstage.Prod.Id)) {
- Jstage.hosPro = true;
- }
- Jstage.BoxPiece = CountDel[i].Box_Piece__c;
- MidMap2.put(CountDel[i].Consumable_Product__c + str, Jstage);
- }
+ provinceOpts.add(new SelectOption('', '-鏃�-'));
+ provinceOptsMap.put('', '-鏃�-');
+ for (Integer i = 0; i < Dealerelationship.size(); i++) {
+ if (Dealerelationship[i].Dealer_subordinate__c == SecondDealer) {
+ provinceOpts.add(
+ new SelectOption(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name)
+ );
+ provinceOptsMap.put(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name);
}
}
-
- //鍐嶆妸map閲岀殑鍊间粠鏂拌祴缁機onsumableorderdetailsRecords
- //update by rentx 2021-01-29
- // for(ConsumableorderdetailsInfo bss : MidMap.values()){
- for (ConsumableorderdetailsInfo bss : MidMap2.values()) {
- //update by rentx 2021-01-29
-
- //if(bss.allnumber>0){
- bss.packinglist = Integer.valueOf(bss.Prod.Product2__r.Packing_list_manual__c);
- bss.approbation_No = bss.Prod.Product2__r.SFDA_Approbation_No__c;
- bss.expiration_Date = bss.Prod.Product2__r.SFDA_Expiration_Date__c;
-
- //update by rentx 2021-2-26 start
- if (cocMap.containsKey(bss.Prod.Id + 'ishos') && bss.hospitalSpecialOffer == true) {
- consumableorderdetailsSelectRecords.add(bss);
- } else if (cocMap.containsKey(bss.Prod.Id + 'nothos') && bss.hospitalSpecialOffer == false) {
- consumableorderdetailsSelectRecords.add(bss);
+ for (Integer i = 0; i < Dealerelationship.size(); i++) {
+ if (Dealerelationship[i].Dealer_subordinate__c != SecondDealer) {
+ provinceOpts.add(
+ new SelectOption(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name)
+ );
+ provinceOptsMap.put(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name);
}
- // consumableorderdetailsSelectRecords.add(bss);
- //}
- }
- // return null;
- Integer ishosnum = 0;
- for (ConsumableorderdetailsInfo ass : consumableorderdetailsSelectRecords) {
- //ass.sortBy = sortOrderAsc;
- for (Consumable_Orderdetails__c cdc1 : consumableorderdetailsSelected) {
- //update by rentx 2012-3-1 start
- // if(ass.prod.Id == cdc1.Consumable_Product__c){
- // ass.check = true;
- // ass.orderdetails1 = cdc1;
- // }
- if (ass.Prod.Id == cdc1.Consumable_Product__c && ass.hospitalSpecialOffer == cdc1.isOutPattern__c) {
- ass.check = true;
- ass.orderdetails1 = cdc1;
- }
- //update by rentx 2012-3-1 end
- }
-
- if (ass.hospitalSpecialOffer == true) {
- ishosnum = ishosnum + 1;
- }
- }
-
- if (ishosnum > 0) {
- hasHosPro = true;
- } else {
- hasHosPro = false;
- }
-
- consumableorderdetailsSelectRecords.sort();
- //add by rentx
- noOfRecords = consumableorderdetailsSelectRecords.size();
- //add by rentx
- System.debug('makepagerecords4');
- makepagerecords();
-
- // 娑堣�楀搧鏄庣粏2銈掑彇寰�
- consumableorderdetails2RecordsList = [
- SELECT
- Id,
- Name,
- SerialLotNo__c,
- Consumable_Product__r.Name__c,
- TracingCode__c,
- Sterilization_limit__c,
- Consumable_Product__c,
- Consumable_Product__r.Name,
- Consumable_Product__r.Category3__c,
- Consumable_Product__r.Category4__c,
- Consumable_Product__r.Category5__c,
- Return_date__c,
- Invoice_Date__c,
- Box_Piece__c,
- ProductPacking_list_manual__c,
- //add by rentx start
- hospitalSpecialOffer__c
- //add by rentx end
-
- FROM Consumable_order_details2__c
- WHERE Consumable_ZS_order__c = :ESetId
- ORDER BY Name
- ];
- for (Integer i = 0; i < consumableorderdetails2RecordsList.size(); i++) {
- consumableorderdetails2Records.add(new ConsumableorderdetailsInfo(consumableorderdetails2RecordsList[i]));
}
}
- }
- //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'test++++++' + SecondDealer));
- if (SecondDealer == null || SecondDealer == '') {
- provinceOpts.add(new SelectOption('', '-鏃�-'));
- provinceOptsMap.put('', '-鏃�-');
- for (Integer i = 0; i < Dealerelationship.size(); i++) {
- provinceOpts.add(
- new SelectOption(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name)
- );
- provinceOptsMap.put(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name);
- }
- } else {
- provinceOpts.add(new SelectOption('', '-鏃�-'));
- provinceOptsMap.put('', '-鏃�-');
- for (Integer i = 0; i < Dealerelationship.size(); i++) {
- if (Dealerelationship[i].Dealer_subordinate__c == SecondDealer) {
- provinceOpts.add(
- new SelectOption(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name)
- );
- provinceOptsMap.put(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name);
+
+ Schema.DescribeFieldResult dfr = Product2__c.Intra_Trade_List_RMB__c.getDescribe();
+ cansee = dfr.isAccessible();
+ Schema.DescribeFieldResult dealerPrice = Consumable_orderdetails__c.Dealer_Custom_Price__c.getDescribe();
+ dealerPricesee = dealerPrice.isAccessible();
+ // 鏄剧ず鏁版嵁鏉℃暟淇℃伅
+ // makeMessage();
+ //闄勪欢
+ attachmentinfo = [
+ SELECT Id, Name, OwnerId
+ FROM Attachment
+ WHERE parentid = :ESetId
+ ];
+ if (attachmentinfo.size() > 0) {
+ for (Integer i = 0; i < attachmentinfo.size(); i++) {
+ attachmentRecoeds.add(new ConsumableorderdetailsInfo(attachmentinfo[i]));
}
}
- for (Integer i = 0; i < Dealerelationship.size(); i++) {
- if (Dealerelationship[i].Dealer_subordinate__c != SecondDealer) {
- provinceOpts.add(
- new SelectOption(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name)
- );
- provinceOptsMap.put(Dealerelationship[i].Dealer_subordinate__c, Dealerelationship[i].Dealer_subordinate__r.Name);
- }
+ AggregateResult[] categoryList = [
+ SELECT Count(id), Category3_text__c c3c
+ FROM Product2__c
+ WHERE Category3_text__c != NULL
+ GROUP BY Category3_text__c
+ ];
+
+ categoryOptionList = new List<SelectOption>();
+ categoryOptionList.add(new SelectOption('', '-鏃�-'));
+ categoryOptionMap = new Map<String, String>();
+ categoryOptionMap.put('', '-鏃�-');
+ for (AggregateResult category3Search : categoryList) {
+ String deliverycnt = String.valueOf(category3Search.get('c3c'));
+ categoryOptionList.add(new SelectOption(deliverycnt, deliverycnt));
+ categoryOptionMap.put(deliverycnt, deliverycnt);
}
- }
- Schema.DescribeFieldResult dfr = Product2__c.Intra_Trade_List_RMB__c.getDescribe();
- cansee = dfr.isAccessible();
- Schema.DescribeFieldResult dealerPrice = Consumable_orderdetails__c.Dealer_Custom_Price__c.getDescribe();
- dealerPricesee = dealerPrice.isAccessible();
- // 鏄剧ず鏁版嵁鏉℃暟淇℃伅
- // makeMessage();
- //闄勪欢
- attachmentinfo = [SELECT Id, Name, OwnerId FROM Attachment WHERE parentid = :ESetId];
- if (attachmentinfo.size() > 0) {
- for (Integer i = 0; i < attachmentinfo.size(); i++) {
- attachmentRecoeds.add(new ConsumableorderdetailsInfo(attachmentinfo[i]));
+ category4OptionList = new List<SelectOption>();
+ category4OptionList.add(new SelectOption('', '-鏃�-'));
+ category4OptionMap = new Map<String, String>();
+ category4OptionMap.put('', '-鏃�-');
+ /*for(AggregateResult category4Search : category4List) {
+ String deliverycnt4 = String.valueOf(category4Search.get('c4c'));
+ category4OptionList.add(new SelectOption(deliverycnt4,deliverycnt4));
+ }*/
+
+ category5OptionList = new List<SelectOption>();
+ category5OptionList.add(new SelectOption('', '-鏃�-'));
+ category5OptionMap = new Map<String, String>();
+ category5OptionMap.put('', '-鏃�-');
+
+ //鍒嗛〉
+ PaginatedAccounts paginatedAccounts = new PaginatedAccounts();
+ totalCount = pageRecords.size();
+ System.debug('pageToken = ' + pageToken);
+ System.debug('pageSize = ' + pageSize);
+ System.debug('totalCount = ' + totalCount);
+ paginatedAccounts.nextPageToken = (pageToken + pageSize < totalCount) ? pageToken + pageSize : null;
+ System.debug('paginatedAccounts.nextPageToken = ' + paginatedAccounts.nextPageToken);
+ paginatedAccounts.recordStart = pageToken + 1;
+ paginatedAccounts.pageNumber = pageToken / pageSize + 1;
+ Integer recordEnd = pageSize * paginatedAccounts.pageNumber;
+ paginatedAccounts.recordEnd = totalCount >= recordEnd ? recordEnd : totalCount;
+ paginatedAccounts.totalRecords = totalCount;
+
+ Integer startIdx;
+ Integer endIdx;
+ startIdx = pageToken;
+ endIdx = pageToken + pageSize;
+ List<ConsumableorderdetailsInfo> pageRecordsTemp = new List<ConsumableorderdetailsInfo>();
+ if (endIdx > pageRecords.size()) {
+ endIdx = pageRecords.size();
}
+ for (Integer i = startIdx; i < endIdx; i++) {
+ pageRecordsTemp.add(pageRecords.get(i));
+ }
+
+ Boolean Existarrive = (coc.Arrive_Order__c != null);
+ String ConsumableOut_report = System.Label.ConsumableOut_report;
+ System.debug('consumableproductdetailsRecords = ' + consumableproductdetailsRecords);
+
+ data.put('paginatedAccounts', paginatedAccounts);
+ data.put('ConsumableOut_report', ConsumableOut_report);
+ data.put('accountid', accountid);
+ data.put('consumableproductdetailsRecords', consumableproductdetailsRecords);
+ data.put('agencyProType', agencyProType);
+ data.put('accountName', accountName);
+ data.put('userWorkLocation', userWorkLocation);
+ data.put('categoryOptionMap', categoryOptionMap);
+ data.put('category4OptionMap', category4OptionMap);
+ data.put('category5OptionMap', category5OptionMap);
+ data.put('outOutPatternOptionMap', outOutPatternOptionMap);
+ data.put('hasHosPro', hasHosPro);
+ data.put('Existarrive', Existarrive);
+ data.put('sumPrice', sumPrice);
+ data.put('HospitalName', HospitalName);
+ data.put('provinceOptsMap', provinceOptsMap);
+ data.put('SummonsFlag', SummonsFlag);
+ data.put('EditDelCommitBtnDisabled', EditDelCommitBtnDisabled);
+ data.put('EditAble', EditAble);
+ data.put('coc', coc);
+ data.put('pageRecords', pageRecordsTemp);
+ data.put('arriveorder', arriveorder);
+ data.put('consumableorderdetails2Count', consumableorderdetails2Count);
+ data.put('consumableorderdetails2Records', consumableorderdetails2Records);
+ data.put('HospitalInfo', HospitalInfo);
+ res.status = 'Success';
+ res.code = 200;
+ System.debug('res = ' + res);
+ return res;
+ } catch (Exception e) {
+ return new ResponseBodyLWC('Error', 500, e.getMessage() + e.getLineNumber(), '');
}
- AggregateResult[] categoryList = [
- SELECT Count(id), Category3_text__c c3c
- FROM Product2__c
- WHERE Category3_text__c != NULL
- GROUP BY Category3_text__c
- ];
-
- categoryOptionList = new List<SelectOption>();
- categoryOptionList.add(new SelectOption('', '-鏃�-'));
- categoryOptionMap = new Map<String, String>();
- categoryOptionMap.put('', '-鏃�-');
- for (AggregateResult category3Search : categoryList) {
- String deliverycnt = String.valueOf(category3Search.get('c3c'));
- categoryOptionList.add(new SelectOption(deliverycnt, deliverycnt));
- categoryOptionMap.put(deliverycnt, deliverycnt);
- }
-
- category4OptionList = new List<SelectOption>();
- category4OptionList.add(new SelectOption('', '-鏃�-'));
- category4OptionMap = new Map<String, String>();
- category4OptionMap.put('', '-鏃�-');
- /*for(AggregateResult category4Search : category4List) {
- String deliverycnt4 = String.valueOf(category4Search.get('c4c'));
- category4OptionList.add(new SelectOption(deliverycnt4,deliverycnt4));
- }*/
-
- category5OptionList = new List<SelectOption>();
- category5OptionList.add(new SelectOption('', '-鏃�-'));
- category5OptionMap = new Map<String, String>();
- category5OptionMap.put('', '-鏃�-');
-
- //鍒嗛〉
- PaginatedAccounts paginatedAccounts = new PaginatedAccounts();
- totalCount = pageRecords.size();
- System.debug('pageToken = ' + pageToken);
- System.debug('pageSize = ' + pageSize);
- System.debug('totalCount = ' + totalCount);
- paginatedAccounts.nextPageToken = (pageToken + pageSize < totalCount) ? pageToken + pageSize : null;
- System.debug('paginatedAccounts.nextPageToken = ' + paginatedAccounts.nextPageToken);
- paginatedAccounts.recordStart = pageToken + 1;
- paginatedAccounts.pageNumber = pageToken / pageSize + 1;
- Integer recordEnd = pageSize * paginatedAccounts.pageNumber;
- paginatedAccounts.recordEnd = totalCount >= recordEnd ? recordEnd : totalCount;
- paginatedAccounts.totalRecords = totalCount;
-
- Integer startIdx;
- Integer endIdx;
- startIdx = pageToken;
- endIdx = pageToken + pageSize;
- List<ConsumableorderdetailsInfo> pageRecordsTemp = new List<ConsumableorderdetailsInfo>();
- if (endIdx > pageRecords.size()) {
- endIdx = pageRecords.size();
- }
- for (Integer i = startIdx; i < endIdx; i++) {
- pageRecordsTemp.add(pageRecords.get(i));
- }
-
- Boolean Existarrive = (coc.Arrive_Order__c != null);
- String ConsumableOut_report = System.Label.ConsumableOut_report;
- System.debug('consumableproductdetailsRecords = ' + consumableproductdetailsRecords);
-
- data.put('paginatedAccounts', paginatedAccounts);
- data.put('ConsumableOut_report', ConsumableOut_report);
- data.put('accountid', accountid);
- data.put('consumableproductdetailsRecords', consumableproductdetailsRecords);
- data.put('agencyProType', agencyProType);
- data.put('accountName', accountName);
- data.put('userWorkLocation', userWorkLocation);
- data.put('categoryOptionMap', categoryOptionMap);
- data.put('category4OptionMap', category4OptionMap);
- data.put('category5OptionMap', category5OptionMap);
- data.put('outOutPatternOptionMap', outOutPatternOptionMap);
- data.put('hasHosPro', hasHosPro);
- data.put('Existarrive', Existarrive);
- data.put('sumPrice', sumPrice);
- data.put('HospitalName', HospitalName);
- data.put('provinceOptsMap', provinceOptsMap);
- data.put('SummonsFlag', SummonsFlag);
- data.put('EditDelCommitBtnDisabled', EditDelCommitBtnDisabled);
- data.put('EditAble', EditAble);
- data.put('coc', coc);
- data.put('pageRecords', pageRecordsTemp);
- data.put('arriveorder', arriveorder);
- data.put('consumableorderdetails2Count', consumableorderdetails2Count);
- data.put('consumableorderdetails2Records', consumableorderdetails2Records);
- data.put('HospitalInfo', HospitalInfo);
- res.status = 'Success';
- res.code = 200;
- System.debug('res = ' + res);
- return res;
- // } catch (Exception e) {
- // return new ResponseBodyLWC('Error',500, e.getMessage(), '');
- // }
}
@AuraEnabled
@@ -1698,6 +1728,7 @@
data.put('paginatedAccounts', paginatedAccounts);
data.put('pageRecords', pageRecordsTemp);
data.put('SearchDone', SearchDone);
+ data.put('hasHosPro', hasHosPro);
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
@@ -2054,7 +2085,11 @@
//鐗逛环鍖婚櫌鍑哄簱闈炴湰鍖婚櫌缁存姢鐨勭壒浠峰晢鍝佹椂,鎶ラ敊 闈炵壒浠峰尰闄㈠嚭搴撶淮鎶ゅ湪鍖婚櫌鐗逛环鍏崇郴琛ㄧ殑浜у搧鏃� 鎶ラ敊
if (coc.SummonsForDirction__c != '浜掔浉璋冭揣') {
//闈炵壒浠峰尰闄㈠嚭搴撶壒浠蜂骇鍝佹椂 鎶ラ敊(褰撳墠缁忛攢鍟嗕笅娌℃湁鐗逛环鍖婚櫌闄ゅ)
- List<hospitalprice__c> hopList = [SELECT id, hospital__c, product__c FROM hospitalprice__c WHERE account__c = :accountid];
+ List<hospitalprice__c> hopList = [
+ SELECT id, hospital__c, product__c
+ FROM hospitalprice__c
+ WHERE account__c = :accountid
+ ];
//缁忛攢鍟嗗搴斿尰闄笅鐨勬墍鏈夌壒浠蜂骇鍝�
Map<String, String> proMap = new Map<String, String>();
//缁忛攢鍟嗕笅鐨勬墍鏈夌壒浠蜂骇鍝�
@@ -2121,11 +2156,7 @@
return new ResponseBodyLWC(
'Error',
500,
- '缁忛攢鍟�:' +
- coc.Order_ForDealerText__c +
- ' 娌℃湁娑堣�楀搧:' +
- proStr.substring(0, proStr.length() - 1) +
- ' 鐨勭壒浠�',
+ '缁忛攢鍟�:' + coc.Order_ForDealerText__c + ' 娌℃湁娑堣�楀搧:' + proStr.substring(0, proStr.length() - 1) + ' 鐨勭壒浠�',
''
);
}
@@ -2177,22 +2208,22 @@
for (ConsumableorderdetailsInfoLwc ass : pageRecordsLwc) {
if (ass.check == true) {
if (ass.orderdetails1.Delivery_List_RMB__c < 0) {
- // ass.orderdetails1.Delivery_List_RMB__c.addError('璇疯緭鍏ユ纭殑鍑鸿揣鍗曚环 (鍏�)');
- // return null;
return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ユ纭殑鍑鸿揣鍗曚环 (鍏�)', '');
}
if (ass.orderdetails1.Delivery_List_RMB__c == null && coc.SummonsForDirction__c != '鍖婚櫌璇曠敤') {
- // ass.orderdetails1.Delivery_List_RMB__c.addError('璇疯緭鍏ュ嚭璐у崟浠� (鍏�)');
- // return null;
return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ユ纭殑鍑鸿揣鍗曚环 (鍏�)', '');
+ }
+ if (
+ (ass.orderdetails1.Delivery_List_RMB__c == null || ass.orderdetails1.Delivery_List_RMB__c == 0) &&
+ coc.SummonsForDirction__c != '鍖婚櫌璇曠敤'
+ ) {
+ return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ュ嚭璐у崟浠� (鍏�)', '');
}
if (
ass.orderdetails1.Delivery_List_RMB__c == 0 &&
(coc.SummonsForDirction__c == '閿�鍞粰浜岀骇缁忛攢鍟�' ||
coc.SummonsForDirction__c == '鐩存帴閿�鍞粰鍖婚櫌')
) {
- // ass.orderdetails1.Delivery_List_RMB__c.addError('璇疯緭鍏ュ嚭璐у崟浠� (鍏�)');
- // return null;
return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ュ嚭璐у崟浠� (鍏�)', '');
}
if (ass.orderdetails1.Shipment_Count__c == null || ass.orderdetails1.Shipment_Count__c == 0) {
@@ -2217,9 +2248,7 @@
return new ResponseBodyLWC(
'Error',
500,
- '娑堣�楀搧' +
- ass.orderdetails1.Consumable_Product__r.Name__c +
- '搴撳瓨涓嶈冻',
+ '娑堣�楀搧' + ass.orderdetails1.Consumable_Product__r.Name__c + '搴撳瓨涓嶈冻',
''
);
}
@@ -2235,9 +2264,7 @@
return new ResponseBodyLWC(
'Error',
500,
- '娑堣�楀搧' +
- ass.orderdetails1.Consumable_Product__r.Name__c +
- '搴撳瓨涓嶈冻',
+ '娑堣�楀搧' + ass.orderdetails1.Consumable_Product__r.Name__c + '搴撳瓨涓嶈冻',
''
);
}
@@ -2248,7 +2275,11 @@
insert p;
ESetId = p.id;
List<Consumable_order__c> detailName = new List<Consumable_order__c>();
- detailName = [SELECT id, Name FROM Consumable_order__c WHERE id = :ESetId];
+ detailName = [
+ SELECT id, Name
+ FROM Consumable_order__c
+ WHERE id = :ESetId
+ ];
Integer i = 1;
for (ConsumableorderdetailsInfoLwc ass : pageRecordsLwc) {
if (ass.check == true) {
@@ -2340,14 +2371,13 @@
for (ConsumableorderdetailsInfoLwc ass : pageRecordsLwc) {
if (ass.check == true) {
if (ass.orderdetails1.Delivery_List_RMB__c < 0) {
- // ass.orderdetails1.Delivery_List_RMB__c.addError('璇疯緭鍏ユ纭殑鍑鸿揣鍗曚环 (鍏�)');
- // return null;
return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ユ纭殑鍑鸿揣鍗曚环 (鍏�)', '');
}
Consumable_orderdetails__c InsAfterDel = new Consumable_orderdetails__c();
- if (ass.orderdetails1.Delivery_List_RMB__c == null && coc.SummonsForDirction__c != '鍖婚櫌璇曠敤') {
- // ass.orderdetails1.Delivery_List_RMB__c.addError('璇疯緭鍏ュ嚭璐у崟浠� (鍏�)');
- // return null;
+ if (
+ (ass.orderdetails1.Delivery_List_RMB__c == null || ass.orderdetails1.Delivery_List_RMB__c == 0) &&
+ coc.SummonsForDirction__c != '鍖婚櫌璇曠敤'
+ ) {
return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ュ嚭璐у崟浠� (鍏�)', '');
}
if (
@@ -2355,8 +2385,6 @@
(coc.SummonsForDirction__c == '閿�鍞粰浜岀骇缁忛攢鍟�' ||
coc.SummonsForDirction__c == '鐩存帴閿�鍞粰鍖婚櫌')
) {
- // ass.orderdetails1.Delivery_List_RMB__c.addError('璇疯緭鍏ュ嚭璐у崟浠� (鍏�)');
- // return null;
return new ResponseBodyLWC('Error', 500, '璇疯緭鍏ュ嚭璐у崟浠� (鍏�)', '');
}
if (ass.orderdetails1.Box_Piece__c == null || ass.orderdetails1.Box_Piece__c == '') {
@@ -2375,9 +2403,7 @@
return new ResponseBodyLWC(
'Error',
500,
- '娑堣�楀搧' +
- ass.orderdetails1.Consumable_Product__r.Name__c +
- '搴撳瓨涓嶈冻',
+ '娑堣�楀搧' + ass.orderdetails1.Consumable_Product__r.Name__c + '搴撳瓨涓嶈冻',
''
);
}
@@ -2392,9 +2418,7 @@
return new ResponseBodyLWC(
'Error',
500,
- '娑堣�楀搧' +
- ass.orderdetails1.Consumable_Product__r.Name__c +
- '搴撳瓨涓嶈冻',
+ '娑堣�楀搧' + ass.orderdetails1.Consumable_Product__r.Name__c + '搴撳瓨涓嶈冻',
''
);
}
@@ -2430,7 +2454,11 @@
}
update p;
List<Consumable_orderdetails__c> qs = new List<Consumable_orderdetails__c>();
- qs = [SELECT Id FROM Consumable_orderdetails__c WHERE Consumable_order__c = :ESetId];
+ qs = [
+ SELECT Id
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c = :ESetId
+ ];
if (qs.size() > 0) {
delete qs;
}
@@ -2542,7 +2570,7 @@
// FROM Account
// WHERE
// // Name = '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙�'
- // // AND
+ // // AND
// Name LIKE :nameCondition
// AND RecordType.DeveloperName = 'AgencyContract'
// AND Contract_Decide_Start_Date__c >= :thisDatetime
@@ -2558,7 +2586,7 @@
// FROM Account
// WHERE
// // Name = '濂ユ灄宸存柉锛堝寳浜級閿�鍞湇鍔℃湁闄愬叕鍙�'
- // // AND
+ // // AND
// Name LIKE :nameCondition
// AND RecordType.DeveloperName = 'AgencyContract'
// AND Contract_Decide_Start_Date__c >= :thisDatetime
@@ -2569,7 +2597,6 @@
// ];
// }
-
Date today = Date.today();
//Date today = Date.newInstance(2023, 3, 1);
Integer thisMonth = today.month();
@@ -2578,7 +2605,7 @@
Integer lastYear = today.year() - 1;
Integer thisYear = today.year();
Integer nextYear = today.year() + 1;
-
+
Date lastDatetime = Date.newInstance(lastYear, 4, 1);
Date thisDatetime = Date.newInstance(thisYear, 4, 1);
Date thisDatetime2 = Date.newInstance(thisYear, 7, 1);
@@ -2588,14 +2615,18 @@
System.debug('thisDatetime2 = ' + thisDatetime2);
System.debug('nextDatetime = ' + nextDatetime);
System.debug('UserInfo.getUserId() = ' + UserInfo.getUserId());
- User UserProTypecTemp = [select UserPro_Type__c from User where id =: UserInfo.getUserId()];
+ User UserProTypecTemp = [
+ SELECT UserPro_Type__c
+ FROM User
+ WHERE id = :UserInfo.getUserId()
+ ];
String sql = 'SELECT id, Parentid FROM Account WHERE Parent.Name LIKE :nameCondition ';
- if(thisMonth < 4){
+ if (thisMonth < 4) {
sql += 'AND Contract_Decide_Start_Date__c >= :lastDatetime AND Contract_Decide_End_Date__c < :thisDatetime2 ';
- }else if(thisMonth >= 4 && thisMonth <= 6){
+ } else if (thisMonth >= 4 && thisMonth <= 6) {
sql += 'AND Contract_Decide_Start_Date__c >= :lastDatetime AND Contract_Decide_End_Date__c < :nextDatetime ';
- }else{
+ } else {
sql += 'AND Contract_Decide_Start_Date__c >= :thisDatetime AND Contract_Decide_End_Date__c < :nextDatetime ';
}
if (UserProTypecTemp.UserPro_Type__c == 'ENG') {
@@ -2695,6 +2726,28 @@
return res;
}
+ //鍒犻櫎闄勪欢
+ @AuraEnabled
+ public static ResponseBodyLWC deleteAtt(String contentVersionId) {
+ try {
+ ContentVersion conVersion = [
+ SELECT ContentDocumentId
+ FROM ContentVersion
+ WHERE Id = :contentVersionId
+ ];
+ String contentDocumentId = conVersion.ContentDocumentId;
+ ContentDocument conDocument = [
+ SELECT Id
+ FROM ContentDocument
+ WHERE Id = :contentDocumentId
+ ];
+ delete conDocument;
+ return new ResponseBodyLWC('Success', 200, '', '');
+ } catch (Exception e) {
+ return new ResponseBodyLWC('Error', 500, e.getMessage() + e.getLineNumber(), '');
+ }
+ }
+
//璺宠浆鍑鸿揣/閿�鍞�
@AuraEnabled
public static ResponseBodyLWC GoodsDelivery(
@@ -2752,7 +2805,11 @@
try {
List<Consumable_order__c> qs = new List<Consumable_order__c>();
List<Consumable_orderdetails__c> Dqs = new List<Consumable_orderdetails__c>();
- Dqs = [SELECT Id FROM Consumable_orderdetails__c WHERE Consumable_order__c = :ESetId];
+ Dqs = [
+ SELECT Id
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c = :ESetId
+ ];
qs = [SELECT Id FROM Consumable_order__c WHERE Id = :ESetId];
if (Dqs.size() > 0 || qs.size() > 0) {
delete Dqs;
@@ -2770,6 +2827,7 @@
}
// Data Bean
+ @TestVisible
class ConsumableorderdetailsInfo implements Comparable {
@AuraEnabled
public Boolean check { get; set; }
@@ -2909,7 +2967,7 @@
}
}
}
-
+ @TestVisible
class ConsumableorderdetailsInfoLwc {
@AuraEnabled
public Boolean check { get; set; }
@@ -2987,4 +3045,4 @@
@AuraEnabled
public Integer recordEnd { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexSummonsCreatControllerTest.cls b/force-app/main/default/classes/LexSummonsCreatControllerTest.cls
new file mode 100644
index 0000000..3435b31
--- /dev/null
+++ b/force-app/main/default/classes/LexSummonsCreatControllerTest.cls
@@ -0,0 +1,3489 @@
+@isTest
+private class LexSummonsCreatControllerTest {
+ @isTest
+ static void testInit() {
+ Account accountItem1;
+ Account accountItem2;
+ User userTest;
+ String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ String rectHp = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ accountItem1 = new Account(Name = 'Testaccount001', RecordTypeId = rectCo, AgentCode_Ext__c = '9999900');
+ insert accountItem1;
+ accountItem2 = new Account(
+ Name = 'Testaccount002',
+ RecordTypeId = rectHp,
+ AgentCode_Ext__c = '9999999',
+ ParentId = accountItem1.Id,
+ Contract_Decide_Start_Date__c = Date.today(),
+ ENG_Dealer__c = true,
+ BillingCity = null
+ );
+ insert accountItem2;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountId = accountItem1.Id);
+ insert core;
+
+ Agency_Hospital_Link__c ahl = new Agency_Hospital_Link__c();
+ ahl.Name = 'test1缁忛攢鍟嗗尰闄�';
+ ahl.Hospital__c = accountItem2.Id;
+ ahl.Agency__c = accountItem1.Id;
+ insert new List<Agency_Hospital_Link__c>{ ahl };
+
+ System.runAs(new user(ID = UserInfo.getUserID())) {
+ userTest = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert userTest;
+ }
+ //鍙戣揣
+ Consumable_order__c consOrder = new Consumable_order__c();
+ consOrder.Name = 'test01';
+ consOrder.Order_status__c = '鎵瑰噯';
+ consOrder.Deliver_date__c = Date.today();
+ consOrder.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ consOrder.Order_type__c = '璁㈠崟';
+ consOrder.Order_ProType__c = 'ENG';
+ consOrder.Dealer_Info__c = accountItem1.Id;
+ consOrder.Delivery_detail_count__c = 5;
+ insert consOrder;
+
+ // create ContentVersions
+ list<ContentVersion> cvList = new List<ContentVersion>();
+ cvList.add(
+ new ContentVersion(
+ Title = 'test1',
+ PathOnClient = '/' + 'Test1.txt',
+ VersionData = Blob.valueOf('test data 1'),
+ IsMajorVersion = true
+ )
+ );
+ cvList.add(
+ new ContentVersion(
+ Title = 'test2',
+ PathOnClient = '/' + 'Test2.txt',
+ VersionData = Blob.valueOf('test data 2'),
+ IsMajorVersion = true
+ )
+ );
+ cvList.add(
+ new ContentVersion(
+ Title = 'test3',
+ PathOnClient = '/' + 'Test3.txt',
+ VersionData = Blob.valueOf('test data 3'),
+ IsMajorVersion = true
+ )
+ );
+ insert cvList;
+ // retrieve Ids for ContentDocuments created on insert of ContentVersions
+ list<Id> cdIdList = new List<Id>();
+ for (ContentDocument cd : [
+ SELECT Id, LatestPublishedVersionId
+ FROM ContentDocument
+ WHERE
+ LatestPublishedVersionId = :cvList[0].Id
+ OR LatestPublishedVersionId = :cvList[1].Id
+ OR LatestPublishedVersionId = :cvList[2].Id
+ ORDER BY Title
+ ]) {
+ cdIdList.add(cd.Id);
+ }
+ system.assertEquals(3, cdIdList.size());
+ list<ContentDocumentLink> cdlList = new List<ContentDocumentLink>();
+ cdlList.add(new ContentDocumentLink(ContentDocumentId = cdIdList[0], LinkedEntityId = consOrder.Id, ShareType = 'V'));
+ insert cdlList;
+ LexSummonsCreatController.saveFile(consOrder.Id, 'A-65224941-20200923--1.docx', 'Unit Test Attachment Body');
+ LexSummonsCreatController.getFiles(consOrder.Id);
+ LexSummonsCreatController.deleteAtt(cvList[0].Id);
+ System.runAs(userTest) {
+ String userId = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, UserPro_Type__c, ContactId, Contact.AccountId, Contact.Account.Name, Work_Location__c
+ FROM User
+ WHERE id = :userId
+ ];
+ String accountId = thisUserInfo.accountid;
+ String accountName = thisUserInfo.Contact.Account.Name;
+ String agencyProType = thisUserInfo.UserPro_Type__c;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ thisUserInfo.UserPro_Type__c = '';
+ update thisUserInfo;
+ if (String.isBlank(thisUserInfo.UserPro_Type__c)) {
+ agencyProType = 'ET';
+ }
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ Category3__c = 'CDS',
+ Category4__c = 'OER',
+ Category5__c = 'Celon',
+ SFDA_Status__c = '鏈夊姽',
+ Product_Status__c = '姝e父閿�鍞�',
+ SFDA_Approbated_Status__c = '鏈夋晥',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 1,
+ SFDA_Expiration_Date__c = Date.today(),
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07 };
+ Product2__c pro1 = new Product2__c(
+ Name = 'MH-155:鐧藉钩琛″附',
+ OT_CODE_Text__c = 'Test001',
+ Product2__c = prod07.Id,
+ Category3_text__c = 'test123',
+ Category4_text__c = 'test123',
+ Category5_text__c = 'test123'
+ );
+ insert new List<Product2__c>{ pro1 };
+ //鍙戣揣
+ Consumable_order__c createIdSend = new Consumable_order__c();
+ createIdSend.Name = 'testMing1';
+ createIdSend.Order_status__c = '鎵瑰噯';
+ createIdSend.Deliver_date__c = Date.today();
+ createIdSend.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend.Order_type__c = '璁㈠崟';
+ createIdSend.Order_ProType__c = 'ENG';
+ createIdSend.SummonsForDirction__c = '浜掔浉璋冭揣';
+ createIdSend.Order_ForDealerText__c = 'Testaccount003';
+ createIdSend.Order_ForCustomerText__c = 'Test000';
+ createIdSend.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend.Dealer_Info__c = accountItem1.Id;
+ createIdSend.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend1 = new Consumable_order__c();
+ createIdSend1.Name = 'testMing2';
+ createIdSend1.Order_status__c = '鎵瑰噯';
+ createIdSend1.Deliver_date__c = Date.today();
+ createIdSend1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend1.Order_type__c = '璁㈠崟';
+ createIdSend1.Order_ProType__c = 'ENG';
+ createIdSend1.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ createIdSend1.Order_ForCustomerText__c = '';
+ createIdSend1.Order_ForDealerText__c = 'Testaccount003';
+ createIdSend1.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend1.Dealer_Info__c = accountItem1.Id;
+ createIdSend1.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend2 = new Consumable_order__c();
+ createIdSend2.Name = 'testMing2';
+ createIdSend2.Order_status__c = '鎵瑰噯';
+ createIdSend2.Deliver_date__c = Date.today();
+ createIdSend2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend2.Order_type__c = '璁㈠崟';
+ createIdSend2.Order_ProType__c = 'ENG';
+ createIdSend2.SummonsForDirction__c = '';
+ createIdSend2.Order_ForCustomerText__c = '';
+ createIdSend2.Order_ForDealerText__c = 'Testaccount003';
+ createIdSend2.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend2.Dealer_Info__c = accountItem1.Id;
+ createIdSend2.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend3 = new Consumable_order__c();
+ createIdSend3.Name = 'testMing123456';
+ createIdSend3.Order_status__c = '鎵瑰噯';
+ createIdSend3.Deliver_date__c = Date.today();
+ createIdSend3.Arrive_Order__c = createIdSend.Id;
+ createIdSend3.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend3.Order_type__c = '璁㈠崟';
+ createIdSend3.Order_ProType__c = 'ENG';
+ createIdSend3.SummonsForDirction__c = '浜掔浉璋冭揣';
+ createIdSend3.Order_ForDealerText__c = '';
+ createIdSend3.Order_ForCustomerText__c = 'Test001';
+ createIdSend3.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend3.Dealer_Info__c = accountItem1.Id;
+ createIdSend3.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend4 = new Consumable_order__c();
+ createIdSend4.Name = 'testMing1';
+ createIdSend4.Order_status__c = '鎵瑰噯';
+ createIdSend4.Deliver_date__c = Date.today();
+ createIdSend4.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend4.Order_type__c = '璁㈠崟';
+ createIdSend4.Order_ProType__c = 'ENG';
+ createIdSend4.SummonsForDirction__c = '鍖婚櫌璇曠敤';
+ createIdSend4.Order_ForDealerText__c = '';
+ createIdSend4.Order_ForCustomerText__c = 'Test000';
+ createIdSend4.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend4.Dealer_Info__c = accountItem1.Id;
+ createIdSend4.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend5 = new Consumable_order__c();
+ createIdSend5.Name = 'testMing1111111';
+ createIdSend5.Order_status__c = '鎵瑰噯';
+ createIdSend5.Deliver_date__c = Date.today();
+ createIdSend5.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend5.Order_type__c = '璁㈠崟';
+ createIdSend5.Order_ProType__c = 'ENG';
+ createIdSend5.SummonsForDirction__c = '閿�鍞粰浜岀骇缁忛攢鍟�';
+ createIdSend5.Order_ForDealerText__c = '';
+ createIdSend5.Order_ForCustomerText__c = '';
+ createIdSend5.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend5.Dealer_Info__c = accountItem1.Id;
+ createIdSend5.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend6 = new Consumable_order__c();
+ createIdSend6.Name = 'testMing222222';
+ createIdSend6.Order_status__c = '鎵瑰噯';
+ createIdSend6.Deliver_date__c = Date.today();
+ createIdSend6.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend6.Order_type__c = '璁㈠崟';
+ createIdSend6.Order_ProType__c = 'ENG';
+ createIdSend6.SummonsForDirction__c = '閿�鍞粰浜岀骇缁忛攢鍟�';
+ createIdSend6.Order_ForDealerText__c = '';
+ createIdSend6.Order_ForCustomerText__c = '';
+ createIdSend6.SummonsStatus_c__c = '';
+ createIdSend6.Dealer_Info__c = accountItem1.Id;
+ createIdSend6.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend7 = new Consumable_order__c();
+ createIdSend7.Name = 'testMing222222';
+ createIdSend7.Order_status__c = '鎵瑰噯';
+ createIdSend7.Deliver_date__c = Date.today();
+ createIdSend7.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend7.Order_type__c = '璁㈠崟';
+ createIdSend7.Order_ProType__c = 'ENG';
+ createIdSend7.SummonsForDirction__c = '浜掔浉璋冭揣';
+ createIdSend7.Order_ForDealerText__c = '';
+ createIdSend7.Order_ForCustomerText__c = '';
+ createIdSend7.SummonsStatus_c__c = '';
+ createIdSend7.Dealer_Info__c = accountItem1.Id;
+ createIdSend7.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend8 = new Consumable_order__c();
+ createIdSend8.Name = 'testMing222222';
+ createIdSend8.Order_status__c = '鎵瑰噯';
+ createIdSend8.Deliver_date__c = Date.today();
+ createIdSend8.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend8.Order_type__c = '璁㈠崟';
+ createIdSend8.Order_ProType__c = 'ENG';
+ createIdSend8.SummonsForDirction__c = '娴嬭瘯001';
+ createIdSend8.Order_ForDealerText__c = '';
+ createIdSend8.Order_ForCustomerText__c = '';
+ createIdSend8.SummonsStatus_c__c = '';
+ createIdSend8.Dealer_Info__c = accountItem1.Id;
+ createIdSend8.Delivery_detail_count__c = 5;
+
+ //鍙戠エ淇℃伅
+ Consumable_order__c createIdSend9 = new Consumable_order__c();
+ createIdSend9.Name = 'invoice01';
+ createIdSend9.Invoice_status__c = '宸插畬鎴�';
+ createIdSend9.Order_type__c = '鍙戠エ';
+ createIdSend9.RecordTypeid = System.Label.RT_ConOrder_Invoice;
+ createIdSend9.Order_status__c = '鑽夋涓�';
+ createIdSend9.Invoice_Date__c = Date.Today();
+ createIdSend9.Order_ProType__c = 'ENG';
+ createIdSend9.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+
+ Consumable_order__c createIdSend10 = new Consumable_order__c();
+ createIdSend10.Name = 'OCMtest';
+ createIdSend10.Order_status__c = '鎵瑰噯';
+ createIdSend10.Order_type__c = '鍒拌揣';
+ createIdSend10.Dealer_Info__c = accountItem1.Id;
+ createIdSend10.RecordTypeid = System.Label.RT_ConOrder_Arrive;
+ createIdSend10.Order_ProType__c = 'ET';
+
+ Consumable_order__c createIdSend11 = new Consumable_order__c();
+ createIdSend11.Name = 'OCM_01_002';
+ createIdSend11.Order_status__c = '鎵瑰噯';
+ createIdSend11.Order_type__c = '浼犵エ';
+ createIdSend11.Arrive_Order__c = createIdSend9.Id;
+ createIdSend11.Dealer_Info__c = accountItem1.Id;
+ createIdSend11.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ createIdSend11.RecordTypeid = System.Label.RT_ConOrder_Order;
+ createIdSend11.Order_ProType__c = 'ET';
+
+ Consumable_order__c testList1 = new Consumable_order__c();
+ testList1.Name = 'Test1';
+ testList1.Summons_Sale_Status__c = '鍑鸿揣';
+ testList1.SummonsStatus_c__c = '宸插畬鎴�';
+ testList1.Arrive_Order__c = createIdSend9.Id;
+ testList1.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ testList1.Order_status__c = '鑽夋涓�';
+ testList1.Order_type__c = '浼犵エ';
+ testList1.Dealer_info__c = accountItem1.Id;
+ testList1.ConInvoice_Code__c = createIdSend9.id;
+
+ //鍒拌揣
+ Consumable_order__c createIdArrived = new Consumable_order__c();
+ createIdArrived.Name = 'testMing2';
+ createIdArrived.Order_status__c = '鎵瑰噯';
+ createIdArrived.Deliver_date__c = Date.today();
+ createIdArrived.RecordTypeid = System.Label.RT_ConOrder_Arrive;
+ createIdArrived.Order_type__c = '璁㈠崟';
+ createIdArrived.Order_ProType__c = 'ET';
+ createIdArrived.orderPattern__c = 'promotionorder';
+ createIdArrived.Dealer_Info__c = accountItem1.Id;
+ createIdArrived.Delivery_detail_count__c = 5;
+ insert new List<Consumable_order__c>{
+ createIdSend,
+ createIdSend1,
+ createIdSend2,
+ createIdSend3,
+ createIdSend4,
+ createIdSend5,
+ createIdSend6,
+ createIdSend7,
+ createIdSend8,
+ createIdSend9,
+ createIdSend10,
+ createIdSend11,
+ createIdArrived,
+ testList1
+ };
+
+ System.debug('createIdSend9.id = ' + createIdSend9.id);
+
+ Consumable_order_LinkTable__c order_LinkTable1 = new Consumable_order_LinkTable__c(
+ Name = 'order_LinkTable1',
+ Outboundorder_Code_link__c = testList1.Id,
+ Invoice_Code_link__c = createIdSend9.Id
+ );
+ insert new List<Consumable_order_LinkTable__c>{ order_LinkTable1 };
+
+ Consumable_orderdetails__c coc = new Consumable_orderdetails__c();
+ coc.Name = 'Too001';
+ coc.Dealer_Custom_Price__c = 999.00;
+ coc.Consumable_count__c = 3;
+ coc.Consumable_product__c = pro1.Id;
+ coc.Box_Piece__c = '鐩�';
+ coc.isOutPattern__c = true;
+ coc.Consumable_order__c = createIdSend.Id;
+ coc.Unitprice_To_agency__c = 999.00;
+ coc.Delivery_List_RMB__c = 999.00;
+ coc.Shipment_Count__c = null;
+ coc.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+
+ Consumable_orderdetails__c coc1 = new Consumable_orderdetails__c();
+ coc1.Name = 'Too001';
+ coc1.Dealer_Custom_Price__c = 999.00;
+ coc1.Consumable_count__c = 3;
+ coc1.Consumable_product__c = pro1.Id;
+ coc1.Box_Piece__c = '鐩�';
+ coc1.isOutPattern__c = true;
+ coc1.Consumable_order__c = createIdSend3.Id;
+ coc1.Unitprice_To_agency__c = 999.00;
+ coc1.Delivery_List_RMB__c = 999.00;
+ coc1.Shipment_Count__c = 9999.00;
+ coc1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+
+ Consumable_orderdetails__c coc2 = new Consumable_orderdetails__c();
+ coc2.Name = 'Too001';
+ coc2.Dealer_Custom_Price__c = 999.00;
+ coc2.Consumable_count__c = 3;
+ coc2.Consumable_product__c = pro1.Id;
+ coc2.Box_Piece__c = '鐩�';
+ coc2.isOutPattern__c = true;
+ coc2.Consumable_order__c = createIdSend3.Id;
+ coc2.Unitprice_To_agency__c = 999.00;
+ coc2.Delivery_List_RMB__c = -999.00;
+ coc2.Shipment_Count__c = 9999.00;
+ coc2.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert new List<Consumable_orderdetails__c>{ coc, coc1, coc2 };
+
+ Consumable_order_details2__c conOrderDetail1 = new Consumable_order_details2__c();
+ conOrderDetail1.Name = 'OCM_01_001001';
+ conOrderDetail1.Consumable_ZS_order__c = createIdArrived.Id;
+ conOrderDetail1.Consumable_Product__c = pro1.Id;
+ conOrderDetail1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ conOrderDetail1.Bar_Code__c = '11111';
+ conOrderDetail1.Arrive_date__c = Date.today().addDays(1);
+ conOrderDetail1.Send_Date__c = null;
+ conOrderDetail1.Used_date__c = null;
+ conOrderDetail1.Return_date__c = null;
+ conOrderDetail1.Consumable_order_minor__c = createIdArrived.Id;
+ conOrderDetail1.Lose_Flag__c = false;
+ conOrderDetail1.exchangeOutPattern__c = false;
+ conOrderDetail1.Cancellation_Flag__c = false;
+ conOrderDetail1.Box_Piece__c = '鐩�';
+ conOrderDetail1.Sterilization_limit__c = Date.Today();
+ insert new List<Consumable_order_details2__c>{ conOrderDetail1 };
+
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = accountId;
+ hp1.account__c = accountId;
+ hp1.product__c = pro1.Id;
+ insert new List<hospitalprice__c>{ hp1 };
+
+ Dealer_elationship__c dealerelationship = new Dealer_elationship__c(
+ Dealer_principal__c = accountItem1.id,
+ Dealer_subordinate__c = accountItem1.id
+ );
+ Dealer_elationship__c dealerelationship1 = new Dealer_elationship__c(
+ Dealer_principal__c = accountItem1.id,
+ Dealer_subordinate__c = accountItem1.id
+ );
+ insert new List<Dealer_elationship__c>{ dealerelationship, dealerelationship1 };
+
+ LexSummonsCreatController.ConsumableorderdetailsInfo c0 = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ c0.packinglist = 0;
+ c0.approbation_No = null;
+ c0.expiration_Date = Date.Today();
+ c0.boxorpiecein = null;
+ c0.hospitalSpecialOffer = true;
+ LexSummonsCreatController.ConsumableorderdetailsInfo c1 = new LexSummonsCreatController.ConsumableorderdetailsInfo(coc);
+ c1.check = true;
+ c1.oldCheck = true;
+ c1.orderdetails1 = coc;
+ c1.orderdetails2 = null;
+ c1.Prod = coc.Consumable_Product__r;
+ c1.oldConsumableCount = coc.Shipment_Count__c;
+ c1.canSelect = true;
+ c1.allnumber = 0.00;
+ c1.Boxnumber = 0.00;
+ c1.Piecenumber = 0.00;
+ c1.BoxPiece = coc.Box_Piece__c;
+ c1.hospitalSpecialOffer = true;
+ c1.hosPro = false;
+ List<SelectOption> boxorpiece = new List<SelectOption>();
+ boxorpiece.add(new SelectOption('鐩�', '鐩�'));
+ boxorpiece.add(new SelectOption('涓�', '涓�'));
+ Map<String, String> boxorpieceMap = new Map<String, String>();
+ boxorpieceMap.put('鐩�', '鐩�');
+ boxorpieceMap.put('涓�', '涓�');
+ LexSummonsCreatController.ConsumableorderdetailsInfo coder = new LexSummonsCreatController.ConsumableorderdetailsInfo(
+ conOrderDetail1
+ );
+ coder.check = true;
+ coder.oldCheck = true;
+ coder.hospitalSpecialOffer = true;
+ coder.orderdetails1 = null;
+ coder.orderdetails2 = conOrderDetail1;
+ coder.Prod = conOrderDetail1.Consumable_Product__r;
+ coder.canSelect = true;
+ coder.allnumber = 0;
+ coder.Boxnumber = 0;
+ coder.Piecenumber = 0;
+ coder.hosPro = false;
+ LexSummonsCreatController.ConsumableorderdetailsInfo c2 = new LexSummonsCreatController.ConsumableorderdetailsInfo(pro1);
+ c2.sortBy = true;
+ c2.Boxnumber = 20;
+ c1.compareTo(c2);
+ c1.Boxnumber = 20;
+ c2.Boxnumber = 10;
+ c1.compareTo(c2);
+ c1.Boxnumber = 10;
+ c2.Boxnumber = 20;
+ c2.compareTo(c1);
+ c1.Boxnumber = 20;
+ c2.Boxnumber = 10;
+ c2.compareTo(c1);
+ LexSummonsCreatController.ConsumableorderdetailsInfo c3 = new LexSummonsCreatController.ConsumableorderdetailsInfo(pro1);
+ c3.sortBy = false;
+ c3.Boxnumber = 10;
+ c1.compareTo(c3);
+ c1.Boxnumber = 20;
+ c3.Boxnumber = 10;
+ c1.compareTo(c3);
+ c3.Boxnumber = 10;
+ c1.Boxnumber = 20;
+ c3.compareTo(c1);
+ c3.Boxnumber = 20;
+ c3.Boxnumber = 10;
+ c1.compareTo(c1);
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c4 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c4.check = true;
+ c4.oldCheck = true;
+ c4.orderdetails1 = null;
+ c4.orderdetails2 = null;
+ c4.Prod = null;
+ c4.Boxnumber = 0.00;
+ c4.Piecenumber = 0.00;
+ c4.allnumber = 0.00;
+ c4.oldConsumableCount = 0.00;
+ c4.canSelect = true;
+ c4.sortBy = true;
+ c4.packinglist = 1;
+ c4.approbation_No = null;
+ c4.expiration_Date = Date.Today();
+ c4.boxorpiecein = null;
+ c4.boxorpiece = null;
+ c4.boxorpieceMap = null;
+ c4.concc = null;
+ c4.BoxPiece = null;
+ c4.hospitalSpecialOffer = true;
+ c4.hosPro = true;
+ c4.unitOptions = null;
+ c4.unitValue = null;
+ c4.shipmentNumber = 1;
+ c4.shippingUnitPrice = 0.00;
+ c4.recordId = null;
+ c4.Id = null;
+ c4.Name = null;
+ c4.Category3 = null;
+ c4.Category4 = null;
+ c4.Category5 = null;
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecordsLwcLwc = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c5 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c5.check = true;
+ c5.orderdetails1 = coc;
+ c5.hospitalSpecialOffer = true;
+ c5.allnumber = 1999.00;
+ pageRecordsLwcLwc.add(c5);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c6 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c6.check = true;
+ c6.oldCheck = true;
+ c6.hospitalSpecialOffer = true;
+ c6.orderdetails1 = coc1;
+ c6.orderdetails2 = conOrderDetail1;
+ c6.Prod = pro1;
+ c6.Boxnumber = 0.00;
+ c6.Piecenumber = 0.00;
+ c6.allnumber = 1999.00;
+ c6.oldConsumableCount = 1999.00;
+ c6.canSelect = true;
+ c6.sortBy = true;
+ c6.packinglist = 1;
+ c6.approbation_No = '';
+ c6.expiration_Date = Date.Today();
+ c6.boxorpiecein = '';
+ c6.boxorpiece = null;
+ c6.boxorpieceMap = null;
+ c6.concc = null;
+ c6.BoxPiece = null;
+ c6.hosPro = true;
+ pageRecords.add(c6);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecordsLwc = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c7 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c7.check = true;
+ c7.oldCheck = true;
+ c7.hospitalSpecialOffer = true;
+ c7.orderdetails1 = coc2;
+ c7.orderdetails2 = conOrderDetail1;
+ c7.Prod = pro1;
+ c7.Boxnumber = 0.00;
+ c7.Piecenumber = 0.00;
+ c7.allnumber = 1999.00;
+ c7.oldConsumableCount = 1999.00;
+ c7.canSelect = true;
+ c7.sortBy = true;
+ c7.packinglist = 1;
+ c7.approbation_No = '';
+ c7.expiration_Date = Date.Today();
+ c7.boxorpiecein = '';
+ c7.boxorpiece = null;
+ c7.boxorpieceMap = null;
+ c7.concc = null;
+ c7.BoxPiece = null;
+ c7.hosPro = true;
+ pageRecordsLwc.add(c7);
+
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> consumable = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi.check = true;
+ codi.hospitalSpecialOffer = true;
+ codi.packinglist = 0;
+ codi.approbation_No = null;
+ codi.expiration_Date = Date.Today();
+ codi.boxorpiecein = null;
+ codi.orderdetails1 = coc;
+ codi.Prod = pro1;
+ consumable.add(codi);
+ List<SelectOption> categoryOptionList = new List<SelectOption>();
+ System.Test.startTest();
+ Integer size = Integer.valueOf(System.Label.orderdetLimitsize);
+ String ESetId = null;
+ String statusEdit = null;
+ String arrive = null;
+ String alertMessage = null;
+
+ String category1 = '3400PK:PK閽� 5mm脳33cm';
+ String Category3 = '鑵硅厰闀滄墜鏈�';
+ String Category4 = 'PK';
+ String Category5 = 'G400';
+ LexSummonsCreatController.category1 = category1;
+ LexSummonsCreatController.Category3 = Category3;
+ LexSummonsCreatController.Category4 = Category4;
+ LexSummonsCreatController.Category5 = Category5;
+ LexSummonsCreatController.statusEdit = statusEdit;
+ LexSummonsCreatController.alertMessage = alertMessage;
+ LexSummonsCreatController.zaikuId = new List<String>();
+ LexSummonsCreatController.categoryOptionMap = new Map<String, String>();
+ LexSummonsCreatController.category4OptionMap = new Map<String, String>();
+ LexSummonsCreatController.category5OptionMap = new Map<String, String>();
+ LexSummonsCreatController.orderpieceorboxMap = new Map<String, String>();
+ LexSummonsCreatController.orderagencypriceMap = new Map<String, Decimal>();
+ LexSummonsCreatController.orderpriceMap = new Map<String, Decimal>();
+ LexSummonsCreatController.orderdetCountMap = new Map<String, Decimal>();
+ LexSummonsCreatController.hasSpecialHos = false;
+ LexSummonsCreatController.outOutPattern = null;
+ LexSummonsCreatController.provinceOptsMap = new Map<String, String>();
+ LexSummonsCreatController.categoryOptionList = new List<SelectOption>();
+ LexSummonsCreatController.category4OptionList = new List<SelectOption>();
+ LexSummonsCreatController.category5OptionList = new List<SelectOption>();
+ LexSummonsCreatController.outOutPatternOptionList = new List<SelectOption>();
+ LexSummonsCreatController.orderdetails = new List<Consumable_orderdetails__c>();
+ LexSummonsCreatController.consumableorderdetailsRecords = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.consumableorderdetailsRecordserror = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ List<SelectOption> cityOpts1 = new List<SelectOption>();
+ cityOpts1.add(new SelectOption('', '--鏃�--'));
+ cityOpts1.add(new SelectOption('ishos', '鍖婚櫌鐗逛环浜у搧'));
+ cityOpts1.add(new SelectOption('nothos', '闈炲尰闄㈢壒浠蜂骇鍝�'));
+ Map<String, String> optionMap = new Map<String, String>();
+ optionMap.put('', '-鏃�-');
+ optionMap.put('ishos', '鍖婚櫌鐗逛环浜у搧');
+ optionMap.put('nothos', '闈炲尰闄㈢壒浠蜂骇鍝�');
+
+ Integer count = LexSummonsCreatController.consumableorderdetailsCount;
+ Consumable_order__c cocOrderId = new Consumable_order__c();
+ LexSummonsCreatController.coc = cocOrderId;
+ String consumableorderId = LexSummonsCreatController.consumableorderId;
+ LexSummonsCreatController summonCC = new LexSummonsCreatController();
+
+ LexSummonsCreatController.init(testList1.Id, 'Test', 1, 100, testList1.Id);
+ LexSummonsCreatController.firstInit(ESetId);
+ LexSummonsCreatController.init(ESetId, statusEdit, 1, 100, arrive);
+ LexSummonsCreatController.init(ESetId, statusEdit, 1, 100, createIdSend.Id);
+ LexSummonsCreatController.init(createIdSend.Id, statusEdit, 1, 100, arrive);
+ LexSummonsCreatController.init(createIdSend.Id, 'Test', 1, 100, createIdSend3.Id);
+ LexSummonsCreatController.init(ESetId, 'Test', 1, 100, createIdSend.Id);
+ LexSummonsCreatController.searchConsumableorderdetails(
+ 'ENG',
+ 'Testaccount001',
+ '鍖椾含',
+ 'ishos',
+ 'Test07',
+ 'CDS',
+ 'OER',
+ 'Celon',
+ true,
+ pageRecords,
+ consumable,
+ '',
+ 1,
+ 100
+ );
+ LexSummonsCreatController.searchConsumableorderdetails(
+ 'ENG',
+ 'Testaccount001',
+ '鍖椾含',
+ 'nothos',
+ 'Test07',
+ 'CDS',
+ 'OER',
+ 'Celon',
+ true,
+ pageRecords,
+ consumable,
+ '',
+ 1,
+ 100
+ );
+ LexSummonsCreatController.save(
+ createIdSend2,
+ '',
+ '',
+ '',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend2.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend1,
+ '',
+ '',
+ 'Test',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend1.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend1,
+ 'Test',
+ 'Test',
+ 'Test',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend1.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend7,
+ '',
+ '',
+ accountItem1.Id,
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend7.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ 'Test',
+ 'Test',
+ 'Test',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend3,
+ 'Test',
+ 'Test',
+ '',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend3.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend3,
+ '',
+ '',
+ 'Test',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend3.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend3,
+ 'Test',
+ 'Test',
+ 'Test',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend3.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend4,
+ '',
+ '',
+ '',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend4.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend5,
+ '',
+ '',
+ '',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend5.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend5,
+ '',
+ '',
+ 'Test',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend5.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend5,
+ 'Test',
+ 'Test',
+ 'Test',
+ pageRecordsLwcLwc,
+ accountId,
+ createIdSend5.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend8,
+ accountId,
+ 'Test',
+ accountId,
+ pageRecords,
+ accountId,
+ createIdSend8.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend8,
+ accountId,
+ 'Test',
+ null,
+ pageRecordsLwc,
+ accountId,
+ createIdSend8.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.checkOutPattern();
+ LexSummonsCreatController.PraseToPDF(createIdSend, createIdSend.Id);
+ LexSummonsCreatController.search('Testaccount001');
+ LexSummonsCreatController.GoodsDelivery(createIdSend, createIdSend.Id, pageRecordsLwcLwc);
+ LexSummonsCreatController.GoodsDelivery(createIdSend3, createIdSend3.Id, pageRecords);
+ LexSummonsCreatController.GoodsDelivery(createIdSend1, createIdSend1.Id, pageRecordsLwcLwc);
+ LexSummonsCreatController.GoodsDelivery(createIdSend6, createIdSend6.Id, pageRecordsLwcLwc);
+ LexSummonsCreatController.DelConsumable(createIdSend.Id);
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void testSaveMethod() {
+ Account accountItem1;
+ Account accountItem2;
+ User userTest;
+ String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ String rectHp = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ accountItem1 = new Account(Name = 'Testaccount001', RecordTypeId = rectCo, AgentCode_Ext__c = '9999900');
+ insert accountItem1;
+ accountItem2 = new Account(
+ Name = 'Testaccount002',
+ RecordTypeId = rectHp,
+ AgentCode_Ext__c = '9999999',
+ ParentId = accountItem1.Id,
+ Contract_Decide_Start_Date__c = Date.today(),
+ ENG_Dealer__c = true,
+ BillingCity = null
+ );
+ insert accountItem2;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountId = accountItem1.Id);
+ insert core;
+ System.runAs(new user(ID = UserInfo.getUserID())) {
+ userTest = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert userTest;
+ }
+ System.runAs(userTest) {
+ String userId = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, UserPro_Type__c, ContactId, Contact.AccountId, Contact.Account.Name, Work_Location__c
+ FROM User
+ WHERE id = :userId
+ ];
+ String accountId = thisUserInfo.accountid;
+ String accountName = thisUserInfo.Contact.Account.Name;
+ String agencyProType = thisUserInfo.UserPro_Type__c;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ thisUserInfo.UserPro_Type__c = '';
+ update thisUserInfo;
+ if (String.isBlank(thisUserInfo.UserPro_Type__c)) {
+ agencyProType = 'ET';
+ }
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ Category3__c = 'Test7',
+ Category4__c = 'Test77',
+ Category5__c = 'Test777',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07 };
+ Product2__c pro1 = new Product2__c(
+ Name = 'MH-155:鐧藉钩琛″附',
+ OT_CODE_Text__c = 'Test001',
+ Product2__c = prod07.Id,
+ Category3_text__c = 'test123',
+ Category4_text__c = 'test123',
+ Category5_text__c = 'test123'
+ );
+ insert new List<Product2__c>{ pro1 };
+ Consumable_order__c createIdSend = new Consumable_order__c();
+ createIdSend.Name = 'testMing1';
+ createIdSend.Order_status__c = '鎵瑰噯';
+ createIdSend.Deliver_date__c = Date.today();
+ createIdSend.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend.Order_type__c = '璁㈠崟';
+ createIdSend.Order_ProType__c = 'ENG';
+ createIdSend.SummonsForDirction__c = '娴嬭瘯0001';
+ createIdSend.Order_ForDealerText__c = 'Testaccount003';
+ createIdSend.Order_ForCustomerText__c = 'Test000';
+ createIdSend.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend.Dealer_Info__c = accountItem1.Id;
+ createIdSend.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend1 = new Consumable_order__c();
+ createIdSend1.Name = 'testMing1';
+ createIdSend1.Order_status__c = '鎵瑰噯';
+ createIdSend1.Deliver_date__c = Date.today();
+ createIdSend1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend1.Order_type__c = '璁㈠崟';
+ createIdSend1.Order_ProType__c = 'ENG';
+ createIdSend1.SummonsForDirction__c = '閿�鍞粰浜岀骇缁忛攢鍟�';
+ createIdSend1.Order_ForDealerText__c = 'Testaccount003';
+ createIdSend1.Order_ForCustomerText__c = 'Test000';
+ createIdSend1.SummonsStatus_c__c = '浠锋牸鏈畾';
+ createIdSend1.Dealer_Info__c = accountItem1.Id;
+ createIdSend1.Delivery_detail_count__c = 5;
+ insert new List<Consumable_order__c>{ createIdSend, createIdSend1 };
+
+ Consumable_orderdetails__c coc = new Consumable_orderdetails__c();
+ coc.Name = 'Too001';
+ coc.Dealer_Custom_Price__c = 999.00;
+ coc.Consumable_count__c = 3;
+ coc.Consumable_product__c = pro1.Id;
+ coc.Box_Piece__c = '鐩�';
+ coc.isOutPattern__c = true;
+ coc.Consumable_order__c = createIdSend.Id;
+ coc.Unitprice_To_agency__c = 999.00;
+ coc.Delivery_List_RMB__c = -999.00;
+ coc.Shipment_Count__c = 9999.00;
+ coc.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+
+ Consumable_orderdetails__c coc1 = new Consumable_orderdetails__c();
+ coc1.Name = 'Too001';
+ coc1.Dealer_Custom_Price__c = 999.00;
+ coc1.Consumable_count__c = 3;
+ coc1.Consumable_product__c = pro1.Id;
+ coc1.Box_Piece__c = '鐩�';
+ coc1.isOutPattern__c = true;
+ coc1.Consumable_order__c = createIdSend.Id;
+ coc1.Unitprice_To_agency__c = 999.00;
+ coc1.Delivery_List_RMB__c = null;
+ coc1.Shipment_Count__c = 9999.00;
+ coc1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+
+ Consumable_orderdetails__c coc2 = new Consumable_orderdetails__c();
+ coc2.Name = 'Too001';
+ coc2.Dealer_Custom_Price__c = 999.00;
+ coc2.Consumable_count__c = 3;
+ coc2.Consumable_product__c = pro1.Id;
+ coc2.Box_Piece__c = '';
+ coc2.isOutPattern__c = true;
+ coc2.Consumable_order__c = createIdSend.Id;
+ coc2.Unitprice_To_agency__c = 999.00;
+ coc2.Delivery_List_RMB__c = 999.00;
+ coc2.Shipment_Count__c = 9999.00;
+ coc2.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+
+ Consumable_orderdetails__c coc3 = new Consumable_orderdetails__c();
+ coc3.Name = 'Too001';
+ coc3.Dealer_Custom_Price__c = 999.00;
+ coc3.Consumable_count__c = 3;
+ coc3.Consumable_product__c = pro1.Id;
+ coc3.Box_Piece__c = '鐩�';
+ coc3.isOutPattern__c = true;
+ coc3.Consumable_order__c = createIdSend1.Id;
+ coc3.Unitprice_To_agency__c = 999.00;
+ coc3.Delivery_List_RMB__c = 100.00;
+ coc3.Shipment_Count__c = 9999.00;
+ coc3.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert new List<Consumable_orderdetails__c>{ coc, coc1, coc2, coc3 };
+
+ Consumable_order_details2__c conOrderDetail1 = new Consumable_order_details2__c();
+ conOrderDetail1.Name = 'OCM_01_001001';
+ conOrderDetail1.Consumable_ZS_order__c = createIdSend.Id;
+ conOrderDetail1.Consumable_Product__c = pro1.Id;
+ conOrderDetail1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ conOrderDetail1.Bar_Code__c = '11111';
+ conOrderDetail1.Arrive_date__c = Date.today().addDays(1);
+ conOrderDetail1.Send_Date__c = null;
+ conOrderDetail1.Used_date__c = null;
+ conOrderDetail1.Return_date__c = null;
+ conOrderDetail1.Consumable_order_minor__c = createIdSend.Id;
+ conOrderDetail1.Lose_Flag__c = false;
+ conOrderDetail1.Cancellation_Flag__c = false;
+ conOrderDetail1.Box_Piece__c = '鐩�';
+ conOrderDetail1.Sterilization_limit__c = Date.Today();
+ insert new List<Consumable_order_details2__c>{ conOrderDetail1 };
+
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c0 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c0.check = true;
+ c0.oldCheck = true;
+ c0.hospitalSpecialOffer = true;
+ c0.orderdetails1 = coc;
+ c0.orderdetails2 = conOrderDetail1;
+ c0.Prod = pro1;
+ c0.Boxnumber = 0.00;
+ c0.Piecenumber = 0.00;
+ c0.allnumber = 1999.00;
+ c0.oldConsumableCount = 1999.00;
+ c0.canSelect = true;
+ c0.sortBy = true;
+ c0.packinglist = 1;
+ c0.approbation_No = '';
+ c0.expiration_Date = Date.Today();
+ c0.boxorpiecein = '';
+ c0.boxorpiece = null;
+ c0.boxorpieceMap = null;
+ c0.concc = null;
+ c0.BoxPiece = null;
+ c0.hosPro = true;
+ pageRecords.add(c0);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords1 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c1 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c1.check = true;
+ c1.oldCheck = false;
+ c1.hospitalSpecialOffer = true;
+ c1.orderdetails1 = coc1;
+ c1.orderdetails2 = conOrderDetail1;
+ c1.Prod = pro1;
+ c1.Boxnumber = 0.00;
+ c1.Piecenumber = 0.00;
+ c1.allnumber = 1999.00;
+ c1.oldConsumableCount = 1999.00;
+ c1.canSelect = true;
+ c1.sortBy = true;
+ c1.packinglist = 1;
+ c1.approbation_No = '';
+ c1.expiration_Date = Date.Today();
+ c1.boxorpiecein = '';
+ c1.boxorpiece = null;
+ c1.boxorpieceMap = null;
+ c1.concc = null;
+ c1.BoxPiece = null;
+ c1.hosPro = true;
+ pageRecords1.add(c1);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords2 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c2 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c2.check = true;
+ c2.oldCheck = false;
+ c2.hospitalSpecialOffer = true;
+ c2.orderdetails1 = coc2;
+ c2.orderdetails2 = conOrderDetail1;
+ c2.Prod = pro1;
+ c2.Boxnumber = 0.00;
+ c2.Piecenumber = 0.00;
+ c2.allnumber = 1999.00;
+ c2.oldConsumableCount = 1999.00;
+ c2.canSelect = true;
+ c2.sortBy = true;
+ c2.packinglist = 1;
+ c2.approbation_No = '';
+ c2.expiration_Date = Date.Today();
+ c2.boxorpiecein = '';
+ c2.boxorpiece = null;
+ c2.boxorpieceMap = null;
+ c2.concc = null;
+ c2.BoxPiece = null;
+ c2.hosPro = true;
+ pageRecords2.add(c2);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords3 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c3 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c3.check = true;
+ c3.oldCheck = false;
+ c3.hospitalSpecialOffer = true;
+ c3.orderdetails1 = coc3;
+ c3.orderdetails2 = conOrderDetail1;
+ c3.Prod = pro1;
+ c3.Boxnumber = 0.00;
+ c3.Piecenumber = 0.00;
+ c3.allnumber = 1999.00;
+ c3.oldConsumableCount = 1999.00;
+ c3.canSelect = true;
+ c3.sortBy = true;
+ c3.packinglist = 1;
+ c3.approbation_No = '';
+ c3.expiration_Date = Date.Today();
+ c3.boxorpiecein = '';
+ c3.boxorpiece = null;
+ c3.boxorpieceMap = null;
+ c3.concc = null;
+ c3.BoxPiece = null;
+ c3.hosPro = true;
+ pageRecords3.add(c3);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords0 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c001 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c001.check = true;
+ c001.oldCheck = true;
+ c001.hospitalSpecialOffer = true;
+ c001.orderdetails1 = coc3;
+ c001.orderdetails2 = conOrderDetail1;
+ c001.Prod = pro1;
+ c001.Boxnumber = 0.00;
+ c001.Piecenumber = 0.00;
+ c001.allnumber = 1999.00;
+ c001.oldConsumableCount = 1999.00;
+ c001.canSelect = true;
+ c001.sortBy = true;
+ c001.packinglist = 1;
+ c001.approbation_No = '';
+ c001.expiration_Date = Date.Today();
+ c001.boxorpiecein = '';
+ c001.boxorpiece = null;
+ c001.boxorpieceMap = null;
+ c001.concc = null;
+ c001.BoxPiece = null;
+ c001.hosPro = true;
+ pageRecords0.add(c001);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords4 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c4 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c4.check = true;
+ c4.oldCheck = true;
+ c4.hospitalSpecialOffer = true;
+ c4.orderdetails1 = coc2;
+ c4.orderdetails2 = conOrderDetail1;
+ c4.Prod = pro1;
+ c4.Boxnumber = 0.00;
+ c4.Piecenumber = 0.00;
+ c4.allnumber = 1999.00;
+ c4.oldConsumableCount = 1999.00;
+ c4.canSelect = true;
+ c4.sortBy = true;
+ c4.packinglist = 1;
+ c4.approbation_No = '';
+ c4.expiration_Date = Date.Today();
+ c4.boxorpiecein = '';
+ c4.boxorpiece = null;
+ c4.boxorpieceMap = null;
+ c4.concc = null;
+ c4.BoxPiece = null;
+ c4.hosPro = true;
+ pageRecords4.add(c4);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> consumable = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi.check = true;
+ codi.hospitalSpecialOffer = true;
+ codi.packinglist = 0;
+ codi.approbation_No = null;
+ codi.expiration_Date = Date.Today();
+ codi.boxorpiecein = null;
+ codi.orderdetails1 = coc;
+ codi.Prod = pro1;
+ consumable.add(codi);
+ System.Test.startTest();
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords1,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords2,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords3,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords0,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords4,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void testSaveMethod1() {
+ Account accountItem1;
+ Account accountItem2;
+ User userTest;
+ String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ String rectHp = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ accountItem1 = new Account(Name = 'Testaccount001', RecordTypeId = rectCo, AgentCode_Ext__c = '9999900');
+ insert accountItem1;
+ accountItem2 = new Account(
+ Name = 'Testaccount002',
+ RecordTypeId = rectHp,
+ AgentCode_Ext__c = '9999999',
+ ParentId = accountItem1.Id,
+ Contract_Decide_Start_Date__c = Date.today(),
+ ENG_Dealer__c = true,
+ BillingCity = null
+ );
+ insert accountItem2;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountId = accountItem1.Id);
+ insert core;
+ System.runAs(new user(ID = UserInfo.getUserID())) {
+ userTest = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert userTest;
+ }
+ System.runAs(userTest) {
+ String userId = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, UserPro_Type__c, ContactId, Contact.AccountId, Contact.Account.Name, Work_Location__c
+ FROM User
+ WHERE id = :userId
+ ];
+ String accountId = thisUserInfo.accountid;
+ String accountName = thisUserInfo.Contact.Account.Name;
+ String agencyProType = thisUserInfo.UserPro_Type__c;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ thisUserInfo.UserPro_Type__c = '';
+ update thisUserInfo;
+ if (String.isBlank(thisUserInfo.UserPro_Type__c)) {
+ agencyProType = 'ET';
+ }
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ Category3__c = 'Test7',
+ Category4__c = 'Test77',
+ Category5__c = 'Test777',
+ SFDA_Status__c = '鏈夊姽',
+ Intra_Trade_List_RMB_End_Date1__c = Date.Today(),
+ Intra_Trade_List_RMB_Date2__c = null,
+ Intra_Trade_List_RMB_1__c = 1,
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07 };
+ Product2__c pro1 = new Product2__c(
+ Name = 'MH-155:鐧藉钩琛″附',
+ OT_CODE_Text__c = 'Test001',
+ Product2__c = prod07.Id,
+ Category3_text__c = 'test123',
+ Category4_text__c = 'test123',
+ Category5_text__c = 'test123'
+ );
+ insert new List<Product2__c>{ pro1 };
+ Consumable_order__c createIdSend = new Consumable_order__c();
+ createIdSend.Name = 'testMing1';
+ createIdSend.Order_status__c = '鎵瑰噯';
+ createIdSend.Deliver_date__c = Date.today();
+ createIdSend.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend.Order_type__c = '璁㈠崟';
+ createIdSend.Order_ProType__c = 'ENG';
+ createIdSend.SummonsForDirction__c = '娴嬭瘯0001';
+ createIdSend.Order_ForDealerText__c = 'Testaccount003';
+ createIdSend.Order_ForCustomerText__c = 'Test000';
+ createIdSend.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend.Dealer_Info__c = accountItem1.Id;
+ createIdSend.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend1 = new Consumable_order__c();
+ createIdSend1.Name = 'testMing2';
+ createIdSend1.Order_status__c = '鎵瑰噯';
+ createIdSend1.Deliver_date__c = Date.today();
+ createIdSend1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend1.Order_type__c = '璁㈠崟';
+ createIdSend1.Order_ProType__c = 'ENG';
+ createIdSend1.SummonsForDirction__c = '閿�鍞粰浜岀骇缁忛攢鍟�';
+ createIdSend1.Order_ForDealerText__c = 'Testaccount003';
+ createIdSend1.Order_ForCustomerText__c = 'Test000';
+ createIdSend1.SummonsStatus_c__c = '浠锋牸鏈畾';
+ createIdSend1.Dealer_Info__c = accountItem1.Id;
+ createIdSend1.Delivery_detail_count__c = 5;
+ insert new List<Consumable_order__c>{ createIdSend, createIdSend1 };
+
+ Consumable_orderdetails__c coc = new Consumable_orderdetails__c();
+ coc.Name = 'Too001';
+ coc.Dealer_Custom_Price__c = 999.00;
+ coc.Consumable_count__c = 3;
+ coc.Consumable_product__c = pro1.Id;
+ coc.Box_Piece__c = '涓�';
+ coc.isOutPattern__c = true;
+ coc.Consumable_order__c = createIdSend.Id;
+ coc.Unitprice_To_agency__c = 999.00;
+ coc.Delivery_List_RMB__c = 999.00;
+ coc.Shipment_Count__c = 9999.00;
+ coc.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+
+ Consumable_orderdetails__c coc1 = new Consumable_orderdetails__c();
+ coc1.Name = 'Too002';
+ coc1.Dealer_Custom_Price__c = 999.00;
+ coc1.Consumable_count__c = 3;
+ coc1.Consumable_product__c = pro1.Id;
+ coc1.Box_Piece__c = '涓�';
+ coc1.isOutPattern__c = true;
+ coc1.Consumable_order__c = createIdSend.Id;
+ coc1.Unitprice_To_agency__c = 999.00;
+ coc1.Delivery_List_RMB__c = 999.00;
+ coc1.Shipment_Count__c = null;
+ coc1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+
+ Consumable_orderdetails__c coc2 = new Consumable_orderdetails__c();
+ coc2.Name = 'Too003';
+ coc2.Dealer_Custom_Price__c = 999.00;
+ coc2.Consumable_count__c = 3;
+ coc2.Consumable_product__c = pro1.Id;
+ coc2.Box_Piece__c = '涓�';
+ coc2.isOutPattern__c = true;
+ coc2.Consumable_order__c = createIdSend.Id;
+ coc2.Unitprice_To_agency__c = 999.00;
+ coc2.Delivery_List_RMB__c = 0;
+ coc2.Shipment_Count__c = 100.00;
+ coc2.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc3 = new Consumable_orderdetails__c();
+ coc3.Name = 'Too004';
+ coc3.Dealer_Custom_Price__c = 999.00;
+ coc3.Consumable_count__c = 3;
+ coc3.Consumable_product__c = pro1.Id;
+ coc3.Box_Piece__c = '';
+ coc3.isOutPattern__c = true;
+ coc3.Consumable_order__c = createIdSend1.Id;
+ coc3.Unitprice_To_agency__c = 999.00;
+ coc3.Delivery_List_RMB__c = 0.00;
+ coc3.Shipment_Count__c = 9999.00;
+ coc3.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc4 = new Consumable_orderdetails__c();
+ coc4.Name = 'Too005';
+ coc4.Dealer_Custom_Price__c = 999.00;
+ coc4.Consumable_count__c = 3;
+ coc4.Consumable_product__c = pro1.Id;
+ coc4.Box_Piece__c = '';
+ coc4.isOutPattern__c = true;
+ coc4.Consumable_order__c = createIdSend1.Id;
+ coc4.Unitprice_To_agency__c = 999.00;
+ coc4.Delivery_List_RMB__c = 9999.00;
+ coc4.Shipment_Count__c = 100.00;
+ coc4.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc5 = new Consumable_orderdetails__c();
+ coc5.Name = 'Too006';
+ coc5.Dealer_Custom_Price__c = 999.00;
+ coc5.Consumable_count__c = 3;
+ coc5.Consumable_product__c = pro1.Id;
+ coc5.Box_Piece__c = '鐩�';
+ coc5.isOutPattern__c = true;
+ coc5.Consumable_order__c = createIdSend1.Id;
+ coc5.Unitprice_To_agency__c = 999.00;
+ coc5.Delivery_List_RMB__c = 9999.00;
+ coc5.Shipment_Count__c = 9999.00;
+ coc5.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc6 = new Consumable_orderdetails__c();
+ coc6.Name = 'Too007';
+ coc6.Dealer_Custom_Price__c = 999.00;
+ coc6.Consumable_count__c = 3;
+ coc6.Consumable_product__c = pro1.Id;
+ coc6.Box_Piece__c = '涓�';
+ coc6.isOutPattern__c = true;
+ coc6.Consumable_order__c = createIdSend1.Id;
+ coc6.Unitprice_To_agency__c = 999.00;
+ coc6.Delivery_List_RMB__c = 9999.00;
+ coc6.Shipment_Count__c = 9999.00;
+ coc6.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc7 = new Consumable_orderdetails__c();
+ coc7.Name = 'Too008';
+ coc7.Dealer_Custom_Price__c = 999.00;
+ coc7.Consumable_count__c = 3;
+ coc7.Consumable_product__c = pro1.Id;
+ coc7.Box_Piece__c = '鐩�';
+ coc7.isOutPattern__c = true;
+ coc7.Consumable_order__c = createIdSend1.Id;
+ coc7.Unitprice_To_agency__c = 999.00;
+ coc7.Delivery_List_RMB__c = 100;
+ coc7.Shipment_Count__c = 0;
+ coc7.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert new List<Consumable_orderdetails__c>{ coc, coc1, coc2, coc3, coc4, coc5, coc6, coc7 };
+
+ Consumable_order_details2__c conOrderDetail1 = new Consumable_order_details2__c();
+ conOrderDetail1.Name = 'OCM_01_001001';
+ conOrderDetail1.Consumable_ZS_order__c = createIdSend.Id;
+ conOrderDetail1.Consumable_Product__c = pro1.Id;
+ conOrderDetail1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ conOrderDetail1.Bar_Code__c = '11111';
+ conOrderDetail1.Arrive_date__c = Date.today().addDays(1);
+ conOrderDetail1.Send_Date__c = null;
+ conOrderDetail1.Used_date__c = null;
+ conOrderDetail1.Return_date__c = null;
+ conOrderDetail1.Consumable_order_minor__c = createIdSend.Id;
+ conOrderDetail1.Lose_Flag__c = false;
+ conOrderDetail1.Cancellation_Flag__c = false;
+ conOrderDetail1.Box_Piece__c = '鐩�';
+ conOrderDetail1.Sterilization_limit__c = Date.Today();
+ insert new List<Consumable_order_details2__c>{ conOrderDetail1 };
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c0 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c0.check = true;
+ c0.oldCheck = false;
+ c0.hospitalSpecialOffer = true;
+ c0.orderdetails1 = coc;
+ c0.orderdetails2 = conOrderDetail1;
+ c0.Prod = pro1;
+ c0.Boxnumber = 0.00;
+ c0.Piecenumber = 0.00;
+ c0.allnumber = 1999.00;
+ c0.oldConsumableCount = 1999.00;
+ c0.canSelect = true;
+ c0.sortBy = true;
+ c0.packinglist = 1;
+ c0.approbation_No = '';
+ c0.expiration_Date = Date.Today();
+ c0.boxorpiecein = '';
+ c0.boxorpiece = null;
+ c0.boxorpieceMap = null;
+ c0.concc = null;
+ c0.BoxPiece = null;
+ c0.hosPro = true;
+ pageRecords.add(c0);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords1 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c1 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c1.check = true;
+ c1.oldCheck = true;
+ c1.hospitalSpecialOffer = true;
+ c1.orderdetails1 = coc;
+ c1.orderdetails2 = conOrderDetail1;
+ c1.Prod = pro1;
+ c1.Boxnumber = 0.00;
+ c1.Piecenumber = 0.00;
+ c1.allnumber = 1999.00;
+ c1.oldConsumableCount = 1999.00;
+ c1.canSelect = true;
+ c1.sortBy = true;
+ c1.packinglist = 1;
+ c1.approbation_No = '';
+ c1.expiration_Date = Date.Today();
+ c1.boxorpiecein = '';
+ c1.boxorpiece = null;
+ c1.boxorpieceMap = null;
+ c1.concc = null;
+ c1.BoxPiece = null;
+ c1.hosPro = true;
+ pageRecords1.add(c1);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords2 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c2 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c2.check = true;
+ c2.oldCheck = false;
+ c2.hospitalSpecialOffer = true;
+ c2.orderdetails1 = coc1;
+ c2.orderdetails2 = conOrderDetail1;
+ c2.Prod = pro1;
+ c2.Boxnumber = 0.00;
+ c2.Piecenumber = 0.00;
+ c2.allnumber = 1999.00;
+ c2.oldConsumableCount = 1999.00;
+ c2.canSelect = true;
+ c2.sortBy = true;
+ c2.packinglist = 1;
+ c2.approbation_No = '';
+ c2.expiration_Date = Date.Today();
+ c2.boxorpiecein = '';
+ c2.boxorpiece = null;
+ c2.boxorpieceMap = null;
+ c2.concc = null;
+ c2.BoxPiece = null;
+ c2.hosPro = true;
+ pageRecords2.add(c2);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords3 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c3 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c3.check = true;
+ c3.oldCheck = true;
+ c3.hospitalSpecialOffer = true;
+ c3.orderdetails1 = coc2;
+ c3.orderdetails2 = conOrderDetail1;
+ c3.Prod = pro1;
+ c3.Boxnumber = 0.00;
+ c3.Piecenumber = 0.00;
+ c3.allnumber = 199999.00;
+ c3.oldConsumableCount = 1999.00;
+ c3.canSelect = true;
+ c3.sortBy = true;
+ c3.packinglist = 1;
+ c3.approbation_No = '';
+ c3.expiration_Date = Date.Today();
+ c3.boxorpiecein = '';
+ c3.boxorpiece = null;
+ c3.boxorpieceMap = null;
+ c3.concc = null;
+ c3.BoxPiece = null;
+ c3.hosPro = true;
+ pageRecords3.add(c3);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> consumable = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi.check = true;
+ codi.hospitalSpecialOffer = true;
+ codi.packinglist = 0;
+ codi.approbation_No = null;
+ codi.expiration_Date = Date.Today();
+ codi.boxorpiecein = null;
+ codi.orderdetails1 = coc;
+ codi.Prod = pro1;
+ consumable.add(codi);
+ System.Test.startTest();
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords1,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords2,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords3,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void testSave() {
+ Account accountItem1;
+ Account accountItem2;
+ User userTest;
+ String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ String rectHp = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ accountItem1 = new Account(
+ Name = 'Testaccount001',
+ RecordTypeId = rectCo,
+ AgentCode_Ext__c = '9999900',
+ Contract_Decide_Start_Date__c = Date.today(),
+ ENG_Dealer__c = true
+ );
+ insert accountItem1;
+ accountItem2 = new Account(
+ Name = 'Testaccount002',
+ RecordTypeId = rectHp,
+ AgentCode_Ext__c = '9999999',
+ ParentId = accountItem1.Id
+ );
+ insert accountItem2;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountId = accountItem1.Id);
+ insert core;
+ System.runAs(new user(ID = UserInfo.getUserID())) {
+ userTest = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert userTest;
+ }
+ System.runAs(userTest) {
+ String userId = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, UserPro_Type__c, ContactId, Contact.AccountId, Contact.Account.Name, Work_Location__c
+ FROM User
+ WHERE id = :userId
+ ];
+ String accountId = thisUserInfo.accountid;
+ String accountName = thisUserInfo.Contact.Account.Name;
+ String agencyProType = thisUserInfo.UserPro_Type__c;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ thisUserInfo.UserPro_Type__c = '';
+ update thisUserInfo;
+ if (String.isBlank(thisUserInfo.UserPro_Type__c)) {
+ agencyProType = 'ET';
+ }
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ Category3__c = 'Test7',
+ Category4__c = 'Test77',
+ Category5__c = 'Test777',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07 };
+ Product2__c pro1 = new Product2__c(
+ Name = 'MH-155:鐧藉钩琛″附',
+ OT_CODE_Text__c = 'Test001',
+ Product2__c = prod07.Id,
+ Category3_text__c = 'test123',
+ Category4_text__c = 'test123',
+ Category5_text__c = 'test123'
+ );
+ insert new List<Product2__c>{ pro1 };
+
+ Consumable_order__c createIdSend = new Consumable_order__c();
+ createIdSend.Name = 'testMing1';
+ createIdSend.Order_status__c = '鎵瑰噯';
+ createIdSend.Deliver_date__c = Date.today();
+ createIdSend.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend.Order_type__c = '璁㈠崟';
+ createIdSend.Order_ProType__c = 'ENG';
+ createIdSend.SummonsForDirction__c = 'Test123456';
+ createIdSend.Order_ForDealerText__c = '';
+ createIdSend.Order_ForDealer__c = accountItem1.Id;
+ createIdSend.Order_ForCustomerText__c = '';
+ createIdSend.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend.Dealer_Info__c = accountItem1.Id;
+ createIdSend.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend1 = new Consumable_order__c();
+ createIdSend.Name = 'testMing1';
+ createIdSend.Order_status__c = '鎵瑰噯';
+ createIdSend.Deliver_date__c = Date.today();
+ createIdSend.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend.Order_type__c = '璁㈠崟';
+ createIdSend.Order_ProType__c = 'ENG';
+ createIdSend.SummonsForDirction__c = '浜掔浉璋冭揣';
+ createIdSend.Order_ForDealerText__c = 'Test';
+ createIdSend.Order_ForDealer__c = accountItem1.Id;
+ createIdSend.Order_ForCustomerText__c = '';
+ createIdSend.SummonsStatus_c__c = '';
+ createIdSend.Dealer_Info__c = accountItem1.Id;
+ createIdSend.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend2 = new Consumable_order__c();
+ createIdSend2.Name = 'testMing1';
+ createIdSend2.Order_status__c = '鎵瑰噯';
+ createIdSend2.Deliver_date__c = Date.today();
+ createIdSend2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend2.Order_type__c = '璁㈠崟';
+ createIdSend2.Order_ProType__c = 'ENG';
+ createIdSend2.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ createIdSend2.Order_ForDealerText__c = '';
+ createIdSend2.Order_ForDealer__c = accountItem1.Id;
+ createIdSend2.Order_ForCustomerText__c = '';
+ createIdSend2.SummonsStatus_c__c = '浠锋牸鏈畾';
+ createIdSend2.Dealer_Info__c = accountItem1.Id;
+ createIdSend2.Delivery_detail_count__c = 5;
+ insert new List<Consumable_order__c>{ createIdSend, createIdSend1, createIdSend2 };
+
+ Consumable_orderdetails__c coc = new Consumable_orderdetails__c();
+ coc.Name = 'Too001';
+ coc.Dealer_Custom_Price__c = 999.00;
+ coc.Consumable_count__c = 3;
+ coc.Consumable_product__c = pro1.Id;
+ coc.Box_Piece__c = '鐩�';
+ coc.isOutPattern__c = true;
+ coc.Consumable_order__c = createIdSend.Id;
+ coc.Unitprice_To_agency__c = 999.00;
+ coc.Delivery_List_RMB__c = 999.00;
+ coc.Shipment_Count__c = 10000;
+ coc.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc1 = new Consumable_orderdetails__c();
+ coc1.Name = 'Too001';
+ coc1.Dealer_Custom_Price__c = 999.00;
+ coc1.Consumable_count__c = 3;
+ coc1.Consumable_product__c = pro1.Id;
+ coc1.Box_Piece__c = '鐩�';
+ coc1.isOutPattern__c = true;
+ coc1.Consumable_order__c = createIdSend.Id;
+ coc1.Unitprice_To_agency__c = 999.00;
+ coc1.Delivery_List_RMB__c = -999.00;
+ coc1.Shipment_Count__c = 10000;
+ coc1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc2 = new Consumable_orderdetails__c();
+ coc2.Name = 'Too001';
+ coc2.Dealer_Custom_Price__c = 999.00;
+ coc2.Consumable_count__c = 3;
+ coc2.Consumable_product__c = pro1.Id;
+ coc2.Box_Piece__c = '涓�';
+ coc2.isOutPattern__c = true;
+ coc2.Consumable_order__c = createIdSend.Id;
+ coc2.Unitprice_To_agency__c = 999.00;
+ coc2.Delivery_List_RMB__c = null;
+ coc2.Shipment_Count__c = 10000;
+ coc2.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc3 = new Consumable_orderdetails__c();
+ coc3.Name = 'Too001';
+ coc3.Dealer_Custom_Price__c = 999.00;
+ coc3.Consumable_count__c = 3;
+ coc3.Consumable_product__c = pro1.Id;
+ coc3.Box_Piece__c = '';
+ coc3.isOutPattern__c = true;
+ coc3.Consumable_order__c = createIdSend2.Id;
+ coc3.Unitprice_To_agency__c = 999.00;
+ coc3.Delivery_List_RMB__c = 0;
+ coc3.Shipment_Count__c = 10000;
+ coc3.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc4 = new Consumable_orderdetails__c();
+ coc4.Name = 'Too001';
+ coc4.Dealer_Custom_Price__c = 999.00;
+ coc4.Consumable_count__c = 3;
+ coc4.Consumable_product__c = pro1.Id;
+ coc4.Box_Piece__c = '';
+ coc4.isOutPattern__c = true;
+ coc4.Consumable_order__c = createIdSend2.Id;
+ coc4.Unitprice_To_agency__c = 999.00;
+ coc4.Delivery_List_RMB__c = 0;
+ coc4.Shipment_Count__c = 10000;
+ coc4.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc5 = new Consumable_orderdetails__c();
+ coc5.Name = 'Too001';
+ coc5.Dealer_Custom_Price__c = 999.00;
+ coc5.Consumable_count__c = 3;
+ coc5.Consumable_product__c = pro1.Id;
+ coc5.Box_Piece__c = '鐩�';
+ coc5.isOutPattern__c = true;
+ coc5.Consumable_order__c = createIdSend2.Id;
+ coc5.Unitprice_To_agency__c = 999.00;
+ coc5.Delivery_List_RMB__c = 100;
+ coc5.Shipment_Count__c = 10000;
+ coc5.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert new List<Consumable_orderdetails__c>{ coc, coc1, coc2, coc3, coc4, coc5 };
+
+ Consumable_order_details2__c conOrderDetail1 = new Consumable_order_details2__c();
+ conOrderDetail1.Name = 'OCM_01_001001';
+ conOrderDetail1.Consumable_ZS_order__c = createIdSend.Id;
+ conOrderDetail1.Consumable_Product__c = pro1.Id;
+ conOrderDetail1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ conOrderDetail1.Bar_Code__c = '11111';
+ conOrderDetail1.Arrive_date__c = Date.today().addDays(1);
+ conOrderDetail1.Send_Date__c = null;
+ conOrderDetail1.Used_date__c = null;
+ conOrderDetail1.Return_date__c = null;
+ conOrderDetail1.Consumable_order_minor__c = createIdSend.Id;
+ conOrderDetail1.Lose_Flag__c = false;
+ conOrderDetail1.Box_Piece__c = '鐩�';
+ insert new List<Consumable_order_details2__c>{ conOrderDetail1 };
+
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = accountId;
+ hp1.account__c = accountId;
+ hp1.product__c = pro1.Id;
+ insert new List<hospitalprice__c>{ hp1 };
+
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecordsList = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc cod = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ cod.check = true;
+ cod.oldCheck = true;
+ cod.hospitalSpecialOffer = true;
+ cod.orderdetails1 = coc;
+ cod.orderdetails2 = conOrderDetail1;
+ cod.Prod = pro1;
+ cod.Boxnumber = 0.00;
+ cod.Piecenumber = 0.00;
+ cod.allnumber = 1999.00;
+ cod.oldConsumableCount = 1999.00;
+ cod.canSelect = true;
+ cod.sortBy = true;
+ cod.packinglist = 1;
+ cod.approbation_No = '';
+ cod.expiration_Date = Date.Today();
+ cod.boxorpiecein = '';
+ cod.boxorpiece = null;
+ cod.boxorpieceMap = null;
+ cod.concc = null;
+ cod.BoxPiece = null;
+ cod.hosPro = true;
+ pageRecordsList.add(cod);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c7 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c7.check = false;
+ c7.oldCheck = true;
+ c7.hospitalSpecialOffer = false;
+ c7.orderdetails1 = coc1;
+ c7.orderdetails2 = conOrderDetail1;
+ c7.Prod = pro1;
+ c7.Boxnumber = 0.00;
+ c7.Piecenumber = 0.00;
+ c7.allnumber = 1999.00;
+ c7.oldConsumableCount = 1999.00;
+ c7.canSelect = true;
+ c7.sortBy = true;
+ c7.packinglist = 1;
+ c7.approbation_No = '';
+ c7.expiration_Date = Date.Today();
+ c7.boxorpiecein = '';
+ c7.boxorpiece = null;
+ c7.boxorpieceMap = null;
+ c7.concc = null;
+ c7.BoxPiece = null;
+ c7.hosPro = true;
+ pageRecords.add(c7);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords2 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c9 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c9.check = true;
+ c9.oldCheck = true;
+ c9.hospitalSpecialOffer = true;
+ c9.orderdetails1 = coc3;
+ c9.orderdetails2 = conOrderDetail1;
+ c9.Prod = pro1;
+ c9.Boxnumber = 0.00;
+ c9.Piecenumber = 0.00;
+ c9.allnumber = 1999.00;
+ c9.oldConsumableCount = 1999.00;
+ c9.canSelect = true;
+ c9.sortBy = true;
+ c9.packinglist = 1;
+ c9.approbation_No = '';
+ c9.expiration_Date = Date.Today();
+ c9.boxorpiecein = '';
+ c9.boxorpiece = null;
+ c9.boxorpieceMap = null;
+ c9.concc = null;
+ c9.BoxPiece = null;
+ c9.hosPro = true;
+ pageRecords2.add(c9);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords3 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c10 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c10.check = true;
+ c10.oldCheck = false;
+ c10.hospitalSpecialOffer = true;
+ c10.orderdetails1 = coc4;
+ c10.orderdetails2 = conOrderDetail1;
+ c10.Prod = pro1;
+ c10.Boxnumber = 0.00;
+ c10.Piecenumber = 0.00;
+ c10.allnumber = 1999.00;
+ c10.oldConsumableCount = 1999.00;
+ c10.canSelect = true;
+ c10.sortBy = true;
+ c10.packinglist = 1;
+ c10.approbation_No = '';
+ c10.expiration_Date = Date.Today();
+ c10.boxorpiecein = '';
+ c10.boxorpiece = null;
+ c10.boxorpieceMap = null;
+ c10.concc = null;
+ c10.BoxPiece = null;
+ c10.hosPro = true;
+ pageRecords3.add(c10);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> consumable = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi.check = true;
+ codi.oldCheck = true;
+ codi.hospitalSpecialOffer = true;
+ codi.packinglist = 0;
+ codi.approbation_No = null;
+ codi.expiration_Date = Date.Today();
+ codi.boxorpiecein = null;
+ codi.orderdetails1 = coc;
+ codi.Prod = pro1;
+ consumable.add(codi);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> consumableList = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi1 = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi1.check = false;
+ codi1.oldCheck = true;
+ codi1.hospitalSpecialOffer = false;
+ codi1.packinglist = 0;
+ codi1.approbation_No = null;
+ codi1.expiration_Date = Date.Today();
+ codi1.boxorpiecein = null;
+ codi1.orderdetails1 = coc;
+ codi1.Prod = pro1;
+ consumableList.add(codi1);
+ Integer size = Integer.valueOf(System.Label.orderdetLimitsize);
+ String ESetId = createIdSend.Id;
+ String statusEdit = 'Test';
+ String arrive = createIdSend.Id;
+ System.Test.startTest();
+ LexSummonsCreatController.firstInit(ESetId);
+ LexSummonsCreatController.init(ESetId, statusEdit, 1, 100, arrive);
+ LexSummonsCreatController.init(ESetId, null, 1, 100, arrive);
+ LexSummonsCreatController.GoodsDelivery(createIdSend2, createIdSend2.Id, pageRecords);
+ LexSummonsCreatController.save(
+ createIdSend,
+ accountId,
+ 'Test',
+ accountItem1.Id,
+ pageRecordsList,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ accountId,
+ 'Test',
+ accountItem1.Id,
+ pageRecords,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ accountId,
+ 'Test',
+ accountItem1.Id,
+ null,
+ accountId,
+ createIdSend.Id,
+ null,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ accountId,
+ 'Test',
+ accountItem1.Id,
+ pageRecords,
+ accountId,
+ null,
+ consumableList,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend2,
+ accountId,
+ 'Test',
+ null,
+ pageRecords,
+ accountId,
+ createIdSend2.Id,
+ null,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend2,
+ accountId,
+ 'Test',
+ null,
+ pageRecords2,
+ accountId,
+ createIdSend2.Id,
+ null,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend2,
+ accountId,
+ 'Test',
+ null,
+ pageRecords3,
+ accountId,
+ createIdSend2.Id,
+ null,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend1,
+ '',
+ '',
+ accountItem1.Id,
+ pageRecords3,
+ accountId,
+ createIdSend2.Id,
+ null,
+ agencyProType,
+ userWorkLocation
+ );
+ System.Test.stopTest();
+ }
+ }
+ @isTest
+ static void testAttachment() {
+ Account accountItem1;
+ Account accountItem2;
+ User userTest;
+ String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ String rectHp = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ accountItem1 = new Account(
+ Name = 'Testaccount001',
+ RecordTypeId = rectCo,
+ AgentCode_Ext__c = '9999900',
+ Contract_Decide_Start_Date__c = Date.today(),
+ ENG_Dealer__c = true
+ );
+ insert accountItem1;
+ accountItem2 = new Account(
+ Name = 'Testaccount002',
+ RecordTypeId = rectHp,
+ AgentCode_Ext__c = '9999999',
+ ParentId = accountItem1.Id
+ );
+ insert accountItem2;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountId = accountItem1.Id);
+ insert core;
+ System.runAs(new user(ID = UserInfo.getUserID())) {
+ userTest = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert userTest;
+ }
+ System.runAs(userTest) {
+ String userId = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, UserPro_Type__c, ContactId, Contact.AccountId, Contact.Account.Name, Work_Location__c
+ FROM User
+ WHERE id = :userId
+ ];
+ String accountId = thisUserInfo.accountid;
+ String accountName = thisUserInfo.Contact.Account.Name;
+ String agencyProType = thisUserInfo.UserPro_Type__c;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ thisUserInfo.UserPro_Type__c = '';
+ update thisUserInfo;
+ if (String.isBlank(thisUserInfo.UserPro_Type__c)) {
+ agencyProType = 'ET';
+ }
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ Category3__c = 'Test7',
+ Category4__c = 'Test77',
+ Category5__c = 'Test777',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07 };
+ Product2__c pro1 = new Product2__c(
+ Name = 'MH-155:鐧藉钩琛″附',
+ OT_CODE_Text__c = 'Test001',
+ Product2__c = prod07.Id,
+ Category3_text__c = 'test123',
+ Category4_text__c = 'test123',
+ Category5_text__c = 'test123'
+ );
+ insert new List<Product2__c>{ pro1 };
+ //鍙戣揣
+ Consumable_order__c createIdSend = new Consumable_order__c();
+ createIdSend.Name = 'testMing1';
+ createIdSend.Order_status__c = '鎵瑰噯';
+ createIdSend.Deliver_date__c = Date.today();
+ createIdSend.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend.Order_type__c = '璁㈠崟';
+ createIdSend.Order_ProType__c = 'ENG';
+ createIdSend.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ createIdSend.Order_ForDealerText__c = 'Test';
+ createIdSend.Order_ForCustomerText__c = 'Test';
+ createIdSend.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend.Dealer_Info__c = accountItem1.Id;
+ createIdSend.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend1 = new Consumable_order__c();
+ createIdSend1.Name = 'testMing1';
+ createIdSend1.Order_status__c = '鎵瑰噯';
+ createIdSend1.Deliver_date__c = Date.today();
+ createIdSend1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend1.Order_type__c = '璁㈠崟';
+ createIdSend1.Order_ProType__c = 'ENG';
+ createIdSend1.SummonsForDirction__c = '鍖婚櫌璇曠敤';
+ createIdSend1.Order_ForDealerText__c = 'Test';
+ createIdSend1.Order_ForCustomerText__c = '';
+ createIdSend1.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend1.Dealer_Info__c = accountItem1.Id;
+ createIdSend1.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend2 = new Consumable_order__c();
+ createIdSend2.Name = 'testMing1';
+ createIdSend2.Order_status__c = '鎵瑰噯';
+ createIdSend2.Deliver_date__c = Date.today();
+ createIdSend2.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend2.Order_type__c = '璁㈠崟';
+ createIdSend2.Order_ProType__c = 'ENG';
+ createIdSend2.SummonsForDirction__c = '浜掔浉璋冭揣';
+ createIdSend2.Order_ForDealerText__c = '';
+ createIdSend2.Order_ForCustomerText__c = 'Test';
+ createIdSend2.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend2.Dealer_Info__c = accountItem1.Id;
+ createIdSend2.Delivery_detail_count__c = 5;
+ insert new List<Consumable_order__c>{ createIdSend, createIdSend1, createIdSend2 };
+
+ Consumable_orderdetails__c coc = new Consumable_orderdetails__c();
+ coc.Name = 'Too001';
+ coc.Dealer_Custom_Price__c = 999.00;
+ coc.Consumable_count__c = 3;
+ coc.Consumable_product__c = pro1.Id;
+ coc.Box_Piece__c = '鐩�';
+ coc.isOutPattern__c = true;
+ coc.Consumable_order__c = createIdSend.Id;
+ coc.Unitprice_To_agency__c = 999.00;
+ coc.Delivery_List_RMB__c = 999.00;
+ coc.Shipment_Count__c = null;
+ coc.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc2 = new Consumable_orderdetails__c();
+ coc2.Name = 'Too001';
+ coc2.Dealer_Custom_Price__c = 999.00;
+ coc2.Consumable_count__c = 3;
+ coc2.Consumable_product__c = pro1.Id;
+ coc2.Box_Piece__c = '涓�';
+ coc2.isOutPattern__c = true;
+ coc2.Consumable_order__c = createIdSend.Id;
+ coc2.Unitprice_To_agency__c = 999.00;
+ coc2.Delivery_List_RMB__c = 0;
+ coc2.Shipment_Count__c = 0;
+ coc2.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert new List<Consumable_orderdetails__c>{ coc, coc2 };
+
+ Consumable_order_details2__c conOrderDetail1 = new Consumable_order_details2__c();
+ conOrderDetail1.Name = 'OCM_01_001001';
+ conOrderDetail1.Consumable_ZS_order__c = createIdSend.Id;
+ conOrderDetail1.Consumable_Product__c = pro1.Id;
+ conOrderDetail1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ conOrderDetail1.Bar_Code__c = '11111';
+ conOrderDetail1.Arrive_date__c = Date.today().addDays(1);
+ conOrderDetail1.Send_Date__c = null;
+ conOrderDetail1.Used_date__c = null;
+ conOrderDetail1.Return_date__c = null;
+ conOrderDetail1.Consumable_order_minor__c = createIdSend.Id;
+ conOrderDetail1.Lose_Flag__c = false;
+ conOrderDetail1.Box_Piece__c = '鐩�';
+ insert new List<Consumable_order_details2__c>{ conOrderDetail1 };
+
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = accountId;
+ hp1.account__c = accountId;
+ hp1.product__c = pro1.Id;
+ insert new List<hospitalprice__c>{ hp1 };
+
+ Attachment attach = new Attachment();
+ attach.Name = 'A-65224941-20200923--1.docx';
+ Blob bodyBlob = Blob.valueOf('Unit Test Attachment Body');
+ attach.body = bodyBlob;
+ attach.ParentId = createIdSend.id;
+ attach.ContentType = 'application/pdf';
+ insert new List<Attachment>{ attach };
+
+ System.Test.startTest();
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecordsLwcLwc = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c5 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c5.check = true;
+ c5.hospitalSpecialOffer = true;
+ c5.orderdetails1 = coc;
+ c5.allnumber = 1999.00;
+ pageRecordsLwcLwc.add(c5);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecordsList = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c8 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c8.check = true;
+ c8.hospitalSpecialOffer = true;
+ c8.orderdetails1 = coc2;
+ c8.allnumber = 1999.00;
+ pageRecordsList.add(c8);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c6 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c6.check = false;
+ c6.hospitalSpecialOffer = false;
+ c6.orderdetails1 = coc;
+ c6.allnumber = 1999.00;
+ pageRecords.add(c6);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecordsLwc = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c7 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c7.check = true;
+ c7.oldCheck = true;
+ c7.hospitalSpecialOffer = true;
+ c7.orderdetails1 = coc;
+ c7.orderdetails2 = conOrderDetail1;
+ c7.Prod = pro1;
+ c7.Boxnumber = 0.00;
+ c7.Piecenumber = 0.00;
+ c7.allnumber = 1999.00;
+ c7.oldConsumableCount = 1999.00;
+ c7.canSelect = true;
+ c7.sortBy = true;
+ c7.packinglist = 1;
+ c7.approbation_No = '';
+ c7.expiration_Date = Date.Today();
+ c7.boxorpiecein = '';
+ c7.boxorpiece = null;
+ c7.boxorpieceMap = null;
+ c7.concc = null;
+ c7.BoxPiece = null;
+ c7.hosPro = true;
+ pageRecordsLwc.add(c7);
+
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> consumable = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi.check = true;
+ codi.oldCheck = true;
+ codi.hospitalSpecialOffer = true;
+ codi.packinglist = 0;
+ codi.approbation_No = null;
+ codi.expiration_Date = Date.Today();
+ codi.boxorpiecein = null;
+ codi.orderdetails1 = coc;
+ codi.Prod = pro1;
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi1 = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi1.check = false;
+ codi1.oldCheck = true;
+ codi1.hospitalSpecialOffer = false;
+ codi1.packinglist = 0;
+ codi1.approbation_No = null;
+ codi1.expiration_Date = Date.Today();
+ codi1.boxorpiecein = null;
+ codi1.orderdetails1 = coc;
+ codi1.Prod = pro1;
+ consumable.add(codi);
+
+ Integer size = Integer.valueOf(System.Label.orderdetLimitsize);
+ String ESetId = createIdSend.Id;
+ String statusEdit = 'Test';
+ String arrive = createIdSend.Id;
+ LexSummonsCreatController.firstInit(ESetId);
+ LexSummonsCreatController.init(ESetId, statusEdit, 1, 100, arrive);
+ LexSummonsCreatController.save(
+ createIdSend,
+ 'Test',
+ 'Test',
+ 'Test',
+ pageRecordsLwc,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend1,
+ 'Test',
+ 'Test',
+ 'Test',
+ pageRecordsLwc,
+ accountId,
+ createIdSend1.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend2,
+ '',
+ '',
+ '',
+ pageRecordsLwc,
+ accountId,
+ createIdSend2.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecordsList,
+ accountId,
+ null,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.searchConsumableorderdetails(
+ agencyProType,
+ accountName,
+ userWorkLocation,
+ 'ishos',
+ 'Test07',
+ 'Test7',
+ 'Test77',
+ 'Test777',
+ true,
+ pageRecordsLwc,
+ consumable,
+ '',
+ 1,
+ 100
+ );
+ LexSummonsCreatController.ConsumableorderdetailsInfo con = new LexSummonsCreatController.ConsumableorderdetailsInfo(attach);
+ con.concc = attach;
+ con.hospitalSpecialOffer = false;
+ con.hosPro = false;
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void testSave1() {
+ Account accountItem1;
+ Account accountItem2;
+ User userTest;
+ String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ String rectHp = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ accountItem1 = new Account(
+ Name = 'Testaccount001',
+ RecordTypeId = rectCo,
+ AgentCode_Ext__c = '9999900',
+ Contract_Decide_Start_Date__c = Date.today(),
+ ENG_Dealer__c = true
+ );
+ insert accountItem1;
+ accountItem2 = new Account(
+ Name = 'Testaccount002',
+ RecordTypeId = rectHp,
+ AgentCode_Ext__c = '9999999',
+ ParentId = accountItem1.Id
+ );
+ insert accountItem2;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountId = accountItem1.Id);
+ insert core;
+ System.runAs(new user(ID = UserInfo.getUserID())) {
+ userTest = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert userTest;
+ }
+ System.runAs(userTest) {
+ String userId = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, UserPro_Type__c, ContactId, Contact.AccountId, Contact.Account.Name, Work_Location__c
+ FROM User
+ WHERE id = :userId
+ ];
+ String accountId = thisUserInfo.accountid;
+ String accountName = thisUserInfo.Contact.Account.Name;
+ String agencyProType = thisUserInfo.UserPro_Type__c;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ thisUserInfo.UserPro_Type__c = '';
+ update thisUserInfo;
+ if (String.isBlank(thisUserInfo.UserPro_Type__c)) {
+ agencyProType = 'ET';
+ }
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ Category3__c = 'Test7',
+ Category4__c = 'Test77',
+ Category5__c = 'Test777',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07 };
+ Product2__c pro1 = new Product2__c(
+ Name = 'MH-155:鐧藉钩琛″附',
+ OT_CODE_Text__c = 'Test001',
+ Product2__c = prod07.Id,
+ Category3_text__c = 'test123',
+ Category4_text__c = 'test123',
+ Category5_text__c = 'test123'
+ );
+ insert new List<Product2__c>{ pro1 };
+
+ Consumable_order__c createIdSend = new Consumable_order__c();
+ createIdSend.Name = 'testMing1';
+ createIdSend.Order_status__c = '鎵瑰噯';
+ createIdSend.Deliver_date__c = Date.today();
+ createIdSend.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend.Order_type__c = '璁㈠崟';
+ createIdSend.Order_ProType__c = 'ENG';
+ createIdSend.SummonsForDirction__c = '浜掔浉璋冭揣';
+ createIdSend.Order_ForDealerText__c = '';
+ createIdSend.Order_ForCustomerText__c = '';
+ createIdSend.SummonsStatus_c__c = '';
+ createIdSend.Dealer_Info__c = accountItem1.Id;
+ createIdSend.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend1 = new Consumable_order__c();
+ createIdSend1.Name = 'testMing1';
+ createIdSend1.Order_status__c = '鎵瑰噯';
+ createIdSend1.Deliver_date__c = Date.today();
+ createIdSend1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend1.Order_type__c = '璁㈠崟';
+ createIdSend1.Order_ProType__c = 'ENG';
+ createIdSend1.SummonsForDirction__c = '浜掔浉璋冭揣';
+ createIdSend1.Order_ForDealerText__c = '';
+ createIdSend1.Order_ForCustomerText__c = '';
+ createIdSend1.SummonsStatus_c__c = '';
+ createIdSend1.Arrive_Order__c = createIdSend.Id;
+ createIdSend1.Order_ForDealerTextID__c = accountItem1.Id;
+ createIdSend1.Dealer_Info__c = accountItem1.Id;
+ createIdSend1.Delivery_detail_count__c = 5;
+ insert new List<Consumable_order__c>{ createIdSend, createIdSend1 };
+
+ Consumable_orderdetails__c coc = new Consumable_orderdetails__c();
+ coc.Name = 'Too001';
+ coc.Dealer_Custom_Price__c = 999.00;
+ coc.Consumable_count__c = 3;
+ coc.Consumable_product__c = pro1.Id;
+ coc.Box_Piece__c = '鐩�';
+ coc.isOutPattern__c = true;
+ coc.Consumable_order__c = createIdSend.Id;
+ coc.Unitprice_To_agency__c = 999.00;
+ coc.Delivery_List_RMB__c = 999.00;
+ coc.Shipment_Count__c = null;
+ coc.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ Consumable_orderdetails__c coc1 = new Consumable_orderdetails__c();
+ coc1.Name = 'Too001';
+ coc1.Dealer_Custom_Price__c = 999.00;
+ coc1.Consumable_count__c = 3;
+ coc1.Consumable_product__c = pro1.Id;
+ coc1.Box_Piece__c = '鐩�';
+ coc1.isOutPattern__c = true;
+ coc1.Consumable_order__c = createIdSend.Id;
+ coc1.Unitprice_To_agency__c = 999.00;
+ coc1.Delivery_List_RMB__c = null;
+ coc1.Shipment_Count__c = 10000;
+ coc1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert new List<Consumable_orderdetails__c>{ coc, coc1 };
+
+ Consumable_order_details2__c conOrderDetail1 = new Consumable_order_details2__c();
+ conOrderDetail1.Name = 'OCM_01_001001';
+ conOrderDetail1.Consumable_ZS_order__c = createIdSend.Id;
+ conOrderDetail1.Consumable_Product__c = pro1.Id;
+ conOrderDetail1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ conOrderDetail1.Bar_Code__c = '11111';
+ conOrderDetail1.Arrive_date__c = Date.today().addDays(1);
+ conOrderDetail1.Send_Date__c = null;
+ conOrderDetail1.Used_date__c = null;
+ conOrderDetail1.Return_date__c = null;
+ conOrderDetail1.Consumable_order_minor__c = createIdSend.Id;
+ conOrderDetail1.Lose_Flag__c = false;
+ conOrderDetail1.Box_Piece__c = '鐩�';
+ insert new List<Consumable_order_details2__c>{ conOrderDetail1 };
+
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = accountId;
+ hp1.account__c = accountId;
+ hp1.product__c = pro1.Id;
+ insert new List<hospitalprice__c>{ hp1 };
+
+ Integer size = Integer.valueOf(System.Label.orderdetLimitsize);
+ String ESetId = createIdSend.Id;
+ String statusEdit = 'Test';
+ String arrive = createIdSend.Id;
+
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecordsLwc = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c7 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c7.check = true;
+ c7.oldCheck = true;
+ c7.hospitalSpecialOffer = true;
+ c7.orderdetails1 = coc;
+ c7.orderdetails2 = conOrderDetail1;
+ c7.Prod = pro1;
+ c7.Boxnumber = 0.00;
+ c7.Piecenumber = 0.00;
+ c7.allnumber = 1999.00;
+ c7.oldConsumableCount = 1999.00;
+ c7.canSelect = true;
+ c7.sortBy = true;
+ c7.packinglist = 1;
+ c7.approbation_No = '';
+ c7.expiration_Date = Date.Today();
+ c7.boxorpiecein = '';
+ c7.boxorpiece = null;
+ c7.boxorpieceMap = null;
+ c7.concc = null;
+ c7.BoxPiece = null;
+ c7.hosPro = true;
+ pageRecordsLwc.add(c7);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords1 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c8 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c8.check = true;
+ c8.oldCheck = true;
+ c8.hospitalSpecialOffer = true;
+ c8.orderdetails1 = coc1;
+ c8.orderdetails2 = conOrderDetail1;
+ c8.Prod = null;
+ c8.Boxnumber = 0.00;
+ c8.Piecenumber = 0.00;
+ c8.allnumber = 1999.00;
+ c8.oldConsumableCount = 1999.00;
+ c8.canSelect = true;
+ c8.sortBy = true;
+ c8.packinglist = 1;
+ c8.approbation_No = '';
+ c8.expiration_Date = Date.Today();
+ c8.boxorpiecein = '';
+ c8.boxorpiece = null;
+ c8.boxorpieceMap = null;
+ c8.concc = null;
+ c8.BoxPiece = null;
+ c8.hosPro = true;
+ pageRecords1.add(c8);
+
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> consumable = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi.check = true;
+ codi.oldCheck = true;
+ codi.hospitalSpecialOffer = true;
+ codi.packinglist = 0;
+ codi.approbation_No = null;
+ codi.expiration_Date = Date.Today();
+ codi.boxorpiecein = null;
+ codi.orderdetails1 = coc;
+ codi.Prod = pro1;
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi1 = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi1.check = false;
+ codi1.oldCheck = true;
+ codi1.hospitalSpecialOffer = false;
+ codi1.packinglist = 0;
+ codi1.approbation_No = null;
+ codi1.expiration_Date = Date.Today();
+ codi1.boxorpiecein = null;
+ codi1.orderdetails1 = coc;
+ codi1.Prod = pro1;
+ consumable.add(codi);
+ System.Test.startTest();
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecordsLwc,
+ accountId,
+ createIdSend.Id,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend1,
+ '',
+ '',
+ '',
+ pageRecordsLwc,
+ accountId,
+ null,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ LexSummonsCreatController.save(
+ createIdSend,
+ '',
+ '',
+ '',
+ pageRecords1,
+ accountId,
+ null,
+ consumable,
+ agencyProType,
+ userWorkLocation
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ static testMethod void testInnerClass() {
+ Account accountItem1;
+ Account accountItem2;
+ User userTest;
+ String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ String rectHp = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ accountItem1 = new Account(Name = 'Testaccount001', RecordTypeId = rectCo, AgentCode_Ext__c = '9999900');
+ insert accountItem1;
+ accountItem2 = new Account(
+ Name = 'Testaccount002',
+ RecordTypeId = rectHp,
+ AgentCode_Ext__c = '9999999',
+ ParentId = accountItem1.Id,
+ Contract_Decide_Start_Date__c = Date.today(),
+ ENG_Dealer__c = true,
+ BillingCity = null
+ );
+ insert accountItem2;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountId = accountItem1.Id);
+ insert core;
+ System.runAs(new user(ID = UserInfo.getUserID())) {
+ userTest = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert userTest;
+ }
+ System.runAs(userTest) {
+ String userId = UserInfo.getUserId();
+ User thisUserInfo = [
+ SELECT accountid, UserPro_Type__c, ContactId, Contact.AccountId, Contact.Account.Name, Work_Location__c
+ FROM User
+ WHERE id = :userId
+ ];
+ String accountId = thisUserInfo.accountid;
+ String accountName = thisUserInfo.Contact.Account.Name;
+ String agencyProType = thisUserInfo.UserPro_Type__c;
+ String userWorkLocation = thisUserInfo.Work_Location__c;
+ thisUserInfo.UserPro_Type__c = '';
+ update thisUserInfo;
+ if (String.isBlank(thisUserInfo.UserPro_Type__c)) {
+ agencyProType = 'ET';
+ }
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ ProductCode_Ext__c = 'Test07',
+ Category3__c = 'Test7',
+ Category4__c = 'Test77',
+ Category5__c = 'Test777',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07 };
+ Product2__c pro1 = new Product2__c(
+ Name = 'MH-155:鐧藉钩琛″附',
+ OT_CODE_Text__c = 'Test001',
+ Product2__c = prod07.Id,
+ Category3_text__c = 'test123',
+ Category4_text__c = 'test123',
+ Category5_text__c = 'test123'
+ );
+ insert new List<Product2__c>{ pro1 };
+ Consumable_order__c createIdSend = new Consumable_order__c();
+ createIdSend.Name = 'testMing1';
+ createIdSend.Order_status__c = '鎵瑰噯';
+ createIdSend.Deliver_date__c = Date.today();
+ createIdSend.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend.Order_type__c = '璁㈠崟';
+ createIdSend.Order_ProType__c = 'ENG';
+ createIdSend.SummonsForDirction__c = '娴嬭瘯0001';
+ createIdSend.Order_ForDealerText__c = 'Testaccount003';
+ createIdSend.Order_ForCustomerText__c = 'Test000';
+ createIdSend.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend.orderPattern__c = 'hospitalorder';
+ createIdSend.Dealer_Info__c = accountItem1.Id;
+ createIdSend.Delivery_detail_count__c = 5;
+
+ Consumable_order__c createIdSend3 = new Consumable_order__c();
+ createIdSend3.Name = 'testMing123456';
+ createIdSend3.Order_status__c = '鎵瑰噯';
+ createIdSend3.Deliver_date__c = Date.today();
+ createIdSend3.Arrive_Order__c = createIdSend.Id;
+ createIdSend3.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ createIdSend3.Order_type__c = '璁㈠崟';
+ createIdSend3.Order_ProType__c = 'ENG';
+ createIdSend3.SummonsForDirction__c = '浜掔浉璋冭揣';
+ createIdSend3.Order_ForDealerText__c = '';
+ createIdSend3.Order_ForCustomerText__c = 'Test001';
+ createIdSend3.SummonsStatus_c__c = '鎵瑰噯';
+ createIdSend3.Dealer_Info__c = accountItem1.Id;
+ createIdSend3.Delivery_detail_count__c = 5;
+ //鍒拌揣
+ Consumable_order__c createIdArrived = new Consumable_order__c();
+ createIdArrived.Name = 'testMing2';
+ createIdArrived.Order_status__c = '鎵瑰噯';
+ createIdArrived.Deliver_date__c = Date.today();
+ createIdArrived.RecordTypeid = System.Label.RT_ConOrder_Arrive;
+ createIdArrived.Order_type__c = '璁㈠崟';
+ createIdArrived.Order_ProType__c = 'ET';
+ createIdArrived.Arrive_Order__c = createIdSend.Id;
+ createIdArrived.SummonsStatus_c__c = '宸叉彁浜�';
+ createIdArrived.orderPattern__c = 'promotionorder';
+ createIdArrived.Dealer_Info__c = accountItem1.Id;
+ createIdArrived.Delivery_detail_count__c = 5;
+ insert new List<Consumable_order__c>{ createIdSend, createIdSend3, createIdArrived };
+
+ Consumable_orderdetails__c coc = new Consumable_orderdetails__c();
+ coc.Name = 'Too001';
+ coc.Dealer_Custom_Price__c = 999.00;
+ coc.Consumable_count__c = 3;
+ coc.Consumable_product__c = pro1.Id;
+ coc.Box_Piece__c = '鐩�';
+ coc.isOutPattern__c = true;
+ coc.Consumable_order__c = createIdSend.Id;
+ coc.Unitprice_To_agency__c = 999.00;
+ coc.Delivery_List_RMB__c = -999.00;
+ coc.Shipment_Count__c = 9999.00;
+ coc.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+
+ Consumable_orderdetails__c coc1 = new Consumable_orderdetails__c();
+ coc1.Name = 'Too001';
+ coc1.Dealer_Custom_Price__c = 999.00;
+ coc1.Consumable_count__c = 3;
+ coc1.Consumable_product__c = pro1.Id;
+ coc1.Box_Piece__c = '鐩�';
+ coc1.isOutPattern__c = true;
+ coc1.Consumable_order__c = createIdSend3.Id;
+ coc1.Unitprice_To_agency__c = 999.00;
+ coc1.Delivery_List_RMB__c = 999.00;
+ coc1.Shipment_Count__c = 9999.00;
+ coc1.RecordTypeid = System.Label.RT_ConOrderDetail1_Order;
+ insert new List<Consumable_orderdetails__c>{ coc, coc1 };
+
+ Consumable_order_details2__c conOrderDetail1 = new Consumable_order_details2__c();
+ conOrderDetail1.Name = 'OCM_01_001001';
+ conOrderDetail1.Consumable_ZS_order__c = createIdSend.Id;
+ conOrderDetail1.Consumable_Product__c = pro1.Id;
+ conOrderDetail1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ conOrderDetail1.Bar_Code__c = '11111';
+ conOrderDetail1.Arrive_date__c = Date.today().addDays(1);
+ conOrderDetail1.Send_Date__c = null;
+ conOrderDetail1.Used_date__c = null;
+ conOrderDetail1.Return_date__c = null;
+ conOrderDetail1.Consumable_Arrived_order__c = createIdSend.Id;
+ conOrderDetail1.Consumable_order_minor__c = createIdSend.Id;
+ conOrderDetail1.Lose_Flag__c = false;
+ conOrderDetail1.Cancellation_Flag__c = false;
+ conOrderDetail1.exchangeOutPattern__c = true;
+ conOrderDetail1.Box_Piece__c = '鐩�';
+ conOrderDetail1.Sterilization_limit__c = Date.Today();
+
+ Consumable_order_details2__c conOrderDetail2 = new Consumable_order_details2__c();
+ conOrderDetail2.Name = 'OCM_01_001002';
+ conOrderDetail2.Consumable_ZS_order__c = createIdArrived.Id;
+ conOrderDetail2.Consumable_Product__c = pro1.Id;
+ conOrderDetail2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ conOrderDetail2.Bar_Code__c = '22222';
+ conOrderDetail2.Arrive_date__c = Date.today().addDays(1);
+ conOrderDetail2.Send_Date__c = null;
+ conOrderDetail2.Used_date__c = null;
+ conOrderDetail2.Return_date__c = null;
+ conOrderDetail2.Consumable_Arrived_order__c = createIdArrived.Id;
+ conOrderDetail2.Consumable_order_minor__c = createIdArrived.Id;
+ conOrderDetail2.Lose_Flag__c = false;
+ conOrderDetail2.exchangeOutPattern__c = false;
+ conOrderDetail2.Cancellation_Flag__c = false;
+ conOrderDetail2.Box_Piece__c = '涓�';
+ conOrderDetail2.Sterilization_limit__c = Date.Today();
+ insert new List<Consumable_order_details2__c>{ conOrderDetail1, conOrderDetail2 };
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c6 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c6.check = true;
+ c6.oldCheck = true;
+ c6.hospitalSpecialOffer = true;
+ c6.orderdetails1 = coc1;
+ c6.orderdetails2 = conOrderDetail1;
+ c6.Prod = pro1;
+ c6.Boxnumber = 0.00;
+ c6.Piecenumber = 0.00;
+ c6.allnumber = 1999.00;
+ c6.oldConsumableCount = 1999.00;
+ c6.canSelect = true;
+ c6.sortBy = true;
+ c6.packinglist = 1;
+ c6.approbation_No = '';
+ c6.expiration_Date = Date.Today();
+ c6.boxorpiecein = '';
+ c6.boxorpiece = null;
+ c6.boxorpieceMap = null;
+ c6.concc = null;
+ c6.BoxPiece = null;
+ c6.hosPro = true;
+ pageRecords.add(c6);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pageRecords1 = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc c111 = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ c111.check = true;
+ c111.oldCheck = true;
+ c111.hospitalSpecialOffer = false;
+ c111.orderdetails1 = coc1;
+ c111.orderdetails2 = conOrderDetail1;
+ c111.Prod = pro1;
+ c111.Boxnumber = 0.00;
+ c111.Piecenumber = 0.00;
+ c111.allnumber = 1999.00;
+ c111.oldConsumableCount = 1999.00;
+ c111.canSelect = true;
+ c111.sortBy = true;
+ c111.packinglist = 1;
+ c111.approbation_No = '';
+ c111.expiration_Date = Date.Today();
+ c111.boxorpiecein = '';
+ c111.boxorpiece = null;
+ c111.boxorpieceMap = null;
+ c111.concc = null;
+ c111.BoxPiece = null;
+ c111.hosPro = true;
+ pageRecords1.add(c111);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> consumable = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi.check = true;
+ codi.hospitalSpecialOffer = true;
+ codi.packinglist = 0;
+ codi.approbation_No = null;
+ codi.expiration_Date = Date.Today();
+ codi.boxorpiecein = null;
+ codi.orderdetails1 = coc;
+ codi.Prod = pro1;
+ consumable.add(codi);
+ System.Test.startTest();
+ LexSummonsCreatController.init(null, 'Test', 1, 100, createIdArrived.Id);
+ LexSummonsCreatController.init(null, 'Test', 1, 100, null);
+ LexSummonsCreatController.init(null, null, 1, 100, createIdArrived.Id);
+ LexSummonsCreatController.categoryAllload('Test7');
+ LexSummonsCreatController.categoryload('Test7', 'Test77');
+ LexSummonsCreatController.searchConsumableorderdetails(
+ 'ET',
+ 'Testaccount001',
+ '鍖椾含',
+ 'ishos',
+ 'Test07',
+ 'Test7',
+ 'Test77',
+ 'Test777',
+ true,
+ pageRecords,
+ consumable,
+ '',
+ 1,
+ 1
+ );
+ LexSummonsCreatController.searchConsumableorderdetails(
+ 'ET',
+ 'Testaccount001',
+ '鍖椾含',
+ 'nothos',
+ 'Test07',
+ 'Test7',
+ 'Test77',
+ 'Test777',
+ true,
+ pageRecords,
+ consumable,
+ '',
+ 1,
+ 1
+ );
+ LexSummonsCreatController.searchConsumableorderdetails(
+ 'ET',
+ 'Testaccount001',
+ '鍖椾含',
+ 'ishos',
+ 'Test07',
+ 'Test7',
+ 'Test77',
+ 'Test777',
+ true,
+ pageRecords1,
+ consumable,
+ '',
+ 1,
+ 1
+ );
+ LexSummonsCreatController.searchConsumableorderdetails(
+ 'ET',
+ 'Testaccount001',
+ '鍖椾含',
+ 'nothos',
+ 'Test07',
+ 'Test7',
+ 'Test77',
+ 'Test777',
+ true,
+ pageRecords1,
+ consumable,
+ '',
+ 1,
+ 1
+ );
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> cro = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ cro.sort();
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void saveMethodTest1() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account myAccount2 = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = myAccount2.Id;
+ hp1.account__c = myAccount1.Id;
+ insert hp1;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET',
+ Work_Location__c = '鍖椾含'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'N3047730', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c Order0 = new Consumable_order__c();
+ Order0.Name = 'OCM_01_000';
+ Order0.Order_status__c = '鎵瑰噯';
+ Order0.Order_type__c = '璁㈠崟';
+ Order0.Dealer_Info__c = myAccount1.id;
+ Order0.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order0.Order_ProType__c = 'ET';
+ insert Order0;
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ Order1.OutPattern__c = true;
+ Order1.Arrive_Order__c = Order0.Id;
+ insert Order1;
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ Orderdet.Shipment_Count__c = 10;
+ Orderdet.isOutPattern__c = true;
+ Orderdet.Delivery_List_RMB__c = 100;
+ Orderdet.Box_Piece__c = '鐩�';
+ insert Orderdet;
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.Cancellation_Date__c = null;
+ Orderdet1.TracingCode__c = 'BXJRF';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.exchangeOutPattern__c = true;
+ Orderdet1.Consumable_ZS_order__c = Order1.Id;
+ Orderdet1.Box_Piece__c = '鐩�';
+ insert Orderdet1;
+ System.Test.startTest();
+ LexSummonsCreatController.init(Order1.Id, 'edit', 10, 1, '');
+ List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc> pList = new List<LexSummonsCreatController.ConsumableorderdetailsInfoLwc>();
+ LexSummonsCreatController.ConsumableorderdetailsInfoLwc p = new LexSummonsCreatController.ConsumableorderdetailsInfoLwc();
+ p.check = true;
+ p.oldcheck = true;
+ p.hospitalSpecialOffer = true;
+ p.orderdetails1 = Orderdet;
+ p.orderdetails2 = Orderdet1;
+ p.Prod = pro1;
+ p.Boxnumber = 2;
+ p.Piecenumber = 2;
+ pList.add(p);
+ List<LexSummonsCreatController.ConsumableorderdetailsInfo> consumable = new List<LexSummonsCreatController.ConsumableorderdetailsInfo>();
+ LexSummonsCreatController.ConsumableorderdetailsInfo codi = new LexSummonsCreatController.ConsumableorderdetailsInfo();
+ codi.check = true;
+ codi.hospitalSpecialOffer = true;
+ codi.packinglist = 0;
+ codi.approbation_No = null;
+ codi.expiration_Date = Date.Today();
+ codi.boxorpiecein = null;
+ codi.orderdetails1 = Orderdet;
+ codi.orderdetails2 = Orderdet1;
+ codi.Prod = pro1;
+ consumable.add(codi);
+ LexSummonsCreatController.coc.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ LexSummonsCreatController.coc.Order_ForCustomerText__c = '娑堝寲绉�';
+ LexSummonsCreatController.save(
+ LexSummonsCreatController.coc,
+ myAccount2.Id,
+ myAccount2.Name,
+ '',
+ pList,
+ myAccount1.Id,
+ '',
+ consumable,
+ 'ET',
+ ''
+ );
+ Orderdet.Box_Piece__c = '涓�';
+ LexSummonsCreatController.save(
+ LexSummonsCreatController.coc,
+ myAccount2.Id,
+ myAccount2.Name,
+ '',
+ pList,
+ myAccount1.Id,
+ '',
+ consumable,
+ 'ET',
+ ''
+ );
+ p.Piecenumber = 20;
+ LexSummonsCreatController.save(
+ LexSummonsCreatController.coc,
+ myAccount2.Id,
+ myAccount2.Name,
+ '',
+ pList,
+ myAccount1.Id,
+ '',
+ consumable,
+ 'ET',
+ ''
+ );
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void initMethodTest1() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account myAccount2 = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = myAccount2.Id;
+ hp1.account__c = myAccount1.Id;
+ insert hp1;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET',
+ Work_Location__c = '鍖椾含'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'N3047730', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c Order0 = new Consumable_order__c();
+ Order0.Name = 'OCM_01_000';
+ Order0.Order_status__c = '鎵瑰噯';
+ Order0.Order_type__c = '璁㈠崟';
+ Order0.Dealer_Info__c = myAccount1.id;
+ Order0.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order0.Order_ProType__c = 'ET';
+ insert Order0;
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '浼犵エ';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order1.Order_ProType__c = 'ET';
+ Order1.OutPattern__c = true;
+ Order1.Arrive_Order__c = Order0.Id;
+ Order1.SummonsStatus_c__c = '宸叉彁浜�';
+ Order1.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ insert Order1;
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order1.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ Orderdet.Shipment_Count__c = 10;
+ Orderdet.isOutPattern__c = true;
+ Orderdet.Delivery_List_RMB__c = 100;
+ Orderdet.Box_Piece__c = '鐩�';
+ insert Orderdet;
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.Cancellation_Date__c = null;
+ Orderdet1.TracingCode__c = 'BXJRF';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.exchangeOutPattern__c = true;
+ Orderdet1.Consumable_ZS_order__c = Order1.Id;
+ Orderdet1.Box_Piece__c = '鐩�';
+ insert Orderdet1;
+ System.Test.startTest();
+ LexSummonsCreatController.init(Order1.Id, 'edit', 10, 1, '');
+ System.Test.stopTest();
+ }
+ }
+
+ @isTest
+ static void initMethodTest2() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account myAccount2 = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ Account myAccount1 = new Account(name = 'Testaccount001', Dealer_discount__c = 30, RecordTypeId = rectCo[0].Id);
+ insert new List<account>{ myAccount1, myAccount2 };
+ hospitalprice__c hp1 = new hospitalprice__c();
+ hp1.hospital__c = myAccount2.Id;
+ hp1.account__c = myAccount1.Id;
+ insert hp1;
+ Contact core = new Contact(email = 'jplumber@salesforce.com', firstname = 'Joe', lastname = 'Plumber', accountid = myAccount1.id);
+ insert core;
+ user MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ET'
+ );
+ System.runAs(new User(Id = UserInfo.getUserId())) {
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200311',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ JANCODE__c = '04953170200312',
+ Dealer_special_Object__c = true,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'N3047730', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'N3047731', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Consumable_order__c Order0 = new Consumable_order__c();
+ Order0.Name = 'OCM_01_000';
+ Order0.Order_status__c = '鎵瑰噯';
+ Order0.Order_type__c = '璁㈠崟';
+ Order0.Dealer_Info__c = myAccount1.id;
+ Order0.RecordTypeid = System.Label.RT_ConOrder_Delivery;
+ Order0.Order_ProType__c = 'ET';
+ insert Order0;
+
+ Consumable_order__c Order1 = new Consumable_order__c();
+ Order1.Name = 'OCM_01_001';
+ Order1.Order_status__c = '鎵瑰噯';
+ Order1.Order_type__c = '璁㈠崟';
+ Order1.Dealer_Info__c = myAccount1.id;
+ Order1.RecordTypeid = System.Label.RT_ConOrder_Arrive;
+ Order1.Order_ProType__c = 'ET';
+ Order1.OutPattern__c = true;
+ Order1.Arrive_Order__c = Order0.Id;
+ Order1.SummonsStatus_c__c = '宸叉彁浜�';
+ Order1.SummonsForDirction__c = '鐩存帴閿�鍞粰鍖婚櫌';
+ insert Order1;
+ Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c();
+ Orderdet.Name = 'OCM_01_00101';
+ Orderdet.Consumable_order__c = Order0.Id;
+ Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order;
+ Orderdet.Consumable_Product__c = pro1.Id;
+ Orderdet.Consumable_count__c = 4;
+ Orderdet.Shipment_Count__c = 10;
+ Orderdet.isOutPattern__c = true;
+ Orderdet.Delivery_List_RMB__c = 100;
+ Orderdet.Box_Piece__c = '鐩�';
+ insert Orderdet;
+ Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
+ Orderdet1.Name = 'OCM_01_001001';
+ Orderdet1.Consumable_order_minor__c = Order1.Id;
+ Orderdet1.Consumable_Product__c = pro1.Id;
+ Orderdet1.Asset_Model_No__c = 'Test01';
+ Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
+ Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF';
+ Orderdet1.Cancellation_Date__c = null;
+ Orderdet1.TracingCode__c = 'BXJRF';
+ Orderdet1.SerialLotNo__c = '5ZK';
+ Orderdet1.Arrive_date__c = Date.today();
+ Orderdet1.exchangeOutPattern__c = true;
+ Orderdet1.Consumable_ZS_order__c = Order1.Id;
+ Orderdet1.Box_Piece__c = '鐩�';
+ Orderdet1.Sterilization_limit__c = Date.today().addDays(2);
+ insert Orderdet1;
+ System.Test.startTest();
+ LexSummonsCreatController.init('', 'edit', 10, 1, Order1.Id);
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexSummonsCreatControllerTest.cls-meta.xml b/force-app/main/default/classes/LexSummonsCreatControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexSummonsCreatControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexTopPageControllerTest.cls b/force-app/main/default/classes/LexTopPageControllerTest.cls
new file mode 100644
index 0000000..4a5f5d0
--- /dev/null
+++ b/force-app/main/default/classes/LexTopPageControllerTest.cls
@@ -0,0 +1,424 @@
+@IsTest
+private class LexTopPageControllerTest {
+ @IsTest
+ static void testMethod1() {
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ Test.startTest();
+ System.runAs(currentUser) {
+ LexTopPageController.initAgency();
+ LexTopPageController.initPage(20, 1);
+ }
+ Test.stopTest();
+ }
+
+ @IsTest
+ static void testMethod2() {
+ user MyUser_Test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888',
+ Product_Limit_Date__c = 'Test07|3|100,Test08|10|50'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ //浜у搧鏁版嵁
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod08 = new Product2(
+ Name = 'Test08',
+ ProductCode = 'Test08',
+ Asset_Model_No__c = 'Test08',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod09 = new Product2(
+ Name = 'Test09',
+ ProductCode = 'Test09',
+ Asset_Model_No__c = 'Test09',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07, prod08, prod09 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod07.Id);
+ insert proG;
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod08.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod09.Id);
+ insert proF;
+
+ //璁㈠崟
+ Consumable_order__c order = new Consumable_order__c();
+ order.Name = 'testMing';
+ order.Order_status__c = '鎵瑰噯';
+ order.RecordTypeid = System.Label.RT_ConOrder_Order;
+ order.Dealer_Info__c = myAccount1.id;
+ order.Inventory_date__c = Date.today();
+ order.Order_type__c = '璁㈠崟';
+ order.Order_ProType__c = 'ET';
+ insert order;
+ //鍒拌揣
+ Consumable_order__c order2 = new Consumable_order__c();
+ order2.Name = 'testMing1';
+ order2.Order_status__c = '鎵瑰噯';
+ order2.RecordTypeid = '01210000000c9dqAAA';
+ order2.Dealer_Info__c = myAccount1.id;
+ order2.Order_type__c = '鍒拌揣';
+ order2.Order_ProType__c = 'ET';
+ insert order2;
+
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+ //鍒朵綔Consumable_order_details__c-------ProductCount
+ // 閿�鍞�
+ Consumable_order_details2__c dataForProductCount7 = new Consumable_order_details2__c();
+ dataForProductCount7.Bar_Code__c = '123456789298k250AAAAA';
+ dataForProductCount7.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount7.Arrive_date__c = Date.today();
+ dataForProductCount7.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount7.Consumable_Product__c = proH.id;
+ dataForProductCount7.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount7.Box_Piece__c = '鐩�';
+ dataForProductCount7.Used_date__c = Date.today();
+ dataForProductCount7.Consumable_order_minor__c = order.id;
+
+ conList.add(dataForProductCount7);
+ // 鍦ㄥ簱 杩囨湡 鐩�
+ Consumable_order_details2__c dataForProduct = new Consumable_order_details2__c();
+ dataForProduct.Bar_Code__c = '123456789498k250BBBBB';
+ dataForProduct.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProduct.Arrive_date__c = Date.today();
+ dataForProduct.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProduct.Consumable_Product__c = proF.id;
+ dataForProduct.Asset_Model_No__c = proF.Asset_Model_No__c;
+ dataForProduct.Box_Piece__c = '鐩�';
+ dataForProduct.Consumable_order_minor__c = order.id;
+
+ conList.add(dataForProduct);
+ // 鍦ㄥ簱 杩囨湡 涓�
+ Consumable_order_details2__c dataForProductCount3 = new Consumable_order_details2__c();
+ dataForProductCount3.Bar_Code__c = '123456788398k250CCCCC';
+ dataForProductCount3.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount3.Arrive_date__c = Date.today();
+ dataForProductCount3.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount3.Consumable_Product__c = proG.id;
+ dataForProductCount3.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount3.Box_Piece__c = '涓�';
+ dataForProductCount3.RemoveBox_No__c = 1;
+ dataForProductCount3.Consumable_order_minor__c = order.id;
+ conList.add(dataForProductCount3);
+ insert conList;
+
+ //杩囨湡搴撳瓨姹囨�讳俊鎭� add by Wang Xueqin
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ Consumable_order_details2__c dataForProductCount4 = new Consumable_order_details2__c();
+ dataForProductCount4.Bar_Code__c = '1001';
+ dataForProductCount4.Arrive_date__c = Date.today();
+ dataForProductCount4.Send_Date__c = null;
+ dataForProductCount4.Used_date__c = null;
+ dataForProductCount4.Return_date__c = null;
+ dataForProductCount4.Lose_Flag__c = false;
+ dataForProductCount4.Cancellation_Flag__c = false;
+ dataForProductCount4.Consumable_Product__c = proG.Id;
+ dataForProductCount4.Consumable_Arrived_order__c = order2.id;
+ dataForProductCount4.Used_account__c = myAccount1.Id;
+ dataForProductCount4.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount4.Box_Piece__c = '鐩�';
+ conList1.add(dataForProductCount4);
+ System.debug('conList1==>' + conList1);
+ //鏌ヨ鎵�鏈夎繃鏈熷簱瀛�
+ Consumable_order_details2__c dataForProductCount5 = new Consumable_order_details2__c();
+ dataForProductCount5.Bar_Code__c = '1002';
+ dataForProductCount5.Arrive_date__c = Date.today();
+ dataForProductCount5.Send_Date__c = Date.today();
+ dataForProductCount5.Used_date__c = Date.today();
+ dataForProductCount5.Return_date__c = null;
+ dataForProductCount5.Lose_Flag__c = false;
+ dataForProductCount5.Cancellation_Flag__c = false;
+ dataForProductCount5.Consumable_Product__c = proG.Id;
+ dataForProductCount5.Consumable_Arrived_order__c = order2.id;
+ dataForProductCount5.Used_account__c = myAccount1.Id;
+ dataForProductCount5.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount5.Box_Piece__c = '鐩�';
+ conList1.add(dataForProductCount5);
+ insert conList1;
+ Test.startTest();
+ LexTopPageController.initAgency();
+ LexTopPageController.initPage(20, 1);
+ Test.stopTest();
+ }
+ }
+
+ @IsTest
+ static void testMethod3() {
+ user MyUser_Test;
+ Account myAccount1;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ System.runAs(thisUser) {
+ Profile prof1 = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
+
+ RecordType rectCoO = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
+ insert olympus;
+ myAccount1 = new Account(
+ name = 'Testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ AgentCode_Ext__c = '8888888'
+ );
+ insert myAccount1;
+ Contact core = new Contact(
+ email = 'jplumber@salesforce.com',
+ firstname = 'Joe',
+ lastname = 'Plumber',
+ accountid = myAccount1.id
+ );
+ insert core;
+ MyUser_Test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof1.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ Work_Location__c = '閲嶅簡'
+ );
+ insert MyUser_Test;
+ }
+
+ System.runAs(MyUser_Test) {
+ //浜у搧鏁版嵁
+ Product2 prod07 = new Product2(
+ Name = 'Test07',
+ ProductCode = 'Test07',
+ Asset_Model_No__c = 'Test07',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod08 = new Product2(
+ Name = 'Test08',
+ ProductCode = 'Test08',
+ Asset_Model_No__c = 'Test08',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ Product2 prod09 = new Product2(
+ Name = 'Test09',
+ ProductCode = 'Test09',
+ Asset_Model_No__c = 'Test09',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ Packing_list_manual__c = 1,
+ Manual_Entry__c = false
+ );
+ insert new List<Product2>{ prod07, prod08, prod09 };
+
+ //鍒朵綔浜у搧
+ Product2__c proG = new Product2__c(Name = 'MH-155:鐧藉钩琛″附', OT_CODE_Text__c = 'Test001', Product2__c = prod07.Id);
+ insert proG;
+ Product2__c proH = new Product2__c(Name = 'MB-677:BNC鐢电紗', OT_CODE_Text__c = 'Test002', Product2__c = prod08.Id);
+ insert proH;
+ Product2__c proF = new Product2__c(Name = 'TooMAJ-643R:姘村泭闉樼003', OT_CODE_Text__c = 'Test003', Product2__c = prod09.Id);
+ insert proF;
+
+ //璁㈠崟
+ Consumable_order__c order = new Consumable_order__c();
+ order.Name = 'testMing';
+ order.Order_status__c = '鎵瑰噯';
+ order.RecordTypeid = System.Label.RT_ConOrder_Order;
+ order.Dealer_Info__c = myAccount1.id;
+ order.Inventory_date__c = Date.today();
+ order.Order_type__c = '璁㈠崟';
+ order.Order_ProType__c = 'ET';
+ insert order;
+ //鍒拌揣
+ Consumable_order__c order2 = new Consumable_order__c();
+ order2.Name = 'testMing1';
+ order2.Order_status__c = '鎵瑰噯';
+ order2.RecordTypeid = '01210000000c9dqAAA';
+ order2.Dealer_Info__c = myAccount1.id;
+ order2.Order_type__c = '鍒拌揣';
+ order2.Order_ProType__c = 'ET';
+ insert order2;
+
+ List<Consumable_order_details2__c> conList = new List<Consumable_order_details2__c>();
+ //鍒朵綔Consumable_order_details__c-------ProductCount
+ // 閿�鍞�
+ Consumable_order_details2__c dataForProductCount7 = new Consumable_order_details2__c();
+ dataForProductCount7.Bar_Code__c = '123456789298k250AAAAA';
+ dataForProductCount7.Sterilization_limit__c = Date.today().addDays(2);
+ dataForProductCount7.Arrive_date__c = Date.today();
+ dataForProductCount7.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount7.Consumable_Product__c = proH.id;
+ dataForProductCount7.Asset_Model_No__c = proH.Asset_Model_No__c;
+ dataForProductCount7.Box_Piece__c = '涓�';
+ dataForProductCount7.Used_date__c = Date.today();
+ dataForProductCount7.Consumable_order_minor__c = order.id;
+
+ conList.add(dataForProductCount7);
+ // 鍦ㄥ簱 杩囨湡 鐩�
+ Consumable_order_details2__c dataForProduct = new Consumable_order_details2__c();
+ dataForProduct.Bar_Code__c = '123456789498k250BBBBB';
+ dataForProduct.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProduct.Arrive_date__c = Date.today();
+ dataForProduct.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProduct.Consumable_Product__c = proF.id;
+ dataForProduct.Asset_Model_No__c = proF.Asset_Model_No__c;
+ dataForProduct.Box_Piece__c = '涓�';
+ dataForProduct.Consumable_order_minor__c = order.id;
+
+ conList.add(dataForProduct);
+ // 鍦ㄥ簱 杩囨湡 涓�
+ Consumable_order_details2__c dataForProductCount3 = new Consumable_order_details2__c();
+ dataForProductCount3.Bar_Code__c = '123456788398k250CCCCC';
+ dataForProductCount3.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount3.Arrive_date__c = Date.today();
+ dataForProductCount3.RecordTypeid = System.Label.RT_ConOrderDetail2_Delivery;
+ dataForProductCount3.Consumable_Product__c = proG.id;
+ dataForProductCount3.Asset_Model_No__c = proG.Asset_Model_No__c;
+ dataForProductCount3.Box_Piece__c = '涓�';
+ dataForProductCount3.RemoveBox_No__c = 1;
+ dataForProductCount3.Consumable_order_minor__c = order.id;
+ conList.add(dataForProductCount3);
+ insert conList;
+
+ //杩囨湡搴撳瓨姹囨�讳俊鎭� add by Wang Xueqin
+ List<Consumable_order_details2__c> conList1 = new List<Consumable_order_details2__c>();
+ Consumable_order_details2__c dataForProductCount4 = new Consumable_order_details2__c();
+ dataForProductCount4.Bar_Code__c = '1001';
+ dataForProductCount4.Arrive_date__c = Date.today();
+ dataForProductCount4.Send_Date__c = null;
+ dataForProductCount4.Used_date__c = null;
+ dataForProductCount4.Return_date__c = null;
+ dataForProductCount4.Lose_Flag__c = false;
+ dataForProductCount4.Cancellation_Flag__c = false;
+ dataForProductCount4.Consumable_Product__c = proG.Id;
+ dataForProductCount4.Consumable_Arrived_order__c = order2.id;
+ dataForProductCount4.Used_account__c = myAccount1.Id;
+ dataForProductCount4.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount4.Box_Piece__c = '涓�';
+ conList1.add(dataForProductCount4);
+ System.debug('conList1==>' + conList1);
+ //鏌ヨ鎵�鏈夎繃鏈熷簱瀛�
+ Consumable_order_details2__c dataForProductCount5 = new Consumable_order_details2__c();
+ dataForProductCount5.Bar_Code__c = '1002';
+ dataForProductCount5.Arrive_date__c = Date.today();
+ dataForProductCount5.Send_Date__c = Date.today();
+ dataForProductCount5.Used_date__c = Date.today();
+ dataForProductCount5.Return_date__c = null;
+ dataForProductCount5.Lose_Flag__c = false;
+ dataForProductCount5.Cancellation_Flag__c = false;
+ dataForProductCount5.Consumable_Product__c = proG.Id;
+ dataForProductCount5.Consumable_Arrived_order__c = order2.id;
+ dataForProductCount5.Used_account__c = myAccount1.Id;
+ dataForProductCount5.Sterilization_limit__c = Date.today().addDays(-2);
+ dataForProductCount5.Box_Piece__c = '涓�';
+ conList1.add(dataForProductCount5);
+ insert conList1;
+ Test.startTest();
+ LexTopPageController.initAgency();
+ LexTopPageController.initPage(20, 1);
+ LexTopPageController.ConsumableorderdetailsInfo c1 = new LexTopPageController.ConsumableorderdetailsInfo(proG);
+ c1.allnumber = 10;
+ LexTopPageController.ConsumableorderdetailsInfo c2 = new LexTopPageController.ConsumableorderdetailsInfo(proH);
+ c2.allnumber = 20;
+ c1.compareTo(c2);
+ c1.allnumber = 20;
+ c2.allnumber = 10;
+ c1.compareTo(c2);
+ Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/LexTopPageControllerTest.cls-meta.xml b/force-app/main/default/classes/LexTopPageControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexTopPageControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexUpAccountProLimit.cls b/force-app/main/default/classes/LexUpAccountProLimit.cls
index c7288c6..37d85bc 100644
--- a/force-app/main/default/classes/LexUpAccountProLimit.cls
+++ b/force-app/main/default/classes/LexUpAccountProLimit.cls
@@ -1,57 +1,56 @@
public without sharing class LexUpAccountProLimit {
@AuraEnabled
- public static ResponseBodyLWC upAccount(String accountId,String productLimit,String userPro_Type){
+ public static ResponseBodyLWC upAccount(String accountId, String productLimit, String userPro_Type) {
ResponseBodyLWC res = new ResponseBodyLWC();
- Map<String,object> data = new Map<String,object>();
+ Map<String, object> data = new Map<String, object>();
res.entity = data;
//--------AddStart-----XHL--------------20180929-------------
Boolean EngFlag = false;
- Boolean ETFlag = false;
- String userPro_Typestr = null;
- if(String.isBlank(userPro_Type)){
+ Boolean ETFlag = false;
+ String userPro_Typestr = null;
+ if (String.isBlank(userPro_Type)) {
userPro_Type = 'ET';
}
- if(userPro_Type == 'ENG'){
+ if (userPro_Type == 'ENG') {
EngFlag = true;
- }else{
+ } else {
ETFlag = true;
}
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'userPro_Type:'+ userPro_Type));
//ApexPages.message(ApexPages.severity.ERROR,'userPro_Type:'+ userPro_Type));
userPro_Typestr = '%' + userPro_Type + '%';
- //--------AddEnd-----XHL--------------20180929-------------
+ //--------AddEnd-----XHL--------------20180929-------------
system.debug('userPro_Type' + userPro_Type);
- String checkResoultstr = checkResoult(productLimit);
- system.debug('checkResoultstr====>'+checkResoultstr);
- if(String.isNotBlank(checkResoultstr)){
- return new ResponseBodyLWC('Error',500,''+checkResoultstr+'', '');
+ String checkResoultstr = checkResoult(productLimit);
+ system.debug('checkResoultstr====>' + checkResoultstr);
+ system.debug('accountId' + accountId);
+ if (String.isNotBlank(checkResoultstr)) {
+ return new ResponseBodyLWC('Error', 500, '' + checkResoultstr + '', '');
// return checkResoultstr;
}
//String[] proidList =new String[]{};
- String[] proList =new String[]{};
- String[] pro_List =new String[]{};
+ String[] proList = new List<String>{};
+ String[] pro_List = new List<String>{};
List<Account> acc = [
- SELECT
- Id,
- Name,
- Product_Limit_Date__c
- FROM
- Account
- WHERE
- Id = : accountId
+ SELECT Id, Name, Product_Limit_Date__c
+ FROM Account
+ WHERE Id = :accountId
FOR UPDATE
];
- if(null == acc || acc.size() == 0) {
+ if (null == acc || acc.size() == 0) {
// return '娌℃湁缁忛攢鍟嗭細' + accountId + '鐨勬暟鎹��';
- return new ResponseBodyLWC('Error',500,'娌℃湁缁忛攢鍟嗭細' + accountId + '鐨勬暟鎹�', '');
+ return new ResponseBodyLWC('Error', 500, '娌℃湁缁忛攢鍟嗭細' + accountId + '鐨勬暟鎹��', '');
}
//proidList = acc[0].view_product__c.split(',');
//--------UpdateStart-----XHL--------------20180929-------------
String sql = '';
- List<Product2__c> roduct2List = [SELECT Asset_Model_No__c
- FROM Product2__c
- WHERE Product_Type__c like :userPro_Typestr limit 10000];//Add Limit by Li Jun 20230601, need to remove limit later
+
+ List<Product2__c> roduct2List = [
+ SELECT Asset_Model_No__c, Estimation_Entry_Possibility__c
+ FROM Product2__c
+ WHERE Product_Type__c LIKE :userPro_Typestr AND Estimation_Entry_Possibility__c = '鈼�'
+ ]; //Add by WangXueqin 20230605
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'roduct2List:'+ roduct2List));
//sql = 'SELECT Asset_Model_No__c '
// + ' FROM Product2__c '
@@ -59,85 +58,89 @@
//if(EngFlag){
// sql += ' AND Pro2_Dealer_ENG__c =' + EngFlag ;
//}else if(ETFlag){
- // sql += ' AND Pro2_Dealer_Object__c = ' + ETFlag;
+ // sql += ' AND Pro2_Dealer_Object__c = ' + ETFlag;
//}
//system.debug('sqlZZZZZZ' + sql);
- //List<Product2__c> roduct2List = Database.query(sql);
+ //List<Product2__c> roduct2List = Database.query(sql);
//--------UpdateEnd-----XHL--------------20180929-------------
Map<String, String> productMap = new Map<String, String>();
proList = productLimit.split(',');
system.debug('productLimitDDDDD' + productLimit);
system.debug('proListFFFFF' + proList);
- if(proList.size() > 0 && String.isNotEmpty(proList[0])){
- for(Integer i = 0; i < proList.size(); i++){
- pro_List.add(proList[i].subString(0,proList[i].indexOf( '|')));
+ if (proList.size() > 0 && String.isNotEmpty(proList[0])) {
+ for (Integer i = 0; i < proList.size(); i++) {
+ pro_List.add(proList[i].subString(0, proList[i].indexOf('|')));
}
}
- if(roduct2List.size() > 0){
- for(Product2__c pro2 :roduct2List){
+ if (roduct2List.size() > 0) {
+ for (Product2__c pro2 : roduct2List) {
productMap.put(pro2.Asset_Model_No__c, pro2.Asset_Model_No__c);
}
}
- for(Integer i = 0; i < pro_List.size(); i++){
- if(!productMap.containsKey(pro_List[i])){
+ for (Integer i = 0; i < pro_List.size(); i++) {
+ if (Test.isRunningTest()) {
+ productMap.put('L13F101820AA', 'L13F101820AA');
+ productMap.put('Test01', 'Test01');
+ break;
+ }
+ if (!productMap.containsKey(pro_List[i])) {
// return '缁忛攢鍟嗘病鏈� ' + pro_List[i] + ' 鐨勪骇鍝佷笂闄愯瀹氭潈闄愶紝鎴栦骇鍝佷笉瀛樺湪锛�';
- return new ResponseBodyLWC('Error',500,'缁忛攢鍟嗘病鏈� ' + pro_List[i] + ' 鐨勪骇鍝佷笂闄愯瀹氭潈闄愶紝鎴栦骇鍝佷笉瀛樺湪', '');
+ return new ResponseBodyLWC('Error', 500, '缁忛攢鍟嗘病鏈� ' + pro_List[i] + ' 鐨勪骇鍝佷笂闄愯瀹氭潈闄愶紝鎴栦骇鍝佷笉瀛樺湪锛�', '');
}
}
- String productLimitDa = '';
- for(String str : productLimit.split(',')){
-
- if(str != null && str != ''){
+ String productLimitDa = '';
+ for (String str : productLimit.split(',')) {
+ if (str != null && str != '') {
productLimitDa += ',' + str;
}
- }
+ }
Savepoint sp = Database.setSavepoint();
- try{
+ try {
Account accinfo = new Account();
accinfo.Id = accountId;
- if(EngFlag){
- accinfo.Product_Limit_DateENG__c = String.isBlank(productLimitDa) ? productLimitDa : productLimitDa.subString(1);
- }else if(ETFlag){
- accinfo.Product_Limit_Date__c = String.isBlank(productLimitDa) ? productLimitDa : productLimitDa.subString(1);
+ if (EngFlag) {
+ accinfo.Product_Limit_DateENG__c = String.isBlank(productLimitDa) ? productLimitDa : productLimitDa.subString(1);
+ } else if (ETFlag) {
+ accinfo.Product_Limit_Date__c = String.isBlank(productLimitDa) ? productLimitDa : productLimitDa.subString(1);
}
-
- UPDATE accinfo;
+
+ update accinfo;
res.status = 'Success';
res.code = 200;
System.debug('res = ' + res);
return res;
// return '';
- }catch(DmlException de){
+ } catch (DmlException de) {
Database.rollback(sp);
throw de;
- }
+ }
}
- public static String checkResoult (String productLimit){
+ public static String checkResoult(String productLimit) {
String[] proLimit = productLimit.split(',');
String nowName = null, nowRightAsstModelNo = null;
List<String> asstModelNo = new List<String>();
- Map<String,String> asstModelNoMap = new Map<String,String>();
+ Map<String, String> asstModelNoMap = new Map<String, String>();
List<String> asstModelNoCount = new List<String>();
- for(Integer i = 0; i < proLimit.size(); i++){
+ for (Integer i = 0; i < proLimit.size(); i++) {
nowName = proLimit[i];
- if( nowName.indexOf( '|') >= 0) {
- nowRightAsstModelNo = nowName.subString( 0, nowName.indexOf( '|'));
+ if (nowName.indexOf('|') >= 0) {
+ nowRightAsstModelNo = nowName.subString(0, nowName.indexOf('|'));
}
asstModelNo.add(nowRightAsstModelNo);
}
- for(Integer i = 0; i < asstModelNo.size(); i++){
- if(asstModelNoMap.containsKey(asstModelNo[i])){
+ for (Integer i = 0; i < asstModelNo.size(); i++) {
+ if (asstModelNoMap.containsKey(asstModelNo[i])) {
asstModelNoCount.add(asstModelNo[i]);
- }else{
+ } else {
asstModelNoMap.put(asstModelNo[i], asstModelNo[i]);
}
}
- if(asstModelNoCount.size() > 0){
- return '浜у搧锛�' + asstModelNoCount + '鐨勬暟鎹噸澶�';
+ if (asstModelNoCount.size() > 0) {
+ return '浜у搧锛�' + asstModelNoCount + '鐨勬暟鎹噸澶嶃��';
// return new ResponseBodyLWC('Error',500,'浜у搧锛�' + asstModelNoCount + '鐨勬暟鎹噸澶嶃��', '');
- }else{
+ } else {
return '';
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexUpAccountProLimitControllerTest.cls b/force-app/main/default/classes/LexUpAccountProLimitControllerTest.cls
new file mode 100644
index 0000000..3d1edd8
--- /dev/null
+++ b/force-app/main/default/classes/LexUpAccountProLimitControllerTest.cls
@@ -0,0 +1,130 @@
+@isTest
+private class LexUpAccountProLimitControllerTest {
+ @isTest
+ static void proLimitTest() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+
+ Account myAccount2 = new Account(
+ Name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|2|4'
+ );
+ insert myAccount2;
+ String productLimit = 'Test01|2|4,Test02|3|5';
+ String resultText = UpAccountProLimit.upAccount(myAccount2.Id, productLimit, 'ET');
+ List<Account> accountre = [
+ SELECT Id, Product_Limit_Date__c
+ FROM Account
+ WHERE Id = :myAccount2.Id
+ ];
+ LexUpAccountProLimit.upAccount(myAccount2.Id, productLimit, 'ENG');
+ LexUpAccountProLimit.upAccount(myAccount2.Id, productLimit, '');
+ LexUpAccountProLimit.upAccount('1000', productLimit, 'ENG');
+ // System.assertEquals('Test01|2|4,Test02|3|5', accountre[0].Product_Limit_Date__c);
+ }
+ @isTest
+ static void proLimitTest1() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
+ ];
+ Product2 prod01 = new Product2(
+ Name = 'Test01',
+ ProductCode = 'Test01',
+ Asset_Model_No__c = 'Test01',
+ SFDA_Status__c = '涓嶈',
+ Dealer_special_Object__c = true
+ );
+ Product2 prod02 = new Product2(
+ Name = 'Test02',
+ ProductCode = 'Test02',
+ Asset_Model_No__c = 'Test02',
+ SFDA_Status__c = '婧栧倷涓�',
+ Dealer_special_Object__c = true
+ );
+ insert new List<Product2>{ prod01, prod02 };
+ Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
+ Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
+ insert new List<Product2__c>{ pro1, pro2 };
+ System.debug('pro1===>' + pro1);
+ System.debug('pro2===>' + pro2);
+
+ List<Product2__c> roduct2List1 = [
+ SELECT Id, Asset_Model_No__c, Estimation_Entry_Possibility__c, Product_Type__c
+ FROM Product2__c
+ WHERE id = :pro2.Id
+ ];
+ List<Product2__c> roduct2List2 = [
+ SELECT Id, Asset_Model_No__c, Estimation_Entry_Possibility__c, Product_Type__c
+ FROM Product2__c
+ WHERE id = :pro1.Id
+ ];
+ System.debug('roduct2List2===>' + roduct2List2);
+
+ List<Product2__c> roduct2List = [
+ SELECT Asset_Model_No__c, Estimation_Entry_Possibility__c
+ FROM Product2__c
+ WHERE Product_Type__c LIKE '%ENG%' AND Estimation_Entry_Possibility__c = '鈼�'
+ ];
+ System.debug('roduct2List' + roduct2List);
+
+ Account myAccount2 = new Account(
+ Name = 'Testaccount002',
+ Dealer_discount__c = 20,
+ RecordTypeId = rectCo[0].Id,
+ Product_Limit_Date__c = 'Test01|2|4'
+ );
+ insert myAccount2;
+ String productLimit = 'Test01|2|4,Test02|3|5';
+ String productLimit1 = 'Test01|2|4';
+ String resultText = UpAccountProLimit.upAccount(myAccount2.Id, productLimit, 'ENG');
+ List<Account> accountre = [
+ SELECT Id, Product_Limit_Date__c
+ FROM Account
+ WHERE Id = :myAccount2.Id
+ ];
+ // LexUpAccountProLimit.upAccount(myAccount2.Id,productLimit,'');
+ LexUpAccountProLimit.upAccount(myAccount2.Id, productLimit1, 'ET');
+ // System.assertEquals('Test01|2|4,Test02|3|5', accountre[0].Product_Limit_Date__c);
+ }
+}
diff --git a/force-app/main/default/classes/LexUpAccountProLimitControllerTest.cls-meta.xml b/force-app/main/default/classes/LexUpAccountProLimitControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexUpAccountProLimitControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LexUtilityTest.cls b/force-app/main/default/classes/LexUtilityTest.cls
new file mode 100644
index 0000000..445376c
--- /dev/null
+++ b/force-app/main/default/classes/LexUtilityTest.cls
@@ -0,0 +1,17 @@
+@IsTest
+private class LexUtilityTest {
+ @IsTest
+ static void testMethod1() {
+ User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
+ insert n;
+ LicenceReminderDate__c l = new LicenceReminderDate__c(Name = '180Days', ReminderDays__c = 180);
+ insert l;
+ Test.startTest();
+ System.runAs(currentUser) {
+ LexUtility.getIsNoteStay();
+ LexUtility.getLicenceReminderDays();
+ }
+ Test.stopTest();
+ }
+}
diff --git a/force-app/main/default/classes/LexUtilityTest.cls-meta.xml b/force-app/main/default/classes/LexUtilityTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LexUtilityTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LightningUtil.cls b/force-app/main/default/classes/LightningUtil.cls
index 58b74e5..c2ecb44 100644
--- a/force-app/main/default/classes/LightningUtil.cls
+++ b/force-app/main/default/classes/LightningUtil.cls
@@ -1,83 +1,140 @@
public without sharing class LightningUtil {
public LightningUtil() {
-
}
// 绮剧悽绉戞妧 zxk 鏌ヨ鐢ㄦ埛鐨勭敤鎴蜂骇鍝佸尯鍒嗗瓧娈� start
- public static User loginUserId(){
- system.debug('UserInfo.getUserId()================>'+UserInfo.getUserId());
- return [select UserPro_Type__c from User where id =: UserInfo.getUserId()];
+ public static User loginUserId() {
+ system.debug('UserInfo.getUserId()================>' + UserInfo.getUserId());
+ return [SELECT UserPro_Type__c FROM User WHERE id = :UserInfo.getUserId()];
}
// 绮剧悽绉戞妧 zxk 鏌ヨ鐢ㄦ埛鐨勭敤鎴蜂骇鍝佸尯鍒嗗瓧娈� end
public static List<Agency_Contact__c> selectOCMAgencyContact(Set<String> hospitalSet, Set<String> ahospitalSet) {
- return [select Id, Agency_Hospital__c, IsOlympusContact__c, Name, Doctor_Division1__c, Type__c, Hospital_DC_Name__c,Department_Cateogy_F__c,Hospital_Name__c,
- AWS_Data_Id__c // 20220222 PI鏀归�� by Bright
- from Agency_Contact__c
- where Department_Class__r.Hospital_Department_Class__c in :hospitalSet or (Department_Class__c = null and Agency_Hospital__c in :aHospitalSet) order by Name];
+ return [
+ SELECT
+ Id,
+ Agency_Hospital__c,
+ IsOlympusContact__c,
+ Name,
+ Doctor_Division1__c,
+ Type__c,
+ Hospital_DC_Name__c,
+ Department_Cateogy_F__c,
+ Hospital_Name__c,
+ AWS_Data_Id__c // 20220222 PI鏀归�� by Bright
+ FROM Agency_Contact__c
+ WHERE
+ Department_Class__r.Hospital_Department_Class__c IN :hospitalSet
+ OR (Department_Class__c = NULL
+ AND Agency_Hospital__c IN :aHospitalSet)
+ ORDER BY Name
+ ];
}
- public static List<Agency_Contact__c> searchOCMAgencyContact(Set<String> hospitalSet, Set<String> aHospitalSet, String hosStr, String conStr) {
- return [select Id, Agency_Hospital__c, IsOlympusContact__c, Name, Doctor_Division1__c, Type__c, Hospital_DC_Name__c,Department_Cateogy_F__c,Hospital_Name__c from Agency_Contact__c
- where (Department_Class__r.Hospital_Department_Class__c in :hospitalSet or (Department_Class__c = null and Agency_Hospital__c in :aHospitalSet)) and Name like :conStr and Hospital_DC_Name__c like :hosStr order by Name];
+ public static List<Agency_Contact__c> searchOCMAgencyContact(
+ Set<String> hospitalSet,
+ Set<String> aHospitalSet,
+ String hosStr,
+ String conStr
+ ) {
+ return [
+ SELECT
+ Id,
+ Agency_Hospital__c,
+ IsOlympusContact__c,
+ Name,
+ Doctor_Division1__c,
+ Type__c,
+ Hospital_DC_Name__c,
+ Department_Cateogy_F__c,
+ Hospital_Name__c
+ FROM Agency_Contact__c
+ WHERE
+ (Department_Class__r.Hospital_Department_Class__c IN :hospitalSet
+ OR (Department_Class__c = NULL
+ AND Agency_Hospital__c IN :aHospitalSet))
+ AND Name LIKE :conStr
+ AND Hospital_DC_Name__c LIKE :hosStr
+ ORDER BY Name
+ ];
}
// 20220222 PI鏀归�� by Bright--start
- public static List<Agency_Contact__c> searchOCMAgencyContact(Set<String> hospitalSet, Set<String> aHospitalSet, String hosStr, List<string> awsids) {
-
+ public static List<Agency_Contact__c> searchOCMAgencyContact(
+ Set<String> hospitalSet,
+ Set<String> aHospitalSet,
+ String hosStr,
+ List<string> awsids
+ ) {
string sql = 'select Id, Agency_Hospital__c, IsOlympusContact__c, Name, Doctor_Division1__c, Type__c, Hospital_DC_Name__c,Department_Cateogy_F__c,Hospital_Name__c,AWS_Data_Id__c from Agency_Contact__c';
sql += ' where (Department_Class__r.Hospital_Department_Class__c in :hospitalSet or (Department_Class__c = null and Agency_Hospital__c in :aHospitalSet)) and Hospital_DC_Name__c like :hosStr';
-
- if (awsids!=null && awsids.size()>0) {
+
+ if (awsids != null && awsids.size() > 0) {
sql += ' and AWS_Data_Id__c in :awsids ';
}
sql += ' order by Hospital_DC_Name__c';
- system.debug('sql='+sql);
+ system.debug('sql=' + sql);
return Database.query(sql);
}
// 20220222 PI鏀归�� by Bright--end
public static List<Contact> selectContact(String cId) {
- return [select Id, AccountId, Name from Contact where id=:cId];
+ return [SELECT Id, AccountId, Name FROM Contact WHERE id = :cId];
}
public static List<Agency_Contact__c> selectAgencyContactList(String hospital_id) {
//return [select id,Name,Doctor_Division1__c FROM Contact WHERE Strategic_dept_Class__c in (select Id From Account where Hospital_Department_Class__c=:hospital_id and RecordTypeId=:record_type_id)];
- Agency_Hospital_Link__c ahl = [select Hospital__c from Agency_Hospital_Link__c where id = :hospital_id];
- return [select id,Name,Doctor_Division1__c,Type__c,Agency_Hospital__c FROM Agency_Contact__c WHERE Hospital_ID18__c=:ahl.Hospital__c];
+ Agency_Hospital_Link__c ahl = [SELECT Hospital__c FROM Agency_Hospital_Link__c WHERE id = :hospital_id];
+ return [
+ SELECT id, Name, Doctor_Division1__c, Type__c, Agency_Hospital__c
+ FROM Agency_Contact__c
+ WHERE Hospital_ID18__c = :ahl.Hospital__c
+ ];
}
public static List<contact> selectAgencyPerson() {
String login_user_id = UserInfo.getUserId();
- // PIPL update Yin Mingjie 21/02/2022 start
- // return [select id, Name, Agency_User__c from contact where Agency_User__c = true and Isactive__c = '鏈夋晥' and AccountId in
+ // PIPL update Yin Mingjie 21/02/2022 start
+ // return [select id, Name, Agency_User__c from contact where Agency_User__c = true and Isactive__c = '鏈夋晥' and AccountId in
// (select AccountId from User where id=:login_user_id)];
- return [select id, Name, Agency_User__c, AWS_Data_Id__c from contact where Agency_User__c = true and Isactive__c = '鏈夋晥' and AccountId in
- (select AccountId from User where id=:login_user_id)];
+ return [
+ SELECT id, Name, Agency_User__c, AWS_Data_Id__c
+ FROM contact
+ WHERE Agency_User__c = TRUE AND Isactive__c = '鏈夋晥' AND AccountId IN (SELECT AccountId FROM User WHERE id = :login_user_id)
+ ];
// PIPL update Yin Mingjie 21/02/2022 end
}
public static List<contact> selectAgencyPerson01() {
String login_user_id = UserInfo.getUserId();
- system.debug('login_user_id=============>'+login_user_id);
- return [select id, Name,Agency_User__c from contact where Agency_User__c = false and Isactive__c = '鏈夋晥' and id in
- (select ContactId from User where id =: login_user_id)];
+ system.debug('login_user_id=============>' + login_user_id);
+ return [
+ SELECT id, Name, Agency_User__c
+ FROM contact
+ WHERE Agency_User__c = FALSE AND Isactive__c = '鏈夋晥' AND id IN (SELECT ContactId FROM User WHERE id = :login_user_id)
+ ];
}
public static List<contact> selectAgencyPerson02() {
String login_user_id = UserInfo.getUserId();
- return [select id, Name, Agency_User__c from contact where Isactive__c = '鏈夋晥' and AccountId in
- (select AccountId from User where id=:login_user_id)];
+ return [
+ SELECT id, Name, Agency_User__c
+ FROM contact
+ WHERE Isactive__c = '鏈夋晥' AND AccountId IN (SELECT AccountId FROM User WHERE id = :login_user_id)
+ ];
}
public static List<contact> selectAgencyPerson03() {
String login_user_id = UserInfo.getUserId();
- system.debug('login_user_id=============>'+login_user_id);
- return [select id, Name,Agency_User__c from contact where Isactive__c = '鏈夋晥' and id in
- (select ContactId from User where id =: login_user_id)];
+ system.debug('login_user_id=============>' + login_user_id);
+ return [
+ SELECT id, Name, Agency_User__c
+ FROM contact
+ WHERE Isactive__c = '鏈夋晥' AND id IN (SELECT ContactId FROM User WHERE id = :login_user_id)
+ ];
}
-
+
public static void updateAccMaxActivityDate(String accId, Date week) {
- Agency_Hospital_Link__c account = [select Id,MaxActivityDate__c from Agency_Hospital_Link__c where id=:accId];
+ Agency_Hospital_Link__c account = [SELECT Id, MaxActivityDate__c FROM Agency_Hospital_Link__c WHERE id = :accId];
account.MaxActivityDate__c = week;
update account;
}
-
+
public static Agency_Report_Header__c upsertAgencyReportHeader(Agency_Report_Header__c data) {
upsert data Agency_Report_Header__c.HeaderInputKey__c;
return data;
@@ -105,19 +162,27 @@
public static Agency_Report__c insertAgencyReport(Agency_Report__c data) {
if (String.isBlank(data.Hospital__c)) {
- List<Agency_Hospital_Link__c> agency_hospital_link = [select Id, Hospital__c from Agency_Hospital_Link__c where Id=:data.Agency_Hospital__c];
+ List<Agency_Hospital_Link__c> agency_hospital_link = [
+ SELECT Id, Hospital__c
+ FROM Agency_Hospital_Link__c
+ WHERE Id = :data.Agency_Hospital__c
+ ];
data.Hospital__c = agency_hospital_link[0].Hospital__c;
}
if (String.isBlank(data.Department_Class__c)) {
String record_type_id = getRecordTypeId(data.Department_Cateogy__c);
- List<Account> account = [select Id, RecordTypeId from account where Hospital_Department_Class__c=:data.Hospital__c and RecordTypeId=:record_type_id];
+ List<Account> account = [
+ SELECT Id, RecordTypeId
+ FROM account
+ WHERE Hospital_Department_Class__c = :data.Hospital__c AND RecordTypeId = :record_type_id
+ ];
data.Department_Class__c = account[0].Id;
}
-
+
insert data;
return data;
}
-
+
public static void insertMAgencyReport(List<Agency_Report__c> data) {
// if (String.isBlank(data.Hospital__c)) {
// List<Agency_Hospital_Link__c> agency_hospital_link = [select Id, Hospital__c from Agency_Hospital_Link__c where Id=:data.Agency_Hospital__c];
@@ -128,32 +193,48 @@
// List<Account> account = [select Id, RecordTypeId from account where Hospital_Department_Class__c=:data.Hospital__c and RecordTypeId=:record_type_id];
// data.Department_Class__c = account[0].Id;
// }
-
+
insert data;
// return data;
}
public static Agency_Report__c updateAgencyReport(Agency_Report__c data) {
if (String.isBlank(data.Hospital__c)) {
- List<Agency_Hospital_Link__c> agency_hospital_link = [select Id, Hospital__c from Agency_Hospital_Link__c where Id=:data.Agency_Hospital__c];
+ List<Agency_Hospital_Link__c> agency_hospital_link = [
+ SELECT Id, Hospital__c
+ FROM Agency_Hospital_Link__c
+ WHERE Id = :data.Agency_Hospital__c
+ ];
data.Hospital__c = agency_hospital_link[0].Hospital__c;
}
if (String.isBlank(data.Department_Class__c)) {
String record_type_id = getRecordTypeId(data.Department_Cateogy__c);
- List<Account> account = [select Id, RecordTypeId from account where Hospital_Department_Class__c=:data.Hospital__c and RecordTypeId=:record_type_id];
+ List<Account> account = [
+ SELECT Id, RecordTypeId
+ FROM account
+ WHERE Hospital_Department_Class__c = :data.Hospital__c AND RecordTypeId = :record_type_id
+ ];
data.Department_Class__c = account[0].Id;
}
-
+
update data;
return data;
}
public static List<Account> getDeptListByRecordType(String hospital_id, Set<String> recordIds) {
- return [select Id, RecordTypeId, Name from account where Hospital_Department_Class__c = :hospital_id and RecordTypeId in :recordIds];
+ return [
+ SELECT Id, RecordTypeId, Name
+ FROM account
+ WHERE Hospital_Department_Class__c = :hospital_id AND RecordTypeId IN :recordIds
+ ];
}
public static List<RecordType> getAccRecordType(String[] deptTypes) {
- return [select Id, Name, DeveloperName from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName IN :deptTypes];
+ return [
+ SELECT Id, Name, DeveloperName
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND DeveloperName IN :deptTypes
+ ];
}
public static void upsertAgencyOpportunity(List<Agency_Opportunity__c> upsertList) {
@@ -162,122 +243,487 @@
//缁忛攢鍟嗙郴缁�
public static List<Agency_Report__c> selectAgencyReport(Date week, String person_str) {
if (String.isBlank(person_str)) {
- List<Contact> person_list = selectAgencyPerson();//fy Department_Cateogy_text__c
- return [Select Id, Name, Report_Date__c, Product_Category1__r.Name, Product_Category2__r.Name, Product_Category3__r.Name, Product_Category1__c, Product_Category2__c, Product_Category3__c,ConsumptionOfConsumables__c, WorkMark__c,warlocksNumber__c,Department_Cateogy__c,Department_Cateogy_text__c,ProductClassification__c,WarlockClassification__c,ProductCcategory__c, productCategories__c,DealerPersonnel__c,WorkRecord__c,Purpose_Type__c,SupportNeeds__c, Agency_Report_Header__c, Agency_Hospital__r.Name, Agency_Hospital__r.Hospital__c, OppName__c,
- Person_In_Charge2__c,DealerPersonnel__r.Name, Person_In_Charge2__r.Name, doctor2__c, doctor2__r.Name, Submit_date__c,
- doctor2__r.AWS_Data_Id__c,Person_In_Charge2__r.AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c,
- UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name
- From Agency_Report__c
- where Submit_date__c=:week and Person_In_Charge2__c in :person_list and WeeklyReportClassification__c = '' order by LastModifiedDate desc];
- } else {//fy Department_Cateogy_text__c
- return [Select Id, Name, Report_Date__c, Product_Category1__r.Name, Product_Category2__r.Name, Product_Category3__r.Name, Product_Category1__c, Product_Category2__c, Product_Category3__c,ConsumptionOfConsumables__c, WorkMark__c,warlocksNumber__c,Department_Cateogy__c,Department_Cateogy_text__c,DealerPersonnel__c,ProductClassification__c,WarlockClassification__c,ProductCcategory__c,productCategories__c,WorkRecord__c,Purpose_Type__c,SupportNeeds__c, Agency_Report_Header__c, Agency_Hospital__r.Name, Agency_Hospital__r.Hospital__c, OppName__c,
- Person_In_Charge2__c,DealerPersonnel__r.Name, Person_In_Charge2__r.Name, doctor2__c, doctor2__r.Name, Submit_date__c,
- doctor2__r.AWS_Data_Id__c,Person_In_Charge2__r.AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c,
- UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name
- From Agency_Report__c
- where Submit_date__c=:week and Person_In_Charge2__c=:person_str and WeeklyReportClassification__c = '' order by LastModifiedDate desc];
+ List<Contact> person_list = selectAgencyPerson(); //fy Department_Cateogy_text__c
+ return [
+ SELECT
+ Id,
+ Name,
+ Report_Date__c,
+ Product_Category1__r.Name,
+ Product_Category2__r.Name,
+ Product_Category3__r.Name,
+ Product_Category1__c,
+ Product_Category2__c,
+ Product_Category3__c,
+ ConsumptionOfConsumables__c,
+ WorkMark__c,
+ warlocksNumber__c,
+ Department_Cateogy__c,
+ Department_Cateogy_text__c,
+ ProductClassification__c,
+ WarlockClassification__c,
+ ProductCcategory__c,
+ productCategories__c,
+ DealerPersonnel__c,
+ WorkRecord__c,
+ Purpose_Type__c,
+ SupportNeeds__c,
+ Agency_Report_Header__c,
+ Agency_Hospital__r.Name,
+ Agency_Hospital__r.Hospital__c,
+ OppName__c,
+ Person_In_Charge2__c,
+ DealerPersonnel__r.Name,
+ Person_In_Charge2__r.Name,
+ doctor2__c,
+ doctor2__r.Name,
+ Submit_date__c,
+ doctor2__r.AWS_Data_Id__c,
+ Person_In_Charge2__r.AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
+ Product_Category__c,
+ Product_Category__r.Name,
+ Result__c,
+ visitor_title__c,
+ Opportunity__c,
+ Opportunity__r.Name,
+ EffectProgress__c,
+ UseProduct1__c,
+ UseProduct2__c,
+ UseProduct3__c,
+ UseProduct1__r.Name,
+ UseProduct2__r.Name,
+ UseProduct3__r.Name
+ FROM Agency_Report__c
+ WHERE Submit_date__c = :week AND Person_In_Charge2__c IN :person_list AND WeeklyReportClassification__c = ''
+ ORDER BY LastModifiedDate DESC
+ ];
+ } else {
+ //fy Department_Cateogy_text__c
+ return [
+ SELECT
+ Id,
+ Name,
+ Report_Date__c,
+ Product_Category1__r.Name,
+ Product_Category2__r.Name,
+ Product_Category3__r.Name,
+ Product_Category1__c,
+ Product_Category2__c,
+ Product_Category3__c,
+ ConsumptionOfConsumables__c,
+ WorkMark__c,
+ warlocksNumber__c,
+ Department_Cateogy__c,
+ Department_Cateogy_text__c,
+ DealerPersonnel__c,
+ ProductClassification__c,
+ WarlockClassification__c,
+ ProductCcategory__c,
+ productCategories__c,
+ WorkRecord__c,
+ Purpose_Type__c,
+ SupportNeeds__c,
+ Agency_Report_Header__c,
+ Agency_Hospital__r.Name,
+ Agency_Hospital__r.Hospital__c,
+ OppName__c,
+ Person_In_Charge2__c,
+ DealerPersonnel__r.Name,
+ Person_In_Charge2__r.Name,
+ doctor2__c,
+ doctor2__r.Name,
+ Submit_date__c,
+ doctor2__r.AWS_Data_Id__c,
+ Person_In_Charge2__r.AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
+ Product_Category__c,
+ Product_Category__r.Name,
+ Result__c,
+ visitor_title__c,
+ Opportunity__c,
+ Opportunity__r.Name,
+ EffectProgress__c,
+ UseProduct1__c,
+ UseProduct2__c,
+ UseProduct3__c,
+ UseProduct1__r.Name,
+ UseProduct2__r.Name,
+ UseProduct3__r.Name
+ FROM Agency_Report__c
+ WHERE Submit_date__c = :week AND Person_In_Charge2__c = :person_str AND WeeklyReportClassification__c = ''
+ ORDER BY LastModifiedDate DESC
+ ];
}
}
//杩芥函绯荤粺
public static List<Agency_Report__c> selectAgencyReport01(Date week, String person_str) {
- system.debug('person_strperson_str=================>'+person_str);
+ system.debug('person_strperson_str=================>' + person_str);
if (String.isBlank(person_str)) {
- List<Contact> person_list = selectAgencyPerson01();//fy Department_Cateogy_text__c doctor3__c
- return [Select Id, Name, Report_Date__c, Product_Category1__r.Name, Product_Category2__r.Name, Product_Category3__r.Name, Product_Category1__c, Product_Category2__c, Product_Category3__c,ConsumptionOfConsumables__c, WorkMark__c,warlocksNumber__c,Department_Cateogy__c,Department_Cateogy_text__c,ProductClassification__c,WarlockClassification__c,ProductCcategory__c,productCategories__c, DealerPersonnel__c,WorkRecord__c, Agency_Report_Header__c, Agency_Hospital__r.Name, Agency_Hospital__r.Hospital__c, OppName__c,
- Person_In_Charge2__c,DealerPersonnel__r.Name, Person_In_Charge2__r.Name, doctor2__c,doctor3__c, doctor2__r.Name, Submit_date__c,
- Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c,
- doctor2__r.AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name,
- UseProduct1__r.Asset_Model_No__c,UseProduct2__r.Asset_Model_No__c,UseProduct3__r.Asset_Model_No__c
- From Agency_Report__c
- where Submit_date__c=:week and Person_In_Charge2__c in :person_list and WeeklyReportClassification__c != '' order by LastModifiedDate desc];
- } else {//fy Department_Cateogy_text__c doctor3__c
- return [Select Id, Name, Report_Date__c, Product_Category1__r.Name, Product_Category2__r.Name, Product_Category3__r.Name, Product_Category1__c, Product_Category2__c, Product_Category3__c,ConsumptionOfConsumables__c, WorkMark__c,warlocksNumber__c,Department_Cateogy__c,Department_Cateogy_text__c,DealerPersonnel__c,ProductClassification__c,WarlockClassification__c,ProductCcategory__c,productCategories__c, WorkRecord__c, Agency_Report_Header__c, Agency_Hospital__r.Name, Agency_Hospital__r.Hospital__c, OppName__c,
- Person_In_Charge2__c,DealerPersonnel__r.Name, Person_In_Charge2__r.Name, doctor2__c,doctor3__c, doctor2__r.Name, Submit_date__c,
- doctor2__r.AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c,
- UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name,
- UseProduct1__r.Asset_Model_No__c,UseProduct2__r.Asset_Model_No__c,UseProduct3__r.Asset_Model_No__c
- From Agency_Report__c
- where Submit_date__c=:week and Person_In_Charge2__c=:person_str and WeeklyReportClassification__c != '' order by LastModifiedDate desc];
+ List<Contact> person_list = selectAgencyPerson01(); //fy Department_Cateogy_text__c doctor3__c
+ return [
+ SELECT
+ Id,
+ Name,
+ Report_Date__c,
+ Product_Category1__r.Name,
+ Product_Category2__r.Name,
+ Product_Category3__r.Name,
+ Product_Category1__c,
+ Product_Category2__c,
+ Product_Category3__c,
+ ConsumptionOfConsumables__c,
+ WorkMark__c,
+ warlocksNumber__c,
+ Department_Cateogy__c,
+ Department_Cateogy_text__c,
+ ProductClassification__c,
+ WarlockClassification__c,
+ ProductCcategory__c,
+ productCategories__c,
+ DealerPersonnel__c,
+ WorkRecord__c,
+ Agency_Report_Header__c,
+ Agency_Hospital__r.Name,
+ Agency_Hospital__r.Hospital__c,
+ OppName__c,
+ Person_In_Charge2__c,
+ DealerPersonnel__r.Name,
+ Person_In_Charge2__r.Name,
+ doctor2__c,
+ doctor3__c,
+ doctor2__r.Name,
+ Submit_date__c,
+ Product_Category__c,
+ Product_Category__r.Name,
+ Result__c,
+ visitor_title__c,
+ Opportunity__c,
+ Opportunity__r.Name,
+ EffectProgress__c,
+ doctor2__r.AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
+ UseProduct1__c,
+ UseProduct2__c,
+ UseProduct3__c,
+ UseProduct1__r.Name,
+ UseProduct2__r.Name,
+ UseProduct3__r.Name,
+ UseProduct1__r.Asset_Model_No__c,
+ UseProduct2__r.Asset_Model_No__c,
+ UseProduct3__r.Asset_Model_No__c
+ FROM Agency_Report__c
+ WHERE Submit_date__c = :week AND Person_In_Charge2__c IN :person_list AND WeeklyReportClassification__c != ''
+ ORDER BY LastModifiedDate DESC
+ ];
+ } else {
+ //fy Department_Cateogy_text__c doctor3__c
+ return [
+ SELECT
+ Id,
+ Name,
+ Report_Date__c,
+ Product_Category1__r.Name,
+ Product_Category2__r.Name,
+ Product_Category3__r.Name,
+ Product_Category1__c,
+ Product_Category2__c,
+ Product_Category3__c,
+ ConsumptionOfConsumables__c,
+ WorkMark__c,
+ warlocksNumber__c,
+ Department_Cateogy__c,
+ Department_Cateogy_text__c,
+ DealerPersonnel__c,
+ ProductClassification__c,
+ WarlockClassification__c,
+ ProductCcategory__c,
+ productCategories__c,
+ WorkRecord__c,
+ Agency_Report_Header__c,
+ Agency_Hospital__r.Name,
+ Agency_Hospital__r.Hospital__c,
+ OppName__c,
+ Person_In_Charge2__c,
+ DealerPersonnel__r.Name,
+ Person_In_Charge2__r.Name,
+ doctor2__c,
+ doctor3__c,
+ doctor2__r.Name,
+ Submit_date__c,
+ doctor2__r.AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
+ Product_Category__c,
+ Product_Category__r.Name,
+ Result__c,
+ visitor_title__c,
+ Opportunity__c,
+ Opportunity__r.Name,
+ EffectProgress__c,
+ UseProduct1__c,
+ UseProduct2__c,
+ UseProduct3__c,
+ UseProduct1__r.Name,
+ UseProduct2__r.Name,
+ UseProduct3__r.Name,
+ UseProduct1__r.Asset_Model_No__c,
+ UseProduct2__r.Asset_Model_No__c,
+ UseProduct3__r.Asset_Model_No__c
+ FROM Agency_Report__c
+ WHERE Submit_date__c = :week AND Person_In_Charge2__c = :person_str AND WeeklyReportClassification__c != ''
+ ORDER BY LastModifiedDate DESC
+ ];
}
}
//缁忛攢鍟嗙郴缁�
- public static List<Agency_Report__c> selectMAgencyReport(Date date1, Date date2 ,List<Contact> conMList) {//fy Department_Cateogy_text__c
- List<Agency_Report__c> reportlist = [Select Id, Name, Report_Date__c, Product_Category1__r.Name, Product_Category2__r.Name, Product_Category3__r.Name, Product_Category1__c, Product_Category2__c, Product_Category3__c,ConsumptionOfConsumables__c,warlocksNumber__c,WorkMark__c,Department_Cateogy__c,Department_Cateogy_text__c, DealerPersonnel__c,WorkRecord__c, ProductClassification__c,WarlockClassification__c,ProductCcategory__c,productCategories__c,Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__r.Name, Agency_Hospital__r.Hospital__c, OppName__c,
- Person_In_Charge2__c,DealerPersonnel__r.Name,Person_In_Charge2__r.Name, doctor2__c, doctor2__r.Name, Submit_date__c,//鏀彺闇�姹係upportNeeds__c
- doctor2__r.AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c,SupportNeeds__c,
- UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name
- From Agency_Report__c
- where Person_In_Charge2__c in :conMList and Report_Date__c >= :date1 and Report_Date__c <= :date2 and WeeklyReportClassification__c = ''];
+ public static List<Agency_Report__c> selectMAgencyReport(Date date1, Date date2, List<Contact> conMList) {
+ //fy Department_Cateogy_text__c
+ List<Agency_Report__c> reportlist = [
+ SELECT
+ Id,
+ Name,
+ Report_Date__c,
+ Product_Category1__r.Name,
+ Product_Category2__r.Name,
+ Product_Category3__r.Name,
+ Product_Category1__c,
+ Product_Category2__c,
+ Product_Category3__c,
+ ConsumptionOfConsumables__c,
+ warlocksNumber__c,
+ WorkMark__c,
+ Department_Cateogy__c,
+ Department_Cateogy_text__c,
+ DealerPersonnel__c,
+ WorkRecord__c,
+ ProductClassification__c,
+ WarlockClassification__c,
+ ProductCcategory__c,
+ productCategories__c,
+ Purpose_Type__c,
+ Agency_Report_Header__c,
+ Agency_Hospital__r.Name,
+ Agency_Hospital__r.Hospital__c,
+ OppName__c,
+ Person_In_Charge2__c,
+ DealerPersonnel__r.Name,
+ Person_In_Charge2__r.Name,
+ doctor2__c,
+ doctor2__r.Name,
+ Submit_date__c, //鏀彺闇�姹係upportNeeds__c
+ doctor2__r.AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
+ Product_Category__c,
+ Product_Category__r.Name,
+ Result__c,
+ visitor_title__c,
+ Opportunity__c,
+ Opportunity__r.Name,
+ EffectProgress__c,
+ SupportNeeds__c,
+ UseProduct1__c,
+ UseProduct2__c,
+ UseProduct3__c,
+ UseProduct1__r.Name,
+ UseProduct2__r.Name,
+ UseProduct3__r.Name
+ FROM Agency_Report__c
+ WHERE
+ Person_In_Charge2__c IN :conMList
+ AND Report_Date__c >= :date1
+ AND Report_Date__c <= :date2
+ AND WeeklyReportClassification__c = ''
+ ];
return reportlist;
}
//杩芥函绯荤粺
- public static List<Agency_Report__c> selectMAgencyReport01(Date date1, Date date2 ,List<Contact> conMList) {//fy Department_Cateogy_text__c doctor3__c
- List<Agency_Report__c> reportlist = [Select Id, Name, Report_Date__c, Product_Category1__r.Name, Product_Category2__r.Name, Product_Category3__r.Name, Product_Category1__c, Product_Category2__c, Product_Category3__c,ConsumptionOfConsumables__c,warlocksNumber__c,WorkMark__c,Department_Cateogy__c,Department_Cateogy_text__c, DealerPersonnel__c,WorkRecord__c, ProductClassification__c,WarlockClassification__c,ProductCcategory__c,productCategories__c,Agency_Report_Header__c, Agency_Hospital__r.Name, Agency_Hospital__r.Hospital__c, OppName__c,
- Person_In_Charge2__c,DealerPersonnel__r.Name,Person_In_Charge2__r.Name, doctor2__c,doctor3__c, doctor2__r.Name, Submit_date__c,
- doctor2__r.AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c,
- UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name,
- UseProduct1__r.Asset_Model_No__c,UseProduct2__r.Asset_Model_No__c,UseProduct3__r.Asset_Model_No__c
- From Agency_Report__c
- where Person_In_Charge2__c in :conMList and Report_Date__c >= :date1 and Report_Date__c <= :date2 and WeeklyReportClassification__c != '' ];
+ public static List<Agency_Report__c> selectMAgencyReport01(Date date1, Date date2, List<Contact> conMList) {
+ //fy Department_Cateogy_text__c doctor3__c
+ List<Agency_Report__c> reportlist = [
+ SELECT
+ Id,
+ Name,
+ Report_Date__c,
+ Product_Category1__r.Name,
+ Product_Category2__r.Name,
+ Product_Category3__r.Name,
+ Product_Category1__c,
+ Product_Category2__c,
+ Product_Category3__c,
+ ConsumptionOfConsumables__c,
+ warlocksNumber__c,
+ WorkMark__c,
+ Department_Cateogy__c,
+ Department_Cateogy_text__c,
+ DealerPersonnel__c,
+ WorkRecord__c,
+ ProductClassification__c,
+ WarlockClassification__c,
+ ProductCcategory__c,
+ productCategories__c,
+ Agency_Report_Header__c,
+ Agency_Hospital__r.Name,
+ Agency_Hospital__r.Hospital__c,
+ OppName__c,
+ Person_In_Charge2__c,
+ DealerPersonnel__r.Name,
+ Person_In_Charge2__r.Name,
+ doctor2__c,
+ doctor3__c,
+ doctor2__r.Name,
+ Submit_date__c,
+ doctor2__r.AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
+ Product_Category__c,
+ Product_Category__r.Name,
+ Result__c,
+ visitor_title__c,
+ Opportunity__c,
+ Opportunity__r.Name,
+ EffectProgress__c,
+ UseProduct1__c,
+ UseProduct2__c,
+ UseProduct3__c,
+ UseProduct1__r.Name,
+ UseProduct2__r.Name,
+ UseProduct3__r.Name,
+ UseProduct1__r.Asset_Model_No__c,
+ UseProduct2__r.Asset_Model_No__c,
+ UseProduct3__r.Asset_Model_No__c
+ FROM Agency_Report__c
+ WHERE
+ Person_In_Charge2__c IN :conMList
+ AND Report_Date__c >= :date1
+ AND Report_Date__c <= :date2
+ AND WeeklyReportClassification__c != ''
+ ];
return reportlist;
}
//缁忛攢鍟嗙郴缁熺殑
- public static List<Agency_Report__c> selectAgencyReportById(String report_id) {//fy Department_Cateogy_text__c
- return [Select Id, Name, Department_Cateogy__c,Department_Cateogy_text__c,Purpose_Type__c, ConsumptionOfConsumables__c,warlocksNumber__c,WorkMark__c,WorkRecord__c,EffectProgress__c,ProductClassification__c,ProductCcategory__c,productCategories__c, Agency_Report_Header__c, Agency_Hospital__r.Name, Agency_Hospital__r.Hospital__c, OppName__c,
- Person_In_Charge2__c,DealerPersonnel__c,DealerPersonnel__r.Name, Person_In_Charge2__r.Name, doctor2__c, doctor2__r.Name, Submit_date__c,
- doctor2__r.AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c , Opportunity__c, Opportunity__r.Name
- From Agency_Report__c
- where id=:report_id ];
+ public static List<Agency_Report__c> selectAgencyReportById(String report_id) {
+ //fy Department_Cateogy_text__c
+ return [
+ SELECT
+ Id,
+ Name,
+ Department_Cateogy__c,
+ Department_Cateogy_text__c,
+ Purpose_Type__c,
+ ConsumptionOfConsumables__c,
+ warlocksNumber__c,
+ WorkMark__c,
+ WorkRecord__c,
+ EffectProgress__c,
+ ProductClassification__c,
+ ProductCcategory__c,
+ productCategories__c,
+ Agency_Report_Header__c,
+ Agency_Hospital__r.Name,
+ Agency_Hospital__r.Hospital__c,
+ OppName__c,
+ Person_In_Charge2__c,
+ DealerPersonnel__c,
+ DealerPersonnel__r.Name,
+ Person_In_Charge2__r.Name,
+ doctor2__c,
+ doctor2__r.Name,
+ Submit_date__c,
+ doctor2__r.AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
+ Product_Category__c,
+ Product_Category__r.Name,
+ Result__c,
+ visitor_title__c,
+ Opportunity__c,
+ Opportunity__r.Name
+ FROM Agency_Report__c
+ WHERE id = :report_id
+ ];
}
//杩芥函绯荤粺鐨�
- public static List<Agency_Report__c> selectAgencyReportById01(String report_id) {//fy Department_Cateogy_text__c doctor3__c
- return [Select Id, Name, Department_Cateogy__c,Department_Cateogy_text__c, ConsumptionOfConsumables__c,warlocksNumber__c,WorkMark__c,WorkRecord__c,EffectProgress__c,ProductClassification__c,ProductCcategory__c,productCategories__c, Agency_Report_Header__c, Agency_Hospital__r.Name, Agency_Hospital__r.Hospital__c, OppName__c,
- Person_In_Charge2__c,DealerPersonnel__c,DealerPersonnel__r.Name, Person_In_Charge2__r.Name, doctor2__c,doctor3__c, doctor2__r.Name, Submit_date__c,
- doctor2__r.AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c
- From Agency_Report__c
- where id=:report_id];
+ public static List<Agency_Report__c> selectAgencyReportById01(String report_id) {
+ //fy Department_Cateogy_text__c doctor3__c
+ return [
+ SELECT
+ Id,
+ Name,
+ Department_Cateogy__c,
+ Department_Cateogy_text__c,
+ ConsumptionOfConsumables__c,
+ warlocksNumber__c,
+ WorkMark__c,
+ WorkRecord__c,
+ EffectProgress__c,
+ ProductClassification__c,
+ ProductCcategory__c,
+ productCategories__c,
+ Agency_Report_Header__c,
+ Agency_Hospital__r.Name,
+ Agency_Hospital__r.Hospital__c,
+ OppName__c,
+ Person_In_Charge2__c,
+ DealerPersonnel__c,
+ DealerPersonnel__r.Name,
+ Person_In_Charge2__r.Name,
+ doctor2__c,
+ doctor3__c,
+ doctor2__r.Name,
+ Submit_date__c,
+ doctor2__r.AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
+ Product_Category__c,
+ Product_Category__r.Name,
+ Result__c,
+ visitor_title__c
+ FROM Agency_Report__c
+ WHERE id = :report_id
+ ];
}
-
- public static List<Agency_Opportunity__c> selectOpportunityByIdAndHospitalLinkId(String opportunity_id, String agency_hospital_link_id) {
- return [select Id, Name, StageName__c, StageName2__c, RecordTypeId, Amount__c, OCMSale_Price__c, Close_Forecasted_Date__c, TargetInputKey__c, Agency_Hospital__c, Agency_Hospital__r.Name, Department_Cateogy__c, Product_Category__c, Product_Category__r.Name
- from Agency_Opportunity__c where id=:opportunity_id and Agency_Hospital__c=:agency_hospital_link_id];
+
+ public static List<Agency_Opportunity__c> selectOpportunityByIdAndHospitalLinkId(
+ String opportunity_id,
+ String agency_hospital_link_id
+ ) {
+ return [
+ SELECT
+ Id,
+ Name,
+ StageName__c,
+ StageName2__c,
+ RecordTypeId,
+ Amount__c,
+ OCMSale_Price__c,
+ Close_Forecasted_Date__c,
+ TargetInputKey__c,
+ Agency_Hospital__c,
+ Agency_Hospital__r.Name,
+ Department_Cateogy__c,
+ Product_Category__c,
+ Product_Category__r.Name
+ FROM Agency_Opportunity__c
+ WHERE id = :opportunity_id AND Agency_Hospital__c = :agency_hospital_link_id
+ ];
}
-
+
public static String getRecordTypeId(String department_str) {
String record_type_id = '';
if (department_str == 'GI') {
// 娑堝寲绉�
record_type_id = '01210000000QemLAAS';
- } else if(department_str == 'BF') {
+ } else if (department_str == 'BF') {
// 鍛煎惛绉�
record_type_id = '01210000000QezZAAS';
- } else if(department_str == 'GYN') {
+ } else if (department_str == 'GYN') {
// 濠︿汉绉�
record_type_id = '01210000000QezoAAC';
- } else if(department_str == 'GS') {
+ } else if (department_str == 'GS') {
// 鏅绉�
record_type_id = '01210000000QezeAAC';
- } else if(department_str == 'URO') {
+ } else if (department_str == 'URO') {
// 娉屽翱绉�
record_type_id = '01210000000QezjAAC';
- } else if(department_str == 'ENT') {
+ } else if (department_str == 'ENT') {
// 鑰抽蓟鍠夌
record_type_id = '01210000000QeztAAC';
- } else if(department_str == 'ET') {
+ } else if (department_str == 'ET') {
record_type_id = '01210000000QemQAAS';
- } else if(department_str == 'OTH') {
+ } else if (department_str == 'OTH') {
// 銇濄伄浠�
record_type_id = '01210000000QezyAAC';
}
-
+
return record_type_id;
}
@@ -287,743 +733,7 @@
public static Integer ControllerUtil() {
Integer i = 0;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
+
return i;
}
-
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LookupSearchResultTest.cls b/force-app/main/default/classes/LookupSearchResultTest.cls
new file mode 100644
index 0000000..7dad0a5
--- /dev/null
+++ b/force-app/main/default/classes/LookupSearchResultTest.cls
@@ -0,0 +1,46 @@
+@isTest
+private class LookupSearchResultTest {
+ @testSetup
+ static void testInfo() {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Account myAccount2 = new Account(name = 'Account001', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '2');
+ insert myAccount2;
+ }
+
+ @isTest
+ static void testLookupSearchResult() {
+ String id = '';
+ String title = '';
+ List<Account> account = [
+ SELECT Id, Name
+ FROM Account
+ WHERE Name = 'Account001'
+ LIMIT 1
+ ];
+ for (Account acc : account) {
+ id = acc.Id;
+ }
+ object compareTo = account;
+ LookupSearchResult resultA = new LookupSearchResult(id, 'Account', 'standard:account', 'Account', 'Account');
+ LookupSearchResult resultB = new LookupSearchResult('', '', '', title, '');
+ LookupSearchResult resultC = new LookupSearchResult(id, 'Account', 'standard:account', title, 'Account');
+ System.Test.startTest();
+ resultA.getId();
+ resultA.getSObjectType();
+ resultA.getIcon();
+ resultA.getTitle();
+ resultA.getSubtitle();
+ resultB.compareTo(resultB);
+ System.assertEquals(1, account.size(), 'expecting to find 1 Account');
+ List<LookupSearchResult> con = new List<LookupSearchResult>();
+ con.sort();
+ System.Test.stopTest();
+ }
+}
diff --git a/force-app/main/default/classes/LookupSearchResultTest.cls-meta.xml b/force-app/main/default/classes/LookupSearchResultTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/LookupSearchResultTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/MetaDataUtility.cls b/force-app/main/default/classes/MetaDataUtility.cls
index 34a5b4e..295c7c7 100644
--- a/force-app/main/default/classes/MetaDataUtility.cls
+++ b/force-app/main/default/classes/MetaDataUtility.cls
@@ -1,32 +1,29 @@
public without sharing class MetaDataUtility {
-
- public static List<Metadata.LayoutSection> GetRecordTypePageLayout(string record_type_id,string objectType){
-
- Map<string,object> mso = null;
+ public static List<Metadata.LayoutSection> GetRecordTypePageLayout(string record_type_id, string objectType) {
+ Map<string, object> mso = null;
System.debug('rerord 6' + record_type_id + ':' + objectType);
- string layout_name = GetRecordTypePageLayoutName(record_type_id,objectType,UserInfo.getProfileId());
+ string layout_name = GetRecordTypePageLayoutName(record_type_id, objectType, UserInfo.getProfileId());
System.debug('layout 8' + layout_name);
- List<Metadata.LayoutSection> temp = GetLayoutSections(objectType,layout_name);
- List<Metadata.LayoutSection> layoutSectionList = new List<Metadata.LayoutSection>();
- for(Metadata.LayoutSection section : temp){
+ List<Metadata.LayoutSection> temp = GetLayoutSections(objectType, layout_name);
+ List<Metadata.LayoutSection> layoutSectionList = new List<Metadata.LayoutSection>();
+ for (Metadata.LayoutSection section : temp) {
boolean a = false;
- for( Metadata.LayoutColumn c: section.layoutColumns){
+ for (Metadata.LayoutColumn c : section.layoutColumns) {
//system.debug(c);
- if(c.layoutItems != null && c.layoutItems.size() > 0 ){
+ if (c.layoutItems != null && c.layoutItems.size() > 0) {
a = true;
}
-
}
- if(a){
- layoutSectionList.add(section);
+ if (a) {
+ layoutSectionList.add(section);
}
}
return layoutSectionList;
}
-
+
/*[{
- "attributes": {
+ "attributes": {
"type": "Layout",
"url": "/services/data/v53.0/tooling/sobjects/Layout/00h10000009iAb5AAE"
},
@@ -35,25 +32,24 @@
"TableEnumOrId": "01I10000000er3hEAA",
"LayoutType": "Standard"
}]
- */
-
- public static string GetTableOrEnumId(string objectType){
-
- Map<string,object> mso = null;
+ */
+
+ public static string GetTableOrEnumId(string objectType) {
+ Map<string, object> mso = null;
string resp = null;
string table_or_enum_id = objectType;
- if(objectType.endsWith('__c')){
- resp = ToolingQuery('SELECT id,DeveloperName from CustomObject where DeveloperName =\''+objectType.replace('__c', '')+'\'');
- if(resp == null){
+ if (objectType.endsWith('__c')) {
+ resp = ToolingQuery('SELECT id,DeveloperName from CustomObject where DeveloperName =\'' + objectType.replace('__c', '') + '\'');
+ if (resp == null) {
system.debug('resp is not ok');
return null;
- }else{
- mso = (Map<string,object>)Json.deserializeUntyped(resp);
- if(integer.valueOf(mso.get('size')) > 0){
- table_or_enum_id = string.valueOf(((Map<string,object>)(((List<object>)mso.get('records'))[0])).get('Id'));
- }else{
+ } else {
+ mso = (Map<string, object>) Json.deserializeUntyped(resp);
+ if (integer.valueOf(mso.get('size')) > 0) {
+ table_or_enum_id = string.valueOf(((Map<string, object>) (((List<object>) mso.get('records'))[0])).get('Id'));
+ } else {
system.debug('no records');
- return null;
+ return null;
}
}
}
@@ -61,125 +57,120 @@
return table_or_enum_id;
}
-
- public static List<object> GetAllPageLayout(string objectType){
+
+ public static List<object> GetAllPageLayout(string objectType) {
string resp = null;
- Map<string,object> mso = null;
-
-
- string table_or_enum_id = GetTableOrEnumId(objectType);
-
- if(string.isBlank(table_or_enum_id)){
+ Map<string, object> mso = null;
+
+ string table_or_enum_id = GetTableOrEnumId(objectType);
+
+ if (string.isBlank(table_or_enum_id)) {
return new List<object>();
}
-
- resp = ToolingQuery('SELECT id,name,TableEnumOrId,LayoutType FROM Layout where TableEnumOrId = \''+table_or_enum_id+'\'');
- if(resp == null){
- system.debug('Layout where TableEnumOrId='+table_or_enum_id+' is null');
+
+ resp = ToolingQuery('SELECT id,name,TableEnumOrId,LayoutType FROM Layout where TableEnumOrId = \'' + table_or_enum_id + '\'');
+ if (resp == null) {
+ system.debug('Layout where TableEnumOrId=' + table_or_enum_id + ' is null');
return null;
- }else{
- mso = (Map<string,object>)Json.deserializeUntyped(resp);
- if(integer.valueOf(mso.get('size')) > 0){
- return (List<object>)mso.get('records');
- }else{
+ } else {
+ mso = (Map<string, object>) Json.deserializeUntyped(resp);
+ if (integer.valueOf(mso.get('size')) > 0) {
+ return (List<object>) mso.get('records');
+ } else {
system.debug('no records');
return new List<object>();
}
}
}
-
-
- public static string GetRecordTypePageLayoutName(string record_type_id,string objectType, string profile_id){
- System.debug('objectType 92' + objectType);
+
+ public static string GetRecordTypePageLayoutName(string record_type_id, string objectType, string profile_id) {
+ System.debug('objectType 92' + objectType);
System.debug('profile 93 ' + profile_id);
-
- if(!string.isBlank(objectType)){
- List<sobject> lso = [SELECT Id, Name, DeveloperName, SobjectType, IsActive, Description, BusinessProcessId FROM RecordType where SobjectType = :objectType];
- if(lso.size()==0){
- return string.valueOf(((Map<string,object>)(GetAllPageLayout(objectType)[0])).get('Name'));
+
+ if (!string.isBlank(objectType)) {
+ List<sobject> lso = [
+ SELECT Id, Name, DeveloperName, SobjectType, IsActive, Description, BusinessProcessId
+ FROM RecordType
+ WHERE SobjectType = :objectType
+ ];
+ if (lso.size() == 0) {
+ return string.valueOf(((Map<string, object>) (GetAllPageLayout(objectType)[0])).get('Name'));
}
}
-
+
// 01210000000QfWdAAK
string query = 'SELECT Layout.Name, Layout.TableEnumOrId, ProfileId, Profile.Name, RecordTypeId FROM ProfileLayout where id!=null ';
- if(!string.isBlank(record_type_id)){
- query += ' and RecordTypeId = \''+record_type_id+'\'';
+ if (!string.isBlank(record_type_id)) {
+ query += ' and RecordTypeId = \'' + record_type_id + '\'';
}
-
- if(!string.isBlank(objectType)){
- query += ' and TableEnumOrId = \''+ GetTableOrEnumId(objectType) +'\'';
+
+ if (!string.isBlank(objectType)) {
+ query += ' and TableEnumOrId = \'' + GetTableOrEnumId(objectType) + '\'';
}
-
- if(!string.isBlank(profile_id)){
- query += ' and ProfileId = \''+profile_id+'\'';
+
+ if (!string.isBlank(profile_id)) {
+ query += ' and ProfileId = \'' + profile_id + '\'';
}
query += ' order by LastModifiedDate desc ';
- system.debug('query='+query);
+ system.debug('query=' + query);
string s = ToolingQuery(query);
- if(string.isBlank(s)){
+ if (string.isBlank(s)) {
system.debug('s is blank');
return null;
- }else{
- Map<string,object> mso = (Map<string,object>)JSON.deserializeUntyped(s);
+ } else {
+ Map<string, object> mso = (Map<string, object>) JSON.deserializeUntyped(s);
System.debug('mso 122' + mso);
-
- if(integer.valueOf(mso.get('size')) > 0){
- List<object> records = ((List<object>)mso.get('records'));
-
- mso = (Map<string,object>)(records[0]);
- return string.valueOf(((Map<string,object>)(mso.get('Layout'))).get('Name'));
- }else{
+
+ if (integer.valueOf(mso.get('size')) > 0) {
+ List<object> records = ((List<object>) mso.get('records'));
+
+ mso = (Map<string, object>) (records[0]);
+ return string.valueOf(((Map<string, object>) (mso.get('Layout'))).get('Name'));
+ } else {
return null;
}
}
-
-
-
}
-
- public static string ToolingQuery(string query){
-
- system.debug('query='+query);
- String baseURL = 'callout:SF_Rest_API/services/data/v41.0/tooling/query?q='+ query.replace(' ', '+');
+
+ public static string ToolingQuery(string query) {
+ system.debug('query=' + query);
+ String baseURL = 'callout:SF_Rest_API/services/data/v41.0/tooling/query?q=' + query.replace(' ', '+');
HttpResponse resp = null;
- HttpRequest req = new HttpRequest();
+ HttpRequest req = new HttpRequest();
req.setMethod('GET');
-
- //req.setHeader('Authorization', 'Bearer ' + UserInfo.getsessionid());
- //req.setEndpoint(baseURL);
- req.setEndpoint(baseURL);
-
- Http client = new Http();
+
+ //req.setHeader('Authorization', 'Bearer ' + UserInfo.getsessionid());
+ //req.setEndpoint(baseURL);
+ req.setEndpoint(baseURL);
+
+ Http client = new Http();
resp = client.send(req);
-
+
system.debug(resp.getStatus());
system.debug(resp.getStatusCode());
- if(resp.getStatus() == 'OK'){
+ if (resp.getStatus() == 'OK') {
string s = resp.getBody();
system.debug(resp.getBody());
- return s;
- }else{
- system.debug('status is not ok,error:'+resp.getBody());
+ return s;
+ } else {
+ system.debug('status is not ok,error:' + resp.getBody());
return null;
}
-
}
-
- public static List<Metadata.LayoutSection> GetLayoutSections(string object_name, string layout_name){
- List<String> componentNameList = new List<String>{object_name+'-'+layout_name};
+
+ public static List<Metadata.LayoutSection> GetLayoutSections(string object_name, string layout_name) {
+ List<String> componentNameList = new List<String>{ object_name + '-' + layout_name };
//閫氳繃Metadata.Operations.retrieve鑾峰彇metadata
//Metadata.Layout -> Metadata.LayoutSection -> Metadata.LayoutColumn objects -> Metadata.LayoutItem objects
System.debug('componentNameList 171: ' + componentNameList);
List<Metadata.Metadata> componentList = Metadata.Operations.retrieve(Metadata.MetadataType.Layout, componentNameList);
System.debug('componentList 173 ' + componentList);
- if(componentList?.size() > 0){
+ if (componentList?.size() > 0) {
Metadata.Layout layout = (Metadata.Layout) componentList.get(0);
List<Metadata.LayoutSection> layoutSectionList = layout.layoutSections;
return layoutSectionList;
- }
- else{
+ } else {
return null;
}
-
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/NewAndEditLeadController.cls b/force-app/main/default/classes/NewAndEditLeadController.cls
index c5db97e..a2501ca 100644
--- a/force-app/main/default/classes/NewAndEditLeadController.cls
+++ b/force-app/main/default/classes/NewAndEditLeadController.cls
@@ -3,48 +3,52 @@
* Created Date: 01/19/2022
* Purpose: Utility class for describe layouts
* Test Class: NewAndEditLeadController
- * History:
+ * History:
* 01/19/2022 - Bubba Li - Initial Code.
- *
+ *
* */
global without sharing class NewAndEditLeadController {
- public List <LayoutDescriberHelper.LayoutSection > layoutSections{set;get;}
- public String awsToken{set;get;}
+ public List<LayoutDescriberHelper.LayoutSection> layoutSections { get; set; }
+ public String awsToken { get; set; }
public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
public static String sobjectTypeValue = 'Lead';
- public Boolean isNewMode{set;get;}
- public Boolean isCloneMode{protected set;get;}
- public String rtTypeId {get; set;}
- public String AWSDataId{set;get;}
- public String AWSDataIdInquiryForm{set;get;}
- public String contactId{set;get;}//For Lookup field
- public List<String> encryptedAPIList{set;get;}
- public String staticResource {get; set;}
- public String staticResourceContact {get; set;}
- public String staticResourceInquiryForm{get; set;}
- public String requiredFieldAPIListStr {get; set;}
- public String fieldAPIToLabelMapStr {get; set;}
- public String Input_Required_Field_Msg{set;get;}
- public String PIPL_Name_Label{set;get;}
- public String PIPL_Input_Account_Error_Msg{set;get;}
- public String sobjectPrefix{set;get;}
- public String sobjecttypeForFrontEnd{set;get;}
- public String contactsInfo {set;get;}//key sfid;value awsid
- public Inquiry_form__c ifc{get; private set;}
- public String contactDataId{get; set;}
- public String layoutSectionsStr {get; set;}
- public String isDecryptContact {get; set;}
- public final string ApiPrefix{get;private set;} //Add By Li Jun 20220403
- public Map<string,string> AWSToSobjectEncryptedMap{get;private set;}
- public string AWSToSobjectEncryptedMapJson{get{return JSON.serialize(AWSToSobjectEncryptedMap);}}
+ public Boolean isNewMode { get; set; }
+ public Boolean isCloneMode { get; protected set; }
+ public String rtTypeId { get; set; }
+ public String AWSDataId { get; set; }
+ public String AWSDataIdInquiryForm { get; set; }
+ public String contactId { get; set; } //For Lookup field
+ public List<String> encryptedAPIList { get; set; }
+ public String staticResource { get; set; }
+ public String staticResourceContact { get; set; }
+ public String staticResourceInquiryForm { get; set; }
+ public String requiredFieldAPIListStr { get; set; }
+ public String fieldAPIToLabelMapStr { get; set; }
+ public String Input_Required_Field_Msg { get; set; }
+ public String PIPL_Name_Label { get; set; }
+ public String PIPL_Input_Account_Error_Msg { get; set; }
+ public String sobjectPrefix { get; set; }
+ public String sobjecttypeForFrontEnd { get; set; }
+ public String contactsInfo { get; set; } //key sfid;value awsid
+ public Inquiry_form__c ifc { get; private set; }
+ public String contactDataId { get; set; }
+ public String layoutSectionsStr { get; set; }
+ public String isDecryptContact { get; set; }
+ public final string ApiPrefix { get; private set; } //Add By Li Jun 20220403
+ public Map<string, string> AWSToSobjectEncryptedMap { get; private set; }
+ public string AWSToSobjectEncryptedMapJson {
+ get {
+ return JSON.serialize(AWSToSobjectEncryptedMap);
+ }
+ }
public String LeadCreatedDate { get; set; } // XLIU-CFE8M7 20220624 ssm
- public String VLookUpFieldsJson{get;private set;}
+ public String VLookUpFieldsJson { get; private set; }
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
- public String staticResourceV2 {get; set;}
+ public String staticResourceV2 { get; set; }
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
public NewAndEditLeadController(ApexPages.StandardController controller) {
- ApiPrefix = 'PIBackApi';
+ ApiPrefix = 'PIBackApi';
isDecryptContact = '0';
isNewMode = true;
isCloneMode = false;
@@ -52,99 +56,150 @@
PIPL_Name_Label = Label.PIPL_Name_Label;
PIPL_Input_Account_Error_Msg = label.PIPL_Input_Account_Error_Msg;
sobjecttypeForFrontEnd = sobjectTypeValue;
- Map<string,string> mso = ApexPages.currentPage().getParameters();
- if(mso != null && mso.containsKey('newclone')){
+ Map<string, string> mso = ApexPages.currentPage().getParameters();
+ if (mso != null && mso.containsKey('newclone')) {
isCloneMode = true;
}
//鑾峰彇鎵�鏈夊瓧娈�
- List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Lead').getDescribe().fields.getMap().keyset());
+ List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Lead').getDescribe().fields.getMap().keyset());
// Add fields to controller. This is to avoid the SOQL error in visualforce page
- if (!Test.isRunningTest()) {
+ if (!Test.isRunningTest()) {
controller.addFields(fieldList);
- }
- SObject obj = controller.getRecord();
+ }
+ SObject obj = controller.getRecord();
// XLIU-CFE8M7 20220624 ssm
- this.LeadCreatedDate = obj.get('CreatedDate') != null ? Date.newInstance(((Datetime)obj.get('CreatedDate')).year(), ((Datetime)obj.get('CreatedDate')).month(), ((Datetime)obj.get('CreatedDate')).day()).format() : Date.today().format();
+ this.LeadCreatedDate = obj.get('CreatedDate') != null
+ ? Date.newInstance(
+ ((Datetime) obj.get('CreatedDate')).year(),
+ ((Datetime) obj.get('CreatedDate')).month(),
+ ((Datetime) obj.get('CreatedDate')).day()
+ )
+ .format()
+ : Date.today().format();
// this.LeadCreatedDate = Date.today().format();
-
- if(ApexPages.currentPage().getParameters().get('CF00N1000000962np_lkid') != null){
+
+ if (ApexPages.currentPage().getParameters().get('CF00N1000000962np_lkid') != null) {
System.debug('CF00N1000000962np_lkid');
//浜у搧鍜ㄨ鍗曡繃鏉ョ殑
String InquiryFormId = ApexPages.currentPage().getParameters().get('CF00N1000000962np_lkid');
- ifc = [select Id,AWS_Data_Id__c,Contact_Name__c,Contact_Id__c,Hospital_Name__c,Hospital_ID__c,Department_Class__c,
- Department_ID__c,Opp_Name_Search__c,Opp_Name_Search_ID__c,Campaign__c,
- Campaign_ID__c,Name,Cancel_Reason__c,Phone__c,Email__c,Last_Name__c,LeadSource__c,Opportunity_Division__c,Request1__c,
- Urgent__c,Inquiry_Num__c,Product_Owner__c from Inquiry_form__c where id = :InquiryFormId];
+ ifc = [
+ SELECT
+ Id,
+ AWS_Data_Id__c,
+ Contact_Name__c,
+ Contact_Id__c,
+ Hospital_Name__c,
+ Hospital_ID__c,
+ Department_Class__c,
+ Department_ID__c,
+ Opp_Name_Search__c,
+ Opp_Name_Search_ID__c,
+ Campaign__c,
+ Campaign_ID__c,
+ Name,
+ Cancel_Reason__c,
+ Phone__c,
+ Email__c,
+ Last_Name__c,
+ LeadSource__c,
+ Opportunity_Division__c,
+ Request1__c,
+ Urgent__c,
+ Inquiry_Num__c,
+ Product_Owner__c
+ FROM Inquiry_form__c
+ WHERE id = :InquiryFormId
+ ];
System.debug('ifc = ' + ifc);
- if(ifc.Contact_Id__c !=null && ifc.Contact_Id__c != ''){
- Contact c = [select AWS_Data_Id__c from Contact where id = :ifc.Contact_Id__c];
+ if (ifc.Contact_Id__c != null && ifc.Contact_Id__c != '') {
+ Contact c = [
+ SELECT AWS_Data_Id__c
+ FROM Contact
+ WHERE id = :ifc.Contact_Id__c
+ ];
contactDataId = c.AWS_Data_Id__c;
}
AWSDataIdInquiryForm = ifc.AWS_Data_Id__c;
System.debug('ifc = ' + ifc);
rtTypeId = ApexPages.currentPage().getParameters().get('RecordType');
- obj.put('OwnerId',UserInfo.getUserId());
- obj.put('Inquiry_Num__c',ifc.Inquiry_Num__c);// 20220413 SWAG-CBUB2W you
- obj.put('owner_not_automatically_update__c',ifc.Product_Owner__c);
+ obj.put('OwnerId', UserInfo.getUserId());
+ obj.put('Inquiry_Num__c', ifc.Inquiry_Num__c); // 20220413 SWAG-CBUB2W you
+ obj.put('owner_not_automatically_update__c', ifc.Product_Owner__c);
controller.getRecord().put('LeadSource', ifc.LeadSource__c);
// controller.getRecord().put('Lead_Inquiry_form__c', ifc.Id);
- }else if(obj.Id != null){
+ } else if (obj.Id != null) {
//鏇存柊
isNewMode = false;
- Lead leadData = [select Id,RecordTypeId,AWS_Data_Id__c,Contact_Name__r.Id,Contact_Name__r.AWS_Data_Id__c from Lead where id =: obj.Id];
+ Lead leadData = [
+ SELECT Id, RecordTypeId, AWS_Data_Id__c, Contact_Name__r.Id, Contact_Name__r.AWS_Data_Id__c
+ FROM Lead
+ WHERE id = :obj.Id
+ ];
rtTypeId = leadData.RecordTypeId;
AWSDataId = leadData.AWS_Data_Id__c;
- Map<String,String> sfIdToAWSIdMap = new Map<String,String>();
- if(leadData.Contact_Name__r.Id != null){
- sfIdToAWSIdMap.put(String.valueof(leadData.Contact_Name__r.Id).subString(0,15),leadData.Contact_Name__r.AWS_Data_Id__c);
+ Map<String, String> sfIdToAWSIdMap = new Map<String, String>();
+ if (leadData.Contact_Name__r.Id != null) {
+ sfIdToAWSIdMap.put(String.valueof(leadData.Contact_Name__r.Id).subString(0, 15), leadData.Contact_Name__r.AWS_Data_Id__c);
}
contactsInfo = JSON.serialize(sfIdToAWSIdMap);
- }else{
+ } else {
//鐪嬮摼鎺ヤ腑鏈夋棤甯﹁繃鏉ョ殑鍙傛暟(瀹㈡埛浜哄憳)
// Map<string,string> mso = ApexPages.currentPage().getParameters();
- for(String key : mso.keySet()){
+ for (String key : mso.keySet()) {
System.debug('key=' + key + ',value=' + mso.get(key));
}
//鑱旂郴浜�
- if(mso.containsKey('CF00N10000006ps6f_lkid')){
+ if (mso.containsKey('CF00N10000006ps6f_lkid')) {
isDecryptContact = '1';
String contactId = mso.get('CF00N10000006ps6f_lkid');
//鏌ヨAWS_Data_Id__c
- List<Contact> contactList = new List<Contact>([select AWS_Data_Id__c from Contact where id=:contactId]);
+ List<Contact> contactList = new List<Contact>([SELECT AWS_Data_Id__c FROM Contact WHERE id = :contactId]);
Contact c = new Contact();
- if(contactList!=null&&contactList.size()>0){
+ if (contactList != null && contactList.size() > 0) {
c = contactList[0];
}
- if (c != null&&c.AWS_Data_Id__c!='') {
+ if (c != null && c.AWS_Data_Id__c != '') {
contactDataId = c.AWS_Data_Id__c;
}
//鏌ヨ鎴樼暐绉戝鍒嗙被
- List<Contact> cs = [select Account.Department_Class__c from Contact where id=:contactId];
- if(cs.size()>0){
- controller.getRecord().put('Department_Class__c',cs[0].Account.Department_Class__c);
+ List<Contact> cs = [
+ SELECT Account.Department_Class__c
+ FROM Contact
+ WHERE id = :contactId
+ ];
+ if (cs.size() > 0) {
+ controller.getRecord().put('Department_Class__c', cs[0].Account.Department_Class__c);
}
- controller.getRecord().put('Contact_Name__c',mso.get('CF00N10000006ps6f_lkid'));
+ controller.getRecord().put('Contact_Name__c', mso.get('CF00N10000006ps6f_lkid'));
}
//鍖婚櫌鍚�
- if(mso.containsKey('CF00N10000002CvC5_lkid')){
- controller.getRecord().put('Hospital_Name__c',mso.get('CF00N10000002CvC5_lkid'));
+ if (mso.containsKey('CF00N10000002CvC5_lkid')) {
+ controller.getRecord().put('Hospital_Name__c', mso.get('CF00N10000002CvC5_lkid'));
//閫氳繃鍖婚櫌id鏌ヨ鎴樼暐绉戝鍒嗙被
String hospitalId = mso.get('CF00N10000002CvC5_lkid');
- List<Account> hospitalAccount = [select Department_Class__c from Account where Id=:hospitalId];
- if(hospitalAccount.size()>0){
- List<Account> departmentAccount = [select Id from Account where Id=:hospitalAccount[0].Department_Class__c];
- if (departmentAccount.size()>0) {
+ List<Account> hospitalAccount = [
+ SELECT Department_Class__c
+ FROM Account
+ WHERE Id = :hospitalId
+ ];
+ if (hospitalAccount.size() > 0) {
+ List<Account> departmentAccount = [
+ SELECT Id
+ FROM Account
+ WHERE Id = :hospitalAccount[0].Department_Class__c
+ ];
+ if (departmentAccount.size() > 0) {
System.debug('Department_Class__c = ' + departmentAccount[0].Id);
- controller.getRecord().put('Department_Class__c',departmentAccount[0].Id);
+ controller.getRecord().put('Department_Class__c', departmentAccount[0].Id);
}
}
}
//鍏徃锛堢瀹わ級
- if(mso.containsKey('CF00N10000002CvC5')){
- controller.getRecord().put('Company',mso.get('CF00N10000002CvC5'));
+ if (mso.containsKey('CF00N10000002CvC5')) {
+ controller.getRecord().put('Company', mso.get('CF00N10000002CvC5'));
}
- //鎴樼暐绉戝CF00N10000006qNtt_lkid
+ //鎴樼暐绉戝CF00N10000006qNtt_lkid
// if(mso.containsKey('CF00N10000006qNtt_lkid ')){
// controller.getRecord().put('Department_Class__c',mso.get('CF00N10000006qNtt_lkid '));
// }
@@ -174,20 +229,23 @@
if (mso.containsKey(System.Label.Purchase_Type)) {
controller.getRecord().put('Purchase_Type__c', mso.get(System.Label.Purchase_Type));
}
- //20220427
- if (mso.containsKey(System.Label.Tender_information)) { //鎷涙爣椤圭洰Id
+ //20220427
+ if (mso.containsKey(System.Label.Tender_information)) {
+ //鎷涙爣椤圭洰Id
controller.getRecord().put('Tender_information__c', mso.get(System.Label.Tender_information));
}
- if (mso.containsKey(System.Label.Agency_Opportunity)) { //缁忛攢鍟嗚浠稩d
+ if (mso.containsKey(System.Label.Agency_Opportunity)) {
+ //缁忛攢鍟嗚浠稩d
controller.getRecord().put('Agency_Opportunity__c', mso.get(System.Label.Agency_Opportunity));
}
- if (mso.containsKey(System.Label.Sales_Method)) { //缁忛攢鍟嗚浠�--鎷涙爣鏂瑰紡
+ if (mso.containsKey(System.Label.Sales_Method)) {
+ //缁忛攢鍟嗚浠�--鎷涙爣鏂瑰紡
controller.getRecord().put('Sales_Method__c', mso.get(System.Label.Sales_Method));
}
if (mso.containsKey(System.Label.Request)) {
controller.getRecord().put('Request__c', mso.get(System.Label.Request));
}
- if (mso.containsKey(System.Label.Request_Detail)) {
+ if (mso.containsKey(System.Label.Request_Detail)) {
controller.getRecord().put('Request_Detail__c', mso.get(System.Label.Request_Detail));
}
// 2022-04-13 鏉ユ簮 jz end 0414 lt
@@ -197,13 +255,17 @@
rtTypeId = mso.get('RecordTypeId');
}
// 20220420 lt OBSAP end
- obj.put('OwnerId',UserInfo.getUserId());
+ obj.put('OwnerId', UserInfo.getUserId());
}
- system.debug('RecordTypeId:'+rtTypeId);
- LayoutDescriberHelper.LayoutWrapper LayoutWrapperValue = LayoutDescriberHelper.describeSectionWithFieldsWrapper(rtTypeId, 'Lead','classic');
+ system.debug('RecordTypeId:' + rtTypeId);
+ LayoutDescriberHelper.LayoutWrapper LayoutWrapperValue = LayoutDescriberHelper.describeSectionWithFieldsWrapper(
+ rtTypeId,
+ 'Lead',
+ 'classic'
+ );
layoutSections = LayoutWrapperValue.layoutSections;
List<String> requiredFieldAPIList = LayoutWrapperValue.requiredFieldAPIList;
- Map<String,String> fieldAPIToLabelMap = LayoutWrapperValue.fieldAPIToLabelMap;
+ Map<String, String> fieldAPIToLabelMap = LayoutWrapperValue.fieldAPIToLabelMap;
requiredFieldAPIListStr = JSON.serialize(requiredFieldAPIList);
fieldAPIToLabelMapStr = JSON.serialize(fieldAPIToLabelMap);
PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Lead');
@@ -216,7 +278,7 @@
encryptedAPIList = piIntegration.PIFields;
sobjectPrefix = piIntegration.sobjectPrefix;
layoutSectionsStr = JSON.serialize(layoutSections);
- AWSToSobjectEncryptedMap = new Map<String,String>();
+ AWSToSobjectEncryptedMap = new Map<String, String>();
for (PI_Field_Policy_Detail__c PIDetail : piIntegration.PIDetails) {
AWSToSobjectEncryptedMap.put(PIDetail.AWS_Field_API__c, PIDetail.SF_Field_API_Name__c);
}
@@ -232,97 +294,110 @@
VLookUpFieldsJson = Json.serialize(VLookUpFields);
}
- global class Response{
- public String recordId{set;get;}
- public String message{set;get;}
- public String status{set;get;}
+ global class Response {
+ public String recordId { get; set; }
+ public String message { get; set; }
+ public String status { get; set; }
}
@RemoteAction
- global static Response saveLead(String leadJson,String transId,Boolean isNew) {
+ global static Response saveLead(String leadJson, String transId, Boolean isNew) {
System.debug('Lead Info:' + JSON.serialize(leadJson));
//1. Prepare the payload for Lead
Schema.SObjectType leadSchema = schemaMap.get(sobjectTypeValue);
Map<String, Schema.SObjectField> fieldAPIToTypeMap = leadSchema.getDescribe().fields.getMap();
- Map<String,Object> fieldValueMap = (Map<String,Object>)JSON.deserializeUntyped(leadJson);
+ Map<String, Object> fieldValueMap = (Map<String, Object>) JSON.deserializeUntyped(leadJson);
Lead leadInfo = new Lead();
- String status = 'success';
+ String status = 'success';
Response resp = new Response();
Savepoint sp = Database.setSavepoint();
Boolean isClone = false;
String rid = '';
String awsDataId = '';
- try{
+ try {
//鑷畾涔夋牸寮忚浆鎹�
- for (String fieldAPI: fieldValueMap.keySet()) {
- system.debug('field API='+fieldAPI);
- if(!fieldAPIToTypeMap.containskey(fieldAPI)){
+ for (String fieldAPI : fieldValueMap.keySet()) {
+ system.debug('field API=' + fieldAPI);
+ if (!fieldAPIToTypeMap.containskey(fieldAPI)) {
continue;
}
- Schema.DisplayType fielddataType = fieldAPIToTypeMap.get(fieldAPI).getDescribe().getType();
- String fieldValue = String.valueOf(fieldValueMap.get(fieldAPI));
- system.debug('Field Type:'+fielddataType+' field Value='+fieldValue);
- if(String.valueOf(fielddataType)=='DATE'){
- leadInfo.put(fieldAPI,(String.isBlank(fieldValue)||String.isEmpty(fieldValue))? null:Date.valueOf(fieldValue.replace('/', '-')));
- }else if(String.valueOf(fielddataType)=='DATETIME'){
- if(String.isNotBlank(fieldValue)&&fieldValue.contains('T')){
- fieldValue = fieldValue.replace('T',' ');
+ Schema.DisplayType fielddataType = fieldAPIToTypeMap.get(fieldAPI).getDescribe().getType();
+ String fieldValue = String.valueOf(fieldValueMap.get(fieldAPI));
+ system.debug('Field Type:' + fielddataType + ' field Value=' + fieldValue);
+ if (String.valueOf(fielddataType) == 'DATE') {
+ leadInfo.put(
+ fieldAPI,
+ (String.isBlank(fieldValue) || String.isEmpty(fieldValue)) ? null : Date.valueOf(fieldValue.replace('/', '-'))
+ );
+ } else if (String.valueOf(fielddataType) == 'DATETIME') {
+ if (String.isNotBlank(fieldValue) && fieldValue.contains('T')) {
+ fieldValue = fieldValue.replace('T', ' ');
leadInfo.put(fieldAPI, Datetime.valueOfGmt(fieldValue));
- }else{
+ } else {
leadInfo.put(fieldAPI, null);
- }
- }else if(String.valueof(fielddataType)=='CURRENCY'|| String.valueof(fielddataType)=='PERCENT'||String.valueOf(fielddataType)=='Number'||String.valueOf(fielddataType)=='DOUBLE' ){
- leadInfo.put(fieldAPI, (String.isBlank(fieldValue)||String.isEmpty(fieldValue))?null:Decimal.valueOf(fieldValue.replace(',', '')));
- } else if(String.valueof(fielddataType)=='BOOLEAN'){
+ }
+ } else if (
+ String.valueof(fielddataType) == 'CURRENCY' ||
+ String.valueof(fielddataType) == 'PERCENT' ||
+ String.valueOf(fielddataType) == 'Number' ||
+ String.valueOf(fielddataType) == 'DOUBLE'
+ ) {
+ leadInfo.put(
+ fieldAPI,
+ (String.isBlank(fieldValue) || String.isEmpty(fieldValue)) ? null : Decimal.valueOf(fieldValue.replace(',', ''))
+ );
+ } else if (String.valueof(fielddataType) == 'BOOLEAN') {
leadInfo.put(fieldAPI, fieldValueMap.get(fieldAPI));
- }else {
- leadInfo.put(fieldAPI,fieldValue);
- }
+ } else {
+ leadInfo.put(fieldAPI, fieldValue);
+ }
}
-
+
//2. Save Record Process
-
-
+
System.debug('abcde');
- awsDataId = (String)leadInfo.get('AWS_Data_Id__c');
+ awsDataId = (String) leadInfo.get('AWS_Data_Id__c');
System.debug('awsDataId = ' + awsDataId);
- Lead[] leads = [select id from Lead where AWS_Data_Id__c =:awsDataId];
-
- if(!isNew){
+ Lead[] leads = [SELECT id FROM Lead WHERE AWS_Data_Id__c = :awsDataId];
+
+ if (!isNew) {
isClone = leads.size() == 0;
}
- System.debug('isClone---------'+isClone);
+ System.debug('isClone---------' + isClone);
//2022-6-10 yjk SWAG-CEY8GZ start
- if(leadInfo.Hospital_Name__c != null){
- Account acc = [select id,Hospital__c from Account where id= :leadInfo.Hospital_Name__c];
+ if (leadInfo.Hospital_Name__c != null) {
+ Account acc = [
+ SELECT id, Hospital__c
+ FROM Account
+ WHERE id = :leadInfo.Hospital_Name__c
+ ];
leadInfo.hospital__c = acc.Hospital__c;
}
//2022-6-10 yjk SWAG-CEY8GZ end
- if(isNew || isClone){
+ if (isNew || isClone) {
System.debug('leadInfozhj = ' + leadInfo);
- if(!Test.isRunningTest()){
+ if (!Test.isRunningTest()) {
insert leadInfo;
}
- }else{
+ } else {
System.debug('into update');
// String awsDataId = (String)leadInfo.get('AWS_Data_Id__c');
// System.debug('awsDataId = ' + awsDataId);
// Lead[] leads = [select id from Lead where AWS_Data_Id__c =:awsDataId];
System.debug('leads[0].id = ' + leads[0].id);
- leadInfo.put('Id',leads[0].id);//For testing;
- if(!Test.isRunningTest()){
+ leadInfo.put('Id', leads[0].id); //For testing;
+ if (!Test.isRunningTest()) {
update leadInfo;
}
}
- rid=leadInfo.Id;
- PIHelper.saveTransLog(sobjectTypeValue,(String)leadInfo.get('AWS_Data_Id__c'),rid,transId,leadJson ,status,'');
+ rid = leadInfo.Id;
+ PIHelper.saveTransLog(sobjectTypeValue, (String) leadInfo.get('AWS_Data_Id__c'), rid, transId, leadJson, status, '');
resp.recordId = leadInfo.Id;
resp.message = '';
resp.status = status;
System.debug('resp from sfdx back-end' + resp);
return resp;
-
- } catch(DmlException e) {
+ } catch (DmlException e) {
Integer index = 0;
System.debug(e.getNumDml());
System.debug(e.getDmlFields(index));
@@ -334,61 +409,75 @@
system.debug(e.getMessage());
system.debug(e.getStackTraceString());
- System.debug('into catch'+e.getMessage());
+ System.debug('into catch' + e.getMessage());
Database.rollback(sp);
resp.status = 'Exception';
- resp.message ='淇濆瓨澶辫触锛屽師鍥�:'+ e.getDmlMessage(index);
- PIHelper.saveTransLog(sobjectTypeValue,(String)leadInfo.get('AWS_Data_Id__c'),rid,transId, leadJson ,status,e.getMessage()+e.getStackTraceString());
+ resp.message = '淇濆瓨澶辫触锛屽師鍥�:' + e.getDmlMessage(index);
+ PIHelper.saveTransLog(
+ sobjectTypeValue,
+ (String) leadInfo.get('AWS_Data_Id__c'),
+ rid,
+ transId,
+ leadJson,
+ status,
+ e.getMessage() + e.getStackTraceString()
+ );
return resp;
-
- } catch(Exception e) {
- System.debug('into catch'+e.getMessage());
+ } catch (Exception e) {
+ System.debug('into catch' + e.getMessage());
Database.rollback(sp);
status = 'fail';
- PIHelper.saveTransLog(sobjectTypeValue,(String)leadInfo.get('AWS_Data_Id__c'),rid,transId,leadJson,status,e.getMessage());
- resp.message = e.getMessage();
+ PIHelper.saveTransLog(
+ sobjectTypeValue,
+ (String) leadInfo.get('AWS_Data_Id__c'),
+ rid,
+ transId,
+ leadJson,
+ status,
+ e.getMessage()
+ );
+ resp.message = e.getMessage();
resp.status = status;
return resp;
}
}
@RemoteAction
- global static String queryAccount(String accountTypes,String accountId) {
- System.debug('accountType='+accountTypes);
- System.debug('accountId='+accountId);
- List<Object> types = (List<Object>)JSON.deserializeUntyped(accountTypes);
- System.debug('types='+types);
+ global static String queryAccount(String accountTypes, String accountId) {
+ System.debug('accountType=' + accountTypes);
+ System.debug('accountId=' + accountId);
+ List<Object> types = (List<Object>) JSON.deserializeUntyped(accountTypes);
+ System.debug('types=' + types);
String soql = 'select Id,Name,';
for (Object t : types) {
- soql += (String)t+',';
+ soql += (String) t + ',';
}
- soql = soql.substring(0,soql.length()-1);
- soql += ' from Account where id=\''+accountId+'\'';
- System.debug('soql='+soql);
+ soql = soql.substring(0, soql.length() - 1);
+ soql += ' from Account where id=\'' + accountId + '\'';
+ System.debug('soql=' + soql);
Sobject account = new Account();
- if(!Test.isRunningTest()){
+ if (!Test.isRunningTest()) {
account = Database.query(soql);
- }else{
- account.put('Id','000000000000000');
+ } else {
+ account.put('Id', '000000000000000');
}
-
Map<String, Map<String, String>> m = new Map<String, Map<String, String>>();
-
- System.debug('account='+account);
+
+ System.debug('account=' + account);
for (Object ty : types) {
- String t = (String)ty;
- if (account.get(t) != null||Test.isRunningTest()){
+ String t = (String) ty;
+ if (account.get(t) != null || Test.isRunningTest()) {
Sobject acc = new Account();
- if(Test.isRunningTest()){
- acc.put('Id','000000000000000');
- acc.put('Name','Name');
- }else{
- acc = Database.query('select Id,Name from Account where id=\''+account.get(t)+'\'');
+ if (Test.isRunningTest()) {
+ acc.put('Id', '000000000000000');
+ acc.put('Name', 'Name');
+ } else {
+ acc = Database.query('select Id,Name from Account where id=\'' + account.get(t) + '\'');
}
Map<String, String> n = new Map<String, String>();
- n.put('Id', (String)acc.get('Id'));
- n.put('Name', (String)acc.get('Name'));
+ n.put('Id', (String) acc.get('Id'));
+ n.put('Name', (String) acc.get('Name'));
m.put(t, n);
}
}
@@ -400,7 +489,7 @@
// m.put('Department_Class__c', (String)account.get('Department_Class__c'));
// m.put('Department_Class__r.Name', (String)account.get('Department_Class__r.Name'));
// }
- System.debug('m='+m);
+ System.debug('m=' + m);
return JSON.serialize(m);
// return (String)account.get('Hospital__c');
@@ -408,757 +497,6 @@
public static Integer ControllerUtil() {
Integer i = 0;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- return i;}
-}
\ No newline at end of file
+ return i;
+ }
+}
diff --git a/force-app/main/default/classes/NewAndEditLeadControllerTest.cls b/force-app/main/default/classes/NewAndEditLeadControllerTest.cls
index 9aec75f..9be1bb1 100644
--- a/force-app/main/default/classes/NewAndEditLeadControllerTest.cls
+++ b/force-app/main/default/classes/NewAndEditLeadControllerTest.cls
@@ -2,15 +2,15 @@
* Author: Guo, Aline Yaying
* Created Date: 03/22/2022
* Purpose: Test Class
- * History:
+ * History:
* 03/22/2022 - Guo, Aline Yaying - Initial Code.
- *
+ *
* */
@isTest
private class NewAndEditLeadControllerTest {
@TestSetup
- static void makeData(){
- List<String> strList= new List<String>();
+ static void makeData() {
+ List<String> strList = new List<String>();
strList.add('Lead');
strList.add('Contact');
strList.add('Inquiry_form__c');
@@ -18,42 +18,248 @@
TestDataUtility.CreatePIPolicyConfigurations(strList);
}
static testMethod void testMethod1() {
-
Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
Test.startTest();
- Lead leadTest = new Lead();
- Contact cont = new Contact();
- ApexPages.StandardController con = new ApexPages.StandardController(leadTest);
- NewAndEditLeadController lead = new NewAndEditLeadController(con);
-
- String leadJson = '{"RecordTypeId":"01210000000QiRaAAK","Lead_No__c":"IN-JS-2022040127183","Status":"鏈窡杩�","Hospital_Name__c":"0011000000VAPEt","Department_Class__c":"0011000000V9bh5","Salutation":"","LastName":"***","Contact_Name__c":"0031m00000DHrkV","Cancel_Reason__c":"","Phone":"","Opp_Name_Search__c":"000000000000000","Email":"","Opp_Name__c":"Test","owner_not_automatically_update__c":false,"Purchase_Plan__c":"鏈�(鏃犻绠�)","Lead_Inquiry_form__c":"000000000000000","Opportunity_Division__c":"璇环","LeadSource":"鐢佃瘽","Campaign__c":"000000000000000","urgent__c":false,"SI_PromoteInquiry__c":false,"Request__c":"","Request_Detail__c":"","Opportunity_stage__c":"棰勭畻娌℃湁鎵瑰噯","Close_Forecasted_Date__c":"2022/04/01","Purchase_Reason__c":"鏇存柊","Sales_Method__c":"鍗曚竴鏉ユ簮閲囪喘","Fund_Basis__c":"閵�琛岃硣閲�","Purchase_Type__c":"涓�鑸紩鍚�","Company":"姹熻嫃鐪佷汉姘戝尰闄� 鍛煎惛绉� 鍛煎惛绉�","Name_Encrypted__c":"48a2693f6bf73d16e0abd48caf7fb756","Phone_Encrypted__c":"","Email_Encrypted__c":"","AWS_Data_Id__c":"959584917346320385"}';
- NewAndEditLeadController.saveLead(leadJson,'avgwshDFcxAS',False);
- NewAndEditLeadController.saveLead(leadJson,'avgwshDFcxAS',True);
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectAcc = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'
+ ];
+ if (rectAcc.size() == 0) {
+ return;
+ }
+ Account accountItem1 = new Account(Name = 'testaccount001', Dealer_discount__c = 10, RecordTypeId = rectCo[0].Id);
+ insert accountItem1;
+ Account accountItem3 = new Account(
+ Name = 'testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectAcc[0].Id,
+ ParentId = accountItem1.Id
+ );
+ insert accountItem3;
+ Account accountItem2 = new Account(
+ Name = 'testaccount002',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ Hospital__c = accountItem1.Id,
+ Department_Class__c = accountItem3.Id
+ );
+ insert accountItem2;
+ Contact contact2 = new Contact();
+ contact2.AccountId = accountItem2.Id;
+ contact2.FirstName = '璨换鑰�';
+ contact2.LastName = 'test1缁忛攢鍟�';
+ contact2.AWS_Data_Id__c = 'Test123';
+ insert contact2;
+
+ Lead leadTest = new Lead();
+ leadTest.LastName = 'test';
+ leadTest.Company = 'test';
+ leadTest.hospital__c = accountItem2.Hospital__c;
+ leadTest.Contact_Name__c = contact2.Id;
+ insert leadTest;
+
+ Inquiry_form__c inquiryform = new Inquiry_form__c();
+ inquiryform.Name = '2023062001';
+ inquiryform.Request1__c = '闇�瑕佹姤浠�';
+ inquiryform.Product1__c = '瓒呭0';
+ inquiryform.Hospital__c = accountItem2.Hospital__c;
+ inquiryform.Contact_Name__c = contact2.Id;
+
+ inquiryform.Opportunity_Division__c = '璇环';
+ insert inquiryform;
+
+ String contactDataId = contact2.AWS_Data_Id__c;
+
+ Boolean isClone = true;
+ Boolean isNew = true;
+ Map<string, string> AWSToSobjectEncryptedMap = new Map<String, String>();
+ String AWSToSobjectEncryptedMapJson = JSON.serialize(AWSToSobjectEncryptedMap);
+ PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Lead');
+ for (PI_Field_Policy_Detail__c PIDetail : piIntegration.PIDetails) {
+ AWSToSobjectEncryptedMap.put(PIDetail.AWS_Field_API__c, PIDetail.SF_Field_API_Name__c);
+ }
+ Map<string, string> mso = ApexPages.currentPage().getParameters();
+ mso.put('newclone', 'newclone');
+ mso.put('CF00N1000000962np_lkid', inquiryform.Id);
+ mso.put('CF00N10000006ps6f_lkid', contact2.Id);
+ mso.put('CF00N10000002CvC5_lkid', accountItem2.Hospital__c);
+ mso.put('CF00N10000002CvC5', 'Company');
+ mso.put('LeadSource', 'LeadSource');
+
+ String InquiryFormId = mso.get('CF00N1000000962np_lkid');
+ String contactId = mso.get('CF00N10000006ps6f_lkid');
+ Boolean isNewMode = false;
+ String recordId = leadTest.Id;
+ String rid = '';
+ ApexPages.StandardController con = new ApexPages.StandardController(leadTest);
+ NewAndEditLeadController lead = new NewAndEditLeadController(con);
+ Inquiry_form__c ifc = lead.ifc;
+ String token = lead.awsToken;
+ String AWSDataId = lead.AWSDataId;
+ String AWSDataIdInquiryForm = lead.AWSDataIdInquiryForm;
+ contactId = lead.contactId; //For Lookup field
+ String contactsInfo = lead.contactsInfo; //key sfid;value awsid
+ Map<String, String> sfIdToAWSIdMap = new Map<String, String>();
+
+ SObject obj = con.getRecord();
+ obj.put('Hospital_Name__c', mso.get('CF00N10000002CvC5_lkid'));
+ String hospitalId = mso.get('CF00N10000002CvC5_lkid');
+ if (obj.Id != null) {
+ Lead leadData = [
+ SELECT Id, RecordTypeId, AWS_Data_Id__c, Contact_Name__r.Id, Contact_Name__r.AWS_Data_Id__c
+ FROM Lead
+ WHERE id = :obj.Id
+ ];
+ String rtTypeId = leadData.RecordTypeId;
+ AWSDataId = leadData.AWS_Data_Id__c;
+ if (leadData.Contact_Name__r.Id != null) {
+ sfIdToAWSIdMap.put(String.valueof(leadData.Contact_Name__r.Id).subString(0, 15), leadData.Contact_Name__r.AWS_Data_Id__c);
+ }
+ contactsInfo = JSON.serialize(sfIdToAWSIdMap);
+ }
+
+ String leadJson = '{"RecordTypeId":"01210000000QiRaAAK","Lead_No__c":"IN-JS-2022040127183","Status":"鏈窡杩�","Hospital_Name__c":"0011000000VAPEt","Department_Class__c":"0011000000V9bh5","Salutation":"","LastName":"***","Contact_Name__c":"0031m00000DHrkV","Cancel_Reason__c":"","Phone":"","Opp_Name_Search__c":"000000000000000","Email":"","Opp_Name__c":"Test","owner_not_automatically_update__c":false,"Purchase_Plan__c":"鏈�(鏃犻绠�)","Lead_Inquiry_form__c":"000000000000000","Opportunity_Division__c":"璇环","LeadSource":"鐢佃瘽","Campaign__c":"000000000000000","urgent__c":false,"SI_PromoteInquiry__c":false,"Request__c":"","Request_Detail__c":"","Opportunity_stage__c":"棰勭畻娌℃湁鎵瑰噯","Close_Forecasted_Date__c":"2022/04/01","Purchase_Reason__c":"鏇存柊","Sales_Method__c":"鍗曚竴鏉ユ簮閲囪喘","Fund_Basis__c":"閵�琛岃硣閲�","Purchase_Type__c":"涓�鑸紩鍚�","Company":"姹熻嫃鐪佷汉姘戝尰闄� 鍛煎惛绉� 鍛煎惛绉�","Name_Encrypted__c":"48a2693f6bf73d16e0abd48caf7fb756","Phone_Encrypted__c":"","Email_Encrypted__c":"","AWS_Data_Id__c":"959584917346320385"}';
+ NewAndEditLeadController.saveLead(leadJson, 'avgwshDFcxAS', false);
+ NewAndEditLeadController.saveLead(leadJson, 'avgwshDFcxAS', true);
+ NewAndEditLeadController.saveLead(leadJson, 'avgwshDFcxAS', isNew);
+
+ Test.stopTest();
+ }
+
+ static testMethod void testMethod2() {
+ Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
+ Test.startTest();
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ List<RecordType> rectAcc = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'
+ ];
+ if (rectAcc.size() == 0) {
+ return;
+ }
+ Account accountItem1 = new Account(Name = 'testaccount001', Dealer_discount__c = 10, RecordTypeId = rectCo[0].Id);
+ insert accountItem1;
+ Account accountItem3 = new Account(
+ Name = 'testaccount001',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectAcc[0].Id,
+ ParentId = accountItem1.Id
+ );
+ insert accountItem3;
+ Account accountItem2 = new Account(
+ Name = 'testaccount002',
+ Dealer_discount__c = 10,
+ RecordTypeId = rectCo[0].Id,
+ Hospital__c = accountItem1.Id,
+ Department_Class__c = accountItem3.Id
+ );
+ insert accountItem2;
+
+ Contact contact2 = new Contact();
+ contact2.AccountId = accountItem2.Id;
+ contact2.FirstName = '璨换鑰�';
+ contact2.LastName = 'test1缁忛攢鍟�';
+ contact2.AWS_Data_Id__c = 'Test123';
+ insert contact2;
+
+ Lead leadTest = new Lead();
+ leadTest.LastName = 'test';
+ leadTest.Company = 'test';
+ leadTest.hospital__c = accountItem2.Hospital__c;
+ leadTest.Contact_Name__c = contact2.Id;
+ insert leadTest;
+
+ Inquiry_form__c inquiryform = new Inquiry_form__c();
+ inquiryform.Name = '2023062001';
+ inquiryform.Request1__c = '闇�瑕佹姤浠�';
+ inquiryform.Product1__c = '瓒呭0';
+ inquiryform.Hospital__c = accountItem2.Hospital__c;
+ inquiryform.Contact_Name__c = contact2.Id;
+
+ inquiryform.Opportunity_Division__c = '璇环';
+ insert inquiryform;
+
+ String contactDataId = contact2.AWS_Data_Id__c;
+
+ Boolean isClone = true;
+ Boolean isNew = true;
+ Map<string, string> AWSToSobjectEncryptedMap = new Map<String, String>();
+ String AWSToSobjectEncryptedMapJson = JSON.serialize(AWSToSobjectEncryptedMap);
+ PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Lead');
+ for (PI_Field_Policy_Detail__c PIDetail : piIntegration.PIDetails) {
+ AWSToSobjectEncryptedMap.put(PIDetail.AWS_Field_API__c, PIDetail.SF_Field_API_Name__c);
+ }
+ Map<string, string> mso = ApexPages.currentPage().getParameters();
+ mso.put('newclone', 'newclone');
+ mso.put('CF00N1000000962np_lkid', null);
+ mso.put('CF00N10000006ps6f_lkid', contact2.Id);
+ mso.put('CF00N10000002CvC5_lkid', accountItem2.Hospital__c);
+ mso.put('CF00N10000002CvC5', 'Company');
+ mso.put('LeadSource', 'LeadSource');
+
+ String InquiryFormId = mso.get('CF00N1000000962np_lkid');
+ String contactId = mso.get('CF00N10000006ps6f_lkid');
+ Boolean isNewMode = false;
+ String recordId = leadTest.Id;
+ String rid = '';
+ ApexPages.StandardController con = new ApexPages.StandardController(leadTest);
+ NewAndEditLeadController lead = new NewAndEditLeadController(con);
+ Inquiry_form__c ifc = lead.ifc;
+ String token = lead.awsToken;
+ String AWSDataId = lead.AWSDataId;
+ String AWSDataIdInquiryForm = lead.AWSDataIdInquiryForm;
+ String contactsInfo = lead.contactsInfo; //key sfid;value awsid
+ Map<String, String> sfIdToAWSIdMap = new Map<String, String>();
+ SObject obj = con.getRecord();
+ obj.put('Hospital_Name__c', mso.get('CF00N10000002CvC5_lkid'));
+ String hospitalId = mso.get('CF00N10000002CvC5_lkid');
+
+ String leadJson = '{"RecordTypeId":"01210000000QiRaAAK","Lead_No__c":"IN-JS-2022040127183","Status":"鏈窡杩�","Hospital_Name__c":"0011000000VAPEt","Department_Class__c":"0011000000V9bh5","Salutation":"","LastName":"***","Contact_Name__c":"0031m00000DHrkV","Cancel_Reason__c":"","Phone":"","Opp_Name_Search__c":"000000000000000","Email":"","Opp_Name__c":"Test","owner_not_automatically_update__c":false,"Purchase_Plan__c":"鏈�(鏃犻绠�)","Lead_Inquiry_form__c":"000000000000000","Opportunity_Division__c":"璇环","LeadSource":"鐢佃瘽","Campaign__c":"000000000000000","urgent__c":false,"SI_PromoteInquiry__c":false,"Request__c":"","Request_Detail__c":"","Opportunity_stage__c":"棰勭畻娌℃湁鎵瑰噯","Close_Forecasted_Date__c":"2022/04/01","Purchase_Reason__c":"鏇存柊","Sales_Method__c":"鍗曚竴鏉ユ簮閲囪喘","Fund_Basis__c":"閵�琛岃硣閲�","Purchase_Type__c":"涓�鑸紩鍚�","Company":"姹熻嫃鐪佷汉姘戝尰闄� 鍛煎惛绉� 鍛煎惛绉�","Name_Encrypted__c":"48a2693f6bf73d16e0abd48caf7fb756","Phone_Encrypted__c":"","Email_Encrypted__c":"","AWS_Data_Id__c":"959584917346320385"}';
+ NewAndEditLeadController.saveLead(leadJson, 'avgwshDFcxAS', false);
+ NewAndEditLeadController.saveLead(leadJson, 'avgwshDFcxAS', true);
+ NewAndEditLeadController.saveLead(leadJson, 'avgwshDFcxAS', isNew);
Test.stopTest();
}
static testMethod void testMethod3() {
Lead leadTest = new Lead();
- String url = ApexPages.currentPage().getParameters().put('CF00N10000006ps6f_lkid','000000000000000');
- url = ApexPages.currentPage().getParameters().put('RecordType','01210000000QiRf');
+ String url = ApexPages.currentPage().getParameters().put('CF00N10000006ps6f_lkid', '000000000000000');
+ url = ApexPages.currentPage().getParameters().put('RecordType', '01210000000QiRf');
Test.startTest();
- try{
+ try {
NewAndEditLeadController.ControllerUtil();
- ApexPages.StandardController con = new ApexPages.StandardController(leadTest);
+ ApexPages.StandardController con = new ApexPages.StandardController(leadTest);
NewAndEditLeadController lc = new NewAndEditLeadController(con);
String jsonString = '["Department_Class__c"]';
- system.debug('jsonString:'+JSON.deserializeUntyped(jsonString));
+ system.debug('jsonString:' + JSON.deserializeUntyped(jsonString));
String token = lc.awsToken;
String AWSDataId = lc.AWSDataId;
String AWSDataIdInquiryForm = lc.AWSDataIdInquiryForm;
- String contactId = lc.contactId;//For Lookup field
- String contactsInfo = lc.contactsInfo ;//key sfid;value awsid
+ String contactId = lc.contactId; //For Lookup field
+ String contactsInfo = lc.contactsInfo; //key sfid;value awsid
Inquiry_form__c ifc = lc.ifc;
NewAndEditLeadController.queryAccount(jsonString, '000000000000000');
- }catch(Exception e){
- system.debug('Exception from query account:'+e.getMessage());
+ } catch (Exception e) {
+ system.debug('Exception from query account:' + e.getMessage());
}
Test.stopTest();
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/Product2Handler.cls b/force-app/main/default/classes/Product2Handler.cls
index 89d3df3..1ea9b7a 100644
--- a/force-app/main/default/classes/Product2Handler.cls
+++ b/force-app/main/default/classes/Product2Handler.cls
@@ -26,19 +26,18 @@
// FlgStopManufacure(this.newList, this.oldMap);
//SFDC鍋滄棰勮 lt 20211015 add end
FlgStopManufacure();
-
}
//SFDC鍋滄棰勮 lt 20210922 add start
- protected override void afterUpdate(){
+ protected override void afterUpdate() {
Calculate_AverageMonthSales(this.newList, this.oldMap);
- AssignmentUltrasonic(this.newList, this.oldMap); //20230506 lt DB202304618804 鍖呭惈瓒呭0 add
+ AssignmentUltrasonic(this.newList, this.oldMap); //20230506 lt DB202304618804 鍖呭惈瓒呭0 add
}
//SFDC鍋滄棰勮 lt 20210922 add end
// SWAG-BHE9GK LHJ 绔炰簤瀵规墜浜у搧鑷姩缂栫爜 Start
private void SetCompetitorCode() {
- Boolean SelctFlg = False;
+ Boolean SelctFlg = false;
list<AggregateResult> proList;
//甯﹂噺閲囪喘淇敼 start fy
list<AggregateResult> proListsc;
@@ -55,48 +54,60 @@
for (Product2 nObj : newList) {
//甯﹂噺閲囪喘淇敼 start fy
String RecordTypeString = '';
- if(nObj.RecordTypeId!=null){
- RecordTypeString=String.valueof(nObj.RecordTypeId).substring(0,15);
+ if (nObj.RecordTypeId != null) {
+ RecordTypeString = String.valueof(nObj.RecordTypeId).substring(0, 15);
}
// nObj.Competitor_product_dummy__c=System.Label.ProductRecordTypeID.contains(RecordTypeString);
// if (nObj.Competitor_product_dummy__c) {
if (System.Label.ProductRecordTypeID.contains(RecordTypeString)) {
- SelctFlg = True;
+ SelctFlg = true;
}
//甯﹂噺閲囪喘淇敼 end fy
}
if (SelctFlg) {
- proList = [Select Max(ProductCode) PC From Product2 Where ProductCode Like 'SD%' and ProductCode!='SD999999'];
+ proList = [
+ SELECT Max(ProductCode) PC
+ FROM Product2
+ WHERE ProductCode LIKE 'SD%' AND ProductCode != 'SD999999'
+ ];
if (proList != null && proList.size() > 0) {
strPC = String.valueof(proList[0].get('PC'));
}
//甯﹂噺閲囪喘 start fy
- proListsc = [Select Max(ProductCode) PC From Product2 Where ProductCode Like 'SC%'];
- if (proListsc != null && proListsc.size() > 0) {
- strPCsc = String.valueof(proListsc[0].get('PC'));
- }
+ // proListsc = [Select Max(ProductCode) PC From Product2 Where ProductCode Like 'SC%'];
+ // if (proListsc != null && proListsc.size() > 0) {
+ // strPCsc = String.valueof(proListsc[0].get('PC'));
+ // }
+ List<Product2> lastPro = [
+ SELECT Id, ProductCode
+ FROM Product2
+ WHERE ProductCode LIKE 'SC%'
+ ORDER BY ProductCode DESC
+ LIMIT 1
+ ];
+ strPCsc = lastPro != null && lastPro.size() > 0 ? lastPro[0].ProductCode : '';
//甯﹂噺閲囪喘 end fy
}
for (Product2 nObj : newList) {
//甯﹂噺閲囪喘 start fy
String RecordTypeString = '';
- if(nObj.RecordTypeId!=null){
- RecordTypeString=String.valueof(nObj.RecordTypeId).substring(0,15);
+ if (nObj.RecordTypeId != null) {
+ RecordTypeString = String.valueof(nObj.RecordTypeId).substring(0, 15);
}
// if (nObj.Competitor_product_dummy__c && strPC.length() == 8
// if (System.Label.ProductRecordTypeID.contains(RecordTypeString) && strPC.length() == 8
if (System.Label.ProductRecordTypeID.contains(RecordTypeString)) {
- //甯﹂噺閲囪喘 end fy
- // && proList != null && proList.size() > 0 ) {
+ //甯﹂噺閲囪喘 end fy
+ // && proList != null && proList.size() > 0 ) {
// Integer num = Integer.valueOf(strPC.SubString(2,strPC.length())) + i;
- Integer num = String.isNotBlank(strPC) ? Integer.valueOf(strPC.SubString(2,strPC.length())) + i : i;
+ Integer num = String.isNotBlank(strPC) ? Integer.valueOf(strPC.SubString(2, strPC.length())) + i : i;
//甯﹂噺閲囪喘 start fy
- Integer numsc = String.isNotBlank(strPCsc) ? Integer.valueOf(strPCsc.SubString(2,strPCsc.length())) + i : i;
+ Integer numsc = String.isNotBlank(strPCsc) ? Integer.valueOf(strPCsc.SubString(2, strPCsc.length())) + i : i;
// if(RecordTypeString=='0129D000001NacC'){
- if(RecordTypes != null && RecordTypes.size() > 1 && RecordTypeString == RecordTypes[1]){
- nObj.ProductCode = 'SC' + String.valueOf(numsc).leftpad(8,'0');
- }else{
- nObj.ProductCode = 'SD' + String.valueOf(num).leftpad(6,'0');
+ if (RecordTypes != null && RecordTypes.size() > 1 && RecordTypeString == RecordTypes[1]) {
+ nObj.ProductCode = 'SC' + String.valueOf(numsc).leftpad(8, '0');
+ } else {
+ nObj.ProductCode = 'SD' + String.valueOf(num).leftpad(6, '0');
}
//甯﹂噺閲囪喘 end fy
// nObj.ProductCode = 'SD' + String.valueOf(num).leftpad(6,'0');
@@ -106,36 +117,59 @@
}
// SWAG-BHE9GK LHJ 绔炰簤瀵规墜浜у搧鑷姩缂栫爜 End
-
//WLIG-CKKA4M xxf 銆愬鎵樸�戙�愪骇鍝佷富鏁版嵁銆戞敞鍐岃瘉鏇存柊鍚庨儴鍒嗗瓧娈典俊鎭湭鑷姩浠e叆 Start
private void AutomaticallyBringData() {
List<String> noNewList = new List<String>();
- for(Product2 prd : newList){
+ for (Product2 prd : newList) {
if (prd.Asset_Model_No__c != null) {
noNewList.add(prd.Asset_Model_No__c);
}
}
if (!noNewList.isEmpty()) {
-
- List<Product2> prdList = [select Id, Name,Asset_Model_No__c,MDM_Name__c,
- Maintenance_Price_Year__c,Extend_new_product_gurantee_MD__c,
- Extend_Gurantee_Start_MD__c,Extend_Gurantee_End_MD__c,
- Entend_gurantee_period_MD__c,Extend_new_product_gurantee__c,
- Extend_Gurantee_Start__c,Extend_Gurantee_End__c,Entend_gurantee_period__c,
- CanNotCancelledGurantee__c,Service_Category1__c,
- Service_Category2__c,Service_Category3__c,
- Service_Category4__c,Service_Category5__c,
- Service_Category6__c,Service_Category7__c,
- Can_Repair__c,RepairListPriceLevelA__c,
- RepairListPriceLevelB__c,RepairListPriceLevelC__c,
- PartSupplyFinishDate__c,EndSaleDate__c,ProductClass__c,ProductCategory__c,
- Period_Filter_Classify1__c,Period_Filter_Classify2__c,Period_Filter_Classify3__c,
- Intra_Trade_Service_RMB_Date1__c,Intra_Trade_Service_RMB_Date2__c,
- Intra_Trade_Service_RMB_EndDate1__c,Intra_Trade_Service_RMB_EndDate2__c,
- Intra_Trade_Service_RMB_1__c,Intra_Trade_Service_RMB_2__c
- from Product2
- where Asset_Model_No__c in :noNewList
- order by CreatedDate desc];
+ List<Product2> prdList = [
+ SELECT
+ Id,
+ Name,
+ Asset_Model_No__c,
+ MDM_Name__c,
+ Maintenance_Price_Year__c,
+ Extend_new_product_gurantee_MD__c,
+ Extend_Gurantee_Start_MD__c,
+ Extend_Gurantee_End_MD__c,
+ Entend_gurantee_period_MD__c,
+ Extend_new_product_gurantee__c,
+ Extend_Gurantee_Start__c,
+ Extend_Gurantee_End__c,
+ Entend_gurantee_period__c,
+ CanNotCancelledGurantee__c,
+ Service_Category1__c,
+ Service_Category2__c,
+ Service_Category3__c,
+ Service_Category4__c,
+ Service_Category5__c,
+ Service_Category6__c,
+ Service_Category7__c,
+ Can_Repair__c,
+ RepairListPriceLevelA__c,
+ RepairListPriceLevelB__c,
+ RepairListPriceLevelC__c,
+ PartSupplyFinishDate__c,
+ EndSaleDate__c,
+ ProductClass__c,
+ ProductCategory__c,
+ Period_Filter_Classify1__c,
+ Period_Filter_Classify2__c,
+ Period_Filter_Classify3__c,
+ Intra_Trade_Service_RMB_Date1__c,
+ Intra_Trade_Service_RMB_Date2__c,
+ Intra_Trade_Service_RMB_EndDate1__c,
+ Intra_Trade_Service_RMB_EndDate2__c,
+ Intra_Trade_Service_RMB_1__c,
+ Intra_Trade_Service_RMB_2__c
+ FROM Product2
+ WHERE Asset_Model_No__c IN :noNewList
+ ORDER BY CreatedDate DESC
+ ];
if (prdList.isEmpty()) {
return;
}
@@ -146,56 +180,56 @@
prdMap.put(pro2.Asset_Model_No__c, pro2);
}
}
-
- for(Product2 prd : newList){
- if (prdMap.containskey(prd.Asset_Model_No__c)){
- prd.Maintenance_Price_Year__c = prdMap.get(prd.Asset_Model_No__c).Maintenance_Price_Year__c;//缁翠慨鍚堝悓鎶ヤ环
- prd.CanNotCancelledGurantee__c = prdMap.get(prd.Asset_Model_No__c).CanNotCancelledGurantee__c;//涓嶅彲鍙栨秷澶氬勾淇濅慨
- prd.ProductClass__c = prdMap.get(prd.Asset_Model_No__c).ProductClass__c;//甯傚満浜у搧绫诲埆
- prd.ProductCategory__c = prdMap.get(prd.Asset_Model_No__c).ProductCategory__c;//甯傚満鍖哄垎
- prd.Extend_new_product_gurantee_MD__c = prdMap.get(prd.Asset_Model_No__c).Extend_new_product_gurantee_MD__c;//甯傚満淇濅慨瀵硅薄
- prd.Extend_new_product_gurantee__c = prdMap.get(prd.Asset_Model_No__c).Extend_new_product_gurantee__c;//鏈嶅姟淇濅慨瀵硅薄
- if (prdMap.get(prd.Asset_Model_No__c).Extend_new_product_gurantee_MD__c == true) {//甯傚満淇濅慨瀵硅薄
- prd.Entend_gurantee_period_MD__c = prdMap.get(prd.Asset_Model_No__c).Entend_gurantee_period_MD__c;//甯傚満淇濅慨鏈�(骞�)
+
+ for (Product2 prd : newList) {
+ if (prdMap.containskey(prd.Asset_Model_No__c)) {
+ prd.Maintenance_Price_Year__c = prdMap.get(prd.Asset_Model_No__c).Maintenance_Price_Year__c; //缁翠慨鍚堝悓鎶ヤ环
+ prd.CanNotCancelledGurantee__c = prdMap.get(prd.Asset_Model_No__c).CanNotCancelledGurantee__c; //涓嶅彲鍙栨秷澶氬勾淇濅慨
+ prd.ProductClass__c = prdMap.get(prd.Asset_Model_No__c).ProductClass__c; //甯傚満浜у搧绫诲埆
+ prd.ProductCategory__c = prdMap.get(prd.Asset_Model_No__c).ProductCategory__c; //甯傚満鍖哄垎
+ prd.Extend_new_product_gurantee_MD__c = prdMap.get(prd.Asset_Model_No__c).Extend_new_product_gurantee_MD__c; //甯傚満淇濅慨瀵硅薄
+ prd.Extend_new_product_gurantee__c = prdMap.get(prd.Asset_Model_No__c).Extend_new_product_gurantee__c; //鏈嶅姟淇濅慨瀵硅薄
+ if (prdMap.get(prd.Asset_Model_No__c).Extend_new_product_gurantee_MD__c == true) {
+ //甯傚満淇濅慨瀵硅薄
+ prd.Entend_gurantee_period_MD__c = prdMap.get(prd.Asset_Model_No__c).Entend_gurantee_period_MD__c; //甯傚満淇濅慨鏈�(骞�)
}
- if(prdMap.get(prd.Asset_Model_No__c).Extend_new_product_gurantee__c == true){//鏈嶅姟淇濅慨瀵硅薄
- prd.Entend_gurantee_period__c = prdMap.get(prd.Asset_Model_No__c).Entend_gurantee_period__c;//鏈嶅姟淇濅慨鏈�(骞�)
+ if (prdMap.get(prd.Asset_Model_No__c).Extend_new_product_gurantee__c == true) {
+ //鏈嶅姟淇濅慨瀵硅薄
+ prd.Entend_gurantee_period__c = prdMap.get(prd.Asset_Model_No__c).Entend_gurantee_period__c; //鏈嶅姟淇濅慨鏈�(骞�)
}
- prd.Extend_Gurantee_Start_MD__c = prdMap.get(prd.Asset_Model_No__c).Extend_Gurantee_Start_MD__c;//甯傚満淇濅慨寮�濮嬫棩
- prd.Extend_Gurantee_End_MD__c = prdMap.get(prd.Asset_Model_No__c).Extend_Gurantee_End_MD__c;//甯傚満淇濅慨缁撴潫鏃�
- prd.Extend_Gurantee_Start__c = prdMap.get(prd.Asset_Model_No__c).Extend_Gurantee_Start__c;//鏈嶅姟淇濅慨寮�濮嬫棩
- prd.Extend_Gurantee_End__c = prdMap.get(prd.Asset_Model_No__c).Extend_Gurantee_End__c;//鏈嶅姟淇濅慨缁撴潫鏃�
- prd.Service_Category1__c = prdMap.get(prd.Asset_Model_No__c).Service_Category1__c;//绗�1鏈嶅姟鍒嗙被
+ prd.Extend_Gurantee_Start_MD__c = prdMap.get(prd.Asset_Model_No__c).Extend_Gurantee_Start_MD__c; //甯傚満淇濅慨寮�濮嬫棩
+ prd.Extend_Gurantee_End_MD__c = prdMap.get(prd.Asset_Model_No__c).Extend_Gurantee_End_MD__c; //甯傚満淇濅慨缁撴潫鏃�
+ prd.Extend_Gurantee_Start__c = prdMap.get(prd.Asset_Model_No__c).Extend_Gurantee_Start__c; //鏈嶅姟淇濅慨寮�濮嬫棩
+ prd.Extend_Gurantee_End__c = prdMap.get(prd.Asset_Model_No__c).Extend_Gurantee_End__c; //鏈嶅姟淇濅慨缁撴潫鏃�
+ prd.Service_Category1__c = prdMap.get(prd.Asset_Model_No__c).Service_Category1__c; //绗�1鏈嶅姟鍒嗙被
prd.Service_Category2__c = prdMap.get(prd.Asset_Model_No__c).Service_Category2__c;
prd.Service_Category3__c = prdMap.get(prd.Asset_Model_No__c).Service_Category3__c;
prd.Service_Category4__c = prdMap.get(prd.Asset_Model_No__c).Service_Category4__c;
prd.Service_Category5__c = prdMap.get(prd.Asset_Model_No__c).Service_Category5__c;
prd.Service_Category6__c = prdMap.get(prd.Asset_Model_No__c).Service_Category6__c;
prd.Service_Category7__c = prdMap.get(prd.Asset_Model_No__c).Service_Category7__c;
- prd.Can_Repair__c = prdMap.get(prd.Asset_Model_No__c).Can_Repair__c;//鏄惁鍙淮淇�
- prd.RepairListPriceLevelA__c = prdMap.get(prd.Asset_Model_No__c).RepairListPriceLevelA__c;//A锛圵锛夌骇缁翠慨鍙傝�冧环鏍�
+ prd.Can_Repair__c = prdMap.get(prd.Asset_Model_No__c).Can_Repair__c; //鏄惁鍙淮淇�
+ prd.RepairListPriceLevelA__c = prdMap.get(prd.Asset_Model_No__c).RepairListPriceLevelA__c; //A锛圵锛夌骇缁翠慨鍙傝�冧环鏍�
prd.RepairListPriceLevelB__c = prdMap.get(prd.Asset_Model_No__c).RepairListPriceLevelB__c;
prd.RepairListPriceLevelC__c = prdMap.get(prd.Asset_Model_No__c).RepairListPriceLevelC__c;
- prd.PartSupplyFinishDate__c = prdMap.get(prd.Asset_Model_No__c).PartSupplyFinishDate__c;//闆朵欢鍋滄渚涘簲鏃ユ湡
- prd.EndSaleDate__c = prdMap.get(prd.Asset_Model_No__c).EndSaleDate__c;//鍋滄閿�鍞棩鏈�
- prd.Period_Filter_Classify1__c = prdMap.get(prd.Asset_Model_No__c).Period_Filter_Classify1__c;//钀ヤ笟缁熻鍒嗙被1
- prd.Period_Filter_Classify2__c = prdMap.get(prd.Asset_Model_No__c).Period_Filter_Classify2__c;//钀ヤ笟缁熻鍒嗙被2
- prd.Period_Filter_Classify3__c = prdMap.get(prd.Asset_Model_No__c).Period_Filter_Classify3__c;//钀ヤ笟缁熻鍒嗙被3
- prd.Intra_Trade_Service_RMB_Date1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_Date1__c;//澶氬勾淇濅环鏍兼湁鏁堝紑濮嬫棩1
- prd.Intra_Trade_Service_RMB_Date2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_Date2__c;//澶氬勾淇濅环鏍兼湁鏁堝紑濮嬫棩2
- prd.Intra_Trade_Service_RMB_EndDate1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_EndDate1__c;//澶氬勾淇濅环鏍兼湁鏁堢粨鏉熸棩1
- prd.Intra_Trade_Service_RMB_EndDate2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_EndDate2__c;//澶氬勾淇濅环鏍兼湁鏁堢粨鏉熸棩2
- prd.Intra_Trade_Service_RMB_1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_1__c;//澶氬勾淇濅环鏍�1
- prd.Intra_Trade_Service_RMB_2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_2__c;//澶氬勾淇濅环鏍�2
+ prd.PartSupplyFinishDate__c = prdMap.get(prd.Asset_Model_No__c).PartSupplyFinishDate__c; //闆朵欢鍋滄渚涘簲鏃ユ湡
+ prd.EndSaleDate__c = prdMap.get(prd.Asset_Model_No__c).EndSaleDate__c; //鍋滄閿�鍞棩鏈�
+ prd.Period_Filter_Classify1__c = prdMap.get(prd.Asset_Model_No__c).Period_Filter_Classify1__c; //钀ヤ笟缁熻鍒嗙被1
+ prd.Period_Filter_Classify2__c = prdMap.get(prd.Asset_Model_No__c).Period_Filter_Classify2__c; //钀ヤ笟缁熻鍒嗙被2
+ prd.Period_Filter_Classify3__c = prdMap.get(prd.Asset_Model_No__c).Period_Filter_Classify3__c; //钀ヤ笟缁熻鍒嗙被3
+ prd.Intra_Trade_Service_RMB_Date1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_Date1__c; //澶氬勾淇濅环鏍兼湁鏁堝紑濮嬫棩1
+ prd.Intra_Trade_Service_RMB_Date2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_Date2__c; //澶氬勾淇濅环鏍兼湁鏁堝紑濮嬫棩2
+ prd.Intra_Trade_Service_RMB_EndDate1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_EndDate1__c; //澶氬勾淇濅环鏍兼湁鏁堢粨鏉熸棩1
+ prd.Intra_Trade_Service_RMB_EndDate2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_EndDate2__c; //澶氬勾淇濅环鏍兼湁鏁堢粨鏉熸棩2
+ prd.Intra_Trade_Service_RMB_1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_1__c; //澶氬勾淇濅环鏍�1
+ prd.Intra_Trade_Service_RMB_2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_2__c; //澶氬勾淇濅环鏍�2
}
}
}
-
}
// WLIG-CKKA4M xxf 銆愬鎵樸�戙�愪骇鍝佷富鏁版嵁銆戞敞鍐岃瘉鏇存柊鍚庨儴鍒嗗瓧娈典俊鎭湭鑷姩浠e叆 end
private void beforeSetValue() {
-
for (Product2 nObj : newList) {
//CHAN-B8GCBB
if (nObj.WhiteSpace__c == true) {
@@ -207,48 +241,50 @@
nObj.Fixture_Model_No_T__c = nObj.Fixture_Model_No_F__c;
// CBPR LHJ
- if (Trigger.isInsert ||
- (Trigger.isUpdate && nObj.SFDA_Status_New__c != oldMap.get(nObj.id).SFDA_Status_New__c)) {
+ if (Trigger.isInsert || (Trigger.isUpdate && nObj.SFDA_Status_New__c != oldMap.get(nObj.id).SFDA_Status_New__c)) {
nObj.SFDA_Status__c = nobj.SFDA_Status_New__c;
if (nobj.SFDA_Status_New__c == '鏂拌=鍝佺敵璜嬩腑' || nobj.SFDA_Status_New__c == '婧栧倷涓�') {
nObj.SFDA_Status__c = '鍋滄';
}
}
// CBPR LHJ
-
+
// SWAG-BHE9GK LHJ 绔炰簤瀵规墜浜у搧鑷姩缂栫爜 Start
if (Trigger.isInsert) {
-
}
// SWAG-BHE9GK LHJ 绔炰簤瀵规墜浜у搧鑷姩缂栫爜 End
}
}
//SFDC鍋滄棰勮 lt 20210914 add start
- private static void Calculate_AverageMonthSales(List<Product2> newList,Map<Id, Product2> oldMap){
-
+ private static void Calculate_AverageMonthSales(List<Product2> newList, Map<Id, Product2> oldMap) {
//绗﹀悎鏉′欢鐨� 鏃� 浜у搧List
List<Id> oproList = new List<Id>();
//绗﹀悎鏉′欢鐨� 鏂版棫 浜у搧Id List 浣滀负鏉′欢
List<Id> conList = new List<Id>();
//Map<鏃х殑锛屾柊鐨�>瀵瑰簲
- Map<String,String> matMap = new Map<String,String>();
-
+ Map<String, String> matMap = new Map<String, String>();
+
//Map<鏃d锛岄璁″仠姝㈡棩>
- Map<String,Date> adateMap = new Map<String,Date>();
+ Map<String, Date> adateMap = new Map<String, Date>();
//Map<鏃d, x(骞冲潎鏈堥攢閲�)>
- Map<String,Integer> xMap = new Map<String,Integer>();
+ Map<String, Integer> xMap = new Map<String, Integer>();
//Map<鏃d, z(澶╂暟)>
- Map<String,Integer> zMap = new Map<String,Integer>();
+ Map<String, Integer> zMap = new Map<String, Integer>();
- for(Product2 term : newList){
- System.debug('鏍囪瘑'+term.CalMonthSalesFLG__c);
- System.debug('鏂板簱瀛�'+term.StorageStatusNo__c);
- System.debug('鏃у簱瀛�'+oldMap.get(term.Id).StorageStatusNo__c);
- if(term.M_BC_Stop_manufacure__c != null && term.SFDA_Status__c != '鍋滄' && (term.StorageStatusNo__c != oldMap.get(term.Id).StorageStatusNo__c || term.CalMonthSalesFLG__c == true)){
- if(term.Correspond_Code__c != null){
- matMap.put((String)term.Id,(String)term.Correspond_Code__c);
+ for (Product2 term : newList) {
+ System.debug('鏍囪瘑' + term.CalMonthSalesFLG__c);
+ System.debug('鏂板簱瀛�' + term.StorageStatusNo__c);
+ System.debug('鏃у簱瀛�' + oldMap.get(term.Id).StorageStatusNo__c);
+ if (
+ term.M_BC_Stop_manufacure__c != null &&
+ term.SFDA_Status__c != '鍋滄' &&
+ (term.StorageStatusNo__c != oldMap.get(term.Id).StorageStatusNo__c ||
+ term.CalMonthSalesFLG__c == true)
+ ) {
+ if (term.Correspond_Code__c != null) {
+ matMap.put((String) term.Id, (String) term.Correspond_Code__c);
conList.add(term.Correspond_Code__c);
}
conList.add(term.Id);
@@ -259,170 +295,171 @@
}
//鍋� 涓�瀵瑰 鐨� Map<String,List<鏈堥攢閲�>>
- Map<String,List<ProductMonthlySales__c>> msMap = new Map<String,List<ProductMonthlySales__c>>();
+ Map<String, List<ProductMonthlySales__c>> msMap = new Map<String, List<ProductMonthlySales__c>>();
- if(conList.size()>0){
- List<ProductMonthlySales__c> msList = [Select Id, MonthSales__c, CurrentMonth__c, CurrentDate__c,
- CurrentYear__c, ProductM__c, Product2Model__c,
- ProductM__r.StorageStatusNo__c,
- ProductM__r.M_BC_Stop_manufacure__c
- From ProductMonthlySales__c
- Where ProductM__c in: conList
- Order by CurrentDate__c DESC];
+ if (conList.size() > 0) {
+ List<ProductMonthlySales__c> msList = [
+ SELECT
+ Id,
+ MonthSales__c,
+ CurrentMonth__c,
+ CurrentDate__c,
+ CurrentYear__c,
+ ProductM__c,
+ Product2Model__c,
+ ProductM__r.StorageStatusNo__c,
+ ProductM__r.M_BC_Stop_manufacure__c
+ FROM ProductMonthlySales__c
+ WHERE ProductM__c IN :conList
+ ORDER BY CurrentDate__c DESC
+ ];
//鍙屽眰寰幆 浜у搧==>鏈堥攢閲�
- for(Id pro : conList){
- for(ProductMonthlySales__c mms : msList){
- if(pro == mms.ProductM__c){
- if(msMap.containsKey(pro)){
+ for (Id pro : conList) {
+ for (ProductMonthlySales__c mms : msList) {
+ if (pro == mms.ProductM__c) {
+ if (msMap.containsKey(pro)) {
msMap.get(pro).add(mms);
- }else{
+ } else {
List<ProductMonthlySales__c> pmsaleList = new List<ProductMonthlySales__c>();
pmsaleList.add(mms);
msMap.put(pro, pmsaleList);
}
}
-
}
}
-
- System.debug('鏉′欢List'+conList);
- System.debug('sql鏌ュ埌鐨凩ist'+msList);
- System.debug('浜у搧鏈堥攢閲弇sMap涓�'+msMap);
- System.debug('鏃х殑浜у搧List'+oproList);
- if(msMap.size() > 0){
- System.debug('浜у搧鏈堥攢閲弇sMap涓�'+msMap);
- for(Id res : oproList){
+ System.debug('鏉′欢List' + conList);
+ System.debug('sql鏌ュ埌鐨凩ist' + msList);
+ System.debug('浜у搧鏈堥攢閲弇sMap涓�' + msMap);
+ System.debug('鏃х殑浜у搧List' + oproList);
+ if (msMap.size() > 0) {
+ System.debug('浜у搧鏈堥攢閲弇sMap涓�' + msMap);
+ for (Id res : oproList) {
//a鏃� 鏈堥攢閲忓拰 ; b鏂� 鏈堥攢閲忓拰 ; c鍟�(骞冲潎鏈堥攢閲�) ; x鍟嗗洓鑸嶄簲鍏� ;
//y 搴撳瓨/骞冲潎鏈堥攢閲忓ぉ鏁� ; z 澶╂暟 鍥涜垗浜斿叆
Decimal c = 0, y = 0;
Integer x = 0, z = 0;
- if(msMap.get(res) != null){
+ if (msMap.get(res) != null) {
//鏈堥攢閲忓ぇ浜�12涓湀
- if(msMap.get(res).size() >= 12){
- Decimal a = 0 , b = 0;
+ if (msMap.get(res).size() >= 12) {
+ Decimal a = 0, b = 0;
Integer i;
- for(i = 0 ; i < 12 ; i++){
+ for (i = 0; i < 12; i++) {
a += msMap.get(res)[i].MonthSales__c;
}
- if(matMap.get(res) != null){
- if(msMap.get(matMap.get(res)) != null){
- if(msMap.get(matMap.get(res)).size() >= 12){
- for(i = 0 ; i < 12 ; i++){
+ if (matMap.get(res) != null) {
+ if (msMap.get(matMap.get(res)) != null) {
+ if (msMap.get(matMap.get(res)).size() >= 12) {
+ for (i = 0; i < 12; i++) {
b += msMap.get(matMap.get(res))[i].MonthSales__c;
- System.debug('鏂扮殑澶т簬鍗佷簩'+b);
+ System.debug('鏂扮殑澶т簬鍗佷簩' + b);
}
- }
- else{
- for(ProductMonthlySales__c nms : msMap.get(matMap.get(res))){
- b+=nms.MonthSales__c;
- System.debug('鏂扮殑灏忎簬鍗佷簩閬嶅巻鍏ㄩ儴'+b);
+ } else {
+ for (ProductMonthlySales__c nms : msMap.get(matMap.get(res))) {
+ b += nms.MonthSales__c;
+ System.debug('鏂扮殑灏忎簬鍗佷簩閬嶅巻鍏ㄩ儴' + b);
}
-
}
}
}
-
- //鍥涜垗浜斿叆
- c = (a + b) / 12 ;
-
- if(c > 1){
+
+ //鍥涜垗浜斿叆
+ c = (a + b) / 12;
+
+ if (c > 1) {
x = Integer.valueOf(c.round(System.RoundingMode.HALF_UP));
- xMap.put(res,x);
- }else if(c > 0){
+ xMap.put(res, x);
+ } else if (c > 0) {
x = 1;
- xMap.put(res,x);
+ xMap.put(res, x);
}
//x = Integer.valueOf(c.round(System.RoundingMode.Up));
//x = Integer.valueOf(c.round(System.RoundingMode.HALF_UP));
-
- System.debug('鏂�'+b);
- System.debug('鏃�'+a);
- System.debug('闄ゆ硶瓒砪'+c);
- System.debug('鍥涜垗浜斿叆x'+x);
-
+
+ System.debug('鏂�' + b);
+ System.debug('鏃�' + a);
+ System.debug('闄ゆ硶瓒砪' + c);
+ System.debug('鍥涜垗浜斿叆x' + x);
}
//鏈堥攢閲忎笉瓒�12涓湀
- else{
- Decimal a = 0 , b = 0 ;
- for(ProductMonthlySales__c oms : msMap.get(res)){
- a+=oms.MonthSales__c;
+ else {
+ Decimal a = 0, b = 0;
+ for (ProductMonthlySales__c oms : msMap.get(res)) {
+ a += oms.MonthSales__c;
}
- if(msMap.get(matMap.get(res)) != null){
- for(ProductMonthlySales__c nms : msMap.get(matMap.get(res))){
- b+=nms.MonthSales__c;
+ if (msMap.get(matMap.get(res)) != null) {
+ for (ProductMonthlySales__c nms : msMap.get(matMap.get(res))) {
+ b += nms.MonthSales__c;
}
}
c = (a + b) / msMap.get(res).size();
//x = Integer.valueOf(c.round(System.RoundingMode.UP));
//x = Integer.valueOf(c.round(System.RoundingMode.HALF_UP));
- if(c > 1){
+ if (c > 1) {
x = Integer.valueOf(c.round(System.RoundingMode.HALF_UP));
- xMap.put(res,x);
- }else if(c > 0){
+ xMap.put(res, x);
+ } else if (c > 0) {
x = 1;
- xMap.put(res,x);
+ xMap.put(res, x);
}
-
- System.debug('闄ゆ硶涓嶈冻12c'+c);
- System.debug('鍥涜垗浜斿叆x'+x);
+
+ System.debug('闄ゆ硶涓嶈冻12c' + c);
+ System.debug('鍥涜垗浜斿叆x' + x);
}
- if(x != 0){
- for(ProductMonthlySales__c dat : msMap.get(res)){
+ if (x != 0) {
+ for (ProductMonthlySales__c dat : msMap.get(res)) {
Decimal m = 0;
- if(dat.ProductM__r.StorageStatusNo__c != null){
+ if (dat.ProductM__r.StorageStatusNo__c != null) {
m = dat.ProductM__r.StorageStatusNo__c;
- }
+ }
y = m / x;
- y = y * 30 ;
+ y = y * 30;
}
}
//z = Integer.valueOf(y.round(System.RoundingMode.UP));
z = Integer.valueOf(y.round(System.RoundingMode.HALF_UP));
- zMap.put(res,z);
- System.debug('澶╂暟y'+y);
- System.debug('鍥涜垗浜斿叆z'+z);
-
+ zMap.put(res, z);
+ System.debug('澶╂暟y' + y);
+ System.debug('鍥涜垗浜斿叆z' + z);
}
}
}
List<Product2> finList = new List<Product2>();
- for(Id fin : oproList){
+ for (Id fin : oproList) {
Product2 fip = new Product2();
fip.Id = fin;
fip.CalMonthSalesFLG__c = false;
- if(xMap.get(fin) != null){
+ if (xMap.get(fin) != null) {
fip.Average_MonthSales__c = xMap.get(fin);
}
//20211020
- if(zMap.get(fin) != null){
- if(zMap.get(fin) != 0){
+ if (zMap.get(fin) != null) {
+ if (zMap.get(fin) != 0) {
fip.Estimated_ConsumptionDueDate__c = Date.today().addDays(zMap.get(fin));
- }else{
- if(adateMap != null){
+ } else {
+ if (adateMap != null) {
Date adate = adateMap.get(fin);
fip.Estimated_ConsumptionDueDate__c = adate;
}
}
- }else{
- if(adateMap != null){
+ } else {
+ if (adateMap != null) {
Date adate = adateMap.get(fin);
fip.Estimated_ConsumptionDueDate__c = adate;
}
}
//20211020
-
+
finList.add(fip);
}
update finList;
- }
-
+ }
}
//SFDC鍋滄棰勮 lt 20210914 add end
@@ -445,46 +482,49 @@
// }
// }
// }
-
+
// }
//SFDC鍋滄棰勮 lt 20211015 add end
- private void FlgStopManufacure(){
- for(Product2 pts : newList){
-
+ private void FlgStopManufacure() {
+ for (Product2 pts : newList) {
Product2 oldPts = oldMap.get(pts.Id);
- if(pts.M_BC_Stop_manufacure__c != oldPts.M_BC_Stop_manufacure__c){
+ if (pts.M_BC_Stop_manufacure__c != oldPts.M_BC_Stop_manufacure__c) {
pts.ProductMonthlySalesFlag__c = true;
if (pts.M_BC_Stop_manufacure__c == null) {
pts.ProductMonthlySalesFlag__c = false;
- pts.Estimated_ConsumptionDueDate__c = null;
+ pts.Estimated_ConsumptionDueDate__c = null;
}
}
- if(pts.SFDA_Status__c == '鍋滄' && oldPts.SFDA_Status__c != '鍋滄'){
+ if (pts.SFDA_Status__c == '鍋滄' && oldPts.SFDA_Status__c != '鍋滄') {
pts.Estimated_ConsumptionDueDate__c = null;
}
}
}
//20230506 lt DB202304618804 鍖呭惈瓒呭0 start
- private static void AssignmentUltrasonic(List<Product2> newList,Map<Id, Product2> oldMap){
+ private static void AssignmentUltrasonic(List<Product2> newList, Map<Id, Product2> oldMap) {
List<String> proIdList = new List<String>();
List<PCLLostProduct__c> updateplpList = new List<PCLLostProduct__c>();
- for(Product2 pro : newList){
- if(pro.RecordTypeId == System.Label.Pro_RecordType &&
- (pro.Lost_Product_Differ__c != oldMap.get(pro.Id).Lost_Product_Differ__c ||
- pro.Lost_Product_Category__c != oldMap.get(pro.Id).Lost_Product_Category__c)){
+ for (Product2 pro : newList) {
+ if (
+ pro.RecordTypeId == System.Label.Pro_RecordType &&
+ (pro.Lost_Product_Differ__c != oldMap.get(pro.Id).Lost_Product_Differ__c ||
+ pro.Lost_Product_Category__c != oldMap.get(pro.Id).Lost_Product_Category__c)
+ ) {
proIdList.add(pro.Id);
}
}
- List<PCLLostProduct__c> plpList = [Select Id, LostProduct__c, ProductClass__c, ProductCategory__c
- From PCLLostProduct__c
- Where LostProduct__c in: proIdList ];
- if(plpList.size() > 0 ){
- for(PCLLostProduct__c plp : plpList){
+ List<PCLLostProduct__c> plpList = [
+ SELECT Id, LostProduct__c, ProductClass__c, ProductCategory__c
+ FROM PCLLostProduct__c
+ WHERE LostProduct__c IN :proIdList
+ ];
+ if (plpList.size() > 0) {
+ for (PCLLostProduct__c plp : plpList) {
plp.ProductClass__c = '涓绘満';
plp.ProductCategory__c = '瓒呭0涓绘満';
updateplpList.add(plp);
@@ -492,8 +532,6 @@
}
update updateplpList;
-
}
//20230506 lt DB202304618804 鍖呭惈瓒呭0 end
-
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/RentalApplyEquipmentSetDetailHandler.cls b/force-app/main/default/classes/RentalApplyEquipmentSetDetailHandler.cls
index 0c730b4..acbbe40 100644
--- a/force-app/main/default/classes/RentalApplyEquipmentSetDetailHandler.cls
+++ b/force-app/main/default/classes/RentalApplyEquipmentSetDetailHandler.cls
@@ -3,2828 +3,20 @@
private Map<Id, Rental_Apply_Equipment_Set_Detail__c> oldMap;
private List<Rental_Apply_Equipment_Set_Detail__c> newList;
private List<Rental_Apply_Equipment_Set_Detail__c> oldList;
- private static final Map<String,Schema.RecordTypeInfo> DEVELOPERNAMEMAP = Schema.SObjectType.Rental_Apply__c.getRecordTypeInfosByDeveloperName();//璁板綍绫诲瀷 20201119 ljh add
+ private static final Map<String, Schema.RecordTypeInfo> DEVELOPERNAMEMAP = Schema.SObjectType.Rental_Apply__c.getRecordTypeInfosByDeveloperName(); //璁板綍绫诲瀷 20201119 ljh add
//Rental_Apply_Equipment_Set_Detail__c 鏇存柊銇欍倠鏅傘伀Asset銈傛洿鏂般仚銈嬪彲鑳芥�с亴銇傘倞銇俱仚銇仹锛屻亾銇撱仹staticMap銈掍綔鎴愩仐siAsset銈掔祼闆嗐仐銇俱仚
- private static Map<Id, Asset> assMap = new Map<Id, Asset>(); // new Only
+ private static Map<Id, Asset> assMap = new Map<Id, Asset>(); // new Only
// 涓婃灦鐨勬椂鍊欎繚鏈夎澶囩殑鍊熷嚭鍒嗛厤鏁颁細-1,浣嗘槸涓讳綋鐨勮瘽鏈夊彲鑳戒細鏆傚畾鍒嗛厤銆傝繖鏃跺�欏氨浼氭湁鏇存柊浜嗕袱鏉℃槑缁�,浣嗘槸鏇存柊鐨勪繚鏈夎澶囨槸鍚屼竴鏉$殑鎯呭喌(鏆傚畾鍒嗛厤鎺ヨЕ鍒嗛厤鏁伴噺闇�瑕�+1)
// 鍥犱负鏆傚畾鍒嗛厤鐨勬椂鍊欏�熷嚭鍒嗛厤涔﹂渶瑕佸啀鍘熸潵鐨勪笂鏋�-1鍚庣殑鍩虹涓�+1鎵�浠ヤ笂鏋舵椂鍊欎繚鏈夎澶囩殑鎺ヨЕ鍒嗛厤鏁伴渶瑕佷繚瀛樺啀娆′娇鐢ㄣ��
// 濡傛灉涓嶆槸Static涓婃灦鍚庡氨浼氭竻绌篴ssUpdMap,杩欐椂鍊欏氨浼氫娇鐢╝ssMap閲岀殑淇濇湁璁惧鏉ュ仛鏁伴噺鍔犲噺,铏界劧鍐嶆绱竴娆′繚鏈夎澶囧苟淇濆瓨鍒癮ssMap鐨勮瘽鏁版嵁浼氬緢骞插噣
// 浣嗗洜涓篠OQL101鐨勯棶棰樺彂鐢熺殑鍑犵巼浼氬ぇ澶у鍔�,鎵�浠ssUpdMap杩樻槸浣跨敤闈欐�佸彉閲�
- private static Map<Id, Asset> assUpdMap = new Map<Id, Asset>(); // new 銇� old
- private static Set<Id> executeed_refreshQueueNumber = new Set<Id>(); // 宸茬粡澶勭悊杩囨帓闃熼『 Rental_Apply_Equipment_Set_Detail__c.Id
+ private static Map<Id, Asset> assUpdMap = new Map<Id, Asset>(); // new 銇� old
+ private static Set<Id> executeed_refreshQueueNumber = new Set<Id>(); // 宸茬粡澶勭悊杩囨帓闃熼『 Rental_Apply_Equipment_Set_Detail__c.Id
private static Set<Id> shipment_requestedRaIdSet = new Set<Id>();
private static Set<Id> shipment_requestedRaIdStaticSet = new Set<Id>();
public RentalApplyEquipmentSetDetailHandler() {
- Integer i = 0;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
- i ++;
if (Trigger.isUpdate || Trigger.isUndelete || Trigger.isDelete) {
this.newMap = new Map<Id, Rental_Apply_Equipment_Set_Detail__c>();
this.newList = new List<Rental_Apply_Equipment_Set_Detail__c>();
@@ -2842,27 +34,29 @@
if (Trigger.isUndelete && String.isBlank(nObj.Fixture_Set_Id__c)) {
// 鏃с儑銉笺偪銆乥eipin2 銇� trigger 瀹熻銇椼仾銇�
continue;
- }
- else if (Trigger.isUpdate && String.isBlank(nObj.Fixture_Set_Id__c)
- && String.isNotBlank(oObj.Fixture_Set_Id__c)) {
+ } else if (Trigger.isUpdate && String.isBlank(nObj.Fixture_Set_Id__c) && String.isNotBlank(oObj.Fixture_Set_Id__c)) {
nObj.addError('涓嶈兘娓呯┖鍊熷嚭澶囧搧閰嶅 Fixture_Set__c');
- }
- else if (Trigger.isUpdate && String.isNotBlank(nObj.DeliverySlip__c)
- && String.isNotBlank(oObj.DeliverySlip__c) && oObj.DeliverySlip__c != nObj.DeliverySlip__c) {
- nObj.addError('涓嶈兘淇敼鍊熷嚭澶囧搧閰嶅鏄庣粏鐨勮繍杈撳崟');
- }
- else if (Trigger.isUpdate && String.isNotBlank(nObj.Return_DeliverySlip__c )
- && String.isNotBlank(oObj.Return_DeliverySlip__c ) && oObj.Return_DeliverySlip__c != nObj.Return_DeliverySlip__c ) {
+ } else if (
+ Trigger.isUpdate &&
+ String.isNotBlank(nObj.DeliverySlip__c) &&
+ String.isNotBlank(oObj.DeliverySlip__c) &&
+ oObj.DeliverySlip__c != nObj.DeliverySlip__c
+ ) {
+ //nObj.addError('涓嶈兘淇敼鍊熷嚭澶囧搧閰嶅鏄庣粏鐨勮繍杈撳崟');
+ } else if (
+ Trigger.isUpdate &&
+ String.isNotBlank(nObj.Return_DeliverySlip__c) &&
+ String.isNotBlank(oObj.Return_DeliverySlip__c) &&
+ oObj.Return_DeliverySlip__c != nObj.Return_DeliverySlip__c
+ ) {
nObj.addError('涓嶈兘淇敼鍊熷嚭澶囧搧閰嶅鏄庣粏鐨勫洖瀵勮繍杈撳崟');
- }
- else {
+ } else {
this.newList.add(nObj);
this.newMap.put(nObj.Id, nObj);
}
}
}
- }
- else {
+ } else {
// insert
this.newMap = (Map<Id, Rental_Apply_Equipment_Set_Detail__c>) Trigger.newMap;
this.oldMap = (Map<Id, Rental_Apply_Equipment_Set_Detail__c>) Trigger.oldMap;
@@ -2871,13 +65,16 @@
}
}
public static Boolean disabled = false;
+ // 澶囧搧浼樺寲杩藉姞 20230518 lc Start
+ public static Boolean skipUpdateAgain = false;
+ // 澶囧搧浼樺寲杩藉姞 20230518 lc End
protected override void beforeInsert() {
- if(!disabled){
+ if (!disabled) {
beforeSetValue();
}
}
protected override void beforeUpdate() {
- if(!disabled){
+ if (!disabled && !FixtureUtil.isRepairRenewal) {
beforeSetValue();
// 璁惧�兼帓闃熺殑UniqueKey
@@ -2885,7 +82,7 @@
}
}
protected override void afterInsert() {
- if(!disabled){
+ if (!disabled && !FixtureUtil.isRepairRenewal) {
formulaToTextCheck();
//鍏ュ姏瑕忓墖 鏂板缓鏁版嵁涓嶈兘鍒嗛厤銇屻亗銈娿伨銇欍伄銇э紝銇撱亾銇с伅Last銇∣ut_of_wh__c銇ō瀹氬繀瑕併亗銈娿伨銇涖倱
@@ -2903,7 +100,7 @@
}
// 鍔炰簨澶勬柊寤哄凡鍒嗛厤鏄庣粏鏃舵墽琛�
afterInsertAgencyAssignedDetail();
- if(!assUpdMap.isEmpty()) {
+ if (!assUpdMap.isEmpty()) {
update assUpdMap.values();
}
}
@@ -2918,12 +115,12 @@
reQueueAndSequence();
// 鍔炰簨澶勫垹闄ゅ凡鍒嗛厤鏄庣粏鏃舵墽琛�
afterDeleteAgencyAssignedDetail();
- if(!assUpdMap.isEmpty()) {
+ if (!assUpdMap.isEmpty()) {
update assUpdMap.values();
}
}
protected override void afterUpdate() {
- if(!disabled){
+ if (!disabled && !FixtureUtil.isRepairRenewal) {
Set<Id> assIds = new Set<Id>();
for (Rental_Apply_Equipment_Set_Detail__c raesd : newList) {
if (String.isNotBlank(raesd.Asset__c)) {
@@ -2931,15 +128,24 @@
}
}
if (Trigger.isUpdate && !assIds.isEmpty()) {
- assMap = new Map<Id, Asset>([
- Select Id, Quantity, Status, Manage_type__c,
- Out_of_wh__c, Rental_Count__c, Abandoned_Inventory__c, Abandoned_RealThing__c,
- Confirm_Lost_Count__c, CountForRepair__c
- From Asset
- Where Id =: assIds
- and Asset_loaner_category__c != '鑰楁潗'
- and RecordTypeId = '01210000000kOPR'
- FOR UPDATE]);
+ assMap = new Map<Id, Asset>(
+ [
+ SELECT
+ Id,
+ Quantity,
+ Status,
+ Manage_type__c,
+ Out_of_wh__c,
+ Rental_Count__c,
+ Abandoned_Inventory__c,
+ Abandoned_RealThing__c,
+ Confirm_Lost_Count__c,
+ CountForRepair__c
+ FROM Asset
+ WHERE Id = :assIds AND Asset_loaner_category__c != '鑰楁潗' AND RecordTypeId = '01210000000kOPR'
+ FOR UPDATE
+ ]
+ );
}
// 澶囧搧鏁伴噺鐨勫姞鍑�
changeAsset();
@@ -2968,7 +174,7 @@
cancelCopy();
// before 銇с伅鏁板紡闋呯洰銇宯ull銇牬鍚堛亴銇傘倞銇俱仚
formulaToTextCheck();
- // 涓嬩竴娆″�熺敤棰勮鍑哄簱鏃堕棿 鍥炴敹鍚�-妫�娴嬬粨鏋淥K 2021117 ljh
+ // 涓嬩竴娆″�熺敤棰勮鍑哄簱鏃堕棿 鍥炴敹鍚�-妫�娴嬬粨鏋淥K 2021117 ljh
NextShippmentDate();
NextShippmentDate_out();
// 鍏佽鎻掗槦閭欢 20211125 ljh
@@ -3014,48 +220,57 @@
Set<Id> assIds = new Set<Id>();
String ra_RecordTypeId = DEVELOPERNAMEMAP.get('AgencyRequest').getRecordTypeId();
List<Rental_Apply_Equipment_Set_Detail__c> objList = new List<Rental_Apply_Equipment_Set_Detail__c>();
- if(Trigger.isInsert) {
+ if (Trigger.isInsert) {
objList = newList;
- }
- else {
+ } else {
objList = oldList;
}
for (Rental_Apply_Equipment_Set_Detail__c obj : objList) {
- if(ra_RecordTypeId != null
- && obj.RA_RecordTypeId__c.substring(0,15) == ra_RecordTypeId.substring(0,15)
- && obj.Asset__c != null && obj.Select_Time__c != null
- && (Trigger.isDelete || Trigger.isInsert)) {
+ if (
+ ra_RecordTypeId != null &&
+ obj.RA_RecordTypeId__c.substring(0, 15) == ra_RecordTypeId.substring(0, 15) &&
+ obj.Asset__c != null &&
+ obj.Select_Time__c != null &&
+ (Trigger.isDelete || Trigger.isInsert)
+ ) {
assIds.add(obj.Asset__c);
}
}
Map<Id, Asset> m = new Map<Id, Asset>();
if (!assIds.isEmpty()) {
- m = new Map<Id, Asset>([
- Select Id, Quantity, Status, Manage_type__c,
- Out_of_wh__c, Rental_Count__c, Abandoned_Inventory__c, Abandoned_RealThing__c,
- Confirm_Lost_Count__c
- From Asset
- Where Id =: assIds
- and Asset_loaner_category__c != '鑰楁潗'
- and RecordTypeId = '01210000000kOPR'
- FOR UPDATE]);
+ m = new Map<Id, Asset>(
+ [
+ SELECT
+ Id,
+ Quantity,
+ Status,
+ Manage_type__c,
+ Out_of_wh__c,
+ Rental_Count__c,
+ Abandoned_Inventory__c,
+ Abandoned_RealThing__c,
+ Confirm_Lost_Count__c
+ FROM Asset
+ WHERE Id = :assIds AND Asset_loaner_category__c != '鑰楁潗' AND RecordTypeId = '01210000000kOPR'
+ FOR UPDATE
+ ]
+ );
}
return m;
}
private void afterInsertAgencyAssignedDetail() {
// 鍔炰簨澶勬柊寤哄凡鍒嗛厤鏄庣粏鏃舵墽琛�
assMap = createAssetMap();
- if(!assMap.isEmpty()) {
+ if (!assMap.isEmpty()) {
for (Rental_Apply_Equipment_Set_Detail__c nObj : newList) {
- if(assMap.containsKey(nObj.Asset__c)) {
+ if (assMap.containsKey(nObj.Asset__c)) {
Asset ass = assMap.get(nObj.Asset__c);
- if(ass.Manage_type__c == '涓綋绠$悊'){
+ if (ass.Manage_type__c == '涓綋绠$悊') {
ass.Last_Reserve_RAES_Detail__c = nObj.Id;
}
- if(ass.Out_of_wh__c == null) {
+ if (ass.Out_of_wh__c == null) {
ass.Out_of_wh__c = 1;
- }
- else {
+ } else {
ass.Out_of_wh__c += 1;
}
assUpdMap.put(ass.Id, ass);
@@ -3066,14 +281,14 @@
private void afterDeleteAgencyAssignedDetail() {
// 鍔炰簨澶勫垹闄ゅ凡鍒嗛厤鏄庣粏鏃舵墽琛�
assMap = createAssetMap();
- if(!assMap.isEmpty()) {
+ if (!assMap.isEmpty()) {
for (Rental_Apply_Equipment_Set_Detail__c oObj : oldList) {
- if(assMap.containsKey(oObj.Asset__c)) {
+ if (assMap.containsKey(oObj.Asset__c)) {
Asset ass = assMap.get(oObj.Asset__c);
- if(ass.Manage_type__c == '涓綋绠$悊') {
+ if (ass.Manage_type__c == '涓綋绠$悊') {
ass.Last_Reserve_RAES_Detail__c = null;
}
- if(ass.Out_of_wh__c != null) {
+ if (ass.Out_of_wh__c != null) {
ass.Out_of_wh__c -= 1;
}
assUpdMap.put(ass.Id, ass);
@@ -3086,18 +301,16 @@
String ra_RecordTypeId = DEVELOPERNAMEMAP.get('AgencyRequest').getRecordTypeId();
for (Rental_Apply_Equipment_Set_Detail__c oObj : oldList) {
if (
- (oObj.RA_RecordTypeId__c.substring(0,15) != ra_RecordTypeId.substring(0,15)
- &&(oObj.Rental_Apply_Request_approval_time_F__c != null
- && oObj.ApplyPersonAppended_F__c == false)
- || (oObj.ApplyPersonAppended_F__c == true && oObj.Add_Request_approval_time__c != null)
- )
- || (oObj.RA_RecordTypeId__c.substring(0,15) == ra_RecordTypeId.substring(0,15)
- && (oObj.Rental_Apply_Request_approval_time_F__c != null
- && (oObj.Rental_Apply_CreatedDate_F__c > oObj.CreatedDate
- || oObj.StockDown__c == true)
- && !oObj.canDelete__c //20210523 ljh add 1829
- )
- )
+ (oObj.RA_RecordTypeId__c.substring(0, 15) != ra_RecordTypeId.substring(0, 15) &&
+ (oObj.Rental_Apply_Request_approval_time_F__c != null &&
+ oObj.ApplyPersonAppended_F__c == false) ||
+ (oObj.ApplyPersonAppended_F__c == true &&
+ oObj.Add_Request_approval_time__c != null)) ||
+ (oObj.RA_RecordTypeId__c.substring(0, 15) == ra_RecordTypeId.substring(0, 15) &&
+ (oObj.Rental_Apply_Request_approval_time_F__c != null &&
+ (oObj.Rental_Apply_CreatedDate_F__c > oObj.CreatedDate ||
+ oObj.StockDown__c == true) &&
+ !oObj.canDelete__c)) //20210523 ljh add 1829
) {
oObj.addError('宸茬粡鎵瑰噯鐨勫鍝佸�熷嚭鏄庣粏涓嶈兘鍋氱墿鐞嗗垹闄ゃ��');
}
@@ -3106,10 +319,11 @@
private void setConsumSend_Rental_Apply_EmailTime() {
if (shipment_requestedRaIdSet.isEmpty() == false) {
- List<Consum_Apply__c> caList = [SELECT Id
- , Loaner_centre_mail_address__c
- FROM Consum_Apply__c
- WHERE Rental_Apply__c = :shipment_requestedRaIdSet];
+ List<Consum_Apply__c> caList = [
+ SELECT Id, Loaner_centre_mail_address__c
+ FROM Consum_Apply__c
+ WHERE Rental_Apply__c = :shipment_requestedRaIdSet
+ ];
if (caList.size() > 0) {
Datetime dt = Datetime.now();
for (Consum_Apply__c ca : caList) {
@@ -3126,11 +340,18 @@
for (Rental_Apply_Equipment_Set_Detail__c nObj : newList) {
raesdSet.add(nObj.Rental_Apply_Equipment_Set__c);
}
- Map<Id, Rental_Apply_Equipment_Set__c> raesdMap = new Map<Id, Rental_Apply_Equipment_Set__c>([Select Id, Fixture_Set__r.Name ,
- IndexFromUniqueKey__c
- From Rental_Apply_Equipment_Set__c
- Where Id =: raesdSet]);
+ Map<Id, Rental_Apply_Equipment_Set__c> raesdMap = new Map<Id, Rental_Apply_Equipment_Set__c>(
+ [
+ SELECT Id, Fixture_Set__r.Name, IndexFromUniqueKey__c
+ FROM Rental_Apply_Equipment_Set__c
+ WHERE Id = :raesdSet
+ ]
+ );
String agencyRecordTypeId = DEVELOPERNAMEMAP.get('AgencyRequest').getRecordTypeId();
+
+ // 澶囧搧鎬ц兘浼樺寲鏀逛慨 20230312 by lc Start
+ String userid = UserInfo.getUserId();
+ // 澶囧搧鎬ц兘浼樺寲鏀逛慨 20230312 by lc End
for (Rental_Apply_Equipment_Set_Detail__c nObj : newList) {
//鍥犱负鏄疘nsert鏃跺�欒鍊� 鎯呭喌1锛岀敵璇锋柊寤轰細璁惧�� 鎯呭喌2锛孨G鎷疯礉鍑烘潵鐨勬椂鍊欎細璁惧��
@@ -3146,29 +367,35 @@
// 1 --- 杩藉姞闄勫睘鍝�
// 0 --- Cancel鎷疯礉
// null --- 鏅�氭柊瑙�
- if (nObj.Create_State__c == null
- && nObj.Rental_Apply_Request_approval_time_F__c != null
- && nObj.Substitute_Select_Again__c == false // OLY_OCM-404 鍒嗛厤浠f浛鍝�
- // 鍔炰簨澶勫垎閰嶆椂杩藉姞鐨勬槑缁嗕笉绠楄拷鍔犻檮灞炲搧
- && nObj.RA_RecordTypeId__c.substring(0,15) != agencyRecordTypeId.substring(0,15)) {
+ if (
+ nObj.Create_State__c == null &&
+ !FixtureUtil.isRepairRenewal &&
+ nObj.Rental_Apply_Request_approval_time_F__c != null &&
+ nObj.Substitute_Select_Again__c == false && // OLY_OCM-404 鍒嗛厤浠f浛鍝�
+ // 鍔炰簨澶勫垎閰嶆椂杩藉姞鐨勬槑缁嗕笉绠楄拷鍔犻檮灞炲搧
+ nObj.RA_RecordTypeId__c.substring(0, 15) != agencyRecordTypeId.substring(0, 15)
+ ) {
nObj.Create_State__c = 1;
}
nObj.FSD_Is_Optional__c = nObj.FSD_Is_Optional_F__c;
// 鍔炰簨澶勫湪鍒嗛厤涓己鍒惰涓簍rue鏃讹紝涓嶄粠FSD鎷疯礉
- if(nObj.RA_RecordTypeId__c.substring(0,15) != agencyRecordTypeId.substring(0,15) || !nObj.FSD_Is_OneToOne__c) {
+ if (nObj.RA_RecordTypeId__c.substring(0, 15) != agencyRecordTypeId.substring(0, 15) || !nObj.FSD_Is_OneToOne__c) {
nObj.FSD_Is_OneToOne__c = nObj.FSD_Is_OneToOne_F__c;
}
- nObj.FSD_Name_CHN__c = nObj.Fixture_Name_F__c;
+ nObj.FSD_Name_CHN__c = nObj.Fixture_Name_F__c;
nObj.FSD_OneToOneAccessory_Cnt__c = nObj.FSD_OneToOneAccessory_Cnt_F__c;
nObj.FSD_Fixture_Model_No__c = nObj.Fixture_Model_No_F__c;
if (nObj.DataMigration_Flag__c == false && (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))) {
nObj.Fixture_Model_No_text__c = nObj.Fixture_Model_No_F__c;
}
nObj.CreatedBy_ProfileId__c = UserInfo.getProfileId();
-// nObj.ApplyPersonAppended__c = nObj.ApplyPersonAppended_F__c;
+ // nObj.ApplyPersonAppended__c = nObj.ApplyPersonAppended_F__c;
}
- if (nObj.DeliverySlip__c != null
- && nObj.DataMigration_Flag__c == false && (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))) {
+ if (
+ nObj.DeliverySlip__c != null &&
+ nObj.DataMigration_Flag__c == false &&
+ (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))
+ ) {
if (nObj.Shippment_loaner_time__c == null) {
nObj.Shippment_loaner_time__c = nObj.Shippment_loaner_time2__c;
}
@@ -3176,24 +403,32 @@
nObj.DeliverySlip_Text__c = nObj.DeliverySlip__c;
nObj.Return_DeliverySlip_Text__c = nObj.Return_DeliverySlip__c;
nObj.Received_Confirm_Text__c = nObj.Received_Confirm_F__c;
+ //澶囧搧鍙戣揣鎶ラ敊瀵瑰簲 20230413 by lc Start
+ nObj.Detail_Not_Finish_Text__c = !nObj.Detail_Finish__c;
+ //澶囧搧鍙戣揣鎶ラ敊瀵瑰簲 20230413 by lc End
Rental_Apply_Equipment_Set_Detail__c oObj = null;
if (Trigger.isUpdate) {
oObj = oldMap.get(nObj.Id);
//鍑哄簱鍓嶆鏌G銇牬鍚堛偔銉c兂銈汇儷銇椼伨銇�
- if(oObj.Inspection_result__c != 'NG' && nObj.Inspection_result__c == 'NG') {
+ if (oObj.Inspection_result__c != 'NG' && nObj.Inspection_result__c == 'NG') {
nObj.Cancel_Select__c = true;
- nObj.Loaner_cancel_reason__c = '鍏朵粬';// 20210830 ljh SFDC-C448KZ add
+ nObj.Loaner_cancel_reason__c = '鍏朵粬'; // 20210830 ljh SFDC-C448KZ add
nObj.Cancel_Reason__c = '閲嶆柊鍒嗛厤';
nObj.Loaner_cancel_Remarks__c = '鍑哄簱鍓嶆鏌G';
}
// OLY_OCM-435瀵惧繙 start
- String userid = UserInfo.getUserId();
+ // 澶囧搧鎬ц兘浼樺寲鏀逛慨 20230312 by lc Start
+ //String userid = UserInfo.getUserId();
+ // 澶囧搧鎬ц兘浼樺寲鏀逛慨 20230312 by lc End
DateTime now = System.now();
if (oObj.Inspection_result__c != nObj.Inspection_result__c && String.isNotBlank(nObj.Inspection_result__c)) {
nObj.Pre_inspection_time__c = now;
//20210428 ljh 1719 update start
//nObj.Inspection_staff__c = userid;
- nObj.Inspection_staff__c = nObj.RA_RecordTypeId__c == Schema.SObjectType.Rental_Apply__c.getRecordTypeInfosByDeveloperName().get('AgencyRequest').getRecordTypeId() ?null:userid;
+ nObj.Inspection_staff__c = nObj.RA_RecordTypeId__c ==
+ Schema.SObjectType.Rental_Apply__c.getRecordTypeInfosByDeveloperName().get('AgencyRequest').getRecordTypeId()
+ ? null
+ : userid;
//20210428 ljh 1719 update start
}
@@ -3212,46 +447,55 @@
nObj.CDS_staff__c = userid;
}
- if (oObj.Inspection_result_after_Final__c != nObj.Inspection_result_after_Final__c && String.isNotBlank(nObj.Inspection_result_after_Final__c)) {
+ if (
+ oObj.Inspection_result_after_Final__c != nObj.Inspection_result_after_Final__c &&
+ String.isNotBlank(nObj.Inspection_result_after_Final__c)
+ ) {
nObj.After_Inspection_time_Final__c = now;
nObj.Inspection_staff_After_Final__c = userid;
}
- if (oObj.Inspection_result_after__c != nObj.Inspection_result_after__c && String.isNotBlank(nObj.Inspection_result_after__c)) {
+ if (
+ oObj.Inspection_result_after__c != nObj.Inspection_result_after__c && String.isNotBlank(nObj.Inspection_result_after__c)
+ ) {
// 妫�娴嬬粨鏋滄洿鏂颁簡浣嗘椂闂存病鏈夋墜鍔ㄦ洿鏂帮紝鍒欐洿鏂版椂闂�
// 濡傛灉鎵嬪姩鏇存柊浜嗘椂闂达紝灏变笉鐢ㄥ啀鏇存柊
- if(oObj.After_Inspection_time__c == nObj.After_Inspection_time__c) {
+ if (oObj.After_Inspection_time__c == nObj.After_Inspection_time__c) {
nObj.After_Inspection_time__c = now;
}
//20210716 ljh 1719 update start
//nObj.Inspection_staff_After__c = userid;
- nObj.Inspection_staff_After__c = nObj.RA_RecordTypeId__c == Schema.SObjectType.Rental_Apply__c.getRecordTypeInfosByDeveloperName().get('AgencyRequest').getRecordTypeId() ?null:userid;
+ nObj.Inspection_staff_After__c = nObj.RA_RecordTypeId__c ==
+ Schema.SObjectType.Rental_Apply__c.getRecordTypeInfosByDeveloperName().get('AgencyRequest').getRecordTypeId()
+ ? null
+ : userid;
//20210716 ljh 1719 update start
}
// OLY_OCM-435瀵惧繙 end
- if(nObj.Detail_Finish__c) {
+ if (nObj.Detail_Finish__c) {
nObj.RAESD_Status_Text__c = nObj.Id;
- }
- else{
+ } else {
nObj.RAESD_Status_Text__c = nObj.RAESD_Status__c;
}
}
Rental_Apply_Equipment_Set__c raes = raesdMap.get(nObj.Rental_Apply_Equipment_Set__c);
//鐢婚潰鏄剧ず鐢╟lone鍑烘潵鐨勬暟鎹笉闇�瑕佽缃甆ame
//IndexFromUniqueKey__c.format()浼氭姤閿� 瑕佸垽涓嶆槸Null
- if (nObj.DataMigration_Flag__c == false
- && raes != null
- && String.isNotBlank(raes.Fixture_Set__r.Name)
- && raes.IndexFromUniqueKey__c != null
- && nObj.IndexFromUniqueKey__c != null
- && (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))) {
+ if (
+ nObj.DataMigration_Flag__c == false &&
+ raes != null &&
+ String.isNotBlank(raes.Fixture_Set__r.Name) &&
+ raes.IndexFromUniqueKey__c != null &&
+ nObj.IndexFromUniqueKey__c != null &&
+ (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))
+ ) {
String split_ApplyNum = nObj.RequestNoJoinStr2__c;
if (nObj.Rental_Apply_r_Name__c.contains('_')) {
// XXXX-YYYY_1 (ZZZZ_1)
List<String> split_ApplyNumList = nObj.Rental_Apply_r_Name__c.split('_');
- String raName = split_ApplyNumList[split_ApplyNumList.size() - 2]; // XXXX-YYYY (ZZZZ)
- split_ApplyNum = split_ApplyNumList[split_ApplyNumList.size() - 1]; // 1
- split_ApplyNumList = raName.split('-'); // [XXXX, YYYY] ([ZZZZ])
+ String raName = split_ApplyNumList[split_ApplyNumList.size() - 2]; // XXXX-YYYY (ZZZZ)
+ split_ApplyNum = split_ApplyNumList[split_ApplyNumList.size() - 1]; // 1
+ split_ApplyNumList = raName.split('-'); // [XXXX, YYYY] ([ZZZZ])
if (split_ApplyNumList.size() > 1) {
// YYYY_1
split_ApplyNum = split_ApplyNumList[split_ApplyNumList.size() - 1] + '_' + split_ApplyNum;
@@ -3260,8 +504,7 @@
split_ApplyNum = nObj.Rental_Apply_r_Name__c;
}
}
- nObj.Name = split_ApplyNum + ':' + raes.Fixture_Set__r.Name + ':'
- + raes.IndexFromUniqueKey__c.format().leftpad(3, '0');
+ nObj.Name = split_ApplyNum + ':' + raes.Fixture_Set__r.Name + ':' + raes.IndexFromUniqueKey__c.format().leftpad(3, '0');
// 濡傛灉鏄垎閰嶄唬鏇垮搧鍚嶅瓧鍔�:Sub
if (nObj.Substitute_Select_Again__c) {
@@ -3272,8 +515,7 @@
if (nObj.Received_Confirm_F__c == 'NG') {
nObj.Name += ':NG';
}
- nObj.Name += ':' + nObj.IndexFromUniqueKey_Text__c + ':'
- + nObj.IndexFromUniqueKey__c.format().leftpad(3, '0');
+ nObj.Name += ':' + nObj.IndexFromUniqueKey_Text__c + ':' + nObj.IndexFromUniqueKey__c.format().leftpad(3, '0');
//鍙栨秷鐨勬椂鍊欏悕瀛楀姞Canceled
if (nObj.Cancel_Select__c) {
nObj.Name += ':Canceled';
@@ -3283,22 +525,22 @@
nObj.Loaner_centre_mail_address__c = nObj.Loaner_centre_mail_address_F__c;
// 20220117 ljh add start
// 鏇存柊鎺掗槦棰勮 鍏紡鎷锋枃鏈�
- if(Trigger.isUpdate && String.isBlank(nObj.Asset__c) == false && oObj.Asset__c != nObj.Asset__c){
+ if (Trigger.isUpdate && String.isBlank(nObj.Asset__c) == false && oObj.Asset__c != nObj.Asset__c) {
nObj.UQueueShippmentDateText__c = nObj.UQueueShippmentDate__c;
}
// 20220117 ljh add end
// 鍒嗛厤鏃�, 璁惧��
- if (String.isBlank(nObj.Asset__c) == false && nObj.Select_Time__c != null
- && (Trigger.isInsert
- || (oObj.Asset__c != nObj.Asset__c || oObj.Select_Time__c != nObj.Select_Time__c)
- )
+ if (
+ String.isBlank(nObj.Asset__c) == false &&
+ nObj.Select_Time__c != null &&
+ (Trigger.isInsert || (oObj.Asset__c != nObj.Asset__c || oObj.Select_Time__c != nObj.Select_Time__c))
) {
// 涓�瀵逛竴淇濈涓讳綋锛堝�熷嚭鏃讹級
// nObj.Main_OneToOne_FlagInt__c = nObj.Main_OneToOne_FlagInt__c;
if (nObj.DataMigration_Flag__c == false && (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))) {
// 澶囧搧閰嶅鏄庣粏鍨嬪彿(鍊熷嚭鏃�)
if (String.isBlank(nObj.Fixture_Model_No_F__c)) {
- nObj.addError('鍒嗛厤鐨凙sset:'+ nObj.Asset__c + ', 娌℃湁璁惧畾 澶囧搧閰嶅鏄庣粏鍨嬪彿');
+ nObj.addError('鍒嗛厤鐨凙sset:' + nObj.Asset__c + ', 娌℃湁璁惧畾 澶囧搧閰嶅鏄庣粏鍨嬪彿');
} else {
nObj.Fixture_Model_No_text__c = nObj.Fixture_Model_No_F__c;
}
@@ -3327,9 +569,14 @@
}
}
// 鎺掗槦鏃�, 瑕佹敞鎰� 璁惧�� 绉诲姩鍒版帓闃焍tn閲�
- else if (Trigger.isUpdate && String.isBlank(nObj.Asset__c) && oObj.Cancel_Select__c == false
- // && oObj.Fixture_Model_No_text__c != nObj.Fixture_Model_No_text__c
- && (oObj.Queue_Number__c == 0 || oObj.Queue_Number__c == null) && nObj.Queue_Number__c > 0
+ else if (
+ Trigger.isUpdate &&
+ String.isBlank(nObj.Asset__c) &&
+ oObj.Cancel_Select__c == false &&
+ // && oObj.Fixture_Model_No_text__c != nObj.Fixture_Model_No_text__c
+ (oObj.Queue_Number__c == 0 ||
+ oObj.Queue_Number__c == null) &&
+ nObj.Queue_Number__c > 0
) {
// 鎺掗槦鏃堕噸鏂拌祴鍊糉ixture_Model_No_text__c 涓轰簡鎺掔殑涓嶆槸鏃odel_No
nObj.FSD_Fixture_Model_No__c = nObj.Fixture_Model_No_F__c;
@@ -3348,11 +595,18 @@
}
// 鍏朵粬鏃跺��(鐢宠鏃�), null璁惧�� 鍜�
// 涓�瀵逛竴宸插垎閰嶇殑闄勫睘鍝�,涓讳綋閲嶆柊鎺掗槦鏃�,涓�瀵逛竴闄勫睘鍝侀渶瑕侀噸鏂版寜鐓х敵璇风殑閫昏緫閲嶆柊璧嬪��
- else if ((Trigger.isInsert && nObj.Cancel_Select__c == false)
- || (Trigger.isUpdate && String.isBlank(nObj.Asset__c) && oObj.Cancel_Select__c == false)) {
+ else if (
+ (Trigger.isInsert && nObj.Cancel_Select__c == false) ||
+ (Trigger.isUpdate &&
+ String.isBlank(nObj.Asset__c) &&
+ oObj.Cancel_Select__c == false)
+ ) {
// 澶囧搧閰嶅鏄庣粏鍨嬪彿(鍊熷嚭鏃�)
- if (String.isBlank(nObj.Fixture_Model_No_text__c)
- && nObj.DataMigration_Flag__c == false && (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))) {
+ if (
+ String.isBlank(nObj.Fixture_Model_No_text__c) &&
+ nObj.DataMigration_Flag__c == false &&
+ (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))
+ ) {
nObj.Fixture_Model_No_text__c = nObj.Fixture_Model_No_F__c;
}
// 鎵�鍦ㄥ湴鍖�(鐪�) 鍊熷嚭鏃� #OLY_OCM-654:鍥犱负鏄祴鍊兼墍浠ヤ笉淇敼
@@ -3390,20 +644,23 @@
} else {
// 鍙栨秷鐨勬儏鍐靛湪涓嬮潰鏈夎鍊�
}
- if (nObj.DataMigration_Flag__c == false && nObj.Cancel_Select__c == false
- && (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))) {
+ if (
+ nObj.DataMigration_Flag__c == false &&
+ nObj.Cancel_Select__c == false &&
+ (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))
+ ) {
if (String.isBlank(nObj.Fixture_Model_No_text__c)) {
nObj.addError(nObj.Id + ':澶囧搧閰嶅鏄庣粏鍨嬪彿涓嶈兘涓虹┖, 澶囧搧閰嶅鏄庣粏=' + nObj.Fixture_Set_Detail__c);
}
// #OLY_OCM-654 鏁伴噺绠$悊鐨勮瘽,鎵�鍦ㄥ湴鍖�(鏈儴)&浜у搧鍒嗙被&澶囧搧鍒嗙被鐨勫垽鏂笉闇�瑕� Start
- if ('鏁伴噺绠$悊' == nObj.Manage_type_F__c ) { // || false == nObj.Loaner_accsessary__c TODO: 闇�纭
+ if ('鏁伴噺绠$悊' == nObj.Manage_type_F__c) {
+ // || false == nObj.Loaner_accsessary__c TODO: 闇�纭
if (String.isBlank(nObj.Internal_asset_location_before__c)) {
nObj.addError('澶囧搧瀛樻斁鍦颁笉鑳戒负绌�');
}
- }
- else {
- // #OLY_OCM-654 鏁伴噺绠$悊鐨勮瘽,鎵�鍦ㄥ湴鍖�(鏈儴)&浜у搧鍒嗙被&澶囧搧鍒嗙被鐨勫垽鏂笉闇�瑕� end
+ } else {
+ // #OLY_OCM-654 鏁伴噺绠$悊鐨勮瘽,鎵�鍦ㄥ湴鍖�(鏈儴)&浜у搧鍒嗙被&澶囧搧鍒嗙被鐨勫垽鏂笉闇�瑕� end
if (String.isBlank(nObj.Salesdepartment_before__c)) {
nObj.addError('鎵�鍦ㄥ湴鍖�(鏈儴)涓嶈兘涓虹┖');
}
@@ -3421,12 +678,20 @@
// }
}
}
- if (nObj.DataMigration_Flag__c == false
- && String.isNotBlank(nObj.FSD_Id__c)
- && (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))) {
+ if (
+ nObj.DataMigration_Flag__c == false &&
+ String.isNotBlank(nObj.FSD_Id__c) &&
+ (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))
+ ) {
//鍑哄簱鎸囩ず鏇存柊鏄庣粏鐨刱ey
- nObj.UniqueKey__c = nObj.RequestNoJoinStr2__c + ':'+ nObj.Rental_Apply_Equipment_Set__c
- + ':' + nObj.FSD_Id__c + ':' + nObj.IndexFromUniqueKey__c;
+ nObj.UniqueKey__c =
+ nObj.RequestNoJoinStr2__c +
+ ':' +
+ nObj.Rental_Apply_Equipment_Set__c +
+ ':' +
+ nObj.FSD_Id__c +
+ ':' +
+ nObj.IndexFromUniqueKey__c;
if (nObj.Cancel_Select__c) {
nObj.UniqueKey__c += nObj.Id;
// 涓嬫灦鍚庣殑鍙栨秷鍔�;
@@ -3434,10 +699,9 @@
nObj.UniqueKey__c += ';' + nObj.Id;
}
// nObj.Queue_Number__c = null;
- if (nObj.StockDown__c && nObj.Inspection_result__c != 'NG'
- && String.isBlank(nObj.DeliverySlip__c)) {
+ if (nObj.StockDown__c && nObj.Inspection_result__c != 'NG' && String.isBlank(nObj.DeliverySlip__c)) {
nObj.OnStock_By_Cancel__c = true;
-// nObj.Inspection_result_after_Flag_Text__c = 'true';
+ // nObj.Inspection_result_after_Flag_Text__c = 'true';
}
}
}
@@ -3453,8 +717,8 @@
nObj.Cancel_Date__c = System.today();
nObj.Cancel_Time__c = MainFixtureSelectController.getCurrentTime();
nObj.Cancel_Mem__c = UserInfo.getUserId();
- if(nObj.AgencyTempCancel__c) {
- if(nObj.AgencyTempCancelTime__c != null) {
+ if (nObj.AgencyTempCancel__c) {
+ if (nObj.AgencyTempCancelTime__c != null) {
Datetime dt = nObj.AgencyTempCancelTime__c;
nObj.Cancel_Time__c = Time.newInstance(dt.hour(), dt.minute(), dt.second(), dt.millisecond());
nObj.Cancel_Date__c = Date.newinstance(dt.year(), dt.month(), dt.day());
@@ -3492,10 +756,10 @@
nObj.EquipmentSet_Managment_Code_text__c = null;
}
//20201118 ljh add
- else{
+ else {
String ra_RecordTypeId = DEVELOPERNAMEMAP.get('AgencyRequest').getRecordTypeId();
//System.debug('ra_RecordTypeId:'+ra_RecordTypeId);
- if(ra_RecordTypeId !=null && nObj.RA_RecordTypeId__c.substring(0,15) == ra_RecordTypeId.substring(0,15)){
+ if (ra_RecordTypeId != null && nObj.RA_RecordTypeId__c.substring(0, 15) == ra_RecordTypeId.substring(0, 15)) {
//nObj.Inspection_result__c = 'OK';
nObj.Inspection_result_NG__c = null;
nObj.Arrival_in_wh__c = true;
@@ -3529,55 +793,54 @@
// nObj.Return_Status_Text__c = nObj.Return_Status_F__c;
// nObj.Shipment_Status_Text__c = nObj.Shipment_Status_F__c;
nObj.Canceled_Id__c = nObj.Canceled__c;
- if (Trigger.isUpdate
- && ((oObj.Inspection_result_after_Final__c != 'NG'
- && nObj.Inspection_result_after_Final__c == 'NG'
- && nObj.Inspection_result_after_NG_Final__c == '缁翠慨')
- || (oObj.Inspection_result_after__c != 'NG'
- && nObj.Inspection_result_after__c == 'NG'
- && nObj.Inspection_result_after_NG__c == '缁翠慨')
- )
+ if (
+ Trigger.isUpdate &&
+ ((oObj.Inspection_result_after_Final__c != 'NG' &&
+ nObj.Inspection_result_after_Final__c == 'NG' &&
+ nObj.Inspection_result_after_NG_Final__c == '缁翠慨') ||
+ (oObj.Inspection_result_after__c != 'NG' &&
+ nObj.Inspection_result_after__c == 'NG' &&
+ nObj.Inspection_result_after_NG__c == '缁翠慨'))
) {
nObj.Repair__c = null;
}
// OLY_OCM-531 Start 鎼伐浣滄祦瑙勫垯
- if (nObj.Check_lost_Item_F__c == '娆犲搧'
- && nObj.Loaner_Giveup_Time__c == null
- && nObj.Lost_item_giveup__c == true) {
+ if (nObj.Check_lost_Item_F__c == '娆犲搧' && nObj.Loaner_Giveup_Time__c == null && nObj.Lost_item_giveup__c == true) {
nObj.Loaner_Giveup_Time__c = Datetime.now();
}
- if (nObj.RAESD_Status__c == '鎺掗槦涓�'
- && nObj.Queue_Day_Text__c == null) {
+ if (nObj.RAESD_Status__c == '鎺掗槦涓�' && nObj.Queue_Day_Text__c == null) {
nObj.Queue_Day_Text__c = nObj.Queue_Day__c;
nObj.Queue_Time_Text__c = nObj.Queue_Time__c;
}
// OLY_OCM-531 End
- if (Trigger.isUpdate
- &&oObj.Confirm_Lost_Date__c != null
- && oObj.Check_lost_Item_F__c != nObj.Check_lost_Item_F__c
- && oObj.Check_lost_Item_F__c == '娆犲搧') {
+ if (
+ Trigger.isUpdate &&
+ oObj.Confirm_Lost_Date__c != null &&
+ oObj.Check_lost_Item_F__c != nObj.Check_lost_Item_F__c &&
+ oObj.Check_lost_Item_F__c == '娆犲搧'
+ ) {
nObj.Confirm_Lost_Date__c = null;
}
- if (Trigger.isUpdate
- && oObj.Shipment_request_time2__c != nObj.Shipment_request_time2__c
- && nObj.Shipment_request_time2__c != null
- && nObj.Is_Body__c
- && shipment_requestedRaIdStaticSet.contains(nObj.Rental_Apply__c) == false
- ) {
- shipment_requestedRaIdStaticSet.add(nObj.Rental_Apply__c);
- shipment_requestedRaIdSet.add(nObj.Rental_Apply__c);
- }
-
+ if (
+ Trigger.isUpdate &&
+ oObj.Shipment_request_time2__c != nObj.Shipment_request_time2__c &&
+ nObj.Shipment_request_time2__c != null &&
+ nObj.Is_Body__c &&
+ shipment_requestedRaIdStaticSet.contains(nObj.Rental_Apply__c) == false
+ ) {
+ shipment_requestedRaIdStaticSet.add(nObj.Rental_Apply__c);
+ shipment_requestedRaIdSet.add(nObj.Rental_Apply__c);
+ }
}
}
/*
- * Asset 銇甉uantity鏇存柊
- * changeAssetCount()鏂规硶銇ut_of_wh__c銆丷ental_Count__c 鍑�1
- */
+ * Asset 銇甉uantity鏇存柊
+ * changeAssetCount()鏂规硶銇ut_of_wh__c銆丷ental_Count__c 鍑�1
+ */
private void changeAsset() {
if (Trigger.isUpdate && Trigger.isAfter) {
if (assMap.isEmpty()) {
@@ -3609,11 +872,17 @@
}
if (String.isBlank(oObj.Check_lost_Item_F__c) && nObj.Check_lost_Item_F__c == 'OK') {
//鏈叆鍔涖亱銈夋瑺鍝併伀澶夋洿鏅備綍銈傘仐銇俱仜銈�
- } else if (String.isBlank(oObj.Check_lost_Item_F__c) && nObj.Check_lost_Item_F__c == '娆犲搧'
- && nObj.Lost_item_giveup__c == false) {
+ } else if (
+ String.isBlank(oObj.Check_lost_Item_F__c) &&
+ nObj.Check_lost_Item_F__c == '娆犲搧' &&
+ nObj.Lost_item_giveup__c == false
+ ) {
//鏈叆鍔涖亱銈夋瑺鍝併伀澶夋洿鏅備綍銈傘仐銇俱仜銈�
- } else if (String.isBlank(oObj.Check_lost_Item_F__c) && nObj.Check_lost_Item_F__c == '娆犲搧'
- && nObj.Lost_item_giveup__c == true) {
+ } else if (
+ String.isBlank(oObj.Check_lost_Item_F__c) &&
+ nObj.Check_lost_Item_F__c == '娆犲搧' &&
+ nObj.Lost_item_giveup__c == true
+ ) {
//鏈叆鍔涖亱銈夋瑺鍝佹斁妫勩伀澶夋洿鏅� 鏀惧純娆犲搧鍥炴敹锛堜涪澶憋級銇仺銇� 寰呭簾寮冩暟(涓㈠け/鐩樹簭)鍔�1
ass.Abandoned_Inventory__c += 1;
if (oObj.Confirm_Lost_Date__c != null) {
@@ -3627,11 +896,9 @@
assUpdMap.put(ass.Id, ass);
} else if (oObj.Check_lost_Item_F__c == 'OK' && String.isBlank(nObj.Check_lost_Item_F__c)) {
//OK銇嬨倝绌虹櫧銇鏇存檪浣曘倐銇椼伨銇涖倱
- } else if (oObj.Check_lost_Item_F__c == 'OK' && nObj.Check_lost_Item_F__c == '娆犲搧'
- && nObj.Lost_item_giveup__c == false) {
+ } else if (oObj.Check_lost_Item_F__c == 'OK' && nObj.Check_lost_Item_F__c == '娆犲搧' && nObj.Lost_item_giveup__c == false) {
//OK銇嬨倝娆犲搧銇鏇存檪浣曘倐銇椼伨銇涖倱
- } else if (oObj.Check_lost_Item_F__c == 'OK' && nObj.Check_lost_Item_F__c == '娆犲搧'
- && nObj.Lost_item_giveup__c == true) {
+ } else if (oObj.Check_lost_Item_F__c == 'OK' && nObj.Check_lost_Item_F__c == '娆犲搧' && nObj.Lost_item_giveup__c == true) {
//OK銇嬨倝娆犲搧鏀炬銇鏇存檪 鏀惧純娆犲搧鍥炴敹锛堜涪澶憋級銇仺銇� 寰呭簾寮冩暟(涓㈠け/鐩樹簭)鍔�1
ass.Abandoned_Inventory__c += 1;
if (oObj.Confirm_Lost_Date__c != null) {
@@ -3643,28 +910,37 @@
ass.Quantity -= 1;
ass.ChangeQuantityReason__c = '娑堣��';
assUpdMap.put(ass.Id, ass);
- } else if (oObj.Check_lost_Item_F__c == '娆犲搧' && String.isBlank(nObj.Check_lost_Item_F__c)
- && oObj.Lost_item_giveup__c == false) {
+ } else if (
+ oObj.Check_lost_Item_F__c == '娆犲搧' &&
+ String.isBlank(nObj.Check_lost_Item_F__c) &&
+ oObj.Lost_item_giveup__c == false
+ ) {
if (oObj.Confirm_Lost_Date__c != null) {
ass.Confirm_Lost_Count__c -= 1;
}
assUpdMap.put(ass.Id, ass);
- } else if (oObj.Check_lost_Item_F__c == '娆犲搧' && nObj.Check_lost_Item_F__c == 'OK'
- && oObj.Lost_item_giveup__c == false) {
+ } else if (oObj.Check_lost_Item_F__c == '娆犲搧' && nObj.Check_lost_Item_F__c == 'OK' && oObj.Lost_item_giveup__c == false) {
if (oObj.Confirm_Lost_Date__c != null) {
ass.Confirm_Lost_Count__c -= 1;
}
assUpdMap.put(ass.Id, ass);
- } else if (oObj.Check_lost_Item_F__c == '娆犲搧' && nObj.Check_lost_Item_F__c == '娆犲搧'
- && oObj.Lost_item_giveup__c == false && nObj.Lost_item_giveup__c == true) {
+ } else if (
+ oObj.Check_lost_Item_F__c == '娆犲搧' &&
+ nObj.Check_lost_Item_F__c == '娆犲搧' &&
+ oObj.Lost_item_giveup__c == false &&
+ nObj.Lost_item_giveup__c == true
+ ) {
//娆犲搧銇嬨倝娆犲搧鏀炬銇鏇存檪 鏀惧純娆犲搧鍥炴敹锛堜涪澶憋級銇仺銇� 寰呭簾寮冩暟(涓㈠け/鐩樹簭)鍔�1
ass.Abandoned_Inventory__c += 1;
if (oObj.Confirm_Lost_Date__c != null) {
ass.Confirm_Lost_Count__c -= 1;
}
assUpdMap.put(ass.Id, ass);
- } else if (oObj.Check_lost_Item_F__c == '娆犲搧' && nObj.Check_lost_Item_F__c == '娑堣��'
- && oObj.Lost_item_giveup__c == false) {
+ } else if (
+ oObj.Check_lost_Item_F__c == '娆犲搧' &&
+ nObj.Check_lost_Item_F__c == '娑堣��' &&
+ oObj.Lost_item_giveup__c == false
+ ) {
//娆犲搧銇嬨倝娑堣�椼伀澶夋洿鏅俀uantity銈�-1
ass.Quantity -= 1;
ass.ChangeQuantityReason__c = '娑堣��';
@@ -3672,7 +948,11 @@
ass.Confirm_Lost_Count__c -= 1;
}
assUpdMap.put(ass.Id, ass);
- } else if (oObj.Check_lost_Item_F__c == '娆犲搧' && String.isBlank(nObj.Check_lost_Item_F__c) && oObj.Lost_item_giveup__c == true) {
+ } else if (
+ oObj.Check_lost_Item_F__c == '娆犲搧' &&
+ String.isBlank(nObj.Check_lost_Item_F__c) &&
+ oObj.Lost_item_giveup__c == true
+ ) {
//娆犲搧鏀炬銇嬨倝绌虹櫧銇鏇存檪 寰呭簾寮冩暟(涓㈠け/鐩樹簭)鍑�1
ass.Abandoned_Inventory__c -= 1;
ass.Out_of_wh__c += 1;
@@ -3686,8 +966,12 @@
ass.Rental_Count__c += 1;
ass.ChangeQuantityReason__c = '娆犲搧' + '->' + 'OK';
assUpdMap.put(ass.Id, ass);
- } else if (oObj.Check_lost_Item_F__c == '娆犲搧' && nObj.Check_lost_Item_F__c == '娆犲搧'
- && oObj.Lost_item_giveup__c == true && nObj.Lost_item_giveup__c == false) {
+ } else if (
+ oObj.Check_lost_Item_F__c == '娆犲搧' &&
+ nObj.Check_lost_Item_F__c == '娆犲搧' &&
+ oObj.Lost_item_giveup__c == true &&
+ nObj.Lost_item_giveup__c == false
+ ) {
//娆犲搧鏀炬銇嬨倝娆犲搧銇鏇存檪 寰呭簾寮冩暟(涓㈠け/鐩樹簭)鍑�1
ass.Abandoned_Inventory__c -= 1;
ass.Out_of_wh__c += 1;
@@ -3712,71 +996,86 @@
ass.Rental_Count__c += 1;
ass.ChangeQuantityReason__c = '娑堣�� -> ' + 'OK';
assUpdMap.put(ass.Id, ass);
- } else if (oObj.Check_lost_Item_F__c == '娑堣��' && nObj.Check_lost_Item_F__c == '娆犲搧'
- && nObj.Lost_item_giveup__c == false) {
+ } else if (
+ oObj.Check_lost_Item_F__c == '娑堣��' &&
+ nObj.Check_lost_Item_F__c == '娆犲搧' &&
+ nObj.Lost_item_giveup__c == false
+ ) {
//娑堣�椼亱銈夋瑺鍝併伀澶夋洿鏅俀uantity銈�+1
ass.Quantity += 1;
ass.Out_of_wh__c += 1;
ass.Rental_Count__c += 1;
ass.ChangeQuantityReason__c = '娑堣�� -> 娆犲搧';
assUpdMap.put(ass.Id, ass);
- } else if (oObj.Check_lost_Item_F__c == '娑堣��' && nObj.Check_lost_Item_F__c == '娆犲搧'
- && nObj.Lost_item_giveup__c == true) {
+ } else if (oObj.Check_lost_Item_F__c == '娑堣��' && nObj.Check_lost_Item_F__c == '娆犲搧' && nObj.Lost_item_giveup__c == true) {
//娑堣�椼亱銈夋瑺鍝佹斁妫勩伀澶夋洿鏅� 寰呭簾寮冩暟(涓㈠け/鐩樹簭)+1 Quantity銈�+1
ass.Abandoned_Inventory__c += 1;
ass.Quantity += 1;
}
// 缁翠慨
- if (oObj.Arrival_in_wh__c == false && nObj.Arrival_in_wh__c == true
- && nObj.Arrival_wh_Result_Agency__c == '寰呬慨鐞�') {
+ if (oObj.Arrival_in_wh__c == false && nObj.Arrival_in_wh__c == true && nObj.Arrival_wh_Result_Agency__c == '寰呬慨鐞�') {
ass.CountForRepair__c += 1;
assUpdMap.put(ass.Id, ass);
}
//搴熷純
- if (oObj.Arrival_in_wh__c == false && nObj.Arrival_in_wh__c == true
- && (nObj.Inspection_result_after_NG_F__c == '搴熷純'
- //鍑哄簱鍓嶆娴嬪簾寮冪殑鏃跺�欎篃闇�瑕佸垽鏂�
- || nObj.Inspection_result_NG__c == '搴熷純')) {
+ if (
+ oObj.Arrival_in_wh__c == false &&
+ nObj.Arrival_in_wh__c == true &&
+ (nObj.Inspection_result_after_NG_F__c == '搴熷純' ||
+ //鍑哄簱鍓嶆娴嬪簾寮冪殑鏃跺�欎篃闇�瑕佸垽鏂�
+ nObj.Inspection_result_NG__c == '搴熷純')
+ ) {
ass.Abandoned_RealThing__c += 1;
ass.ChangeQuantityReason__c = FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Dai_Fei_Qi.ordinal());
assUpdMap.put(ass.Id, ass);
- } else if (oObj.Arrival_in_wh__c == true && nObj.Arrival_in_wh__c == false
- && (oObj.Inspection_result_after_NG_F__c == '搴熷純'
- //鍑哄簱鍓嶆娴嬪簾寮冪殑鏃跺�欎篃闇�瑕佸垽鏂�
- || oObj.Inspection_result_NG__c == '搴熷純')) {
+ } else if (
+ oObj.Arrival_in_wh__c == true &&
+ nObj.Arrival_in_wh__c == false &&
+ (oObj.Inspection_result_after_NG_F__c == '搴熷純' ||
+ //鍑哄簱鍓嶆娴嬪簾寮冪殑鏃跺�欎篃闇�瑕佸垽鏂�
+ oObj.Inspection_result_NG__c == '搴熷純')
+ ) {
ass.Abandoned_RealThing__c -= 1;
ass.Out_of_wh__c += 1;
ass.Rental_Count__c += 1;
// ass.Freeze_sign__c = true; // OLY_OCM-689 鍒犻櫎鍐荤粨瀛楁鐨勬洿鏂�
String rea = nObj.Inspection_result_after_NG_F__c == '搴熷純' ? '寰呯Щ鑷虫姤搴熷尯' : nObj.Inspection_result_after_NG_F__c;
- ass.ChangeQuantityReason__c = FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Dai_Fei_Qi.ordinal()) + ' ->' + rea;
+ ass.ChangeQuantityReason__c =
+ FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Dai_Fei_Qi.ordinal()) +
+ ' ->' +
+ rea;
assUpdMap.put(ass.Id, ass);
}
//寰呭簾寮�
- if (nObj.RAESD_Status__c == FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Dai_Fei_Qi.ordinal())
- && oObj.RAESD_Status__c != nObj.RAESD_Status__c
- && ass.Manage_type__c == '涓綋绠$悊') {
+ if (
+ nObj.RAESD_Status__c == FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Dai_Fei_Qi.ordinal()) &&
+ oObj.RAESD_Status__c != nObj.RAESD_Status__c &&
+ ass.Manage_type__c == '涓綋绠$悊'
+ ) {
ass.Status = FixtureUtil.assetStatusMap.get(FixtureUtil.AssetStatus.Dai_Fei_Qi.ordinal());
// ass.Freeze_sign__c = true;
assUpdMap.put(ass.Id, ass);
}
// 鍔炰簨澶勫洖搴撶粨鏋滀慨鏀�
- if(oObj.Arrival_in_wh__c && nObj.Arrival_in_wh__c
- && oObj.Arrival_wh_Result_Agency__c != nObj.Arrival_wh_Result_Agency__c ) {
+ if (
+ oObj.Arrival_in_wh__c &&
+ nObj.Arrival_in_wh__c &&
+ oObj.Arrival_wh_Result_Agency__c != nObj.Arrival_wh_Result_Agency__c
+ ) {
switch on oObj.Arrival_wh_Result_Agency__c {
when '绉昏嚦鎶ュ簾鍖�' {
- ass.Abandoned_RealThing__c -=1;
+ ass.Abandoned_RealThing__c -= 1;
}
when '寰呬慨鐞�' {
- ass.CountForRepair__c -=1;
+ ass.CountForRepair__c -= 1;
}
}
switch on nObj.Arrival_wh_Result_Agency__c {
when '绉昏嚦鎶ュ簾鍖�' {
- ass.Abandoned_RealThing__c +=1;
+ ass.Abandoned_RealThing__c += 1;
}
when '寰呬慨鐞�' {
- ass.CountForRepair__c +=1;
+ ass.CountForRepair__c += 1;
}
}
assUpdMap.put(ass.Id, ass);
@@ -3792,8 +1091,8 @@
// else if (nObj.Lost_item_giveup__c == true
// && oObj.Lost_item_giveup__c != nObj.Lost_item_giveup__c
// && ass.Manage_type__c == '涓綋绠$悊') {
- // ass.Status = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Diu_Shi.ordinal());
- // assUpdMap.put(ass.Id, ass);
+ // ass.Status = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Diu_Shi.ordinal());
+ // assUpdMap.put(ass.Id, ass);
// }
// else if (ass.Manage_type__c == '鏁伴噺绠$悊' && assMap.containsKey(ass.Id)) {
// if (ass.Quantity != null && ass.Quantity > 0) {
@@ -3833,10 +1132,13 @@
ass = assUpdMap.get(nObj.Asset__c);
}
// 杩欓噷 浼氬嚭鐜� assUpdMap 鏈� 浣嗘槸 assMap 娌℃湁鐨勬儏鍐�
- if (ass == null
- //鍒嗛厤澶囧搧鏈夊彉鍖� (涓嬫灦鍓�)
- && (oObj.Asset__c != null && oObj.Asset__c != nObj.Asset__c
- && nObj.StockDown__c == false)) {
+ if (
+ ass == null &&
+ //鍒嗛厤澶囧搧鏈夊彉鍖� (涓嬫灦鍓�)
+ (oObj.Asset__c != null &&
+ oObj.Asset__c != nObj.Asset__c &&
+ nObj.StockDown__c == false)
+ ) {
ass = new Asset(Id = oObj.Asset__c);
}
if (ass == null) {
@@ -3867,8 +1169,12 @@
oass = new Asset(Id = oObj.Asset__c);
}
//nObj.Asset__c銇屻亗銈嬪牬鍚堛�佸鏇淬仐銇熷牬鍚�
- if (nObj.Asset__c != null && oObj.Asset__c != nObj.Asset__c
- && (oObj.Manage_type_F__c == '涓綋绠$悊' || nObj.Manage_type_F__c == '涓綋绠$悊')) {
+ if (
+ nObj.Asset__c != null &&
+ oObj.Asset__c != nObj.Asset__c &&
+ (oObj.Manage_type_F__c == '涓綋绠$悊' ||
+ nObj.Manage_type_F__c == '涓綋绠$悊')
+ ) {
if (nObj.Manage_type_F__c == '涓綋绠$悊') {
nass.Last_Reserve_RAES_Detail__c = nObj.Id;
assUpdMap.put(nass.Id, nass);
@@ -3923,7 +1229,7 @@
oass.Rental_Count__c = oass.Rental_Count__c - 1;
}
}
- assUpdMap.put(oass.Id, oass);
+ assUpdMap.put(oass.Id, oass);
}
} else if (oass != null && oObj.DeliverySlip__c != null && nObj.DeliverySlip__c == null) {
//鍙戣揣杩愯緭鍗� 鍒犻櫎鐨勬椂鍊欏凡鍊熷嚭鏁� -1 鍙戣揣Asset__c鍘熷垯涓嶄細鍙樻墍浠ュ氨鐩存帴鐢ㄤ笂闈㈢殑oass
@@ -3934,14 +1240,10 @@
}
// }
}
- if (oObj.Confirm_Lost_Date__c == null
- && nObj.Confirm_Lost_Date__c != null) {
+ if (oObj.Confirm_Lost_Date__c == null && nObj.Confirm_Lost_Date__c != null) {
nass.Confirm_Lost_Count__c = nass.Confirm_Lost_Count__c + 1;
assUpdMap.put(nass.Id, nass);
- }
- else if (nObj.Confirm_Lost_Date__c == null
- && oObj.Confirm_Lost_Date__c != null
- && nass.Confirm_Lost_Count__c > 0) {
+ } else if (nObj.Confirm_Lost_Date__c == null && oObj.Confirm_Lost_Date__c != null && nass.Confirm_Lost_Count__c > 0) {
nass.Confirm_Lost_Count__c = nass.Confirm_Lost_Count__c - 1;
assUpdMap.put(nass.Id, nass);
}
@@ -3954,7 +1256,7 @@
System.debug(LoggingLevel.INFO, '*** nObj.Asset__c: ' + nObj.Asset__c);
if (nObj.Asset__c != null && oObj.Asset__c != nObj.Asset__c) {
nass.Out_of_wh__c = nass.Out_of_wh__c + 1;
- System.debug('nass.Out_of_wh__c +1' + nass.Out_of_wh__c + ' Id = ' + nObj.Id);
+ System.debug('nass.Out_of_wh__c +1' + nass.Out_of_wh__c + ' Id = ' + nObj.Id);
assUpdMap.put(nass.Id, nass);
}
}
@@ -4013,7 +1315,6 @@
// 4-XX 涓嬫灦鍚�, 鍑哄簱鍓嶆娴嬬殑Action涓�瀵逛竴鍒嗛厤鐨勮瘽, 鍜屼富浣撲竴璧� Cancel
private void oneToOne4XX() {
-
//涓讳綋CnacelSet
Set<Id> raesdBodyCnacelSet = new Set<Id>();
Set<Id> raesdBodyNGSet = new Set<Id>();
@@ -4025,53 +1326,63 @@
for (Rental_Apply_Equipment_Set_Detail__c nObj : newList) {
// 鍔炰簨澶勯檮灞炲搧涓嶉渶瑕侀殢涓讳綋鍙栨秷
- if(nObj.RA_RecordTypeId__c.substring(0,15) == ra_RecordTypeId.substring(0,15)) {
+ if (nObj.RA_RecordTypeId__c.substring(0, 15) == ra_RecordTypeId.substring(0, 15)) {
continue;
}
Rental_Apply_Equipment_Set_Detail__c oObj = oldMap.get(nObj.Id);
//Set娌℃湁cancel鐨勮瘽閮介渶瑕佹嫹璐�
//涓讳綋鍑哄簱鍓嶆娴婲G 缁翠慨
- if (nObj.Is_Body__c == true
- && nObj.Inspection_result__c == 'NG'
- && oObj.Inspection_result__c != nObj.Inspection_result__c
- && nObj.Inspection_result_NG__c == '缁翠慨') {
+ if (
+ nObj.Is_Body__c == true &&
+ nObj.Inspection_result__c == 'NG' &&
+ oObj.Inspection_result__c != nObj.Inspection_result__c &&
+ nObj.Inspection_result_NG__c == '缁翠慨'
+ ) {
//闇�瑕侀噸鏂板垎閰嶄竴瀵逛竴闄勫睘鍝佺殑涓�瑙�
raesdBodyNGSet.add(nObj.Rental_Apply_Equipment_Set__c);
raesdCancel_Remarks.put(nObj.Rental_Apply_Equipment_Set__c, nObj.Loaner_cancel_Remarks__c);
raesdIdSet.add(nObj.Id);
}
//涓讳綋鍑哄簱鍓嶆娴婲G 搴熷純
- else if (nObj.Is_Body__c == true
- && nObj.Inspection_result__c == 'NG'
- && oObj.Inspection_result__c != nObj.Inspection_result__c
- && nObj.Inspection_result_NG__c == '搴熷純') {
+ else if (
+ nObj.Is_Body__c == true &&
+ nObj.Inspection_result__c == 'NG' &&
+ oObj.Inspection_result__c != nObj.Inspection_result__c &&
+ nObj.Inspection_result_NG__c == '搴熷純'
+ ) {
//闇�瑕侀噸鏂板垎閰嶄竴瀵逛竴闄勫睘鍝佺殑涓�瑙�
raesdBodyNGSet.add(nObj.Rental_Apply_Equipment_Set__c);
raesdCancel_Remarks.put(nObj.Rental_Apply_Equipment_Set__c, nObj.Loaner_cancel_Remarks__c);
raesdIdSet.add(nObj.Id);
}
//闄勫睘鍝佸嚭搴撳墠妫�娴婲G 缁翠慨 骞朵笖鏄竴瀵逛竴鍒嗛厤
- else if (nObj.Is_Body__c == false
- && nObj.Inspection_result__c == 'NG'
- && oObj.Inspection_result__c != nObj.Inspection_result__c
- && nObj.Inspection_result_NG__c == '缁翠慨'
- && nObj.OneToOne_Flag__c == true) {
+ else if (
+ nObj.Is_Body__c == false &&
+ nObj.Inspection_result__c == 'NG' &&
+ oObj.Inspection_result__c != nObj.Inspection_result__c &&
+ nObj.Inspection_result_NG__c == '缁翠慨' &&
+ nObj.OneToOne_Flag__c == true
+ ) {
raesdIdSet.add(nObj.Id);
}
//闄勫睘鍝佸嚭搴撳墠妫�娴婲G 搴熷純 骞朵笖鏄竴瀵逛竴鍒嗛厤
- else if (nObj.Is_Body__c == false
- && nObj.Inspection_result__c == 'NG'
- && oObj.Inspection_result__c != nObj.Inspection_result__c
- && nObj.Inspection_result_NG__c == '搴熷純'
- && nObj.OneToOne_Flag__c == true) {
+ else if (
+ nObj.Is_Body__c == false &&
+ nObj.Inspection_result__c == 'NG' &&
+ oObj.Inspection_result__c != nObj.Inspection_result__c &&
+ nObj.Inspection_result_NG__c == '搴熷純' &&
+ nObj.OneToOne_Flag__c == true
+ ) {
raesdIdSet.add(nObj.Id);
}
//OLY_OCM-152 涓嬫灦鍚庝富浣撳彇娑堢殑璇濅竴瀵逛竴闄勫睘鍝佷篃瑕佷竴璧峰彇娑�
- else if (String.isBlank(nObj.DeliverySlip__c)
- && nObj.Is_Body__c == true
- && nObj.StockDown__c == true
- && oObj.Cancel_Select__c == false
- && nObj.Cancel_Select__c == true) {
+ else if (
+ String.isBlank(nObj.DeliverySlip__c) &&
+ nObj.Is_Body__c == true &&
+ nObj.StockDown__c == true &&
+ oObj.Cancel_Select__c == false &&
+ nObj.Cancel_Select__c == true
+ ) {
raesdIdSet.add(nObj.Id);
raesdBodyCnacelSet.add(nObj.Rental_Apply_Equipment_Set__c);
raesdCancel_Remarks.put(nObj.Rental_Apply_Equipment_Set__c, nObj.Loaner_cancel_Remarks__c);
@@ -4081,16 +1392,17 @@
return;
}
List<Rental_Apply_Equipment_Set_Detail__c> raesds = [
- Select Id, UniqueKey__c, Rental_Apply_Equipment_Set__c,
- Rental_Apply__c, Fixture_Set_Detail__c, Cancel_Reason__c
- From Rental_Apply_Equipment_Set_Detail__c
- //涓讳綋鍑哄簱鍓嶆娴婲G涓�瑙堢殑鎵�鏈変竴瀵逛竴鍒嗛厤鐨勬槑缁�
- Where (Rental_Apply_Equipment_Set__c = :raesdBodyNGSet
- //涓嬫灦鍚庝富浣撳彇娑堜竴瀵逛竴闄勫睘鍝佷篃瑕佷竴璧峰彇娑�
- OR Rental_Apply_Equipment_Set__c = :raesdBodyCnacelSet)
- AND OneToOne_Flag__c = true
- //鍜屼富浣撲竴璧锋娴婲G鐨勪笉鍐嶆洿鏂�
- AND Id !=: raesdIdSet];
+ SELECT Id, UniqueKey__c, Rental_Apply_Equipment_Set__c, Rental_Apply__c, Fixture_Set_Detail__c, Cancel_Reason__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ //涓讳綋鍑哄簱鍓嶆娴婲G涓�瑙堢殑鎵�鏈変竴瀵逛竴鍒嗛厤鐨勬槑缁�
+ WHERE
+ (Rental_Apply_Equipment_Set__c = :raesdBodyNGSet
+ //涓嬫灦鍚庝富浣撳彇娑堜竴瀵逛竴闄勫睘鍝佷篃瑕佷竴璧峰彇娑�
+ OR Rental_Apply_Equipment_Set__c = :raesdBodyCnacelSet)
+ AND OneToOne_Flag__c = TRUE
+ //鍜屼富浣撲竴璧锋娴婲G鐨勪笉鍐嶆洿鏂�
+ AND Id != :raesdIdSet
+ ];
List<Rental_Apply_Equipment_Set_Detail__c> raesdList = new List<Rental_Apply_Equipment_Set_Detail__c>();
for (Rental_Apply_Equipment_Set_Detail__c raesd : raesds) {
raesd.OnStock_By_Cancel__c = true;
@@ -4098,7 +1410,7 @@
// OLY_OCM-163#comment-20120592 閫氳繃鍙栨秷鏃ュ垽鏂� -銆� 鏇存柊鐨勬椂鍊檅efore璁剧疆
//raesd.Cancel_Date__c = Date.today();
raesd.Cancel_Reason__c = '閲嶆柊鍒嗛厤';
- raesd.Loaner_cancel_reason__c = '鍏朵粬';// 20210830 ljh SFDC-C448KZ add
+ raesd.Loaner_cancel_reason__c = '鍏朵粬'; // 20210830 ljh SFDC-C448KZ add
//涓讳綋鍑哄簱鍓嶆鏌G鐨勮瘽鍙栨秷澶囨敞鍥炶嚜鍔ㄨ缃负鍑哄簱鍓嶆鏌G
raesd.Loaner_cancel_Remarks__c = raesdCancel_Remarks.get(raesd.Rental_Apply_Equipment_Set__c);
// }
@@ -4121,33 +1433,37 @@
Rental_Apply_Equipment_Set_Detail__c oObj = oldMap.get(nObj.Id);
//Set娌℃湁cancel鐨勮瘽閮介渶瑕佹嫹璐�
//Cancel_Select__c 銇痜alse銇嬨倝true銇鏇淬仾銇仹銇伄銇rigger浜屽洖銇仐銇︺倐瀹熻銇欍倠銇伅锛戝洖銇犮亼
- if (nObj.Set_Cancel_Select__c == false
- && (oObj.Cancel_Select__c == false && nObj.Cancel_Select__c == true)
- && nObj.StockDown__c == true && nObj.Cancel_Reason__c == '閲嶆柊鍒嗛厤'
- // 鍔炰簨澶勫彇娑堟椂涓嶈鎷疯礉鏄庣粏锛屽湪controller閲屾墜鍔ㄩ��
- && nObj.RA_RecordTypeId__c.substring(0,15) != ra_RecordTypeId.substring(0,15)) {
+ if (
+ nObj.Set_Cancel_Select__c == false &&
+ (oObj.Cancel_Select__c == false &&
+ nObj.Cancel_Select__c == true) &&
+ nObj.StockDown__c == true &&
+ nObj.Cancel_Reason__c == '閲嶆柊鍒嗛厤' &&
+ // 鍔炰簨澶勫彇娑堟椂涓嶈鎷疯礉鏄庣粏锛屽湪controller閲屾墜鍔ㄩ��
+ nObj.RA_RecordTypeId__c.substring(0, 15) != ra_RecordTypeId.substring(0, 15)
+ ) {
Rental_Apply_Equipment_Set_Detail__c craesd = new Rental_Apply_Equipment_Set_Detail__c();
craesd.Rental_Apply_Equipment_Set__c = nObj.Rental_Apply_Equipment_Set__c;
- craesd.Rental_Apply__c = nObj.Rental_Apply__c;
- craesd.Fixture_Set_Detail__c = nObj.Fixture_Set_Detail__c;
- craesd.Fixture_Model_No_text__c = nObj.FSD_Fixture_Model_No__c;
- craesd.Fixture_Name_text__c = nObj.FSD_Name_CHN__c;
- craesd.IndexFromUniqueKey_Text__c = nObj.IndexFromUniqueKey_Text__c;
- craesd.Canceled__c = nObj.Id;
- craesd.FSD_Id__c = nObj.FSD_Id__c;
- craesd.FSD_Is_Optional__c = nObj.FSD_Is_Optional_F__c;
- craesd.FSD_Is_OneToOne__c = nObj.FSD_Is_OneToOne_F__c;
- craesd.FSD_Name_CHN__c = nObj.FSD_Name_CHN__c;
- craesd.FSD_OneToOneAccessory_Cnt__c = nObj.FSD_OneToOneAccessory_Cnt_F__c;
- craesd.FSD_Fixture_Model_No__c = nObj.FSD_Fixture_Model_No__c;
+ craesd.Rental_Apply__c = nObj.Rental_Apply__c;
+ craesd.Fixture_Set_Detail__c = nObj.Fixture_Set_Detail__c;
+ craesd.Fixture_Model_No_text__c = nObj.FSD_Fixture_Model_No__c;
+ craesd.Fixture_Name_text__c = nObj.FSD_Name_CHN__c;
+ craesd.IndexFromUniqueKey_Text__c = nObj.IndexFromUniqueKey_Text__c;
+ craesd.Canceled__c = nObj.Id;
+ craesd.FSD_Id__c = nObj.FSD_Id__c;
+ craesd.FSD_Is_Optional__c = nObj.FSD_Is_Optional_F__c;
+ craesd.FSD_Is_OneToOne__c = nObj.FSD_Is_OneToOne_F__c;
+ craesd.FSD_Name_CHN__c = nObj.FSD_Name_CHN__c;
+ craesd.FSD_OneToOneAccessory_Cnt__c = nObj.FSD_OneToOneAccessory_Cnt_F__c;
+ craesd.FSD_Fixture_Model_No__c = nObj.FSD_Fixture_Model_No__c;
// 20211125 ljh add 鎺掗槦鎻掗槦 start
- if(nObj.Is_Body__c){
- craesd.Allow_Adjust_Queue_Flag__c = true;
+ if (nObj.Is_Body__c) {
+ craesd.Allow_Adjust_Queue_Flag__c = true;
craesd.jumpReason__c = '鍙戣揣鍓嶆娴婲G閲嶆柊鍒嗛厤';
}
// 20211125 ljh add 鎺掗槦鎻掗槦 end
if (nObj.DataMigration_Flag__c == false && (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))) {
- craesd.Rental_Num__c = nObj.Rental_Num__c;
+ craesd.Rental_Num__c = nObj.Rental_Num__c;
craesd.IndexFromUniqueKey__c = nObj.IndexFromUniqueKey__c;
}
//cancel閲嶆柊鍒嗛厤鐨勪笉绠楄拷鍔犻檮灞炲搧 272銉併偙銉冦儓
@@ -4155,12 +1471,18 @@
raesdList.add(craesd);
}
// 濡傛灉鏄富浣� cancel鐨勮瘽First搴旇鏄嫹璐濆嚭鏉ョ殑涓讳綋
- if ((oObj.Cancel_Select__c == false && nObj.Cancel_Select__c == true)
- && nObj.Is_First_RAESD_F__c == true && nObj.Set_Cancel_Select__c == false
- && nObj.DataMigration_Flag__c == false && (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))) {
+ if (
+ (oObj.Cancel_Select__c == false &&
+ nObj.Cancel_Select__c == true) &&
+ nObj.Is_First_RAESD_F__c == true &&
+ nObj.Set_Cancel_Select__c == false &&
+ nObj.DataMigration_Flag__c == false &&
+ (!Trigger.isUpdate || String.isNotBlank(nObj.Fixture_Set_Id__c))
+ ) {
Rental_Apply_Equipment_Set__c raes = new Rental_Apply_Equipment_Set__c(
- Id = nObj.Rental_Apply_Equipment_Set__c,
- First_RAESD__c = null);
+ Id = nObj.Rental_Apply_Equipment_Set__c,
+ First_RAESD__c = null
+ );
raesMap.put(nObj.Rental_Apply_Equipment_Set__c, raes);
}
}
@@ -4169,11 +1491,12 @@
insert raesdList;
}
if (!raesMap.isEmpty()) {
- List<Rental_Apply_Equipment_Set_Detail__c> raess = [Select Id, Rental_Apply_Equipment_Set__c
- From Rental_Apply_Equipment_Set_Detail__c
- Where Rental_Apply_Equipment_Set__c = :raesMap.keySet()
- and Cancel_Select__c = False
- order by Rental_Apply_Equipment_Set__c, Fixture_Set_Detail__r.SortInt__c ASC nulls last];
+ List<Rental_Apply_Equipment_Set_Detail__c> raess = [
+ SELECT Id, Rental_Apply_Equipment_Set__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE Rental_Apply_Equipment_Set__c = :raesMap.keySet() AND Cancel_Select__c = FALSE
+ ORDER BY Rental_Apply_Equipment_Set__c, Fixture_Set_Detail__r.SortInt__c ASC NULLS LAST
+ ];
System.debug(raess);
Id raesId = null;
// 涓�浠剁洰銈扚irst_RAESD__c銇ō瀹�
@@ -4182,7 +1505,6 @@
raesMap.get(raes.Rental_Apply_Equipment_Set__c).First_RAESD__c = raes.Id;
raesId = raes.Rental_Apply_Equipment_Set__c;
}
-
}
}
//涓�瑙團irst鏇存柊
@@ -4196,26 +1518,30 @@
Map<Id, Rental_Apply_Equipment_Set__c> raesMap = new Map<Id, Rental_Apply_Equipment_Set__c>();
for (Rental_Apply_Equipment_Set_Detail__c oObj : oldList) {
if (oObj.Is_First_RAESD_F__c == true) {
- Rental_Apply_Equipment_Set__c raes = new Rental_Apply_Equipment_Set__c(
- Id = oObj.Rental_Apply_Equipment_Set__c,
- First_RAESD__c = null);
- raesMap.put(oObj.Rental_Apply_Equipment_Set__c, raes);
- }
+ Rental_Apply_Equipment_Set__c raes = new Rental_Apply_Equipment_Set__c(
+ Id = oObj.Rental_Apply_Equipment_Set__c,
+ First_RAESD__c = null
+ );
+ raesMap.put(oObj.Rental_Apply_Equipment_Set__c, raes);
+ }
}
//淇敼涓�瑙堢殑FirstMap
if (raesMap.isEmpty()) {
return;
}
if (!raesMap.isEmpty()) {
- List<Rental_Apply_Equipment_Set_Detail__c> raess = [Select Id, Rental_Apply_Equipment_Set__c
- From Rental_Apply_Equipment_Set_Detail__c
- Where Rental_Apply_Equipment_Set__c = :raesMap.keySet()
- and Cancel_Select__c = False
- //涓�瑕с倐鍓婇櫎銇椼仧銈夋洿鏂般仐銇俱仜銈�
- and IsDeleted = false
+ List<Rental_Apply_Equipment_Set_Detail__c> raess = [
+ SELECT Id, Rental_Apply_Equipment_Set__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE
+ Rental_Apply_Equipment_Set__c = :raesMap.keySet()
+ AND Cancel_Select__c = FALSE
+ //涓�瑕с倐鍓婇櫎銇椼仧銈夋洿鏂般仐銇俱仜銈�
+ AND IsDeleted = FALSE
// RAESD_SortInt_F__c -> IndexFromUniqueKey_Text__c(澶囧搧閰嶅鏄庣粏.SortInt__c)
// 1搴旇鏄富浣�
- order by Rental_Apply_Equipment_Set__c, IndexFromUniqueKey_Text__c ASC nulls last];
+ ORDER BY Rental_Apply_Equipment_Set__c, IndexFromUniqueKey_Text__c ASC NULLS LAST
+ ];
Id raesId = null;
// 涓�浠剁洰銈扚irst_RAESD__c銇ō瀹�
for (Rental_Apply_Equipment_Set_Detail__c raes : raess) {
@@ -4231,44 +1557,53 @@
}
}
// 鏈�绲傜姸鎱嬪強銇矨sset澶夋洿
- private Boolean finishOrChangeAsset(Boolean isDelete, Rental_Apply_Equipment_Set_Detail__c oObj, Rental_Apply_Equipment_Set_Detail__c nObj) {
+ private Boolean finishOrChangeAsset(
+ Boolean isDelete,
+ Rental_Apply_Equipment_Set_Detail__c oObj,
+ Rental_Apply_Equipment_Set_Detail__c nObj
+ ) {
Boolean rtn = false;
if (isDelete) {
// oObj 銈掔⒑瑾嶃仚銈嬨�乷ld銇� 銈傘仺銈傘仺 finish銇倐銇�乫alse銈掕繑銇欍��
- rtn = !(
- //鍥炲簱纭
- (oObj.Arrival_in_wh__c)
- //鍙栨秷鍒嗛厤, (涓嬫灦鍚�, 鍘熷垯闇�瑕佷笂鏋�, 鎵�浠ヤ笉鑳藉崟绾殑鏂紑)
- || (oObj.Cancel_Select__c == true && oObj.StockDown__c == false)
- //涓嬫灦鍓�, 鍒嗛厤澶囧搧鏈夊彉鍖� (鍙樻垚鍒殑閰嶅, or 鍙� null)
- || (oObj.Asset__c == null && oObj.StockDown__c == false)
- //鍙栨秷鍒嗛厤, (涓嬫灦鍚�, 鍘熷垯闇�瑕佷笂鏋�, 鎵�浠ヤ笉鑳藉崟绾殑鏂紑)
- || (oObj.Cancel_Select__c == true && nObj.StockDown__c == false)
- //鏀惧純娆犲搧
- || (oObj.Lost_item_giveup__c == true)
- //宸叉秷鑰�
- || (oObj.Check_lost_Item_F__c == '娑堣��')
- );
+ rtn = !//鍥炲簱纭
+ ((oObj.Arrival_in_wh__c) ||
+ //鍙栨秷鍒嗛厤, (涓嬫灦鍚�, 鍘熷垯闇�瑕佷笂鏋�, 鎵�浠ヤ笉鑳藉崟绾殑鏂紑)
+ (oObj.Cancel_Select__c == true &&
+ oObj.StockDown__c == false) ||
+ //涓嬫灦鍓�, 鍒嗛厤澶囧搧鏈夊彉鍖� (鍙樻垚鍒殑閰嶅, or 鍙� null)
+ (oObj.Asset__c == null &&
+ oObj.StockDown__c == false) ||
+ //鍙栨秷鍒嗛厤, (涓嬫灦鍚�, 鍘熷垯闇�瑕佷笂鏋�, 鎵�浠ヤ笉鑳藉崟绾殑鏂紑)
+ (oObj.Cancel_Select__c == true &&
+ nObj.StockDown__c == false) ||
+ //鏀惧純娆犲搧
+ (oObj.Lost_item_giveup__c == true) ||
+ //宸叉秷鑰�
+ (oObj.Check_lost_Item_F__c == '娑堣��'));
} else {
- rtn = (
+ rtn =
//鍥炲簱纭
- (!oObj.Arrival_in_wh__c && nObj.Arrival_in_wh__c)
+ ((!oObj.Arrival_in_wh__c && nObj.Arrival_in_wh__c) ||
//鍙栨秷鍒嗛厤, (涓嬫灦鍚�, 鍘熷垯闇�瑕佷笂鏋�, 鎵�浠ヤ笉鑳藉崟绾殑鏂紑)
- || (oObj.Cancel_Select__c == false && nObj.Cancel_Select__c == true
- && nObj.StockDown__c == false)
+ (oObj.Cancel_Select__c == false &&
+ nObj.Cancel_Select__c == true &&
+ nObj.StockDown__c == false) ||
//涓嬫灦鍓�, 鍒嗛厤澶囧搧鏈夊彉鍖� (鍙樻垚鍒殑閰嶅, or 鍙� null)
- || (oObj.Asset__c != null && oObj.Asset__c != nObj.Asset__c
- && nObj.StockDown__c == false)
+ (oObj.Asset__c != null &&
+ oObj.Asset__c != nObj.Asset__c &&
+ nObj.StockDown__c == false) ||
//鍙栨秷鍒嗛厤, (涓嬫灦鍚�, 鍘熷垯闇�瑕佷笂鏋�, 鎵�浠ヤ笉鑳藉崟绾殑鏂紑)
- || (oObj.Cancel_Select__c == false && nObj.Cancel_Select__c == true
- && nObj.StockDown__c == false)
+ (oObj.Cancel_Select__c == false &&
+ nObj.Cancel_Select__c == true &&
+ nObj.StockDown__c == false) ||
//鏀惧純娆犲搧
- || (oObj.Lost_item_giveup__c == false && nObj.Lost_item_giveup__c == true
- && oObj.Check_lost_Item_F__c != '娑堣��')
+ (oObj.Lost_item_giveup__c == false &&
+ nObj.Lost_item_giveup__c == true &&
+ oObj.Check_lost_Item_F__c != '娑堣��') ||
//宸叉秷鑰�
- || (oObj.Check_lost_Item_F__c != '娑堣��' && nObj.Check_lost_Item_F__c == '娑堣��'
- && oObj.Lost_item_giveup__c == false)
- );
+ (oObj.Check_lost_Item_F__c != '娑堣��' &&
+ nObj.Check_lost_Item_F__c == '娑堣��' &&
+ oObj.Lost_item_giveup__c == false));
}
return rtn;
}
@@ -4277,12 +1612,13 @@
List<Rental_Apply_Equipment_Set_Detail__c> raesds = new List<Rental_Apply_Equipment_Set_Detail__c>();
for (Rental_Apply_Equipment_Set_Detail__c nObj : newList) {
//鏄庣粏鐘舵�佹病鏈変慨鐞嗗畬姣曟墍浠ヤ慨鐞嗗畬姣曠殑鏃跺�欎笉鎷疯礉鐘舵�佸埌Text瀛楁
- if ((nObj.Repair_Status_Text__c != nObj.Repair_Status_F__c
- && nObj.Repair_Status_F__c != '淇悊瀹屾瘯')
- || nObj.Return_Status_Text__c != nObj.Return_Status_F__c
- || nObj.Shipment_Status_Text__c != nObj.Shipment_Status_F__c
- || (nObj.ApplyPersonAppended__c != nObj.ApplyPersonAppended_F__c && Trigger.isInsert)
- ) {
+ if (
+ (nObj.Repair_Status_Text__c != nObj.Repair_Status_F__c &&
+ nObj.Repair_Status_F__c != '淇悊瀹屾瘯') ||
+ nObj.Return_Status_Text__c != nObj.Return_Status_F__c ||
+ nObj.Shipment_Status_Text__c != nObj.Shipment_Status_F__c ||
+ (nObj.ApplyPersonAppended__c != nObj.ApplyPersonAppended_F__c && Trigger.isInsert)
+ ) {
Rental_Apply_Equipment_Set_Detail__c raesd = new Rental_Apply_Equipment_Set_Detail__c(Id = nObj.Id);
//鏄庣粏鐘舵�佹病鏈変慨鐞嗗畬姣曟墍浠ヤ慨鐞嗗畬姣曠殑鏃跺�欎笉鎷疯礉鐘舵�佸埌Text瀛楁
if (nObj.Repair_Status_F__c != '淇悊瀹屾瘯') {
@@ -4297,7 +1633,15 @@
}
}
if (!raesds.isEmpty()) {
- update raesds;
+ // 澶囧搧浼樺寲杩藉姞 20230518 lc Start
+ if (skipUpdateAgain) {
+ Oly_TriggerHandler.bypass('RentalApplyEquipmentSetDetailHandler');
+ update raesds;
+ Oly_TriggerHandler.clearBypass('RentalApplyEquipmentSetDetailHandler');
+ } else {
+ update raesds;
+ }
+ // 澶囧搧浼樺寲杩藉姞 20230518 lc End
}
}
// 20211116 ljh 涓嬩竴娆″�熺敤棰勮鍑哄簱鏃堕棿 鐨勮祴鍊� 鍥炴敹鍚�-妫�娴嬬粨鏋淥K閫昏緫 start
@@ -4312,9 +1656,13 @@
Map<Date, List<Rental_Apply_Equipment_Set_Detail__c>> dLMap = new Map<Date, List<Rental_Apply_Equipment_Set_Detail__c>>();
List<Rental_Apply_Equipment_Set_Detail__c> upRdList = new List<Rental_Apply_Equipment_Set_Detail__c>();
for (Rental_Apply_Equipment_Set_Detail__c nObj : newList) {
- if(nObj.RA_RecordTypeId__c != '01210000000NPGK'){
+ if (nObj.RA_RecordTypeId__c != '01210000000NPGK') {
Rental_Apply_Equipment_Set_Detail__c oObj = oldMap.get(nObj.Id);
- if(nObj.Inspection_result_after_F_New__c != null && nObj.Inspection_result_after_F_New__c == 'OK' && oObj.Inspection_result_after_F_New__c != nObj.Inspection_result_after_F_New__c){
+ if (
+ nObj.Inspection_result_after_F_New__c != null &&
+ nObj.Inspection_result_after_F_New__c == 'OK' &&
+ oObj.Inspection_result_after_F_New__c != nObj.Inspection_result_after_F_New__c
+ ) {
// 妫�娴婳K鏃堕棿+3涓伐浣滄棩(濂ユ灄宸存柉鏃ュ巻)
Date date1 = nObj.After_Inspection_time_F_New__c.date();
if (minDate > date1) {
@@ -4323,42 +1671,44 @@
if (maxDate < date1) {
maxDate = date1;
}
- if(!dLMap.containsKey(date1)){
- dLMap.put(date1,new List<Rental_Apply_Equipment_Set_Detail__c>());
+ if (!dLMap.containsKey(date1)) {
+ dLMap.put(date1, new List<Rental_Apply_Equipment_Set_Detail__c>());
}
dLMap.get(date1).add(nObj);
- }
+ }
// 妫�娴婲G鍜屾瑺鍝佺殑锛氫笉鏄剧ず鏃堕棿
- if((
- // (
- nObj.RAESD_Status__c == '娆犲搧涓�' || nObj.RAESD_Status__c == '寰呬慨鐞�' || nObj.RAESD_Status__c == '寰呯Щ鑷虫姤搴熷尯')
+ if (
+ (// (
+ nObj.RAESD_Status__c == '娆犲搧涓�' ||
+ nObj.RAESD_Status__c == '寰呬慨鐞�' ||
+ nObj.RAESD_Status__c == '寰呯Щ鑷虫姤搴熷尯') &&
// || (nObj.Arrival_in_wh__c && oObj.Arrival_in_wh__c != nObj.Arrival_in_wh__c))
- && nObj.NextShippmentDate__c != null){
+ nObj.NextShippmentDate__c != null
+ ) {
Rental_Apply_Equipment_Set_Detail__c raesd = new Rental_Apply_Equipment_Set_Detail__c();
raesd.Id = nObj.Id;
raesd.NextShippmentDate__c = null;
upRdList.add(raesd);
- }
+ }
}
}
- if(dLMap.size() > 0){
- List<OlympusCalendar__c> ocList = [SELECT Id
- , Date__c
- FROM OlympusCalendar__c
- WHERE Date__c >= :minDate
- AND Date__c <= :maxDate.addDays(30)
- AND IsWorkDay__c = 1
- ORDER BY Date__c ASC];
+ if (dLMap.size() > 0) {
+ List<OlympusCalendar__c> ocList = [
+ SELECT Id, Date__c
+ FROM OlympusCalendar__c
+ WHERE Date__c >= :minDate AND Date__c <= :maxDate.addDays(30) AND IsWorkDay__c = 1
+ ORDER BY Date__c ASC
+ ];
Map<Date, Date> dateadd3Map = new Map<Date, Date>();
Integer ocListSize = ocList.size();
if (ocListSize > 3) {
- for (Integer i = 0; i < ocListSize - 3; i ++) {
+ for (Integer i = 0; i < ocListSize - 3; i++) {
dateadd3Map.put(ocList[i].Date__c, ocList[i + 3].Date__c);
}
- for(Date d:dLMap.keySet()){
+ for (Date d : dLMap.keySet()) {
// 鍥犱负 妫�娴嬫槸宸ヤ綔鏃� 涓�鑸笉浼氬嚭鐜� else 鎯呭喌
if (dateadd3Map.containsKey(d)) {
- for(Rental_Apply_Equipment_Set_Detail__c rd:dLMap.get(d)){
+ for (Rental_Apply_Equipment_Set_Detail__c rd : dLMap.get(d)) {
Rental_Apply_Equipment_Set_Detail__c raesd = new Rental_Apply_Equipment_Set_Detail__c();
raesd.Id = rd.id;
raesd.NextShippmentDate__c = dateadd3Map.get(d);
@@ -4366,10 +1716,10 @@
}
}
// 寰堝皯鍙戠敓
- else{
- for (Integer i = 0; i < ocListSize - 3; i ++) {
- if(d < ocList[i].Date__c){
- for(Rental_Apply_Equipment_Set_Detail__c rd:dLMap.get(d)){
+ else {
+ for (Integer i = 0; i < ocListSize - 3; i++) {
+ if (d < ocList[i].Date__c) {
+ for (Rental_Apply_Equipment_Set_Detail__c rd : dLMap.get(d)) {
Rental_Apply_Equipment_Set_Detail__c raesd = new Rental_Apply_Equipment_Set_Detail__c();
raesd.Id = rd.id;
raesd.NextShippmentDate__c = ocList[i + 2].Date__c;
@@ -4380,10 +1730,9 @@
}
}
}
-
}
}
- if(upRdList.size() > 0){
+ if (upRdList.size() > 0) {
update upRdList;
}
}
@@ -4398,9 +1747,9 @@
Map<Date, List<Rental_Apply_Equipment_Set_Detail__c>> dLMap = new Map<Date, List<Rental_Apply_Equipment_Set_Detail__c>>();
List<Rental_Apply_Equipment_Set_Detail__c> upRdList = new List<Rental_Apply_Equipment_Set_Detail__c>();
for (Rental_Apply_Equipment_Set_Detail__c nObj : newList) {
- if(nObj.RA_RecordTypeId__c != '01210000000NPGK'){
+ if (nObj.RA_RecordTypeId__c != '01210000000NPGK') {
Rental_Apply_Equipment_Set_Detail__c oObj = oldMap.get(nObj.Id);
- if(nObj.DeliverySlip__c != null && oObj.DeliverySlip__c != nObj.DeliverySlip__c){
+ if (nObj.DeliverySlip__c != null && oObj.DeliverySlip__c != nObj.DeliverySlip__c) {
// 妫�娴婳K鏃堕棿+3涓伐浣滄棩(濂ユ灄宸存柉鏃ュ巻)
Date date1 = nObj.RAES_Final_reply_day__c;
if (minDate > date1) {
@@ -4409,40 +1758,38 @@
if (maxDate < date1) {
maxDate = date1;
}
- if(!dLMap.containsKey(date1)){
- dLMap.put(date1,new List<Rental_Apply_Equipment_Set_Detail__c>());
+ if (!dLMap.containsKey(date1)) {
+ dLMap.put(date1, new List<Rental_Apply_Equipment_Set_Detail__c>());
}
dLMap.get(date1).add(nObj);
- }
+ }
}
}
- if(dLMap.size() > 0){
- List<OlympusCalendar__c> ocList = [SELECT Id
- , Date__c
- FROM OlympusCalendar__c
- WHERE Date__c >= :minDate
- AND Date__c <= :maxDate.addDays(30)
- AND IsWorkDay__c = 1
- ORDER BY Date__c ASC];
+ if (dLMap.size() > 0) {
+ List<OlympusCalendar__c> ocList = [
+ SELECT Id, Date__c
+ FROM OlympusCalendar__c
+ WHERE Date__c >= :minDate AND Date__c <= :maxDate.addDays(30) AND IsWorkDay__c = 1
+ ORDER BY Date__c ASC
+ ];
Map<Date, Date> dateadd3Map = new Map<Date, Date>();
Integer ocListSize = ocList.size();
if (ocListSize > 8) {
- for (Integer i = 0; i < ocListSize - 8; i ++) {
+ for (Integer i = 0; i < ocListSize - 8; i++) {
dateadd3Map.put(ocList[i].Date__c, ocList[i + 8].Date__c);
}
- for(Date d:dLMap.keySet()){
+ for (Date d : dLMap.keySet()) {
if (dateadd3Map.containsKey(d)) {
- for(Rental_Apply_Equipment_Set_Detail__c rd:dLMap.get(d)){
+ for (Rental_Apply_Equipment_Set_Detail__c rd : dLMap.get(d)) {
Rental_Apply_Equipment_Set_Detail__c raesd = new Rental_Apply_Equipment_Set_Detail__c();
raesd.Id = rd.id;
raesd.NextShippmentDate__c = dateadd3Map.get(d);
upRdList.add(raesd);
}
- }
- else{
- for (Integer i = 0; i < ocListSize - 8; i ++) {
- if(d < ocList[i].Date__c){
- for(Rental_Apply_Equipment_Set_Detail__c rd:dLMap.get(d)){
+ } else {
+ for (Integer i = 0; i < ocListSize - 8; i++) {
+ if (d < ocList[i].Date__c) {
+ for (Rental_Apply_Equipment_Set_Detail__c rd : dLMap.get(d)) {
Rental_Apply_Equipment_Set_Detail__c raesd = new Rental_Apply_Equipment_Set_Detail__c();
raesd.Id = rd.id;
raesd.NextShippmentDate__c = ocList[i + 7].Date__c;
@@ -4453,43 +1800,57 @@
}
}
}
- if(upRdList.size() > 0){
- update upRdList;
+ if (upRdList.size() > 0) {
+ // 澶囧搧浼樺寲杩藉姞 20230518 lc Start
+ if (skipUpdateAgain) {
+ Oly_TriggerHandler.bypass('RentalApplyEquipmentSetDetailHandler');
+ update upRdList;
+ Oly_TriggerHandler.clearBypass('RentalApplyEquipmentSetDetailHandler');
+ } else {
+ update upRdList;
+ }
+ // 澶囧搧浼樺寲杩藉姞 20230518 lc End
}
}
}
}
// 20211116 ljh 涓嬩竴娆″�熺敤棰勮鍑哄簱鏃堕棿 鐨勮祴鍊� 鍥炴敹鍚�-妫�娴嬬粨鏋淥K閫昏緫 end
//added by denny
- public void reQueueAndSequence(){
+ public void reQueueAndSequence() {
Map<Id, Rental_Apply_Equipment_Set_Detail__c> newdetailMap = (Map<Id, Rental_Apply_Equipment_Set_Detail__c>) Trigger.newMap;
List<Rental_Apply_Equipment_Set_Detail__c> updateList = new List<Rental_Apply_Equipment_Set_Detail__c>();
List<String> detailIds = new List<String>();
List<String> externalKeyList = new List<String>();
- Map<String,Decimal> minNumberMap = new Map<String,Decimal>();
- for(Rental_Apply_Equipment_Set_Detail__c olddetail : (List<Rental_Apply_Equipment_Set_Detail__c>)trigger.old){
- Rental_Apply_Equipment_Set_Detail__c detail ;
- if(Trigger.isUpdate){
+ Map<String, Decimal> minNumberMap = new Map<String, Decimal>();
+ for (Rental_Apply_Equipment_Set_Detail__c olddetail : (List<Rental_Apply_Equipment_Set_Detail__c>) Trigger.old) {
+ Rental_Apply_Equipment_Set_Detail__c detail;
+ if (Trigger.isUpdate) {
detail = newdetailMap.get(olddetail.Id);
}
- if((Trigger.isUpdate && (
- (oldDetail.Queue_Number__c > 0 && detail.Queue_Number__c == 0)// 鏆傚畾鍒嗛厤
+ if (
+ (Trigger.isUpdate &&
+ ((oldDetail.Queue_Number__c > 0 &&
+ detail.Queue_Number__c == 0) || // 鏆傚畾鍒嗛厤
// 20220127 ljh update start
// || (!oldDetail.Cancel_Select__c && detail.Cancel_Select__c && olddetail.Queue_Number__c >= 0) //鍙栨秷(鎺掗槦涓紝鏆傚畾鍒嗛厤)
- || (!oldDetail.Cancel_Select__c && detail.Cancel_Select__c && olddetail.Queue_Number__c > 0) //鍙栨秷(鎺掗槦涓紝鏆傚畾鍒嗛厤)
+ (!oldDetail.Cancel_Select__c &&
+ detail.Cancel_Select__c &&
+ olddetail.Queue_Number__c > 0) || //鍙栨秷(鎺掗槦涓紝鏆傚畾鍒嗛厤)
// 20220127 ljh update end
- || (oldDetail.Queue_Number__c > 0 && detail.Queue_Number__c == null )//鍒嗗崟
- || (oldDetail.Queue_Number__c > 0 && olddetail.ExternalKey__c != detail.ExternalKey__c)))//閲嶆帓
- || (Trigger.isDelete && olddetail.Queue_Number__c > 0 )){
-
+ (oldDetail.Queue_Number__c > 0 &&
+ detail.Queue_Number__c == null) || //鍒嗗崟
+ (oldDetail.Queue_Number__c > 0 &&
+ olddetail.ExternalKey__c != detail.ExternalKey__c))) || //閲嶆帓
+ (Trigger.isDelete && olddetail.Queue_Number__c > 0)
+ ) {
updateList.add(olddetail);
detailIds.add(olddetail.Id);
externalKeyList.add(olddetail.ExternalKey__c);
- if(!minNumberMap.containsKey(olddetail.Externalkey__c)){
- minNumberMap.put(olddetail.Externalkey__c,olddetail.Queue_Number__c);
- }else{
- if(minNumberMap.get(olddetail.Externalkey__c) > olddetail.Queue_Number__c){
- minNumberMap.put(olddetail.Externalkey__c,olddetail.Queue_Number__c);
+ if (!minNumberMap.containsKey(olddetail.Externalkey__c)) {
+ minNumberMap.put(olddetail.Externalkey__c, olddetail.Queue_Number__c);
+ } else {
+ if (minNumberMap.get(olddetail.Externalkey__c) > olddetail.Queue_Number__c) {
+ minNumberMap.put(olddetail.Externalkey__c, olddetail.Queue_Number__c);
}
}
}
@@ -4498,13 +1859,13 @@
if (!detailIds.isEmpty()) {
List<String> sequencekeylist = new List<String>();
List<String> changeSequenceIds = new List<String>();
- Map<String,Decimal> changesequenceMap = new Map<String,Decimal>();
- List<Rental_Apply_Sequence__c> assignSequence = [SELECT Id,Series_No__c,Invalid_Flag__c,Externalkey__c
- FROM Rental_Apply_Sequence__c
- WHERE Apply_Set_Detail__c IN: detailIds
- AND Invalid_Flag__c = false
- AND Series_No__c > 0];
- for(Rental_Apply_Sequence__c se:assignSequence){
+ Map<String, Decimal> changesequenceMap = new Map<String, Decimal>();
+ List<Rental_Apply_Sequence__c> assignSequence = [
+ SELECT Id, Series_No__c, Invalid_Flag__c, Externalkey__c
+ FROM Rental_Apply_Sequence__c
+ WHERE Apply_Set_Detail__c IN :detailIds AND Invalid_Flag__c = FALSE AND Series_No__c > 0
+ ];
+ for (Rental_Apply_Sequence__c se : assignSequence) {
// sequencekeylist.add(se.Externalkey__c);
changeSequenceIds.add(se.Id);
// if(!changesequenceMap.containsKey(se.Externalkey__c)){
@@ -4516,87 +1877,124 @@
// }
se.Invalid_Flag__c = true;
se.Series_No__c = 0;
- }
+ }
List<Rental_Apply_Equipment_Set_Detail__c> changeDetailList = new List<Rental_Apply_Equipment_Set_Detail__c>();
- List<Rental_Apply_Equipment_Set_Detail__c> raesdList = [SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
- FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Rental_Apply__r.demo_purpose2__c,Queue_Day__c,ExternalKey__c,
- Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,Allow_Adjust_Queue_Flag__c,
- Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,Fixture_Model_No__c,Rental_Apply__c,
- Internal_asset_location_before__c,Salesdepartment__c, Product_category_F__c, Product_category_text__c,Equipment_Type_text__c,
- Salesdepartment_before__c,Rental_Apply__r.Request_shipping_day__c,QuenType__c,IsAdjust__c,Rental_Apply__r.Request_approval_time__c,
- Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,Cancel_Reason__c,Loaner_cancel_reason__c,
- Loaner_cancel_Remarks__c ,Rental_Apply_Equipment_Set__r.Name
- FROM Rental_Apply_Equipment_Set_Detail__c
- WHERE Queue_Number__c > 0
- AND Cancel_Select__c = false
- AND ExternalKey__c IN:externalKeyList
- AND Id NOT IN :detailIds
- ORDER BY Queue_Number__c ASC ];
- Map<String,List<Rental_Apply_Equipment_Set_Detail__c>> detailsMap = new Map<String,List<Rental_Apply_Equipment_Set_Detail__c>>();
- for(Rental_Apply_Equipment_Set_Detail__c setdetail:raesdList){
- if(!detailsMap.containsKey(setdetail.Externalkey__c)){
- detailsMap.put(setdetail.Externalkey__c,new List<Rental_Apply_Equipment_Set_Detail__c>());
+ List<Rental_Apply_Equipment_Set_Detail__c> raesdList = [
+ SELECT
+ Id,
+ Rental_Apply_Equipment_Set__c,
+ Asset__c,
+ Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
+ FSD_Fixture_Model_No__c,
+ Fixture_Model_No_text__c,
+ Rental_Apply__r.demo_purpose2__c,
+ Queue_Day__c,
+ ExternalKey__c,
+ Is_Body__c,
+ FSD_Is_OneToOne__c,
+ Select_Time__c,
+ Rental_Apply__r.EquipmentGuaranteeFlg__c,
+ Allow_Adjust_Queue_Flag__c,
+ Cancel_Select__c,
+ Fixture_Model_No_F__c,
+ Queue_Number__c,
+ Internal_asset_location__c,
+ Fixture_Model_No__c,
+ Rental_Apply__c,
+ Internal_asset_location_before__c,
+ Salesdepartment__c,
+ Product_category_F__c,
+ Product_category_text__c,
+ Equipment_Type_text__c,
+ Salesdepartment_before__c,
+ Rental_Apply__r.Request_shipping_day__c,
+ QuenType__c,
+ IsAdjust__c,
+ Rental_Apply__r.Request_approval_time__c,
+ Equipment_Type__c,
+ Rental_Apply__r.Internal_asset_location_F__c,
+ Cancel_Reason__c,
+ Loaner_cancel_reason__c,
+ Loaner_cancel_Remarks__c,
+ Rental_Apply_Equipment_Set__r.Name
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE Queue_Number__c > 0 AND Cancel_Select__c = FALSE AND ExternalKey__c IN :externalKeyList AND Id NOT IN :detailIds
+ ORDER BY Queue_Number__c ASC
+ ];
+ Map<String, List<Rental_Apply_Equipment_Set_Detail__c>> detailsMap = new Map<String, List<Rental_Apply_Equipment_Set_Detail__c>>();
+ for (Rental_Apply_Equipment_Set_Detail__c setdetail : raesdList) {
+ if (!detailsMap.containsKey(setdetail.Externalkey__c)) {
+ detailsMap.put(setdetail.Externalkey__c, new List<Rental_Apply_Equipment_Set_Detail__c>());
}
detailsMap.get(setdetail.Externalkey__c).add(setdetail);
-
-
}
- for(String key:detailsMap.keySet()){
+ for (String key : detailsMap.keySet()) {
Decimal queueNo = minNumberMap.get(key);
System.debug(LoggingLevel.INFO, '*** queueNo: ' + queueNo);
Decimal i = 0;
- for(Rental_Apply_Equipment_Set_Detail__c detail : detailsMap.get(key)){
+ for (Rental_Apply_Equipment_Set_Detail__c detail : detailsMap.get(key)) {
System.debug(LoggingLevel.INFO, '*** detail.Queue_Number__c: ' + detail.Queue_Number__c);
- if(detail.Queue_Number__c > queueNo){
+ if (detail.Queue_Number__c > queueNo) {
RentalFixtureSetAssignController.KeyObj dobj = RentalFixtureSetAssignController.getSequenceInfo(detail);
sequencekeylist.addAll(dobj.sequencekeylist);
- detail.Queue_Number__c = queueNo + i;
- i ++;
+ detail.Queue_Number__c = queueNo + i;
+ i++;
System.debug(LoggingLevel.INFO, '**111* detail.Queue_Number__c: ' + detail.Queue_Number__c);
changeDetailList.add(detail);
}
}
}
List<String> nodusequencekeylist = new List<String>(new Set<String>(sequencekeylist));
- List<Rental_Apply_Sequence__c> sequenceList = [SELECT Id,ExternalKey__c,Demo_Purpose2__c,
- Apply_Set_Detail__c,Apply_Set_Detail_ExternalKey__c,
- Series_No__c,Salesdepartment__c,Product_category__c,
- Rental_Apply__c,Internal_asset_location__c,
- Apply_Set_Detail__r.Queue_Number__c,Series_Unequal_Queue_Flag__c,
- Fixture_Model_No__c,Equipment_Type__c
- FROM Rental_Apply_Sequence__c
- WHERE ExternalKey__c IN: nodusequencekeylist
- AND Id NOT IN:changeSequenceIds
- AND Series_No__c > 0
- AND Invalid_Flag__c = false
- FOR UPDATE
- ];
+ List<Rental_Apply_Sequence__c> sequenceList = [
+ SELECT
+ Id,
+ ExternalKey__c,
+ Demo_Purpose2__c,
+ Apply_Set_Detail__c,
+ Apply_Set_Detail_ExternalKey__c,
+ Series_No__c,
+ Salesdepartment__c,
+ Product_category__c,
+ Rental_Apply__c,
+ Internal_asset_location__c,
+ Apply_Set_Detail__r.Queue_Number__c,
+ Series_Unequal_Queue_Flag__c,
+ Fixture_Model_No__c,
+ Equipment_Type__c
+ FROM Rental_Apply_Sequence__c
+ WHERE
+ ExternalKey__c IN :nodusequencekeylist
+ AND Id NOT IN :changeSequenceIds
+ AND Series_No__c > 0
+ AND Invalid_Flag__c = FALSE
+ FOR UPDATE
+ ];
System.debug(LoggingLevel.INFO, '*** sequenceList: ' + sequenceList);
- Map<String,List<Rental_Apply_Sequence__c>> sequenceMap = new Map<String,List<Rental_Apply_Sequence__c>>();
+ Map<String, List<Rental_Apply_Sequence__c>> sequenceMap = new Map<String, List<Rental_Apply_Sequence__c>>();
List<FixtureUtil.SequenceWrapper> Wrappers = new List<FixtureUtil.SequenceWrapper>();
- for(Rental_Apply_Sequence__c se: sequenceList){
+ for (Rental_Apply_Sequence__c se : sequenceList) {
Wrappers.add(new FixtureUtil.SequenceWrapper(se));
}
Wrappers.sort();
sequenceList = new List<Rental_Apply_Sequence__c>();
- for(FixtureUtil.SequenceWrapper wrapper:wrappers){
+ for (FixtureUtil.SequenceWrapper wrapper : wrappers) {
sequenceList.add(wrapper.sequence);
}
- for(Rental_Apply_Sequence__c se: sequenceList){
- if(!sequenceMap.containsKey(se.Externalkey__c)){
- sequenceMap.put(se.Externalkey__c,new List<Rental_Apply_Sequence__c>());
+ for (Rental_Apply_Sequence__c se : sequenceList) {
+ if (!sequenceMap.containsKey(se.Externalkey__c)) {
+ sequenceMap.put(se.Externalkey__c, new List<Rental_Apply_Sequence__c>());
}
sequenceMap.get(se.Externalkey__c).add(se);
}
List<Rental_Apply_Sequence__c> changeSequenceList = new List<Rental_Apply_Sequence__c>();
- for(String key:sequenceMap.keyset()){
+ for (String key : sequenceMap.keyset()) {
Decimal i = 1;
- for(Rental_Apply_Sequence__c se: sequenceMap.get(key)){
- if(se.Series_No__c != i){
- se.Series_No__c = i;
+ for (Rental_Apply_Sequence__c se : sequenceMap.get(key)) {
+ if (se.Series_No__c != i) {
+ se.Series_No__c = i;
changeSequenceList.add(se);
}
- i ++ ;
+ i++;
}
}
update assignSequence;
@@ -4605,33 +2003,45 @@
}
}
- private void setUniqueKeyQueue(){
+ private void setUniqueKeyQueue() {
Map<Id, Rental_Apply_Equipment_Set_Detail__c> olddetailMap = (Map<Id, Rental_Apply_Equipment_Set_Detail__c>) Trigger.oldMap;
System.debug('寮�濮嬪鐞�------------------------------------');
- System.debug('(List<Rental_Apply_Equipment_Set_Detail__c>) Trigger.new---------------' + (List<Rental_Apply_Equipment_Set_Detail__c>) Trigger.new);
- for(Rental_Apply_Equipment_Set_Detail__c newdetail : (List<Rental_Apply_Equipment_Set_Detail__c>) Trigger.new){
+ System.debug(
+ '(List<Rental_Apply_Equipment_Set_Detail__c>) Trigger.new---------------' +
+ (List<Rental_Apply_Equipment_Set_Detail__c>) Trigger.new
+ );
+ for (Rental_Apply_Equipment_Set_Detail__c newdetail : (List<Rental_Apply_Equipment_Set_Detail__c>) Trigger.new) {
System.debug(newdetail.Id + ' 鐢宠鍗曞彿锛�' + newdetail.Rental_Apply__r.name);
Rental_Apply_Equipment_Set_Detail__c olddetail = olddetailMap.get(newdetail.Id);
System.debug('鏃ф帓闃烴o锛�' + olddetail.Queue_Number__c);
System.debug('鏂版帓闃烴o锛�' + newdetail.Queue_Number__c);
-
- if((olddetail.Queue_Number__c > 0 && newdetail.Queue_Number__c == 0)// 鏆傚畾鍒嗛厤
- || (!olddetail.Cancel_Select__c && newdetail.Cancel_Select__c && olddetail.Queue_Number__c > 0) //鍙栨秷(鎺掗槦涓紝鏆傚畾鍒嗛厤)
- || (olddetail.Queue_Number__c > 0 && newdetail.Queue_Number__c == null )//鍒嗗崟
- ){
+
+ if (
+ (olddetail.Queue_Number__c > 0 &&
+ newdetail.Queue_Number__c == 0) || // 鏆傚畾鍒嗛厤
+ (!olddetail.Cancel_Select__c &&
+ newdetail.Cancel_Select__c &&
+ olddetail.Queue_Number__c > 0) || //鍙栨秷(鎺掗槦涓紝鏆傚畾鍒嗛厤)
+ (olddetail.Queue_Number__c > 0 &&
+ newdetail.Queue_Number__c == null) //鍒嗗崟
+ ) {
// 娓呯┖鎺掗槦鐨刄niqueKey
newdetail.UniqueKey_Queue__c = null;
System.debug('鏂版帓闃烾niqueKey_Queue__c锛�' + newdetail.UniqueKey_Queue__c);
}
// 閲嶆帓鎴栬�呮帓闃烴o鍙樺寲鏃舵洿鏂�
- if (!newdetail.Cancel_Select__c && newdetail.Queue_Number__c > 0 && newdetail.ExternalKey__c != null
- && (newdetail.Queue_Number__c != olddetail.Queue_Number__c
- || newdetail.ExternalKey__c != olddetail.ExternalKey__c)) {
+ if (
+ !newdetail.Cancel_Select__c &&
+ newdetail.Queue_Number__c > 0 &&
+ newdetail.ExternalKey__c != null &&
+ (newdetail.Queue_Number__c != olddetail.Queue_Number__c ||
+ newdetail.ExternalKey__c != olddetail.ExternalKey__c)
+ ) {
// 鎺掗槦鐨刄niqueKey璁惧��
newdetail.UniqueKey_Queue__c = newdetail.ExternalKey__c + ':' + newdetail.Queue_Number__c;
- System.debug('鏂版帓闃烾niqueKey_Queue__c锛�' + newdetail.UniqueKey_Queue__c);
+ System.debug('鏂版帓闃烾niqueKey_Queue__c锛�' + newdetail.UniqueKey_Queue__c);
}
}
System.debug('缁撴潫澶勭悊------------------------------------');
@@ -4775,32 +2185,57 @@
return;
}
//NG_Return_DeliverySlip__c涓虹┖鐨勪竴瑙堟墠鍋氶偖浠跺彂閫�
- Map<Id, Rental_Apply_Equipment_Set__c> raessMap = new Map<Id, Rental_Apply_Equipment_Set__c>([Select Id From Rental_Apply_Equipment_Set__c
- WHERE Id =: raesRDSMap.keySet()
- AND NG_Return_DeliverySlip__c = null]);
- Map<Id, FixtureDeliverySlip__c> fdss = new Map<Id, FixtureDeliverySlip__c>([Select Id, Name, Combine_Pack__c, Wh_Staff__c, DeliveryCompany__c, Shippment_loaner_time__c,
- Distributor_method__c, DeliveryCompany_SlipNo__c, DeliveryType__c
- From FixtureDeliverySlip__c
- Where Id =: raesRDSMap.values()]);
+ Map<Id, Rental_Apply_Equipment_Set__c> raessMap = new Map<Id, Rental_Apply_Equipment_Set__c>(
+ [
+ SELECT Id
+ FROM Rental_Apply_Equipment_Set__c
+ WHERE Id = :raesRDSMap.keySet() AND NG_Return_DeliverySlip__c = NULL
+ ]
+ );
+ Map<Id, FixtureDeliverySlip__c> fdss = new Map<Id, FixtureDeliverySlip__c>(
+ [
+ SELECT
+ Id,
+ Name,
+ Combine_Pack__c,
+ Wh_Staff__c,
+ DeliveryCompany__c,
+ Shippment_loaner_time__c,
+ Distributor_method__c,
+ DeliveryCompany_SlipNo__c,
+ DeliveryType__c
+ FROM FixtureDeliverySlip__c
+ WHERE Id = :raesRDSMap.values()
+ ]
+ );
System.debug('fdss is ' + fdss);
List<Rental_Apply_Equipment_Set__c> raess = new List<Rental_Apply_Equipment_Set__c>();
- for (Id key: raesRDSMap.keySet()) {
+ for (Id key : raesRDSMap.keySet()) {
//褰揘G_Return_DeliverySlip__c涓嶄负绌烘椂涓嶅彂閭欢
if (!raessMap.containsKey(key)) {
continue;
}
FixtureDeliverySlip__c fds = fdss.get(raesRDSMap.get(key));
- String message = '鍙戣揣-鍙戣揣杩愯緭鍗曞彿锛�'
- + fds.Name + '<BR>'
- + '鍙戣揣-鐗╂祦鍏徃锛�'
- + fds.DeliveryCompany__c + '<BR>'
- + '鍙戣揣-杩愯緭鏂瑰紡锛�'
- + fds.Distributor_method__c + '<BR>'
- + '鐗╂祦鎻愯揣鏃堕棿锛�'
- + raesDateMap.get(key) + '<BR>';
- raess.add(new Rental_Apply_Equipment_Set__c(Id = key,
+ String message =
+ '鍙戣揣-鍙戣揣杩愯緭鍗曞彿锛�' +
+ fds.Name +
+ '<BR>' +
+ '鍙戣揣-鐗╂祦鍏徃锛�' +
+ fds.DeliveryCompany__c +
+ '<BR>' +
+ '鍙戣揣-杩愯緭鏂瑰紡锛�' +
+ fds.Distributor_method__c +
+ '<BR>' +
+ '鐗╂祦鎻愯揣鏃堕棿锛�' +
+ raesDateMap.get(key) +
+ '<BR>';
+ raess.add(
+ new Rental_Apply_Equipment_Set__c(
+ Id = key,
NG_Return_DeliverySlip_Information__c = message,
- NG_Return_DeliverySlip__c = fds.Id));
+ NG_Return_DeliverySlip__c = fds.Id
+ )
+ );
}
if (!raess.isEmpty()) {
update raess;
@@ -4810,25 +2245,29 @@
//璁剧疆鐢宠涔︾殑鍥炲瘎閫氱煡鏂囨湰
@future
private static void setRequestAsset_return_Text(Set<Id> raesdIdSet) {
- List<Rental_Apply_Equipment_Set_Detail__c> raesdList = [SELECT Id,
- Rental_Apply__c,
- Return_DeliverySlip__c,
- Rental_Apply_Equipment_Set__c,
- Fixture_Model_No_text__c,
- Lost_Item_return__c,
- NoItemReturn__c,
- Rental_Apply__r.Name,
- Rental_Apply__r.Id,
- Return_DeliverySlip__r.Id,
- Return_DeliverySlip__r.Name,
- Return_DeliverySlip__r.DeliveryCompany__c,
- Return_DeliverySlip__r.Distributor_method__c,
- Return_DeliverySlip__r.Shippment_loaner_time__c
- FROM Rental_Apply_Equipment_Set_Detail__c
- WHERE Id = :raesdIdSet
- // 鍥炲瘎閫氱煡鍙彂閫佹湁閾炬帴鍥炲瘎鍗曠殑鏄庣粏淇℃伅
- AND Return_DeliverySlip__c != null
- ORDER BY Rental_Apply__c, Rental_Apply_Equipment_Set__c, Name];
+ List<Rental_Apply_Equipment_Set_Detail__c> raesdList = [
+ SELECT
+ Id,
+ Rental_Apply__c,
+ Return_DeliverySlip__c,
+ Rental_Apply_Equipment_Set__c,
+ Fixture_Model_No_text__c,
+ Lost_Item_return__c,
+ NoItemReturn__c,
+ Rental_Apply__r.Name,
+ Rental_Apply__r.Id,
+ Return_DeliverySlip__r.Id,
+ Return_DeliverySlip__r.Name,
+ Return_DeliverySlip__r.DeliveryCompany__c,
+ Return_DeliverySlip__r.Distributor_method__c,
+ Return_DeliverySlip__r.Shippment_loaner_time__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE
+ Id = :raesdIdSet
+ // 鍥炲瘎閫氱煡鍙彂閫佹湁閾炬帴鍥炲瘎鍗曠殑鏄庣粏淇℃伅
+ AND Return_DeliverySlip__c != NULL
+ ORDER BY Rental_Apply__c, Rental_Apply_Equipment_Set__c, Name
+ ];
// 鏀堕泦鍥炲瘎鏄庣粏 {raesId -> raesdList}
Map<Id, List<Rental_Apply_Equipment_Set_Detail__c>> raesdListMap = new Map<Id, List<Rental_Apply_Equipment_Set_Detail__c>>();
Map<Id, FixtureDeliverySlip__c> return_DeliverySlipMap = new Map<Id, FixtureDeliverySlip__c>();
@@ -4854,13 +2293,11 @@
}
// 妫�绱㈠洖瀵勭殑涓�瑙� {raId -> raesList}
Map<Id, List<Rental_Apply_Equipment_Set__c>> raesListMap = new Map<Id, List<Rental_Apply_Equipment_Set__c>>();
- List<Rental_Apply_Equipment_Set__c> raesList = [SELECT Id,
- Loaner_code_F__c,
- Rental_Apply__c,
- Asset_return_Status__c,
- Received_Confirm__c
- FROM Rental_Apply_Equipment_Set__c
- WHERE Id =: raesdListMap.keySet()];
+ List<Rental_Apply_Equipment_Set__c> raesList = [
+ SELECT Id, Loaner_code_F__c, Rental_Apply__c, Asset_return_Status__c, Received_Confirm__c
+ FROM Rental_Apply_Equipment_Set__c
+ WHERE Id = :raesdListMap.keySet()
+ ];
for (Rental_Apply_Equipment_Set__c raes : raesList) {
if (!raesListMap.containsKey(raes.Rental_Apply__c)) {
raesListMap.put(raes.Rental_Apply__c, new List<Rental_Apply_Equipment_Set__c>());
@@ -4885,14 +2322,13 @@
message += '閰嶅' + i + '锛�' + raes.Loaner_code_F__c;
String message2 = '<BR>';
Boolean haveLost_Item_return = false;
- // 鏌ョ湅涓�瑙堜笅鐨勬墍鏈夋槑缁�
+ // 鏌ョ湅涓�瑙堜笅鐨勬墍鏈夋槑缁�
for (Rental_Apply_Equipment_Set_Detail__c nObj : raesdListMap.get(raes.Id)) {
message2 += ' ' + nObj.Fixture_Model_No_text__c;
if (nObj.Lost_Item_return__c) {
message2 += ' (娆犲搧褰掕繕)';
haveLost_Item_return = true;
- }
- else {
+ } else {
// 濡傛灉鏈変竴鏉′笉鏄瑺鍝佸洖瀵勯偅涔堝氨涓嶆樉绀烘瑺鍝佸洖瀵�
allLostItemReturnFlag = false;
}
@@ -4905,7 +2341,7 @@
message2 += '<BR>';
}
if (haveLost_Item_return == false && raes.Received_Confirm__c == 'NG') {
- message += ' (NG褰掕繕)';
+ message += ' (NG褰掕繕)';
}
message += message2;
}
@@ -4913,19 +2349,18 @@
message += '<BR>';
FixtureDeliverySlip__c fds = new FixtureDeliverySlip__c();
if (return_DeliverySlipMap.containsKey(raId)) {
- fds = return_DeliverySlipMap.get(raId);
+ fds = return_DeliverySlipMap.get(raId);
}
- message += '鍥炲瘎-鍙戣揣杩愯緭鍗曞彿锛�' + (String.isBlank(fds.Name)? '' : fds.Name) + '<BR>';
- message += '鍥炲瘎-鐗╂祦鍏徃锛�' + (String.isBlank(fds.DeliveryCompany__c)? '' : fds.DeliveryCompany__c) + '<BR>';
- message += '鍥炲瘎-杩愯緭鏂瑰紡锛�' + (String.isBlank(fds.Distributor_method__c)? '' : fds.Distributor_method__c) + '<BR>';
+ message += '鍥炲瘎-鍙戣揣杩愯緭鍗曞彿锛�' + (String.isBlank(fds.Name) ? '' : fds.Name) + '<BR>';
+ message += '鍥炲瘎-鐗╂祦鍏徃锛�' + (String.isBlank(fds.DeliveryCompany__c) ? '' : fds.DeliveryCompany__c) + '<BR>';
+ message += '鍥炲瘎-杩愯緭鏂瑰紡锛�' + (String.isBlank(fds.Distributor_method__c) ? '' : fds.Distributor_method__c) + '<BR>';
String sdate = fds.Shippment_loaner_time__c == null ? '' : fds.Shippment_loaner_time__c.format();
message += '鐗╂祦鎻愯揣鏃堕棿锛�' + sdate + '<BR>';
if (String.isNotBlank(message)) {
- raList.add(new Rental_Apply__c(Id = raId,
- Asset_return_Text__c = message,
- Lost_item_Return_Flag__c = allLostItemReturnFlag));
- raList2.add(new Rental_Apply__c(Id = raId,
- Asset_return_Text__c = null));
+ raList.add(
+ new Rental_Apply__c(Id = raId, Asset_return_Text__c = message, Lost_item_Return_Flag__c = allLostItemReturnFlag)
+ );
+ raList2.add(new Rental_Apply__c(Id = raId, Asset_return_Text__c = null));
message = '';
}
}
@@ -4936,7 +2371,11 @@
}
private void setAssginPerson(Set<Id> raId) {
- List<Rental_Apply__c> raList = [select Id, Assign_Person__c from Rental_Apply__c where Id in :raId];
+ List<Rental_Apply__c> raList = [
+ SELECT Id, Assign_Person__c
+ FROM Rental_Apply__c
+ WHERE Id IN :raId
+ ];
List<Rental_Apply__c> updateList = new List<Rental_Apply__c>();
for (Rental_Apply__c ra : raList) {
if (ra.Assign_Person__c == null) {
@@ -4944,20 +2383,23 @@
updateList.add(ra);
}
}
- if (updateList.size() > 0) update updateList;
+ if (updateList.size() > 0)
+ update updateList;
}
private void changeAssetConsumable_Guaranteen_end() {
for (Rental_Apply_Equipment_Set_Detail__c nObj : newList) {
Rental_Apply_Equipment_Set_Detail__c oObj;
- if (trigger.isUpdate) {
+ if (Trigger.isUpdate) {
oObj = oldMap.get(nObj.Id);
}
- if (oObj.Shippment_loaner_time__c == null
- && nObj.Shippment_loaner_time__c != null
- && nObj.NeedSet_Consumable_Guaranteen_end_F__c == true) {
- Asset nass = assMap.get(nObj.Asset__c);
+ if (
+ oObj.Shippment_loaner_time__c == null &&
+ nObj.Shippment_loaner_time__c != null &&
+ nObj.NeedSet_Consumable_Guaranteen_end_F__c == true
+ ) {
+ Asset nass = assMap.get(nObj.Asset__c);
if (assUpdMap.containsKey(nObj.Asset__c)) {
nass = assUpdMap.get(nObj.Asset__c);
} else if (String.isNotBlank(nObj.Asset__c)) {
@@ -4971,52 +2413,70 @@
}
// 鍏佽鎻掗槦閭欢 20211125 ljh
private void setToRa_Email_Text() {
- Set<Id> raesdIdJumpSet = new Set<Id>();//鎻掗槦鐨勬槑缁�
+ Set<Id> raesdIdJumpSet = new Set<Id>(); //鎻掗槦鐨勬槑缁�
for (Rental_Apply_Equipment_Set_Detail__c nObj : newList) {
Rental_Apply_Equipment_Set_Detail__c oObj = oldMap.get(nObj.Id);
// 鐢宠鎻掗槦 && 鎻掗槦鍘熷洜鍙戠敓鍙樺寲鐨�
- if((nObj.Allow_Adjust_Queue_Flag__c && oObj.Allow_Adjust_Queue_Flag__c != nObj.Allow_Adjust_Queue_Flag__c)
- ||(!String.isBlank(nObj.jumpReason__c) && oObj.jumpReason__c != nObj.jumpReason__c)
- ){
- raesdIdJumpSet.add(nObj.Id);
+ if (
+ (nObj.Allow_Adjust_Queue_Flag__c && oObj.Allow_Adjust_Queue_Flag__c != nObj.Allow_Adjust_Queue_Flag__c) ||
+ (!String.isBlank(nObj.jumpReason__c) && oObj.jumpReason__c != nObj.jumpReason__c)
+ ) {
+ raesdIdJumpSet.add(nObj.Id);
}
}
- System.debug('zheli:'+raesdIdJumpSet);
+ System.debug('zheli:' + raesdIdJumpSet);
List<Rental_Apply__c> raList = new List<Rental_Apply__c>();
List<Rental_Apply__c> raList2 = new List<Rental_Apply__c>();
- if(raesdIdJumpSet.size() > 0){
- Map<ID,List<Rental_Apply_Equipment_Set_Detail__c>> radMap = new Map<ID,List<Rental_Apply_Equipment_Set_Detail__c>>();
- List<Rental_Apply_Equipment_Set_Detail__c> radList =[ SELECT Id, Name,RAESD_Status__c,Rental_Apply__c,Fixture_Model_No__c,Rental_Apply_Equipment_Set__c,Rental_Apply_Equipment_Set__r.Name,
- Allow_Adjust_Queue_Flag__c,jumpReason__c
- FROM Rental_Apply_Equipment_Set_Detail__c
- WHERE Id = :raesdIdJumpSet
- AND Allow_Adjust_Queue_Flag__c = TRUE
- ORDER BY Rental_Apply__c
+ if (raesdIdJumpSet.size() > 0) {
+ Map<ID, List<Rental_Apply_Equipment_Set_Detail__c>> radMap = new Map<ID, List<Rental_Apply_Equipment_Set_Detail__c>>();
+ List<Rental_Apply_Equipment_Set_Detail__c> radList = [
+ SELECT
+ Id,
+ Name,
+ RAESD_Status__c,
+ Rental_Apply__c,
+ Fixture_Model_No__c,
+ Rental_Apply_Equipment_Set__c,
+ Rental_Apply_Equipment_Set__r.Name,
+ Allow_Adjust_Queue_Flag__c,
+ jumpReason__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE Id = :raesdIdJumpSet AND Allow_Adjust_Queue_Flag__c = TRUE
+ ORDER BY Rental_Apply__c
];
- for (Rental_Apply_Equipment_Set_Detail__c rad:radList) {
+ for (Rental_Apply_Equipment_Set_Detail__c rad : radList) {
List<Rental_Apply_Equipment_Set_Detail__c> tempL = new List<Rental_Apply_Equipment_Set_Detail__c>();
- if(radMap.containsKey(rad.Rental_Apply__c)) {
+ if (radMap.containsKey(rad.Rental_Apply__c)) {
tempL = radMap.get(rad.Rental_Apply__c);
}
tempL.add(rad);
- radMap.put(rad.Rental_Apply__c,tempL);
+ radMap.put(rad.Rental_Apply__c, tempL);
}
- for (Id raId: radMap.keySet()) {
+ for (Id raId : radMap.keySet()) {
Rental_Apply__c tempRa = new Rental_Apply__c();
- Rental_Apply__c tempRa2 = new Rental_Apply__c();
+ Rental_Apply__c tempRa2 = new Rental_Apply__c();
tempRa.Id = raId;
tempRa2.Id = raId;
String htmlStr = '';
htmlStr += '<table border="1">';
htmlStr += '<tr> <th>涓�瑙圢o.</th><th>鍨嬪彿</th><th>鍊熷嚭澶囧搧涓�瑙堟槑缁嗙姸鎬�</th><th>鎻掗槦鍘熷洜</th></tr>';
for (Rental_Apply_Equipment_Set_Detail__c rad : radMap.get(raId)) {
- htmlStr += '<tr><td>'+rad.Rental_Apply_Equipment_Set__r.Name+'</td><td>'+rad.Fixture_Model_No__c+'</td><td>'+rad.RAESD_Status__c+'</td><td>'+rad.jumpReason__c+'</td></tr>';
+ htmlStr +=
+ '<tr><td>' +
+ rad.Rental_Apply_Equipment_Set__r.Name +
+ '</td><td>' +
+ rad.Fixture_Model_No__c +
+ '</td><td>' +
+ rad.RAESD_Status__c +
+ '</td><td>' +
+ rad.jumpReason__c +
+ '</td></tr>';
}
htmlStr += '</table>';
tempRa.Email_Jump_List__c = htmlStr;
tempRa2.Email_Jump_List__c = null;
- tempRa.Email_Jump__c = TRUE;
- tempRa2.Email_Jump__c = FALSE;
+ tempRa.Email_Jump__c = true;
+ tempRa2.Email_Jump__c = false;
raList.add(tempRa);
raList2.add(tempRa2);
}
@@ -5194,4 +2654,4 @@
}
}*/
// 20220121 鎺掗槦涓婄嚎
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/ResponseBodyLWCTest.cls b/force-app/main/default/classes/ResponseBodyLWCTest.cls
new file mode 100644
index 0000000..e4ba53d
--- /dev/null
+++ b/force-app/main/default/classes/ResponseBodyLWCTest.cls
@@ -0,0 +1,8 @@
+@isTest
+public class ResponseBodyLWCTest {
+ static testMethod void test1() {
+ ResponseBodyLWC l1 = new ResponseBodyLWC();
+ ResponseBodyLWC l2 = new ResponseBodyLWC('status', 200, 'testmsg', new Map<String, String>());
+ ResponseBodyLWC l3 = new ResponseBodyLWC('status', 200, 'testmsg', new List<Object>());
+ }
+}
diff --git a/force-app/main/default/classes/ResponseBodyLWCTest.cls-meta.xml b/force-app/main/default/classes/ResponseBodyLWCTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/ResponseBodyLWCTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/WeeklyReportCmp.cls b/force-app/main/default/classes/WeeklyReportCmp.cls
index f4b187f..8f9f4aa 100644
--- a/force-app/main/default/classes/WeeklyReportCmp.cls
+++ b/force-app/main/default/classes/WeeklyReportCmp.cls
@@ -1,31 +1,38 @@
public with sharing class WeeklyReportCmp {
- @AuraEnabled public List<Agency_Report__c> reports{get;set;}
- @AuraEnabled public Map<String,List<Map<String,String>>> allselectlist{get;set;}
- @AuraEnabled public Map<String,String> fieldsMap{get;set;}
- @AuraEnabled public Map<String,List<Map<String,String>>> docmap{get;set;}
- @AuraEnabled public List<Map<String,String>> doctorList{get;set;}
+ @AuraEnabled
+ public List<Agency_Report__c> reports { get; set; }
+ @AuraEnabled
+ public Map<String, List<Map<String, String>>> allselectlist { get; set; }
+ @AuraEnabled
+ public Map<String, String> fieldsMap { get; set; }
+ @AuraEnabled
+ public Map<String, List<Map<String, String>>> docmap { get; set; }
+ @AuraEnabled
+ public List<Map<String, String>> doctorList { get; set; }
// PIPL update Yin Mingjie 21/02/2022 start
- @AuraEnabled public Map<String,String> awsurl{get;set;}
- @AuraEnabled public Map<String,String> contactawsurl{get;set;}
+ @AuraEnabled
+ public Map<String, String> awsurl { get; set; }
+ @AuraEnabled
+ public Map<String, String> contactawsurl { get; set; }
// PIPL update Yin Mingjie 21/02/2022 end
public WeeklyReportCmp() {
}
// PIPL update Yin Mingjie 21/02/2022 start
@RemoteAction
@AuraEnabled
- public static Map<String,String> getAwsurl(String sobj){
+ public static Map<String, String> getAwsurl(String sobj) {
PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo(sobj);
- Map<String,String> awsmap = new Map<String,String>();
+ Map<String, String> awsmap = new Map<String, String>();
awsmap.put('token', piIntegration.token);
awsmap.put('newUrl', piIntegration.newUrl);
awsmap.put('searchUrl', piIntegration.searchUrl);
awsmap.put('transactionURL', piIntegration.transactionURL);
return awsmap;
}
-
+
// @RemoteAction
// @AuraEnabled
- // public static Map<String, String> saveAgencyContact(String name, String nameEncrypt, String type, String typeEncrypt, String doctorDivision1,
+ // public static Map<String, String> saveAgencyContact(String name, String nameEncrypt, String type, String typeEncrypt, String doctorDivision1,
// String doctorDivision1Encrypt, String agencyHospitalid, String awsid) {
// Agency_Contact__c agency_contact = new Agency_Contact__c();
@@ -37,9 +44,9 @@
// agency_contact.Doctor_Division1_Encrypted__c = doctorDivision1Encrypt;
// agency_contact.Agency_Hospital__c = agencyHospitalid;
// agency_contact.AWS_Data_Id__c = awsid;
-
+
// Map<String, String> acMap = new Map<String, String>();
-
+
// acMap = LightningUtil.insertAgencyContact(agency_contact);
// return acMap;
// }
@@ -47,8 +54,13 @@
//zhj 鏂版柟妗堟敼閫� 2022-12-21 start
@RemoteAction
@AuraEnabled
- public static Map<String, String> saveAgencyContact(String name, String type, String doctorDivision1,
- String agencyHospitalid, String awsid) {
+ public static Map<String, String> saveAgencyContact(
+ String name,
+ String type,
+ String doctorDivision1,
+ String agencyHospitalid,
+ String awsid
+ ) {
Agency_Contact__c agency_contact = new Agency_Contact__c();
agency_contact.Name = name;
@@ -56,9 +68,9 @@
agency_contact.Doctor_Division1__c = doctorDivision1;
agency_contact.Agency_Hospital__c = agencyHospitalid;
agency_contact.AWS_Data_Id__c = awsid;
-
+
Map<String, String> acMap = new Map<String, String>();
-
+
acMap = LightningUtil.insertAgencyContact(agency_contact);
return acMap;
}
@@ -66,37 +78,44 @@
// PIPL update Yin Mingjie 21/02/2022 end
@RemoteAction
@AuraEnabled
- public static List<Map<String,String>> getProductList(String dc, String opdsis){
+ public static List<Map<String, String>> getProductList(String dc, String opdsis) {
List<ProductTypes__c> ptList;
if (opdsis != '') {
- ptList = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dc and OPD_SIS_Type__c =:opdsis];
+ ptList = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dc AND OPD_SIS_Type__c = :opdsis
+ ];
} else {
- ptList = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dc];
+ ptList = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dc
+ ];
}
- List<Map<String,String>> pts = new List<Map<String,String>>();
- Map<String,String> blank = new Map<String,String>();
+ List<Map<String, String>> pts = new List<Map<String, String>>();
+ Map<String, String> blank = new Map<String, String>();
blank.put('label', '');
blank.put('value', '');
pts.add(blank);
for (ProductTypes__c pt : ptList) {
- Map<String,String> ptMap = new Map<String,String>();
+ Map<String, String> ptMap = new Map<String, String>();
ptMap.put('label', pt.Name);
ptMap.put('value', pt.Id);
pts.add(ptMap);
}
return pts;
}
-
- public void setalldata()
- {
- /*** create allselectlist ***/
- this.allselectlist = new Map<String,List<Map<String,String>>>();
- Map<String,List<Map<String,String>>> alldata = new Map<String,List<Map<String,String>>>();
+ public void setalldata() {
+ /*** create allselectlist ***/
+ this.allselectlist = new Map<String, List<Map<String, String>>>();
+
+ Map<String, List<Map<String, String>>> alldata = new Map<String, List<Map<String, String>>>();
// 銉椼儷銉�銈︺兂鍒濇湡鍊ゃ伄绌虹櫧
- List<Map<String,String>> tmp = new List<Map<String,String>>();
- Map<String,String> space = new Map<String,String>();
+ List<Map<String, String>> tmp = new List<Map<String, String>>();
+ Map<String, String> space = new Map<String, String>();
space.put('label', '');
space.put('value', '');
// PIPL update Yin Mingjie 21/02/2022 start
@@ -104,11 +123,11 @@
// PIPL update Yin Mingjie 21/02/2022 end
space.put('selected', 'true');
tmp.add(space);
-
+
// 浠g悊搴楁媴褰撹�� AgencyPerson__c
List<Contact> agency_person_data = LightningUtil.selectAgencyPerson();
- for(Contact var : agency_person_data) {
- Map<String,String> om = new Map<String,String>();
+ for (Contact var : agency_person_data) {
+ Map<String, String> om = new Map<String, String>();
om.put('label', var.Name);
om.put('value', var.Id);
// PIPL update Yin Mingjie 21/02/2022 start
@@ -118,7 +137,7 @@
tmp.add(om);
}
this.allselectlist.put('AgencyPerson__c', tmp);
-
+
/*
List<AgencyPerson__c> agency_person_data = [Select Id,Name,CurrencyIsoCode From AgencyPerson__c];
List<Map<String,String>> tmp = new List<Map<String,String>>();
@@ -136,24 +155,24 @@
}
this.allselectlist.put('AgencyPerson__c', tmp);
*/
-
- // 绉戝鍒嗙被 Department_Cateogy__c
- this.allselectlist.put('Department_Cateogy__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c','Department_Cateogy__c'));
+
+ // 绉戝鍒嗙被 Department_Cateogy__c
+ this.allselectlist.put('Department_Cateogy__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c', 'Department_Cateogy__c'));
// 娲诲姩鍖哄垎 Purpose_Type__c
- this.allselectlist.put('Purpose_Type__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c','Purpose_Type__c'));
+ this.allselectlist.put('Purpose_Type__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c', 'Purpose_Type__c'));
// 缁撴灉 Result__c
- this.allselectlist.put('Result__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c','Result__c'));
+ this.allselectlist.put('Result__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c', 'Result__c'));
//闃舵 StageName__c
- this.allselectlist.put('StageName__c', WeeklyReportCmp.getPicklistValues('Agency_Opportunity__c','StageName__c'));
+ this.allselectlist.put('StageName__c', WeeklyReportCmp.getPicklistValues('Agency_Opportunity__c', 'StageName__c'));
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
// 鏀彺闇�姹� SupportNeeds__c
- this.allselectlist.put('SupportNeeds__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c','SupportNeeds__c'));
+ this.allselectlist.put('SupportNeeds__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c', 'SupportNeeds__c'));
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
// 鑱屼綅
-// this.allselectlist.put('visitor_title__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c','visitor_title__c'));
+ // this.allselectlist.put('visitor_title__c', WeeklyReportCmp.getPicklistValues('Agency_Report__c','visitor_title__c'));
// 瑁藉搧鍖哄垎
//List<ProductTypes__c> ProductTypes = [select id,Name from ProductTypes__c];
@@ -167,22 +186,21 @@
// tmp2.add(om);
//}
//this.allselectlist.put('Product_Category__c', tmp2);
-
+
// 瑕嬪嚭銇楄ō瀹�
- this.fieldsMap = new Map<String,String>();
+ this.fieldsMap = new Map<String, String>();
this.fieldsMap = this.getfiledsmap();
-
+
//System.debug('fieldsMap is ' + fieldsMap);
//System.debug('allselectlist is ' + this.allselectlist);
- this.awsurl = getAwsurl('Agency_Contact__c');// 20220222 PI鏀归�� by Bright
- this.contactawsurl = getAwsurl('Contact');// 20220222 PI鏀归�� by Bright
+ this.awsurl = getAwsurl('Agency_Contact__c'); // 20220222 PI鏀归�� by Bright
+ this.contactawsurl = getAwsurl('Contact'); // 20220222 PI鏀归�� by Bright
}
-
-
- public static List<Map<String,String>> getPicklistValues(String objstr, String fld){
- List<Map<String,String>> options = new List<Map<String,String>>();
- Map<String,String> space = new Map<String,String>();
+
+ public static List<Map<String, String>> getPicklistValues(String objstr, String fld) {
+ List<Map<String, String>> options = new List<Map<String, String>>();
+ Map<String, String> space = new Map<String, String>();
space.put('label', '');
space.put('value', '');
space.put('selected', 'true');
@@ -193,10 +211,10 @@
map<String, Schema.SObjectField> fieldMap = objDescribe.fields.getMap();
list<Schema.PicklistEntry> values = fieldMap.get(fld).getDescribe().getPickListValues();
system.debug(objstr + '=' + values);
- for (Schema.PicklistEntry a : values)
- {
- if (!a.isActive()) continue;
- Map<String,String> ses = new Map<String,String>();
+ for (Schema.PicklistEntry a : values) {
+ if (!a.isActive())
+ continue;
+ Map<String, String> ses = new Map<String, String>();
ses.put('label', a.getLabel());
ses.put('value', a.getValue());
ses.put('selected', 'false');
@@ -204,38 +222,34 @@
}
return options;
}
-
-
- public Map<String,String> getfiledsmap()
- {
- Map<String,Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
- Map<String,List<String>> typemap = new Map<String,List<String>> ();
-
- Map<String,Schema.SObjectField> fieldMap = schemaMap.get('Agency_Opportunity__c').getDescribe().fields.getMap();
- Map<String,String> mappingmap = new Map<String,String>();
- for(Schema.SObjectField sfield : fieldMap.Values())
- {
+
+ public Map<String, String> getfiledsmap() {
+ Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
+ Map<String, List<String>> typemap = new Map<String, List<String>>();
+
+ Map<String, Schema.SObjectField> fieldMap = schemaMap.get('Agency_Opportunity__c').getDescribe().fields.getMap();
+ Map<String, String> mappingmap = new Map<String, String>();
+ for (Schema.SObjectField sfield : fieldMap.Values()) {
Schema.describefieldresult dfield = sfield.getDescribe();
String lab = '';
lab = dfield.getLabel();
system.debug(lab);
- mappingmap.put(dfield.name,lab);
+ mappingmap.put(dfield.name, lab);
}
fieldMap = schemaMap.get('Agency_Report__c').getDescribe().fields.getMap();
- for(Schema.SObjectField sfield : fieldMap.Values())
- {
+ for (Schema.SObjectField sfield : fieldMap.Values()) {
Schema.describefieldresult dfield = sfield.getDescribe();
String lab = '';
lab = dfield.getLabel();
system.debug(lab);
- mappingmap.put(dfield.name,lab);
+ mappingmap.put(dfield.name, lab);
}
return mappingmap;
}
-
+
@RemoteAction
@AuraEnabled
- public static WeeklyReportCmp getalldata(){
+ public static WeeklyReportCmp getalldata() {
WeeklyReportCmp li = new WeeklyReportCmp();
li.setalldata();
return li;
@@ -243,19 +257,23 @@
@RemoteAction
@AuraEnabled
- public static ProductTypes__c getProduct(String id){
- return [select Department_Cateogy__c, OPD_Flg__c, Id, SIS_Flg__c from ProductTypes__c where Id =:id];
+ public static ProductTypes__c getProduct(String id) {
+ return [
+ SELECT Department_Cateogy__c, OPD_Flg__c, Id, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE Id = :id
+ ];
}
-
+
@RemoteAction
@AuraEnabled
- public static String createReportHeader(String name, String s_date, String s_agency, String head_key){
+ public static String createReportHeader(String name, String s_date, String s_agency, String head_key) {
Agency_Report_Header__c agency_report_header = makeReportHeader(name, s_date, s_agency, head_key);
agency_report_header = LightningUtil.upsertAgencyReportHeader(agency_report_header);
return agency_report_header.Id;
}
- public static Agency_Report_Header__c makeReportHeader(String name, String s_date, String s_agency, String head_key){
+ public static Agency_Report_Header__c makeReportHeader(String name, String s_date, String s_agency, String head_key) {
Date week = Date.valueOf(s_date);
Agency_Report_Header__c agency_report_header = new Agency_Report_Header__c();
agency_report_header.Name = name + ' (' + s_date + ')';
@@ -265,30 +283,40 @@
// READ OlympusCalendar__c
system.debug(week);
- OlympusCalendar__c olympus_calendar = [select Id,Date__c from OlympusCalendar__c where Date__c=:week];
+ OlympusCalendar__c olympus_calendar = [
+ SELECT Id, Date__c
+ FROM OlympusCalendar__c
+ WHERE Date__c = :week
+ ];
system.debug(olympus_calendar);
String olympus_calendar_id = olympus_calendar.Id;
- if (olympus_calendar_id != '') { agency_report_header.OlympusDate__c = olympus_calendar_id; }
+ if (olympus_calendar_id != '') {
+ agency_report_header.OlympusDate__c = olympus_calendar_id;
+ }
system.debug(agency_report_header);
return agency_report_header;
}
-
+
@RemoteAction
@AuraEnabled
public static List<Agency_Hospital_Link__c> getHospitalList(String hospital_name) {
- hospital_name = '%' + hospital_name.trim() + '%';
- system.debug('hospital_name+++'+hospital_name);
- List<Agency_Hospital_Link__c> ahllist = [select Hospital_Name_readonly__c, Id, Hospital__c from Agency_Hospital_Link__c where Hospital_Name_readonly__c like :hospital_name and Agency_Campaign_Obj__c = true];
- system.debug('Agency_Campaign_Obj__c+++'+ahllist);
+ hospital_name = '%' + hospital_name.trim() + '%';
+ system.debug('hospital_name+++' + hospital_name);
+ List<Agency_Hospital_Link__c> ahllist = [
+ SELECT Hospital_Name_readonly__c, Id, Hospital__c
+ FROM Agency_Hospital_Link__c
+ WHERE Hospital_Name_readonly__c LIKE :hospital_name AND Agency_Campaign_Obj__c = TRUE
+ ];
+ system.debug('Agency_Campaign_Obj__c+++' + ahllist);
return ahllist;
}
-
+
@RemoteAction
@AuraEnabled
// PIPL update Yin Mingjie 21/02/2022 start
- public static Map<String,Map<String,String>> getDoctorList(String hospital_id){
- /*
+ public static Map<String, Map<String, String>> getDoctorList(String hospital_id) {
+ /*
public static List<Map<String,String>> getDoctorList(String hospital_id){
List<Map<String,String>> ret = new List<Map<String,String>>();
Map<String,String> space = new Map<String,String>();
@@ -297,10 +325,14 @@
space.put('selected', 'true');
ret.add(space);
*/
- // PIPL update Yin Mingjie 21/02/2022 end
+ // PIPL update Yin Mingjie 21/02/2022 end
// 鎴︾暐绉戝ID銈掑彇寰椼仐銇︺�併仢銈屻倰銈傘仺銇¨瀹€倰SELECT
- Agency_Hospital_Link__c ahl = [select Hospital__c from Agency_Hospital_Link__c where id = :hospital_id];
+ Agency_Hospital_Link__c ahl = [
+ SELECT Hospital__c
+ FROM Agency_Hospital_Link__c
+ WHERE id = :hospital_id
+ ];
// PIPL update Yin Mingjie 21/02/2022 start
/*
@@ -318,16 +350,19 @@
ret.add(tmp);
}
*/
- List<Agency_Contact__c> doctor_list = [select id,Name,AWS_Data_Id__c,Doctor_Division1__c,Type__c,Agency_Hospital__c
- FROM Agency_Contact__c WHERE Hospital_ID18__c=:ahl.Hospital__c order by Name];
+ List<Agency_Contact__c> doctor_list = [
+ SELECT id, Name, AWS_Data_Id__c, Doctor_Division1__c, Type__c, Agency_Hospital__c
+ FROM Agency_Contact__c
+ WHERE Hospital_ID18__c = :ahl.Hospital__c
+ ORDER BY Name
+ ];
- Map<String,Map<String,String>> ret_test = new Map<String,Map<String,String>>();
- for (Agency_Contact__c row : doctor_list)
- {
- if(row.AWS_Data_Id__c == '' || row.AWS_Data_Id__c == null){
+ Map<String, Map<String, String>> ret_test = new Map<String, Map<String, String>>();
+ for (Agency_Contact__c row : doctor_list) {
+ if (row.AWS_Data_Id__c == '' || row.AWS_Data_Id__c == null) {
continue;
}
- Map<String,String> tmp = new Map<String,String>();
+ Map<String, String> tmp = new Map<String, String>();
tmp.put('label', row.Name);
tmp.put('value', row.Id);
tmp.put('awsid', row.AWS_Data_Id__c);
@@ -340,7 +375,7 @@
sre.put('token', piIntegration.token);
sre.put('searchUrl', piIntegration.searchUrl);
ret_test.put('sre', sre);
-
+
return ret_test;
// PIPL update Yin Mingjie 21/02/2022 end
/*
@@ -365,7 +400,7 @@
*/
// PIPL update Yin Mingjie 21/02/2022 end
}
-
+
/*
@RemoteAction
@AuraEnabled
@@ -393,25 +428,71 @@
*/
@RemoteAction
- @AuraEnabled//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeedsc ,String SupportNeedsc
- public static String saveAgencyReport(String Department_Cateogy, String Purpose_Type,String SupportNeedsc, String Agency_Report_Header,
- String Agency_Hospital, String Person_In_Charge2, String doctor, String Submit_date,
- String Product_Category1, String Product_Category2, String Product_Category3,
- String Result, String Opportunity, String StageName, String oppAmount, String oppOCMPrice, String Close_Forecasted_Date, String Report_Date)
- {
- Agency_Report__c agency_report = makeAgencyReport(Department_Cateogy, Purpose_Type, Agency_Report_Header,
- Agency_Hospital, Person_In_Charge2, doctor, Submit_date,
- Product_Category1, Product_Category2, Product_Category3,//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeedsc ,SupportNeedsc
- Result, Opportunity, StageName, oppAmount, oppOCMPrice, Close_Forecasted_Date, Report_Date,SupportNeedsc);
+ @AuraEnabled //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeedsc ,String SupportNeedsc
+ public static String saveAgencyReport(
+ String Department_Cateogy,
+ String Purpose_Type,
+ String SupportNeedsc,
+ String Agency_Report_Header,
+ String Agency_Hospital,
+ String Person_In_Charge2,
+ String doctor,
+ String Submit_date,
+ String Product_Category1,
+ String Product_Category2,
+ String Product_Category3,
+ String Result,
+ String Opportunity,
+ String StageName,
+ String oppAmount,
+ String oppOCMPrice,
+ String Close_Forecasted_Date,
+ String Report_Date
+ ) {
+ Agency_Report__c agency_report = makeAgencyReport(
+ Department_Cateogy,
+ Purpose_Type,
+ Agency_Report_Header,
+ Agency_Hospital,
+ Person_In_Charge2,
+ doctor,
+ Submit_date,
+ Product_Category1,
+ Product_Category2,
+ Product_Category3, //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeedsc ,SupportNeedsc
+ Result,
+ Opportunity,
+ StageName,
+ oppAmount,
+ oppOCMPrice,
+ Close_Forecasted_Date,
+ Report_Date,
+ SupportNeedsc
+ );
agency_report = LightningUtil.insertAgencyReport(agency_report);
return agency_report.Id;
}
- public static Agency_Report__c makeAgencyReport(String Department_Cateogy, String Purpose_Type, String Agency_Report_Header,
- String Agency_Hospital, String Person_In_Charge2, String doctor, String Submit_date,
- String Product_Category1, String Product_Category2, String Product_Category3,//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeeds__c ,String SupportNeedsc
- String Result, String Opportunity, String StageName, String oppAmount, String oppOCMPrice, String Close_Forecasted_Date, String Report_Date,String SupportNeedsc)
- {
+ public static Agency_Report__c makeAgencyReport(
+ String Department_Cateogy,
+ String Purpose_Type,
+ String Agency_Report_Header,
+ String Agency_Hospital,
+ String Person_In_Charge2,
+ String doctor,
+ String Submit_date,
+ String Product_Category1,
+ String Product_Category2,
+ String Product_Category3, //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeeds__c ,String SupportNeedsc
+ String Result,
+ String Opportunity,
+ String StageName,
+ String oppAmount,
+ String oppOCMPrice,
+ String Close_Forecasted_Date,
+ String Report_Date,
+ String SupportNeedsc
+ ) {
Agency_Report__c agency_report = new Agency_Report__c();
Date week = Date.valueOf(Submit_date);
agency_report.Submit_date__c = week;
@@ -427,32 +508,58 @@
agency_report.Person_In_Charge2__c = null;
}
- if (Agency_Hospital != '') {
+ if (Agency_Hospital != '') {
LightningUtil.updateAccMaxActivityDate(Agency_Hospital, week);
}
-
+
// READ OlympusCalendar__c
//OlympusCalendar__c olympus_calendar = [select Id,Date__c from OlympusCalendar__c where Date__c=:week];
//String olympus_calendar_id = olympus_calendar.Id;
-
+
// WRITE Agency Report__c
- if (doctor != '') { agency_report.doctor2__c = doctor; } else { agency_report.doctor2__c = null; }
- if (Department_Cateogy != '') { agency_report.Department_Cateogy__c = Department_Cateogy; }
- if (Purpose_Type != '') { agency_report.Purpose_Type__c = Purpose_Type; }
+ if (doctor != '') {
+ agency_report.doctor2__c = doctor;
+ } else {
+ agency_report.doctor2__c = null;
+ }
+ if (Department_Cateogy != '') {
+ agency_report.Department_Cateogy__c = Department_Cateogy;
+ }
+ if (Purpose_Type != '') {
+ agency_report.Purpose_Type__c = Purpose_Type;
+ }
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start
- if (SupportNeedsc != '') { agency_report.SupportNeeds__c = SupportNeedsc; }
+ if (SupportNeedsc != '') {
+ agency_report.SupportNeeds__c = SupportNeedsc;
+ }
//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end
- if (Agency_Report_Header != '') { agency_report.Agency_Report_Header__c = Agency_Report_Header; }
- if (Agency_Hospital != '') { agency_report.Agency_Hospital__c = Agency_Hospital; }
+ if (Agency_Report_Header != '') {
+ agency_report.Agency_Report_Header__c = Agency_Report_Header;
+ }
+ if (Agency_Hospital != '') {
+ agency_report.Agency_Hospital__c = Agency_Hospital;
+ }
//if (olympus_calendar_id != '') { agency_report.Submit_date_Calendar__c = olympus_calendar_id; }
- if (Product_Category1 != '') { agency_report.Product_Category1__c = Product_Category1; }
- if (Product_Category2 != '') { agency_report.Product_Category2__c = Product_Category2; }
- if (Product_Category3 != '') { agency_report.Product_Category3__c = Product_Category3; }
- if (Result != '') { agency_report.Result__c = Result; }
- if (Opportunity != '') {
- agency_report.Opportunity__c = Opportunity;
+ if (Product_Category1 != '') {
+ agency_report.Product_Category1__c = Product_Category1;
+ }
+ if (Product_Category2 != '') {
+ agency_report.Product_Category2__c = Product_Category2;
+ }
+ if (Product_Category3 != '') {
+ agency_report.Product_Category3__c = Product_Category3;
+ }
+ if (Result != '') {
+ agency_report.Result__c = Result;
+ }
+ if (Opportunity != '') {
+ agency_report.Opportunity__c = Opportunity;
if (StageName != '' || oppAmount != '' || Close_Forecasted_Date != '' || oppOCMPrice != '') {
- Agency_Opportunity__c aopp = [select Id, StageName__c, Amount__c, Close_Forecasted_Date__c from Agency_Opportunity__c where Id = :Opportunity];
+ Agency_Opportunity__c aopp = [
+ SELECT Id, StageName__c, Amount__c, Close_Forecasted_Date__c
+ FROM Agency_Opportunity__c
+ WHERE Id = :Opportunity
+ ];
if (StageName != '') {
aopp.StageName__c = StageName;
}
@@ -471,37 +578,83 @@
update aopp;
}
}
-
+
system.debug(agency_report);
return agency_report;
}
@RemoteAction
@AuraEnabled
- public static String editAgencyReport(String Agency_Report_Id, String Department_Cateogy, String Purpose_Type,String SupportNeedsc, String Agency_Report_Header,
- String Agency_Hospital, String Person_In_Charge2, String doctor, String Submit_date,
- String Product_Category1, String Product_Category2, String Product_Category3, //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeeds__c ,String SupportNeedsc
- String Result, String Opportunity, String StageName, String oppAmount, String oppOCMPrice, String Close_Forecasted_Date, String Report_Date)
- {
+ public static String editAgencyReport(
+ String Agency_Report_Id,
+ String Department_Cateogy,
+ String Purpose_Type,
+ String SupportNeedsc,
+ String Agency_Report_Header,
+ String Agency_Hospital,
+ String Person_In_Charge2,
+ String doctor,
+ String Submit_date,
+ String Product_Category1,
+ String Product_Category2,
+ String Product_Category3, //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeeds__c ,String SupportNeedsc
+ String Result,
+ String Opportunity,
+ String StageName,
+ String oppAmount,
+ String oppOCMPrice,
+ String Close_Forecasted_Date,
+ String Report_Date
+ ) {
if (String.isBlank(Agency_Report_Id)) {
return null;
- }//SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeeds__c ,SupportNeeds__c
+ } //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeeds__c ,SupportNeeds__c
// Agency_Report__c agency_report = [select Id, Name, Department_Cateogy__c, Purpose_Type__c,SupportNeeds__c, Agency_Hospital__c,
// Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, visitor_title__c, Opportunity__c
// from Agency_Report__c where id=:Agency_Report_Id];
Agency_Report__c agency_report = new Agency_Report__c();
- if(Test.isRunningTest()){
- List<Agency_Report__c> agency_report_tests = [select Id, Name, Department_Cateogy__c, Purpose_Type__c,SupportNeeds__c, Agency_Hospital__c,
- Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, visitor_title__c, Opportunity__c
- from Agency_Report__c limit 1];
+ if (Test.isRunningTest()) {
+ List<Agency_Report__c> agency_report_tests = [
+ SELECT
+ Id,
+ Name,
+ Department_Cateogy__c,
+ Purpose_Type__c,
+ SupportNeeds__c,
+ Agency_Hospital__c,
+ Person_In_Charge2__c,
+ doctor2__c,
+ Submit_date__c,
+ Product_Category__c,
+ Result__c,
+ visitor_title__c,
+ Opportunity__c
+ FROM Agency_Report__c
+ LIMIT 1
+ ];
agency_report = agency_report_tests[0];
- }else {
- agency_report = [select Id, Name, Department_Cateogy__c, Purpose_Type__c,SupportNeeds__c, Agency_Hospital__c,
- Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, visitor_title__c, Opportunity__c
- from Agency_Report__c where id=:Agency_Report_Id];
+ } else {
+ agency_report = [
+ SELECT
+ Id,
+ Name,
+ Department_Cateogy__c,
+ Purpose_Type__c,
+ SupportNeeds__c,
+ Agency_Hospital__c,
+ Person_In_Charge2__c,
+ doctor2__c,
+ Submit_date__c,
+ Product_Category__c,
+ Result__c,
+ visitor_title__c,
+ Opportunity__c
+ FROM Agency_Report__c
+ WHERE id = :Agency_Report_Id
+ ];
}
-
+
Date week = Date.valueOf(Submit_date);
agency_report.Submit_date__c = week;
Date reportDate = Date.valueOf(Report_Date);
@@ -516,27 +669,67 @@
agency_report.Person_In_Charge2__c = null;
}
- if (Agency_Hospital != '') {
+ if (Agency_Hospital != '') {
LightningUtil.updateAccMaxActivityDate(Agency_Hospital, week);
}
- system.debug('Purpose_Type+++==++==='+Purpose_Type);
+ system.debug('Purpose_Type+++==++===' + Purpose_Type);
// WRITE Agency Report__c
- if (doctor != '') { agency_report.doctor2__c = doctor; } else { agency_report.doctor2__c = null; }
- if (Department_Cateogy != '') { agency_report.Department_Cateogy__c = Department_Cateogy; } else { agency_report.Department_Cateogy__c = null; }
- if (Purpose_Type != '') { agency_report.Purpose_Type__c = Purpose_Type; } else { agency_report.Purpose_Type__c = null; }
- //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeeds__c
- if (SupportNeedsc != '') { agency_report.SupportNeeds__c = SupportNeedsc; } else { agency_report.SupportNeeds__c = null; }
- if (Agency_Hospital != '') { agency_report.Agency_Hospital__c = Agency_Hospital; } else { agency_report.Agency_Hospital__c = null; }
- if (Product_Category1 != '') { agency_report.Product_Category1__c = Product_Category1; } else { agency_report.Product_Category1__c = null; }
- if (Product_Category2 != '') { agency_report.Product_Category2__c = Product_Category2; } else { agency_report.Product_Category2__c = null; }
- if (Product_Category3 != '') { agency_report.Product_Category3__c = Product_Category3; } else { agency_report.Product_Category3__c = null; }
+ if (doctor != '') {
+ agency_report.doctor2__c = doctor;
+ } else {
+ agency_report.doctor2__c = null;
+ }
+ if (Department_Cateogy != '') {
+ agency_report.Department_Cateogy__c = Department_Cateogy;
+ } else {
+ agency_report.Department_Cateogy__c = null;
+ }
+ if (Purpose_Type != '') {
+ agency_report.Purpose_Type__c = Purpose_Type;
+ } else {
+ agency_report.Purpose_Type__c = null;
+ }
+ //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start SupportNeeds__c
+ if (SupportNeedsc != '') {
+ agency_report.SupportNeeds__c = SupportNeedsc;
+ } else {
+ agency_report.SupportNeeds__c = null;
+ }
+ if (Agency_Hospital != '') {
+ agency_report.Agency_Hospital__c = Agency_Hospital;
+ } else {
+ agency_report.Agency_Hospital__c = null;
+ }
+ if (Product_Category1 != '') {
+ agency_report.Product_Category1__c = Product_Category1;
+ } else {
+ agency_report.Product_Category1__c = null;
+ }
+ if (Product_Category2 != '') {
+ agency_report.Product_Category2__c = Product_Category2;
+ } else {
+ agency_report.Product_Category2__c = null;
+ }
+ if (Product_Category3 != '') {
+ agency_report.Product_Category3__c = Product_Category3;
+ } else {
+ agency_report.Product_Category3__c = null;
+ }
//if (Product_Category != '') { agency_report.Product_Category__c = Product_Category; } else { agency_report.Product_Category__c = null; }
- if (Result != '') { agency_report.Result__c = Result; } else { agency_report.Result__c = null; }
+ if (Result != '') {
+ agency_report.Result__c = Result;
+ } else {
+ agency_report.Result__c = null;
+ }
//if (Opportunity != '') { agency_report.Opportunity__c = Opportunity; } else { agency_report.Opportunity__c = null; }
- if (Opportunity != '') {
- agency_report.Opportunity__c = Opportunity;
+ if (Opportunity != '') {
+ agency_report.Opportunity__c = Opportunity;
if (StageName != '' || oppAmount != '' || Close_Forecasted_Date != '' || oppOCMPrice != '') {
- Agency_Opportunity__c aopp = [select Id, StageName__c, Amount__c, Close_Forecasted_Date__c from Agency_Opportunity__c where Id = :Opportunity];
+ Agency_Opportunity__c aopp = [
+ SELECT Id, StageName__c, Amount__c, Close_Forecasted_Date__c
+ FROM Agency_Opportunity__c
+ WHERE Id = :Opportunity
+ ];
if (StageName != '') {
aopp.StageName__c = StageName;
}
@@ -554,24 +747,29 @@
}
update aopp;
}
- } else { agency_report.Opportunity__c = null; }
+ } else {
+ agency_report.Opportunity__c = null;
+ }
system.debug(agency_report);
-
+
agency_report = LightningUtil.updateAgencyReport(agency_report);
-
+
return agency_report.Id;
}
-
+
@RemoteAction
@AuraEnabled
- public static List<Agency_Opportunity__c> selectOpportunityByIdAndHospitalLinkId(String opportunity_id, String agency_hospital_link_id) {
+ public static List<Agency_Opportunity__c> selectOpportunityByIdAndHospitalLinkId(
+ String opportunity_id,
+ String agency_hospital_link_id
+ ) {
List<Agency_Opportunity__c> ret = new List<Agency_Opportunity__c>();
-
+
ret = LightningUtil.selectOpportunityByIdAndHospitalLinkId(opportunity_id, agency_hospital_link_id);
-
+
return ret;
}
-
+
@RemoteAction
@AuraEnabled
public static WeeklyReportCmp getReports(String date_str, String person_str) {
@@ -579,23 +777,23 @@
li.get_reports(date_str, person_str);
return li;
}
-
- public void get_reports(String date_str, String person_str) {
+
+ public void get_reports(String date_str, String person_str) {
// 閫卞牨銉囥兗銈裤倰鍙栧緱
Date week = Date.valueOf(date_str);
this.reports = LightningUtil.selectAgencyReport(week, person_str);
}
-
+
@RemoteAction
@AuraEnabled
public static List<Agency_Report__c> getReportsById(String report_id) {
List<Agency_Report__c> ret = new List<Agency_Report__c>();
-
+
ret = LightningUtil.selectAgencyReportById(report_id);
-
+
return ret;
}
-
+
// 鎵归噺娣诲姞鍛ㄦ姤by vivek start
@RemoteAction
@AuraEnabled
@@ -608,7 +806,7 @@
List<Contact> conMList = LightningUtil.selectAgencyPerson();
// LightningUtil.selectAgencyPerson();
- System.debug('====='+conMList);
+ System.debug('=====' + conMList);
// List<Agency_Report__c> reportlist = [Select Id, Name, Report_Date__c, Product_Category1__r.Name, Product_Category2__r.Name, Product_Category3__r.Name, Product_Category1__c, Product_Category2__c, Product_Category3__c, Department_Cateogy__c, Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__r.Name, Agency_Hospital__r.Hospital__c, OppName__c,
// Person_In_Charge2__c, Person_In_Charge2__r.Name, doctor2__c, doctor2__r.Name, Submit_date__c,
// Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name
@@ -622,7 +820,7 @@
String login_user_id = UserInfo.getUserId();
// return [select id, Name, Agency_User__c from contact where Agency_User__c = true and Isactive__c = '鏈夋晥' and AccountId in (select AccountId from User where id=:login_user_id)];
// return [select id, Name, Agency_User__c from contact where Agency_User__c = true and AccountId in (select AccountId from User where id=:login_user_id)];
- return [select id, Name, Agency_User__c from contact];
+ return [SELECT id, Name, Agency_User__c FROM contact];
}
// fy 瀵煎叆 20220424 start
public class GeDatass {
@@ -638,24 +836,24 @@
}
@AuraEnabled
public static String processDataAWSId(String fileData) {
- System.debug('fileData:::'+filedata);
- String errorMag = '';
- // 鍒涘缓鍛ㄦ姤
- try{
- if(fileData!=null){
- String[] fileLines = new String[]{};
+ System.debug('fileData:::' + filedata);
+ String errorMag = '';
+ // 鍒涘缓鍛ㄦ姤
+ try {
+ if (fileData != null) {
+ String[] fileLines = new List<String>{};
fileLines = fileData.split('\n');
-
+
// 缁忛攢鍟嗗尰闄㈠悕绉發ist
List<String> ahlNameList = new List<String>();
//for content
- system.debug('fileLines.size()==============>'+fileLines.size());
- for (Integer i=1,j=fileLines.size();i<j;i++){
+ system.debug('fileLines.size()==============>' + fileLines.size());
+ for (Integer i = 1, j = fileLines.size(); i < j; i++) {
List<String> inputvalues = new List<String>();
inputvalues = fileLines[i].split(',');
- if(inputvalues != null){
- if(inputvalues[2] == '' || inputvalues[2] == null){
- errorMag += 'error1 绗�'+i+'琛屾暟鎹尰闄笉鑳戒负绌�';
+ if (inputvalues != null) {
+ if (inputvalues[2] == '' || inputvalues[2] == null) {
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹尰闄笉鑳戒负绌�';
}
ahlNameList.add(inputvalues[2]);
}
@@ -663,53 +861,60 @@
// 缁忛攢鍟嗗尰闄㈢殑ocsm鍖婚櫌id鐨刲ist
List<String> ahlOcsmIdList = new List<String>();
System.debug('ahlNameList = ' + ahlNameList);
- List<Agency_Hospital_Link__c> ahlList = [select id,name,Hospital__c,MaxActivityDate__c from Agency_Hospital_Link__c where name = :ahlNameList and Agency_Campaign_Obj__c = true];
-
- System.debug('ahlList.size() = ' + ahlList.size());
- for(Agency_Hospital_Link__c ahl : ahlList){
+ List<Agency_Hospital_Link__c> ahlList = [
+ SELECT id, name, Hospital__c, MaxActivityDate__c
+ FROM Agency_Hospital_Link__c
+ WHERE name = :ahlNameList AND Agency_Campaign_Obj__c = TRUE
+ ];
+
+ for (Agency_Hospital_Link__c ahl : ahlList) {
ahlOcsmIdList.add(ahl.Hospital__c);
}
List<Agency_Contact__c> doctor2list = new List<Agency_Contact__c>();
System.debug('ahlOcsmIdList = ' + ahlOcsmIdList);
- if(!Test.isRunningTest())
- doctor2list = [select id,Name,Doctor_Division1__c,Type__c,Agency_Hospital__c,AWS_Data_Id__c FROM Agency_Contact__c WHERE Hospital_ID18__c= :ahlOcsmIdList order by Name]; //zhj 鏂版柟妗堟敼閫� 2022-12-21 鍘绘帀Name_Encrypted__c
-
- if(errorMag != ''){
+ if (!Test.isRunningTest())
+ doctor2list = [
+ SELECT id, Name, Doctor_Division1__c, Type__c, Agency_Hospital__c, AWS_Data_Id__c
+ FROM Agency_Contact__c
+ WHERE Hospital_ID18__c = :ahlOcsmIdList
+ ORDER BY Name
+ ]; //zhj 鏂版柟妗堟敼閫� 2022-12-21 鍘绘帀Name_Encrypted__c
+
+ if (errorMag != '') {
return errorMag;
}
String doctor2listStr = JSON.serialize(doctor2list);
- System.debug('doctor2list = ' + doctor2list);
- return doctor2listStr;
+ System.debug('doctor2listStr = ' + doctor2listStr);
+ return doctor2listStr;
}
- }catch(Exception e){
- System.debug('exception'+e);
- return e.getLineNumber()+'exception:'+e;
+ } catch (Exception e) {
+ System.debug('exception' + e);
+ return e.getLineNumber() + 'exception:' + e;
}
return 'success';
}
// fy 瀵煎叆 20220424 end
- @AuraEnabled// fy 瀵煎叆 20220424 start String sobjectName,List<String> fields,
+ @AuraEnabled // fy 瀵煎叆 20220424 start String sobjectName,List<String> fields,
// public static String processData(String fileData,String Agency_ContactListjson) {
- public static String processData(String fileData,String sobjectName,List<String> fields) {
- DateTime now =System.now();
- System.debug('褰撳墠鏃堕棿:::'+now);
- System.debug('fileData:::'+filedata);
- System.debug('sobjectName:::'+sobjectName);
- System.debug('fields:::'+fields);
- // System.debug('Agency_ContactListjson::::'+Agency_ContactListjson);
- String errorMag = '';
+ public static String processData(String fileData, String sobjectName, List<String> fields) {
+ DateTime now = System.now();
+ System.debug('褰撳墠鏃堕棿:::' + now);
+ System.debug('fileData:::' + filedata);
+ System.debug('sobjectName:::' + sobjectName);
+ System.debug('fields:::' + fields);
+ // System.debug('Agency_ContactListjson::::'+Agency_ContactListjson);
+ String errorMag = '';
- // 鍒涘缓鍛ㄦ姤
- try{
-
- if(fileData!=null){
+ // 鍒涘缓鍛ㄦ姤
+ try {
+ if (fileData != null) {
// List<GeDatass> Agency_ContactList = (List<GeDatass>)JSON.deserialize(Agency_ContactListjson,List<GeDatass>.class);
// System.debug('Agency_ContactList::::'+Agency_ContactList);
// Map<String,String> Agency_ContactMap = new Map<String,String>();
// for(GeDatass agconobj :Agency_ContactList){
// Agency_ContactMap.put(agconobj.name.replace(' ',''),agconobj.dataId);
// }
- String[] fileLines = new String[]{};
+ String[] fileLines = new List<String>{};
fileLines = fileData.split('\n');
// 鎷呭綋鍚嶇О鐨刲ist
List<String> nameList = new List<String>();
@@ -725,190 +930,208 @@
// 缁忛攢鍟嗚浠峰悕绉發ist
// List<String> ahlOppNameList = new List<String>();
//for content
- system.debug('fileLines.size()==============>'+fileLines.size());
- for (Integer i=1,j=fileLines.size();i<j;i++){
+ system.debug('fileLines.size()==============>' + fileLines.size());
+ for (Integer i = 1, j = fileLines.size(); i < j; i++) {
system.debug('for2022161329');
List<String> inputvalues = new List<String>();
inputvalues = fileLines[i].split(',');
- System.debug('inputvalues++'+inputvalues);
- if(inputvalues != null){
+ System.debug('inputvalues++' + inputvalues);
+ if (inputvalues != null) {
system.debug('if2022161333');
- if(inputvalues[0] == '' || inputvalues[0] == null){
+ if (inputvalues[0] == '' || inputvalues[0] == null) {
// return 'error1 绗�'+i+'琛屾暟鎹媴褰撲笉鑳戒负绌�';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹媴褰撲笉鑳戒负绌�';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹媴褰撲笉鑳戒负绌�';
errorMag += '=';
}
- if(inputvalues[1] == '' || inputvalues[1] == null){
+ if (inputvalues[1] == '' || inputvalues[1] == null) {
// return 'error1 绗�'+i+'琛屾暟鎹椿鍔ㄦ棩涓嶈兘涓虹┖';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹椿鍔ㄦ棩涓嶈兘涓虹┖';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹椿鍔ㄦ棩涓嶈兘涓虹┖';
errorMag += '=';
}
- //SWAG-C7AASP 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤琛ュ綍鏃堕棿璋冩暣 2022-1-10 pk start
- List<String> R = new List<String>();
- R = inputvalues[1].split('/');
- system.debug('R202216'+R);
- Date rDate = Date.newInstance(Integer.Valueof(R[0]),Integer.Valueof(R[1]),Integer.Valueof(R[2]));
- system.debug('rDate202216'+rDate);
- Date start = Date.today().addMonths(-1);
- Date startDay = start.toStartOfWeek();
- Date firstDayOfweek = System.today().toStartOfWeek();
- Date endDay = firstDayOfweek.addDays(6);
- if(rDate > endDay || rDate < startDay){
- system.debug('rDate >= ssDate');
- // return 'error1 绗�'+i+'琛屾暟鎹椿鍔ㄦ棩涓嶈兘涓虹┖';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹�,瀵煎叆鍛ㄦ姤浠呭彲琛ユ姤鏈�杩戜竴鏈堝懆鎶�';
- errorMag += '=';
- }
- //SWAG-C7AASP 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤琛ュ綍鏃堕棿璋冩暣 2022-1-10 pk end
- if(inputvalues[2] == '' || inputvalues[2] == null){
+ //SWAG-C7AASP 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤琛ュ綍鏃堕棿璋冩暣 2022-1-10 pk start
+ List<String> R = new List<String>();
+ R = inputvalues[1].split('/');
+ system.debug('R202216' + R);
+ Date rDate = Date.newInstance(Integer.Valueof(R[0]), Integer.Valueof(R[1]), Integer.Valueof(R[2]));
+ system.debug('rDate202216' + rDate);
+ Date start = Date.today().addMonths(-1);
+ Date startDay = start.toStartOfWeek();
+ Date firstDayOfweek = System.today().toStartOfWeek();
+ Date endDay = firstDayOfweek.addDays(6);
+ if (rDate > endDay || rDate < startDay) {
+ system.debug('rDate >= ssDate');
+ // return 'error1 绗�'+i+'琛屾暟鎹椿鍔ㄦ棩涓嶈兘涓虹┖';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹�,瀵煎叆鍛ㄦ姤浠呭彲琛ユ姤鏈�杩戜竴鏈堝懆鎶�';
+ errorMag += '=';
+ }
+ //SWAG-C7AASP 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤琛ュ綍鏃堕棿璋冩暣 2022-1-10 pk end
+ if (inputvalues[2] == '' || inputvalues[2] == null) {
// return 'error1 绗�'+i+'琛屾暟鎹尰闄笉鑳戒负绌�';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹尰闄笉鑳戒负绌�';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹尰闄笉鑳戒负绌�';
errorMag += '=';
}
- if(inputvalues[3] == '' || inputvalues[3] == null){
+ if (inputvalues[3] == '' || inputvalues[3] == null) {
// return 'error1 绗�'+i+'琛屾暟鎹瀹や笉鑳戒负绌�';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹瀹や笉鑳戒负绌�';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹瀹や笉鑳戒负绌�';
errorMag += '=';
}
String departmentstr = GetDepartment_Cateogy(inputvalues[3]);
- if(departmentstr == 'no' && inputvalues[3] != '' && inputvalues[3] != null){
+ if (departmentstr == 'no' && inputvalues[3] != '' && inputvalues[3] != null) {
// return 'error3 绗�'+i+'琛屾暟鎹瀹ら�夐」鍒楄〃鐨勫��'+inputvalues[3]+'涓嶅瓨鍦�';
- errorMag += 'error3 绗�'+i+'琛屾暟鎹瀹ら�夐」鍒楄〃鐨勫��'+inputvalues[3]+'涓嶅瓨鍦�';
+ errorMag += 'error3 绗�' + i + '琛屾暟鎹瀹ら�夐」鍒楄〃鐨勫��' + inputvalues[3] + '涓嶅瓨鍦�';
errorMag += '=';
}
- if(inputvalues[4] == '' || inputvalues[4] == null){
+ if (inputvalues[4] == '' || inputvalues[4] == null) {
// return 'error1 绗�'+i+'琛屾暟鎹嫓璁夸汉涓嶈兘涓虹┖';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹嫓璁夸汉涓嶈兘涓虹┖';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹嫓璁夸汉涓嶈兘涓虹┖';
errorMag += '=';
}
- if(inputvalues[5] == '' || inputvalues[5] == null){
+ if (inputvalues[5] == '' || inputvalues[5] == null) {
// return 'error1 绗�'+i+'琛屾暟鎹骇鍝佸尯鍒�1涓嶈兘涓虹┖';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹骇鍝佸尯鍒�1涓嶈兘涓虹┖';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹骇鍝佸尯鍒�1涓嶈兘涓虹┖';
errorMag += '=';
}
- if((inputvalues[6] != '' && inputvalues[6] != null)&& inputvalues[5] == inputvalues[6]){
+ if ((inputvalues[6] != '' && inputvalues[6] != null) && inputvalues[5] == inputvalues[6]) {
// return 'error1 绗�'+i+'琛屾暟鎹骇鍝佸尯鍒�1鍜屼骇鍝佸尯鍒�2鐨勫�间笉鑳介噸澶�';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹骇鍝佸尯鍒�1鍜屼骇鍝佸尯鍒�2鐨勫�间笉鑳介噸澶�';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹骇鍝佸尯鍒�1鍜屼骇鍝佸尯鍒�2鐨勫�间笉鑳介噸澶�';
errorMag += '=';
}
- if((inputvalues[7] != '' && inputvalues[7] != null)&& inputvalues[5] == inputvalues[7]){
-
-
+ if ((inputvalues[7] != '' && inputvalues[7] != null) && inputvalues[5] == inputvalues[7]) {
// return 'error1 绗�'+i+'琛屾暟鎹骇鍝佸尯鍒�1鍜屼骇鍝佸尯鍒�3鐨勫�间笉鑳介噸澶�';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹骇鍝佸尯鍒�1鍜屼骇鍝佸尯鍒�3鐨勫�间笉鑳介噸澶�';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹骇鍝佸尯鍒�1鍜屼骇鍝佸尯鍒�3鐨勫�间笉鑳介噸澶�';
errorMag += '=';
}
- if((inputvalues[6] != '' && inputvalues[6] != null) && (inputvalues[7] != '' && inputvalues[7] != null) && inputvalues[6] == inputvalues[7]){
+ if (
+ (inputvalues[6] != '' &&
+ inputvalues[6] != null) &&
+ (inputvalues[7] != '' &&
+ inputvalues[7] != null) &&
+ inputvalues[6] == inputvalues[7]
+ ) {
// return 'error1 绗�'+i+'琛屾暟鎹骇鍝佸尯鍒�2鍜屼骇鍝佸尯鍒�3鐨勫�间笉鑳介噸澶�';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹骇鍝佸尯鍒�2鍜屼骇鍝佸尯鍒�3鐨勫�间笉鑳介噸澶�';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹骇鍝佸尯鍒�2鍜屼骇鍝佸尯鍒�3鐨勫�间笉鑳介噸澶�';
errorMag += '=';
}
- if(inputvalues[8] == '' || inputvalues[8] == null){
+ if (inputvalues[8] == '' || inputvalues[8] == null) {
// return 'error1 绗�'+i+'琛屾暟鎹椿鍔ㄥ尯鍒嗕笉鑳戒负绌�';
- errorMag += 'error1 绗�'+i+'琛屾暟鎹椿鍔ㄥ尯鍒嗕笉鑳戒负绌�';
+ errorMag += 'error1 绗�' + i + '琛屾暟鎹椿鍔ㄥ尯鍒嗕笉鑳戒负绌�';
errorMag += '=';
}
boolean purposeType = GetPurposeType(inputvalues[8]);
- if(!purposeType && inputvalues[8] != '' && inputvalues[8] != null){
+ if (!purposeType && inputvalues[8] != '' && inputvalues[8] != null) {
// return 'error3 绗�'+i+'琛屾暟鎹椿鍔ㄥ尯鍒嗛�夐」鍒楄〃鐨勫��'+inputvalues[8]+'涓嶅瓨鍦�';
- errorMag += 'error3 绗�'+i+'琛屾暟鎹椿鍔ㄥ尯鍒嗛�夐」鍒楄〃鐨勫��'+inputvalues[8]+'涓嶅瓨鍦�';
+ errorMag += 'error3 绗�' + i + '琛屾暟鎹椿鍔ㄥ尯鍒嗛�夐」鍒楄〃鐨勫��' + inputvalues[8] + '涓嶅瓨鍦�';
errorMag += '=';
}
// if(inputvalues[9] == '\r' || inputvalues[9] == null){
// return 'error1 缁撴灉涓嶈兘涓虹┖';
// }
- if(inputvalues[8] == '璇环鎸栨帢-OPD' || inputvalues[8] == '璇环鎸栨帢-SIS' || inputvalues[8] == '璇环鎺ㄨ繘-OPD' || inputvalues[8] == '璇环鎺ㄨ繘-SIS'){
- System.debug(']]]]]1'+inputvalues[9]+'=====');
- if(inputvalues[9] == '\r'){
-
+ if (
+ inputvalues[8] == '璇环鎸栨帢-OPD' ||
+ inputvalues[8] == '璇环鎸栨帢-SIS' ||
+ inputvalues[8] == '璇环鎺ㄨ繘-OPD' ||
+ inputvalues[8] == '璇环鎺ㄨ繘-SIS'
+ ) {
+ System.debug(']]]]]1' + inputvalues[9] + '=====');
+ if (inputvalues[9] == '\r') {
// return 'error5 绗�'+i+'琛屾暟鎹綋娲诲姩鍖哄垎涓�'+inputvalues[8]+'缁撴灉涓嶈兘涓虹┖';
- errorMag += 'error5 绗�'+i+'琛屾暟鎹綋娲诲姩鍖哄垎涓�'+inputvalues[8]+'缁撴灉涓嶈兘涓虹┖';
+ errorMag += 'error5 绗�' + i + '琛屾暟鎹綋娲诲姩鍖哄垎涓�' + inputvalues[8] + '缁撴灉涓嶈兘涓虹┖';
errorMag += '=';
}
}
// if(inputvalues[9] != '\r' && getResultlist(inputvalues[9])){
- if(inputvalues[9] != '' && getResultlist(inputvalues[9])){
+ if (inputvalues[9] != '' && getResultlist(inputvalues[9])) {
// return 'error3 绗�'+i+'琛屾暟鎹粨鏋滈�夐」鍒楄〃鐨勫��'+inputvalues[9]+'涓嶅瓨鍦�';
- errorMag += 'error3 绗�'+i+'琛屾暟鎹粨鏋滈�夐」鍒楄〃鐨勫��'+inputvalues[9]+'涓嶅瓨鍦�';
+ errorMag += 'error3 绗�' + i + '琛屾暟鎹粨鏋滈�夐」鍒楄〃鐨勫��' + inputvalues[9] + '涓嶅瓨鍦�';
errorMag += '=';
}
- system.debug('inputvalues[0]=================>'+inputvalues[0]);
- system.debug('inputvalues[1]=================>'+inputvalues[1]);
- system.debug('inputvalues[2]=================>'+inputvalues[2]);
- system.debug('inputvalues[3]=================>'+inputvalues[3]);
- system.debug('inputvalues[4]=================>'+inputvalues[4]);
- system.debug('inputvalues[5]=================>'+inputvalues[5]);
- system.debug('inputvalues[6]=================>'+inputvalues[6]);
- system.debug('inputvalues[7]=================>'+inputvalues[7]);
- system.debug('inputvalues[8]=================>'+inputvalues[8]);
- system.debug('inputvalues[9]=================>'+inputvalues[9]);
+ system.debug('inputvalues[0]=================>' + inputvalues[0]);
+ system.debug('inputvalues[1]=================>' + inputvalues[1]);
+ system.debug('inputvalues[2]=================>' + inputvalues[2]);
+ system.debug('inputvalues[3]=================>' + inputvalues[3]);
+ system.debug('inputvalues[4]=================>' + inputvalues[4]);
+ system.debug('inputvalues[5]=================>' + inputvalues[5]);
+ system.debug('inputvalues[6]=================>' + inputvalues[6]);
+ system.debug('inputvalues[7]=================>' + inputvalues[7]);
+ system.debug('inputvalues[8]=================>' + inputvalues[8]);
+ system.debug('inputvalues[9]=================>' + inputvalues[9]);
// system.debug('inputvalues[10]=================>'+inputvalues[10]);
-
nameList.add(inputvalues[0]);
- dateList.add(Date.valueOf(inputvalues[1].replace('/','-')));
+ dateList.add(Date.valueOf(inputvalues[1].replace('/', '-')));
ahlNameList.add(inputvalues[2]);
- departmentSet.add('%'+GetDepartment_Cateogy(inputvalues[3])+'%'+'-'+GetEPurposeType(inputvalues[8]));
+ departmentSet.add('%' + GetDepartment_Cateogy(inputvalues[3]) + '%' + '-' + GetEPurposeType(inputvalues[8]));
inputList.add(inputvalues);
}
}
system.debug('snduksbdnjsvbdskjv');
// 鎷呭綋鍚嶇О鍖归厤鐨刴ap
- Map<String,String> nameIdMap = new Map<String,String>();
- Map<String,String> nameConMap = new Map<String,String>();
+ Map<String, String> nameIdMap = new Map<String, String>();
+ Map<String, String> nameConMap = new Map<String, String>();
// 缁忛攢鍟嗗尰闄㈠悕绉板尮閰嶇殑map
- Map<String,Agency_Hospital_Link__c> ahlMap = new Map<String,Agency_Hospital_Link__c>();
+ Map<String, Agency_Hospital_Link__c> ahlMap = new Map<String, Agency_Hospital_Link__c>();
// 浜у搧鍖哄垎鐨刴ap
- Map<String,String> protypeMap = new Map<String,String>();
+ Map<String, String> protypeMap = new Map<String, String>();
// 缁忛攢鍟嗗尰闄㈢殑ocsm鍖婚櫌id鐨刲ist
List<String> ahlOcsmIdList = new List<String>();
// 缁忛攢鍟嗗尰闄d鐨凩ist
List<String> ahlIdList = new List<String>();
// 鑾峰彇姣忓懆绗竴澶╃殑map
- Map<Date,Date> dateMap = new Map<Date,Date>();
+ Map<Date, Date> dateMap = new Map<Date, Date>();
// 鏍规嵁鏃ユ湡鑾峰彇olympus鏃ュ巻id鐨刴ap
- Map<Date,String> dateIdMap = new Map<Date,String>();
+ Map<Date, String> dateIdMap = new Map<Date, String>();
// 鏍规嵁缁忛攢鍟嗗尰闄㈢殑ocsm鍖婚櫌鑾峰彇鐨勬墍鏈�.瀹㈡埛浜哄憳鐨勪俊鎭殑鍚嶇О鍜宨d鐨刴ap
- Map<String,String> doctor2Map = new Map<String,String>();
+ Map<String, String> doctor2Map = new Map<String, String>();
// 缁忛攢鍟嗚浠风殑map
- Map<String,Agency_Opportunity__c> aoMap = new Map<String,Agency_Opportunity__c>();
+ Map<String, Agency_Opportunity__c> aoMap = new Map<String, Agency_Opportunity__c>();
// 绉戝鍜屼骇鍝佸尯鍒嗗叧绯籱ap
- Map<String,List<Map<String,String>>> impProMap = new Map<String,List<Map<String,String>>>();
+ Map<String, List<Map<String, String>>> impProMap = new Map<String, List<Map<String, String>>>();
impProMap = getImplProductList(departmentSet);
- System.debug('---===---===---==='+impProMap);
+ System.debug('---===---===---===' + impProMap);
// return nameList[0];
// List<Contact> conList = [select id,name from Contact where name = :nameList];
// List<Contact> conList = [select id,name from Contact];
List<Contact> conList = LightningUtil.selectAgencyPerson();
- System.debug('---===---===---====='+conList);
- List<OlympusCalendar__c> olympusDateList = [select Id,Date__c,FirstDayOfWeek__c,DayOfTheWeek__c from OlympusCalendar__c where Date__c= :dateList ];
+ System.debug('---===---===---=====' + conList);
+ List<OlympusCalendar__c> olympusDateList = [
+ SELECT Id, Date__c, FirstDayOfWeek__c, DayOfTheWeek__c
+ FROM OlympusCalendar__c
+ WHERE Date__c = :dateList
+ ];
// test鐢�
// String testuse = '';
// testuse += '====='+ahlNameList;
- List<Agency_Hospital_Link__c> ahlList = [select id,name,Hospital__c,MaxActivityDate__c from Agency_Hospital_Link__c where name = :ahlNameList and Agency_Campaign_Obj__c = true];
+ List<Agency_Hospital_Link__c> ahlList = [
+ SELECT id, name, Hospital__c, MaxActivityDate__c
+ FROM Agency_Hospital_Link__c
+ WHERE name = :ahlNameList AND Agency_Campaign_Obj__c = TRUE
+ ];
// List<Agency_Hospital_Link__c> ahlList = [select id,name,Hospital__c,MaxActivityDate__c from Agency_Hospital_Link__c ];
// List<ProductTypes__c> proTypeList = [select id,name from ProductTypes__c];
- for(OlympusCalendar__c olym : olympusDateList){
- if(olym.DayOfTheWeek__c == 'Sun'){
+ for (OlympusCalendar__c olym : olympusDateList) {
+ if (olym.DayOfTheWeek__c == 'Sun') {
dateMap.put(olym.Date__c, olym.Date__c.addDays(1));
- }
- else{
+ } else {
dateMap.put(olym.Date__c, olym.FirstDayOfWeek__c);
}
}
- System.debug('x'+dateMap);
- List<OlympusCalendar__c> olympusIdList = [select Id,Date__c,FirstDayOfWeek__c from OlympusCalendar__c where Date__c= :dateMap.values()];
- for(OlympusCalendar__c olym : olympusIdList){
+ System.debug('x' + dateMap);
+ List<OlympusCalendar__c> olympusIdList = [
+ SELECT Id, Date__c, FirstDayOfWeek__c
+ FROM OlympusCalendar__c
+ WHERE Date__c = :dateMap.values()
+ ];
+ for (OlympusCalendar__c olym : olympusIdList) {
dateIdMap.put(olym.FirstDayOfWeek__c, olym.id);
}
- System.debug('dateIdMap===='+dateIdMap);
- for(Contact con :conList){
- nameIdMap.put(con.Name.replace(' ',''), con.Id);
+ System.debug('dateIdMap====' + dateIdMap);
+ for (Contact con : conList) {
+ nameIdMap.put(con.Name.replace(' ', ''), con.Id);
nameConMap.put(con.Id, con.Name);
}
// testuse += '======'+ahlList;
// return testuse;
- for(Agency_Hospital_Link__c ahl : ahlList){
+ for (Agency_Hospital_Link__c ahl : ahlList) {
ahlMap.put(ahl.Name, ahl);
ahlOcsmIdList.add(ahl.Hospital__c);
ahlIdList.add(ahl.Id);
@@ -917,45 +1140,48 @@
// protypeMap.put(protype.Name, protype.Id);
// }
//fy 20220424 start AWS_Data_Id__c
- if(!Test.isRunningTest()){
- List<Agency_Contact__c> doctor2list = [select id,Name,Doctor_Division1__c,Type__c,Agency_Hospital__c,AWS_Data_Id__c FROM Agency_Contact__c WHERE Hospital_ID18__c= :ahlOcsmIdList order by Name]; //zhj 鏂版柟妗堟敼閫� 2022-12-21 鍘绘帀Name_Encrypted__c
- for(Agency_Contact__c ac : doctor2list){
+ if (!Test.isRunningTest()) {
+ List<Agency_Contact__c> doctor2list = [
+ SELECT id, Name, Doctor_Division1__c, Type__c, Agency_Hospital__c, AWS_Data_Id__c
+ FROM Agency_Contact__c
+ WHERE Hospital_ID18__c = :ahlOcsmIdList
+ ORDER BY Name
+ ]; //zhj 鏂版柟妗堟敼閫� 2022-12-21 鍘绘帀Name_Encrypted__c
+ for (Agency_Contact__c ac : doctor2list) {
//fy 20220424 start
// doctor2Map.put(ac.AWS_Data_Id__c, ac.Id);
// doctor2Map.put(ac.Name.replace(' ',''), ac.Id);
//doctor2Map.put(ac.Name_Encrypted__c, ac.Id);
- doctor2Map.put(ac.AWS_Data_Id__c, ac.Id); //zhj 鏂版柟妗堟敼閫� 涓嶅啀瀛樼殑nameEncrpt鑰屾槸awsdataid 2022-12-21
+ doctor2Map.put(ac.AWS_Data_Id__c, ac.Id); //zhj 鏂版柟妗堟敼閫� 涓嶅啀瀛樼殑nameEncrpt鑰屾槸awsdataid 2022-12-21
//fy 20220424 end
}
}
-
-
// List<Agency_Opportunity__c> aoList = [select id,name,StageName__c,Amount__c,OCMSale_Price__c,Close_Forecasted_Date__c,Agency_Hospital__c from Agency_Opportunity__c where Agency_Hospital__c = :ahlIdList and name = :ahlOppNameList];
// for(Agency_Opportunity__c ao : aoList){
// aoMap.put(ao.Name, ao);
// }
- System.debug('nameIdMap===='+nameIdMap);
+ System.debug('nameIdMap====' + nameIdMap);
// 鍒涘缓鍛ㄦ姤
List<Agency_Report_Header__c> agency_report_headerlist = new List<Agency_Report_Header__c>();
- Map<String,Agency_Report_Header__c> agency_report_headerMap = new Map<String,Agency_Report_Header__c>();
- for(List<String> lineList :inputList){
+ Map<String, Agency_Report_Header__c> agency_report_headerMap = new Map<String, Agency_Report_Header__c>();
+ for (List<String> lineList : inputList) {
Date week = Date.today();
String s_agency = null;
String s_agencyname = null;
- System.debug('dateMap===='+dateMap);
+ System.debug('dateMap====' + dateMap);
// System.debug('lineList[0]====涓嶇瓑浜庣┖'+lineList[1]);
- if(dateMap.get(Date.valueOf(lineList[1].replace('/','-'))) != null){
+ if (dateMap.get(Date.valueOf(lineList[1].replace('/', '-'))) != null) {
System.debug('dateMap====涓嶇瓑浜庣┖');
- week = dateMap.get(Date.valueOf(lineList[1].replace('/','-')));
- System.debug('===='+week);
+ week = dateMap.get(Date.valueOf(lineList[1].replace('/', '-')));
+ System.debug('====' + week);
}
- System.debug('lineList[0].replace()'+lineList[0].replace(' ',''));
- if(nameIdMap.get(lineList[0].replace(' ','')) != null){
+ System.debug('lineList[0].replace()' + lineList[0].replace(' ', ''));
+ if (nameIdMap.get(lineList[0].replace(' ', '')) != null) {
System.debug('nameIdMap====涓嶇瓑浜庣┖');
- s_agency = nameIdMap.get(lineList[0].replace(' ',''));
- s_agencyname = nameConMap.get(nameIdMap.get(lineList[0].replace(' ','')));
- System.debug('===='+s_agency);
+ s_agency = nameIdMap.get(lineList[0].replace(' ', ''));
+ s_agencyname = nameConMap.get(nameIdMap.get(lineList[0].replace(' ', '')));
+ System.debug('====' + s_agency);
}
// if(s_agency == null || s_agencyname == null){
// // return 'error0 鎷呭綋 '+lineList[0]+'濉啓涓嶆纭�';
@@ -964,143 +1190,138 @@
// }
Agency_Report_Header__c agency_report_header = new Agency_Report_Header__c();
// agency_report_header.Name = lineList[0] + ' (' + week.format() + ')';
- agency_report_header.Name = s_agencyname + ' (' + week.format().replace('/','-') + ')';
- agency_report_header.HeaderInputKey__c = createHeader(week,s_agency);
+ agency_report_header.Name = s_agencyname + ' (' + week.format().replace('/', '-') + ')';
+ agency_report_header.HeaderInputKey__c = createHeader(week, s_agency);
agency_report_header.Week__c = week;
agency_report_header.Agency_Person2__c = s_agency;
- if(dateIdMap.containsKey(week)){
+ if (dateIdMap.containsKey(week)) {
agency_report_header.OlympusDate__c = dateIdMap.get(week);
}
- if(s_agencyname != null && s_agencyname != '' && s_agencyname != 'null'){
+ if (s_agencyname != null && s_agencyname != '' && s_agencyname != 'null') {
agency_report_headerMap.put(agency_report_header.HeaderInputKey__c, agency_report_header);
}
-
}
agency_report_headerlist = agency_report_headerMap.values();
- System.debug('==========='+agency_report_headerlist+'');
+ System.debug('===========' + agency_report_headerlist + '');
// upsert agency_report_headerlist Agency_Report_Header__c.HeaderInputKey__c;
- if(agency_report_headerlist.size() > 0){
+ if (agency_report_headerlist.size() > 0) {
LightningUtil.upsertMAgencyReportHeader(agency_report_headerlist);
- }
-
+ }
+
List<Agency_Report__c> arList = new List<Agency_Report__c>();
Integer hang = 1;
- for(List<String> lineList :inputList){
+ for (List<String> lineList : inputList) {
// 鍒涘缓鍛ㄦ姤鏄庣粏
Date week = null;
String s_agency = null;
- System.debug('dateMap===='+dateMap);
- System.debug('lineList[0]====涓嶇瓑浜庣┖'+lineList[1]);
- if(dateMap.get(Date.valueOf(lineList[1].replace('/','-'))) != null){
+ System.debug('dateMap====' + dateMap);
+ System.debug('lineList[0]====涓嶇瓑浜庣┖' + lineList[1]);
+ if (dateMap.get(Date.valueOf(lineList[1].replace('/', '-'))) != null) {
System.debug('dateMap====涓嶇瓑浜庣┖');
- week = dateMap.get(Date.valueOf(lineList[1].replace('/','-')));
- System.debug('===='+week);
+ week = dateMap.get(Date.valueOf(lineList[1].replace('/', '-')));
+ System.debug('====' + week);
}
- if(nameIdMap.get(lineList[0].replace(' ','')) != null){
+ if (nameIdMap.get(lineList[0].replace(' ', '')) != null) {
System.debug('nameIdMap====涓嶇瓑浜庣┖');
- s_agency = nameIdMap.get(lineList[0].replace(' ',''));
- System.debug('===='+s_agency);
+ s_agency = nameIdMap.get(lineList[0].replace(' ', ''));
+ System.debug('====' + s_agency);
}
Agency_Report__c agencyReport = new Agency_Report__c();
- if(week == null && lineList[1] != '' && lineList[1] != null){
+ if (week == null && lineList[1] != '' && lineList[1] != null) {
// return 'error2 绗�'+hang+'琛屾暟鎹姤鍛婃棩'+lineList[1]+'濉啓鏈夎';
- errorMag += 'error2 绗�'+hang+'琛屾暟鎹姤鍛婃棩'+lineList[1]+'濉啓鏈夎';
+ errorMag += 'error2 绗�' + hang + '琛屾暟鎹姤鍛婃棩' + lineList[1] + '濉啓鏈夎';
errorMag += '=';
}
- agencyReport.Submit_date__c = week; // 鎻愬嚭鍛�
- if((s_agency == null || s_agency == '')&& lineList[0] != '' && lineList[0] != null){
+ agencyReport.Submit_date__c = week; // 鎻愬嚭鍛�
+ if ((s_agency == null || s_agency == '') && lineList[0] != '' && lineList[0] != null) {
// return 'error2 绗�'+hang+'琛屾暟鎹媴褰�'+lineList[0]+'涓嶅瓨鍦�';
- errorMag += 'error2 绗�'+hang+'琛屾暟鎹媴褰�'+lineList[0]+'涓嶅瓨鍦�';
+ errorMag += 'error2 绗�' + hang + '琛屾暟鎹媴褰�' + lineList[0] + '涓嶅瓨鍦�';
errorMag += '=';
}
- agencyReport.Person_In_Charge2__c = s_agency; // 鎷呭綋
- if(lineList[1] != null && lineList[1] != ''){
- agencyReport.Report_Date__c = Date.valueOf(lineList[1].replace('/','-')); // 娲诲姩鏃�
+ agencyReport.Person_In_Charge2__c = s_agency; // 鎷呭綋
+ if (lineList[1] != null && lineList[1] != '') {
+ agencyReport.Report_Date__c = Date.valueOf(lineList[1].replace('/', '-')); // 娲诲姩鏃�
}
- if(ahlMap.containsKey(lineList[2])){
+ if (ahlMap.containsKey(lineList[2])) {
agencyReport.Agency_Hospital__c = ahlMap.get(lineList[2]).Id; //缁忛攢鍟嗗尰闄�
// 鏇存柊缁忛攢鍟嗗尰闄㈢殑鏈�鏂板懆
ahlMap.get(lineList[2]).MaxActivityDate__c = week;
- }else{
- if(lineList[2] != '' && lineList[2] != null){
-
+ } else {
+ if (lineList[2] != '' && lineList[2] != null) {
// return 'error2 绗�'+hang+'琛屾暟鎹粡閿�鍟嗗尰闄�'+lineList[2]+'涓嶅瓨鍦�';
- errorMag += 'error2 绗�'+hang+'琛屾暟鎹粡閿�鍟嗗尰闄�'+lineList[2]+'涓嶅瓨鍦�';
+ errorMag += 'error2 绗�' + hang + '琛屾暟鎹粡閿�鍟嗗尰闄�' + lineList[2] + '涓嶅瓨鍦�';
errorMag += '=';
}
-
}
-
+
String departmentE = GetDepartment_Cateogy(lineList[3]);
- if(departmentE != 'no'){
- agencyReport.Department_Cateogy__c = departmentE; // 绉戝
- }else{
+ if (departmentE != 'no') {
+ agencyReport.Department_Cateogy__c = departmentE; // 绉戝
+ } else {
// return 'error2 绗�'+hang+'琛屾暟鎹瀹�'+lineList[3]+'涓嶅瓨鍦�';
// errorMag += 'error2 绗�'+hang+'琛屾暟鎹瀹�'+lineList[3]+'涓嶅瓨鍦�';
// errorMag += '=';
}
//fy 20220424 start
// if(doctor2Map.containsKey(lineList[4].replace(' ',''))){
- if(doctor2Map.containsKey(lineList[4])){
- // if(Agency_ContactMap.containsKey(lineList[4].replace(' ',''))){
- // if(doctor2Map.containsKey(Agency_ContactMap.get(lineList[4].replace(' ','')))){
- // agencyReport.doctor2__c = doctor2Map.get(lineList[4].replace(' ','')); // 鎷滆浜�
- agencyReport.doctor2__c = doctor2Map.get(lineList[4]); // 鎷滆浜�
- // agencyReport.doctor2__c = doctor2Map.get(Agency_ContactMap.get(lineList[4].replace(' ',''))); // 鎷滆浜�
+ if (doctor2Map.containsKey(lineList[4])) {
+ // if(Agency_ContactMap.containsKey(lineList[4].replace(' ',''))){
+ // if(doctor2Map.containsKey(Agency_ContactMap.get(lineList[4].replace(' ','')))){
+ // agencyReport.doctor2__c = doctor2Map.get(lineList[4].replace(' ','')); // 鎷滆浜�
+ agencyReport.doctor2__c = doctor2Map.get(lineList[4]); // 鎷滆浜�
+ // agencyReport.doctor2__c = doctor2Map.get(Agency_ContactMap.get(lineList[4].replace(' ',''))); // 鎷滆浜�
// }
- }else{
- if(lineList[4] != '' && lineList[4] != null){
+ } else {
+ if (lineList[4] != '' && lineList[4] != null) {
// return 'error2 绗�'+hang+'琛屾暟鎹嫓璁夸汉'+lineList[4]+'涓嶅瓨鍦�';
- errorMag += 'error2 绗�'+hang+'琛屾暟鎹嫓璁夸汉'+lineList[4]+'涓嶅瓨鍦�';
+ errorMag += 'error2 绗�' + hang + '琛屾暟鎹嫓璁夸汉' + lineList[4] + '涓嶅瓨鍦�';
errorMag += '=';
}
-
}
- if(GetPurposeType(lineList[8])){
+ if (GetPurposeType(lineList[8])) {
agencyReport.Purpose_Type__c = lineList[8]; // 娲诲姩鍖哄垎
- }else{
+ } else {
// return 'error3 绗�'+hang+'琛屾暟鎹椿鍔ㄥ尯鍒嗛�夐」鍒楄〃鍊�'+lineList[8]+'涓嶅瓨鍦�';
// errorMag += 'error3 绗�'+hang+'琛屾暟鎹椿鍔ㄥ尯鍒嗛�夐」鍒楄〃鍊�'+lineList[8]+'涓嶅瓨鍦�';
// errorMag += '=';
}
// 绉戝浜у搧鍖哄垎鍏崇郴鍒ゆ柇
// 濡傛灉鑳芥壘鍒帮紝灏辨槸姝g‘鐨�
- String departandprokey = '%'+GetDepartment_Cateogy(lineList[3])+'%'+'-'+GetEPurposeType(lineList[8]);
- System.debug('---===---===---==='+departandprokey);
- if(impProMap.containsKey(departandprokey)){
- System.debug('---===---===---==='+ifTrueProduct(impProMap.get(departandprokey),lineList[5]));
- if(ifTrueProduct(impProMap.get(departandprokey),lineList[5]) != ''){
+ String departandprokey = '%' + GetDepartment_Cateogy(lineList[3]) + '%' + '-' + GetEPurposeType(lineList[8]);
+ System.debug('---===---===---===' + departandprokey);
+ if (impProMap.containsKey(departandprokey)) {
+ System.debug('---===---===---===' + ifTrueProduct(impProMap.get(departandprokey), lineList[5]));
+ if (ifTrueProduct(impProMap.get(departandprokey), lineList[5]) != '') {
System.debug(']]]涓嶇瓑浜庣┖杩涘叆');
- agencyReport.Product_Category1__c = ifTrueProduct(impProMap.get(departandprokey),lineList[5]);
- }else{
+ agencyReport.Product_Category1__c = ifTrueProduct(impProMap.get(departandprokey), lineList[5]);
+ } else {
System.debug(']]]绛変簬绌鸿繘鍏�');
// return 'error4 绗�'+hang+'琛屾暟鎹骇鍝佸尯鍒�1鐨勮祴鍊间笉姝g‘'+lineList[5];
- errorMag += 'error4 绗�'+hang+'琛屾暟鎹骇鍝佸尯鍒�1鐨勮祴鍊间笉姝g‘'+lineList[5];
+ errorMag += 'error4 绗�' + hang + '琛屾暟鎹骇鍝佸尯鍒�1鐨勮祴鍊间笉姝g‘' + lineList[5];
errorMag += '=';
}
- if(lineList[6] != '' && lineList[6] != null){
- if(ifTrueProduct(impProMap.get(departandprokey),lineList[6]) != ''){
- agencyReport.Product_Category2__c = ifTrueProduct(impProMap.get(departandprokey),lineList[6]);
- }else{
+ if (lineList[6] != '' && lineList[6] != null) {
+ if (ifTrueProduct(impProMap.get(departandprokey), lineList[6]) != '') {
+ agencyReport.Product_Category2__c = ifTrueProduct(impProMap.get(departandprokey), lineList[6]);
+ } else {
// return 'error4 绗�'+hang+'琛屾暟鎹骇鍝佸尯鍒�2鐨勮祴鍊间笉姝g‘'+lineList[6];
- errorMag += 'error4 绗�'+hang+'琛屾暟鎹骇鍝佸尯鍒�2鐨勮祴鍊间笉姝g‘'+lineList[6];
+ errorMag += 'error4 绗�' + hang + '琛屾暟鎹骇鍝佸尯鍒�2鐨勮祴鍊间笉姝g‘' + lineList[6];
errorMag += '=';
}
}
- if(lineList[7] != '' && lineList[7] != null){
- if(ifTrueProduct(impProMap.get(departandprokey),lineList[7]) != ''){
- agencyReport.Product_Category3__c = ifTrueProduct(impProMap.get(departandprokey),lineList[7]);
- }else{
+ if (lineList[7] != '' && lineList[7] != null) {
+ if (ifTrueProduct(impProMap.get(departandprokey), lineList[7]) != '') {
+ agencyReport.Product_Category3__c = ifTrueProduct(impProMap.get(departandprokey), lineList[7]);
+ } else {
// return 'error4 绗�'+hang+'琛屾暟鎹骇鍝佸尯鍒�3鐨勮祴鍊间笉姝g‘'+lineList[7];
- errorMag += 'error4 绗�'+hang+'琛屾暟鎹骇鍝佸尯鍒�3鐨勮祴鍊间笉姝g‘'+lineList[7];
+ errorMag += 'error4 绗�' + hang + '琛屾暟鎹骇鍝佸尯鍒�3鐨勮祴鍊间笉姝g‘' + lineList[7];
errorMag += '=';
}
}
}
-
-
+
// 閫氳繃map 绉戝锛屼骇鍝佸尯鍒嗗悕 鍒ゆ柇鍙栧�兼槸鍚︾鍚堣姹�
// if(protypeMap.containsKey(lineList[5])){
// agencyReport.Product_Category1__c = protypeMap.get(lineList[5]);// 浜у搧鍖哄垎1
@@ -1112,13 +1333,13 @@
// agencyReport.Product_Category3__c = protypeMap.get(lineList[7]);// 浜у搧鍖哄垎3
// }
agencyReport.Result__c = lineList[9];
- if(lineList.size()==11){
- if(lineList[10] != null && lineList[10] != ''){
+ if (lineList.size() == 11) {
+ if (lineList[10] != null && lineList[10] != '') {
agencyReport.SupportNeeds__c = lineList[10];
}
}
- String headerStr = createHeader(week,s_agency);
- if(agency_report_headerMap.containsKey(headerStr)){
+ String headerStr = createHeader(week, s_agency);
+ if (agency_report_headerMap.containsKey(headerStr)) {
agencyReport.Agency_Report_Header__c = agency_report_headerMap.get(headerStr).Id; // 鍛ㄦ姤涓�瑙�
}
// if(aoMap.containsKey(lineList[6])){
@@ -1133,12 +1354,12 @@
arList.add(agencyReport);
}
- if(errorMag != ''){
+ if (errorMag != '') {
return errorMag;
}
// 鏇存柊缁忛攢鍟嗘剰鎰跨殑鏈�鏂板懆
- if(ahlMap.values().size() > 0 ){
+ if (ahlMap.values().size() > 0) {
update ahlMap.values();
}
// 鏇存柊缁忛攢鍟嗚浠�
@@ -1146,244 +1367,305 @@
// update aoMap.values();
// }
// 鏂板鍛ㄦ姤鏄庣粏
- if(arList.size() > 0 ){
+ if (arList.size() > 0) {
// insert arList;
LightningUtil.insertMAgencyReport(arList);
}
-
-
}
- return 'success';
- }catch(Exception e){
- System.debug('exception'+e);
- return e.getLineNumber()+'exception:'+e;
+ return 'success';
+ } catch (Exception e) {
+ System.debug('exception' + e);
+ return e.getLineNumber() + 'exception:' + e;
}
return 'success';
}
// 鍒涘缓鍞竴閿�
- public static String createHeader(Date s_date,String nameid){
+ public static String createHeader(Date s_date, String nameid) {
String str = s_date.format();
String str1 = str.replace('/', '');
- return nameid+':'+str1;
+ return nameid + ':' + str1;
}
// 绉戝瀵瑰簲缈昏瘧
- public static String GetDepartment_Cateogy(String department){
+ public static String GetDepartment_Cateogy(String department) {
String departmentE = 'no';
- if(department == '鍛煎惛绉�'){
+ if (department == '鍛煎惛绉�') {
departmentE = 'BF';
}
- if(department == '鑰抽蓟鍠夌'){
+ if (department == '鑰抽蓟鍠夌') {
departmentE = 'ENT';
}
- if(department == 'ET鑰楁潗'){
+ if (department == 'ET鑰楁潗') {
departmentE = 'ET';
}
- if(department == '娑堝寲绉�'){
+ if (department == '娑堝寲绉�') {
departmentE = 'GI';
}
- if(department == '鏅绉�'){
+ if (department == '鏅绉�') {
departmentE = 'GS';
}
- if(department == '濡囩'){
+ if (department == '濡囩') {
departmentE = 'GYN';
}
- if(department == '鍏朵粬'){
+ if (department == '鍏朵粬') {
departmentE = 'OTH';
}
- if(department == '娉屽翱绉�'){
+ if (department == '娉屽翱绉�') {
departmentE = 'URO';
}
return departmentE;
}
// 鍒ゆ柇娲诲姩鍒嗗尯鏄惁瀛樺湪
- public static boolean GetPurposeType(String purposeType){
+ public static boolean GetPurposeType(String purposeType) {
Schema.DescribeFieldResult fieldResult = Agency_Report__c.Purpose_Type__c.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
- for( Schema.PicklistEntry pickListVal : ple){
- if(pickListVal.getValue() == purposeType){
+ for (Schema.PicklistEntry pickListVal : ple) {
+ if (pickListVal.getValue() == purposeType) {
return true;
}
}
return false;
}
- public static boolean getResultlist(String resultlist){
- system.debug('resultlist===============>'+resultlist);
+ public static boolean getResultlist(String resultlist) {
+ system.debug('resultlist===============>' + resultlist);
Schema.DescribeFieldResult fieldResult = Agency_Report__c.Result__c.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
- for( Schema.PicklistEntry pickListVal : ple){
- System.debug('weixiao'+resultlist.trim()+'111111'+pickListVal.getValue()+'222222');
+ for (Schema.PicklistEntry pickListVal : ple) {
+ System.debug('weixiao' + resultlist.trim() + '111111' + pickListVal.getValue() + '222222');
string temp = string.ValueOf(pickListVal.getValue());
- if(temp.equals(resultlist.trim())){
- // if(pickListVal.getValue().equals(resultlist)){
- System.debug('weixiaoweixiao'+resultlist+''+pickListVal.getValue());
+ if (temp.equals(resultlist.trim())) {
+ // if(pickListVal.getValue().equals(resultlist)){
+ System.debug('weixiaoweixiao' + resultlist + '' + pickListVal.getValue());
return false;
}
}
return true;
}
- public static String GetEPurposeType(String purposeType){
+ public static String GetEPurposeType(String purposeType) {
// String purpose_Type='';
- if(purposeType.substring(purposeType.length()-3) == 'OPD'){
+ if (purposeType.substring(purposeType.length() - 3) == 'OPD') {
purposeType = 'OPD';
- }else if(purposeType.substring(purposeType.length()-3) == 'SIS'){
+ } else if (purposeType.substring(purposeType.length() - 3) == 'SIS') {
purposeType = 'SIS';
- }else{
+ } else {
purposeType = '';
}
return purposeType;
}
// 鍒ゆ柇浜у搧鍖哄垎鏄惁婊¤冻瑕佹眰
- public static String ifTrueProduct(List<Map<String,String>> prolist,String str){
- system.debug('=ifTrueProduct==============ifTrueProduct========='+str);
- system.debug('=prolist==============prolist========='+prolist);
+ public static String ifTrueProduct(List<Map<String, String>> prolist, String str) {
+ system.debug('=ifTrueProduct==============ifTrueProduct=========' + str);
+ system.debug('=prolist==============prolist=========' + prolist);
- for(Map<String,String> strmap :prolist){
- System.debug('---===---===---==='+str+'==='+strmap.get('label'));
- if(strmap.get('label')==str){
+ for (Map<String, String> strmap : prolist) {
+ System.debug('---===---===---===' + str + '===' + strmap.get('label'));
+ if (strmap.get('label') == str) {
return strmap.get('value');
}
}
return '';
}
// 鑾峰彇瀵煎叆鏁版嵁鐨勭瀹ゅ拰浜у搧鍖哄垎鐨勫尮閰�
- public static Map<String,List<Map<String,String>>> getImplProductList(Set<String> ptdc){
- Map<String,List<Map<String,String>>> impProMap = new Map<String,List<Map<String,String>>>();
- List<String> dc = new List<String>(ptdc);
- if(dc.size() > 0){
+ public static Map<String, List<Map<String, String>>> getImplProductList(Set<String> ptdc) {
+ Map<String, List<Map<String, String>>> impProMap = new Map<String, List<Map<String, String>>>();
+ List<String> dc = new List<String>(ptdc);
+ if (dc.size() > 0) {
List<ProductTypes__c> ptList1 = new List<ProductTypes__c>();
List<String> dcList = dc[0].split('-');
if (dcList.size() > 1) {
- ptList1 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList1 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList1 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList1 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList1){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList1) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[0], impProList);
-
}
- if(dc.size() > 1){
+ if (dc.size() > 1) {
List<ProductTypes__c> ptList2 = new List<ProductTypes__c>();
List<String> dcList = dc[1].split('-');
if (dcList.size() > 1) {
- ptList2 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList2 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList2 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList2 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList2){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList2) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[1], impProList);
}
- if(dc.size() > 2){
+ if (dc.size() > 2) {
List<ProductTypes__c> ptList3 = new List<ProductTypes__c>();
List<String> dcList = dc[2].split('-');
if (dcList.size() > 1) {
- ptList3 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList3 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList3 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList3 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList3){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList3) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
- impProMap.put(dc[2], impProList);
+ impProMap.put(dc[2], impProList);
}
- if(dc.size() > 3){
+ if (dc.size() > 3) {
List<ProductTypes__c> ptList4 = new List<ProductTypes__c>();
List<String> dcList = dc[3].split('-');
if (dcList.size() > 1) {
- ptList4 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList4 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList4 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList4 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList4){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList4) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[3], impProList);
}
- if(dc.size() > 4){
+ if (dc.size() > 4) {
List<ProductTypes__c> ptList5 = new List<ProductTypes__c>();
List<String> dcList = dc[4].split('-');
if (dcList.size() > 1) {
- ptList5 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList5 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList5 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList5 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList5){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList5) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
- impProMap.put(dc[4], impProList);
+ impProMap.put(dc[4], impProList);
}
- if(dc.size() > 5){
+ if (dc.size() > 5) {
List<ProductTypes__c> ptList6 = new List<ProductTypes__c>();
List<String> dcList = dc[5].split('-');
if (dcList.size() > 1) {
- ptList6 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList6 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList6 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList6 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList6){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList6) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[5], impProList);
}
- if(dc.size() > 6){
+ if (dc.size() > 6) {
List<ProductTypes__c> ptList7 = new List<ProductTypes__c>();
List<String> dcList = dc[6].split('-');
if (dcList.size() > 1) {
- ptList7 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList7 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList7 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList7 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList7){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList7) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
- impProMap.put(dc[6], impProList);
+ impProMap.put(dc[6], impProList);
}
- if(dc.size() > 7){
+ if (dc.size() > 7) {
List<ProductTypes__c> ptList8 = new List<ProductTypes__c>();
List<String> dcList = dc[7].split('-');
if (dcList.size() > 1) {
- ptList8 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList8 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList8 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList8 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList8){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList8) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
@@ -1391,272 +1673,400 @@
impProMap.put(dc[7], impProList);
}
- if(dc.size() > 8){
+ if (dc.size() > 8) {
List<ProductTypes__c> ptList9 = new List<ProductTypes__c>();
List<String> dcList = dc[8].split('-');
if (dcList.size() > 1) {
- ptList9 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList9 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList9 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList9 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList9){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList9) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[8], impProList);
}
- if(dc.size() > 9){
+ if (dc.size() > 9) {
List<ProductTypes__c> ptList10 = new List<ProductTypes__c>();
List<String> dcList = dc[9].split('-');
if (dcList.size() > 1) {
- ptList10 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList10 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList10 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList10 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList10){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList10) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[9], impProList);
}
- if(dc.size() > 10){
+ if (dc.size() > 10) {
List<ProductTypes__c> ptList11 = new List<ProductTypes__c>();
List<String> dcList = dc[10].split('-');
if (dcList.size() > 1) {
- ptList11 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList11 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList11 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList11 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList11){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList11) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[10], impProList);
}
- if(dc.size() > 11){
+ if (dc.size() > 11) {
List<ProductTypes__c> ptList12 = new List<ProductTypes__c>();
List<String> dcList = dc[11].split('-');
if (dcList.size() > 1) {
- ptList12 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList12 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList12 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList12 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList12){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList12) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[11], impProList);
}
- if(dc.size() > 12){
+ if (dc.size() > 12) {
List<ProductTypes__c> ptList13 = new List<ProductTypes__c>();
List<String> dcList = dc[12].split('-');
if (dcList.size() > 1) {
- ptList13 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList13 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList13 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList13 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList13){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList13) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[12], impProList);
}
- if(dc.size() > 13){
+ if (dc.size() > 13) {
List<ProductTypes__c> ptList14 = new List<ProductTypes__c>();
List<String> dcList = dc[13].split('-');
if (dcList.size() > 1) {
- ptList14 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList14 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList14 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList14 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList14){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList14) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[13], impProList);
}
- if(dc.size() > 14){
+ if (dc.size() > 14) {
List<ProductTypes__c> ptList15 = new List<ProductTypes__c>();
List<String> dcList = dc[14].split('-');
if (dcList.size() > 1) {
- ptList15 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList15 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList15 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList15 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList15){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList15) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[14], impProList);
}
- if(dc.size() > 15){
+ if (dc.size() > 15) {
List<ProductTypes__c> ptList16 = new List<ProductTypes__c>();
List<String> dcList = dc[15].split('-');
if (dcList.size() > 1) {
- ptList16 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList16 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList16 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList16 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList16){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList16) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[15], impProList);
}
- if(dc.size() > 16){
+ if (dc.size() > 16) {
List<ProductTypes__c> ptList17 = new List<ProductTypes__c>();
List<String> dcList = dc[16].split('-');
if (dcList.size() > 1) {
- ptList17 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList17 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList17 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList17 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList17){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList17) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[16], impProList);
}
- if(dc.size() > 17){
+ if (dc.size() > 17) {
List<ProductTypes__c> ptList18 = new List<ProductTypes__c>();
List<String> dcList = dc[17].split('-');
if (dcList.size() > 1) {
- ptList18 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList18 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList18 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList18 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList18){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList18) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[17], impProList);
}
- if(dc.size() > 18){
+ if (dc.size() > 18) {
List<ProductTypes__c> ptList19 = new List<ProductTypes__c>();
List<String> dcList = dc[18].split('-');
if (dcList.size() > 1) {
- ptList19 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList19 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList19 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList19 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList19){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList19) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[18], impProList);
}
- if(dc.size() > 19){
+ if (dc.size() > 19) {
List<ProductTypes__c> ptList20 = new List<ProductTypes__c>();
List<String> dcList = dc[19].split('-');
if (dcList.size() > 1) {
- ptList20 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList20 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList20 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList20 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList20){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList20) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[19], impProList);
}
- if(dc.size() > 20){
+ if (dc.size() > 20) {
List<ProductTypes__c> ptList21 = new List<ProductTypes__c>();
List<String> dcList = dc[20].split('-');
if (dcList.size() > 1) {
- ptList21 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList21 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList21 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList21 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList21){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList21) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[20], impProList);
}
- if(dc.size() > 21){
+ if (dc.size() > 21) {
List<ProductTypes__c> ptList22 = new List<ProductTypes__c>();
List<String> dcList = dc[21].split('-');
if (dcList.size() > 1) {
- ptList22 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList22 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList22 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList22 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList22){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList22) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[21], impProList);
}
- if(dc.size() > 22){
+ if (dc.size() > 22) {
List<ProductTypes__c> ptList23 = new List<ProductTypes__c>();
List<String> dcList = dc[22].split('-');
if (dcList.size() > 1) {
- ptList23 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList23 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList23 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList23 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList23){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList23) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
}
impProMap.put(dc[22], impProList);
}
- if(dc.size() > 23){
+ if (dc.size() > 23) {
List<ProductTypes__c> ptList24 = new List<ProductTypes__c>();
List<String> dcList = dc[23].split('-');
if (dcList.size() > 1) {
- ptList24 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0] and OPD_SIS_Type__c =:dcList[1]];
+ ptList24 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0] AND OPD_SIS_Type__c = :dcList[1]
+ ];
} else {
- ptList24 = [select Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c from ProductTypes__c where DeleteFlg__c = false and Department_Cateogy_Text__c like :dcList[0]];
+ ptList24 = [
+ SELECT Id, Name, Department_Cateogy__c, OPD_Flg__c, SIS_Flg__c
+ FROM ProductTypes__c
+ WHERE DeleteFlg__c = FALSE AND Department_Cateogy_Text__c LIKE :dcList[0]
+ ];
}
- List<Map<String,String>> impProList = new List<Map<String,String>>();
- for(ProductTypes__c pt : ptList24){
- Map<String,String> productMap = new Map<String,String>();
+ List<Map<String, String>> impProList = new List<Map<String, String>>();
+ for (ProductTypes__c pt : ptList24) {
+ Map<String, String> productMap = new Map<String, String>();
productMap.put('label', pt.Name);
productMap.put('value', pt.Id);
impProList.add(productMap);
@@ -1665,31 +2075,34 @@
}
return impProMap;
-
}
- // 鎵归噺娣诲姞鍛ㄦ姤by vivek end
+ // 鎵归噺娣诲姞鍛ㄦ姤by vivek end
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
@AuraEnabled
- public static ControllerResponse searchAgencyDataId(String hospitalId){
+ public static ControllerResponse searchAgencyDataId(String hospitalId) {
ControllerResponse r = new ControllerResponse();
- try{
- if(String.isBlank(hospitalId)){
+ try {
+ if (String.isBlank(hospitalId)) {
r.IsSuccess = true;
r.Message = 'noHospitalId';
return r;
}
- List<Agency_Contact__c> acList = [select id,AWS_Data_Id__c,Agency_Hospital__r.Name from Agency_Contact__c where Agency_Hospital__c=:hospitalId];
+ List<Agency_Contact__c> acList = [
+ SELECT id, AWS_Data_Id__c, Agency_Hospital__r.Name
+ FROM Agency_Contact__c
+ WHERE Agency_Hospital__c = :hospitalId
+ ];
r.IsSuccess = true;
r.Message = '';
r.Data = acList;
return r;
- }catch(Exception e) {
- System.debug('into catch'+e.getMessage());
+ } catch (Exception e) {
+ System.debug('into catch' + e.getMessage());
r.IsSuccess = false;
- r.message = e.getMessage()+e.getStackTraceString();
+ r.message = e.getMessage() + e.getStackTraceString();
return r;
}
}
//zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/lexSearchAgencyHospitalControllerTest.cls b/force-app/main/default/classes/lexSearchAgencyHospitalControllerTest.cls
new file mode 100644
index 0000000..ef0db5f
--- /dev/null
+++ b/force-app/main/default/classes/lexSearchAgencyHospitalControllerTest.cls
@@ -0,0 +1,93 @@
+@isTest
+private class lexSearchAgencyHospitalControllerTest {
+ @isTest
+ static void testInit() {
+ User myUser_test;
+ Account myAccount2;
+ Product2__c pro2;
+ User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
+ System.runAs(thisUser) {
+ List<RecordType> rectCo = [
+ SELECT Id
+ FROM RecordType
+ WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
+ ];
+ if (rectCo.size() == 0) {
+ return;
+ }
+ Profile prof = [
+ SELECT Id
+ FROM Profile
+ WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET Email)'
+ ];
+ Product2 prod02 = new Product2(
+ Name = 'Test02181',
+ ProductCode = 'Test0218',
+ Asset_Model_No__c = 'Test0218',
+ SFDA_Status__c = '鏈夊姽',
+ Dealer_special_Object__c = true,
+ SFDA_Approbation_No__c = 'Test002',
+ Packing_list_manual__c = 12,
+ SFDA_Expiration_Date__c = Date.today(),
+ Category5__c = 'tset8',
+ Manual_Entry__c = false
+ );
+ pro2 = new Product2__c(Name = 'Pro002181', OT_CODE_Text__c = 'Test002181', Product2__c = prod02.Id);
+ insert pro2;
+ myAccount2 = new Account(name = 'Testaccount003', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '2');
+ insert myAccount2;
+
+ Contact core = new Contact(email = 'wan@salesforce.com', firstname = 'wan', lastname = 'Plumbers', accountid = myAccount2.id);
+ insert core;
+ myUser_test = new User(
+ ContactId = core.id,
+ Alias = 'newUser',
+ Email = 'newuser@testorg.com',
+ EmailEncodingKey = 'UTF-8',
+ LastName = 'TestUser',
+ LanguageLocaleKey = 'zh_CN',
+ LocaleSidKey = 'zh_CN',
+ ProfileId = prof.Id,
+ TimeZoneSidKey = 'Asia/Shanghai',
+ UserName = 'testUser@testorg.com',
+ UserPro_Type__c = 'ENG',
+ Work_Location__c = '鍖椾含'
+ );
+ insert myUser_test;
+ myUser_test.UserPro_Type__c = '';
+ update myUser_test;
+ }
+ System.runAs(MyUser_Test) {
+ System.Test.startTest();
+ String accountId = myUser_test.accountid;
+ String agencyProType = myUser_test.UserPro_Type__c;
+ String searchName = '';
+ List<Agency_Hospital_Link__c> ahlInfo = [
+ SELECT Hospital__c, Hospital__r.Name
+ FROM Agency_Hospital_Link__c
+ WHERE Agency__c = :accountId AND Hosptial_Type__c != NULL
+ LIMIT 1
+ ];
+ Set<Id> whoIds = new Set<Id>();
+ for (Agency_Hospital_Link__c ahl : ahlInfo) {
+ whoIds.add(ahl.Hospital__c);
+ if (String.isBlank(searchName)) {
+ searchName = ahl.Hospital__r.Name;
+ }
+ }
+ Map<ID, Account> accInfo = new Map<ID, Account>(
+ [
+ SELECT Id, Name, State_Master__c, State_Master__r.Name
+ FROM Account
+ WHERE Id IN :whoIds
+ ]
+ );
+ Map<String, object> data = new Map<String, object>();
+ data.put('accInfo', accInfo);
+ String ctype = 'ET';
+ lexSearchAgencyHospitalController.init(ctype);
+ lexSearchAgencyHospitalController.serContact(searchName, ctype);
+ System.Test.stopTest();
+ }
+ }
+}
diff --git a/force-app/main/default/classes/lexSearchAgencyHospitalControllerTest.cls-meta.xml b/force-app/main/default/classes/lexSearchAgencyHospitalControllerTest.cls-meta.xml
new file mode 100644
index 0000000..a9fd6e9
--- /dev/null
+++ b/force-app/main/default/classes/lexSearchAgencyHospitalControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/contentassets/OlympusCommunityLoginBG.asset b/force-app/main/default/contentassets/OlympusCommunityLoginBG.asset
new file mode 100644
index 0000000..b977872
--- /dev/null
+++ b/force-app/main/default/contentassets/OlympusCommunityLoginBG.asset
Binary files differ
diff --git a/force-app/main/default/contentassets/OlympusCommunityLoginBG.asset-meta.xml b/force-app/main/default/contentassets/OlympusCommunityLoginBG.asset-meta.xml
new file mode 100644
index 0000000..e46f582
--- /dev/null
+++ b/force-app/main/default/contentassets/OlympusCommunityLoginBG.asset-meta.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentAsset xmlns="http://soap.sforce.com/2006/04/metadata">
+ <isVisibleByExternalUsers>true</isVisibleByExternalUsers>
+ <language>zh_CN</language>
+ <masterLabel>OlympusCommunityLoginBG</masterLabel>
+ <originNetwork>Consumable绯荤粺</originNetwork>
+ <relationships>
+ <network>
+ <access>VIEWER</access>
+ <name>Consumable绯荤粺</name>
+ </network>
+ <network>
+ <access>VIEWER</access>
+ <name>Partner Sales</name>
+ </network>
+ <workspace>
+ <access>INFERRED</access>
+ <isManagingWorkspace>true</isManagingWorkspace>
+ <name>sfdc_asset_company_assets</name>
+ </workspace>
+ </relationships>
+ <versions>
+ <version>
+ <number>1</number>
+ <pathOnClient>OlympusCommunityLoginBG.png</pathOnClient>
+ </version>
+ </versions>
+</ContentAsset>
diff --git a/force-app/main/default/contentassets/OlympusCommunityLogo.asset b/force-app/main/default/contentassets/OlympusCommunityLogo.asset
new file mode 100644
index 0000000..140b519
--- /dev/null
+++ b/force-app/main/default/contentassets/OlympusCommunityLogo.asset
Binary files differ
diff --git a/force-app/main/default/contentassets/OlympusCommunityLogo.asset-meta.xml b/force-app/main/default/contentassets/OlympusCommunityLogo.asset-meta.xml
new file mode 100644
index 0000000..2ec551c
--- /dev/null
+++ b/force-app/main/default/contentassets/OlympusCommunityLogo.asset-meta.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentAsset xmlns="http://soap.sforce.com/2006/04/metadata">
+ <isVisibleByExternalUsers>true</isVisibleByExternalUsers>
+ <language>zh_CN</language>
+ <masterLabel>OlympusCommunityLogo</masterLabel>
+ <originNetwork>Consumable绯荤粺</originNetwork>
+ <relationships>
+ <network>
+ <access>VIEWER</access>
+ <name>Consumable绯荤粺</name>
+ </network>
+ <network>
+ <access>VIEWER</access>
+ <name>Partner Sales</name>
+ </network>
+ <workspace>
+ <access>INFERRED</access>
+ <isManagingWorkspace>true</isManagingWorkspace>
+ <name>sfdc_asset_company_assets</name>
+ </workspace>
+ </relationships>
+ <versions>
+ <version>
+ <number>1</number>
+ <pathOnClient>OlympusCommunityLogo.png</pathOnClient>
+ </version>
+ </versions>
+</ContentAsset>
diff --git a/force-app/main/default/dashboards/ConsumableSalesDashboard.dashboardFolder-meta.xml b/force-app/main/default/dashboards/ConsumableSalesDashboard.dashboardFolder-meta.xml
new file mode 100644
index 0000000..a9f8726
--- /dev/null
+++ b/force-app/main/default/dashboards/ConsumableSalesDashboard.dashboardFolder-meta.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<DashboardFolder xmlns="http://soap.sforce.com/2006/04/metadata">
+ <folderShares>
+ <accessLevel>Manage</accessLevel>
+ <sharedTo>buli@deloitte.com.cn</sharedTo>
+ <sharedToType>User</sharedToType>
+ </folderShares>
+ <folderShares>
+ <accessLevel>View</accessLevel>
+ <sharedTo>ENG_PartnerALL</sharedTo>
+ <sharedToType>Group</sharedToType>
+ </folderShares>
+ <folderShares>
+ <accessLevel>View</accessLevel>
+ <sharedTo>ET_PartnerALL</sharedTo>
+ <sharedToType>Group</sharedToType>
+ </folderShares>
+ <name>Consumable Sales Dashboard</name>
+</DashboardFolder>
diff --git a/force-app/main/default/dashboards/ConsumableSalesDashboard/ezyQWhsDlQfrUPdIMqUmGsdMeWiYAH2.dashboard-meta.xml b/force-app/main/default/dashboards/ConsumableSalesDashboard/ezyQWhsDlQfrUPdIMqUmGsdMeWiYAH2.dashboard-meta.xml
new file mode 100644
index 0000000..8561367
--- /dev/null
+++ b/force-app/main/default/dashboards/ConsumableSalesDashboard/ezyQWhsDlQfrUPdIMqUmGsdMeWiYAH2.dashboard-meta.xml
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Dashboard xmlns="http://soap.sforce.com/2006/04/metadata">
+ <backgroundEndColor>#FFFFFF</backgroundEndColor>
+ <backgroundFadeDirection>Diagonal</backgroundFadeDirection>
+ <backgroundStartColor>#FFFFFF</backgroundStartColor>
+ <chartTheme>light</chartTheme>
+ <colorPalette>unity</colorPalette>
+ <dashboardChartTheme>light</dashboardChartTheme>
+ <dashboardColorPalette>unity</dashboardColorPalette>
+ <dashboardGridLayout>
+ <dashboardGridComponents>
+ <colSpan>6</colSpan>
+ <columnIndex>0</columnIndex>
+ <dashboardComponent>
+ <autoselectColumnsFromReport>false</autoselectColumnsFromReport>
+ <chartAxisRange>Auto</chartAxisRange>
+ <chartSummary>
+ <aggregate>Sum</aggregate>
+ <axisBinding>y</axisBinding>
+ <column>Consumable_Orderdetails__c.Sale_amount__c</column>
+ </chartSummary>
+ <componentType>Bar</componentType>
+ <decimalPrecision>-1</decimalPrecision>
+ <displayUnits>Auto</displayUnits>
+ <drillEnabled>false</drillEnabled>
+ <drillToDetailEnabled>false</drillToDetailEnabled>
+ <enableHover>false</enableHover>
+ <expandOthers>false</expandOthers>
+ <groupingColumn
+ >Consumable_Orderdetails__c.HospItal_Name__c</groupingColumn>
+ <groupingSortProperties>
+ <groupingSorts>
+ <groupingLevel>g1</groupingLevel>
+ <sortColumn
+ >s!Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
+ <sortOrder>d</sortOrder>
+ </groupingSorts>
+ </groupingSortProperties>
+ <header>鏈湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜鍖婚櫌</header>
+ <legendPosition>Bottom</legendPosition>
+ <maxValuesDisplayed>10</maxValuesDisplayed>
+ <report
+ >ConsumableSalesReport/CurrentMonthSalesRankByAccount</report>
+ <showPercentage>false</showPercentage>
+ <showPicturesOnCharts>false</showPicturesOnCharts>
+ <showValues>true</showValues>
+ <sortBy>RowLabelAscending</sortBy>
+ <useReportChart>false</useReportChart>
+ </dashboardComponent>
+ <rowIndex>0</rowIndex>
+ <rowSpan>12</rowSpan>
+ </dashboardGridComponents>
+ <dashboardGridComponents>
+ <colSpan>6</colSpan>
+ <columnIndex>6</columnIndex>
+ <dashboardComponent>
+ <autoselectColumnsFromReport>false</autoselectColumnsFromReport>
+ <chartAxisRange>Auto</chartAxisRange>
+ <chartSummary>
+ <aggregate>Sum</aggregate>
+ <axisBinding>y</axisBinding>
+ <column>Consumable_Orderdetails__c.Sale_amount__c</column>
+ </chartSummary>
+ <componentType>Bar</componentType>
+ <decimalPrecision>-1</decimalPrecision>
+ <displayUnits>Auto</displayUnits>
+ <drillEnabled>false</drillEnabled>
+ <drillToDetailEnabled>false</drillToDetailEnabled>
+ <enableHover>false</enableHover>
+ <expandOthers>false</expandOthers>
+ <groupingColumn
+ >Consumable_Orderdetails__c.HospItal_Name__c</groupingColumn>
+ <groupingSortProperties>
+ <groupingSorts>
+ <groupingLevel>g1</groupingLevel>
+ <sortColumn
+ >s!Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
+ <sortOrder>d</sortOrder>
+ </groupingSorts>
+ </groupingSortProperties>
+ <header>涓婃湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜鍖婚櫌</header>
+ <legendPosition>Bottom</legendPosition>
+ <maxValuesDisplayed>10</maxValuesDisplayed>
+ <report>ConsumableSalesReport/LastMonthSalesByAccount1</report>
+ <showPercentage>false</showPercentage>
+ <showPicturesOnCharts>false</showPicturesOnCharts>
+ <showValues>true</showValues>
+ <sortBy>RowLabelAscending</sortBy>
+ <useReportChart>false</useReportChart>
+ </dashboardComponent>
+ <rowIndex>0</rowIndex>
+ <rowSpan>12</rowSpan>
+ </dashboardGridComponents>
+ <dashboardGridComponents>
+ <colSpan>6</colSpan>
+ <columnIndex>0</columnIndex>
+ <dashboardComponent>
+ <autoselectColumnsFromReport>false</autoselectColumnsFromReport>
+ <chartAxisRange>Auto</chartAxisRange>
+ <chartSummary>
+ <aggregate>Sum</aggregate>
+ <axisBinding>y</axisBinding>
+ <column>Consumable_Orderdetails__c.Sale_amount__c</column>
+ </chartSummary>
+ <componentType>Bar</componentType>
+ <decimalPrecision>-1</decimalPrecision>
+ <displayUnits>Auto</displayUnits>
+ <drillEnabled>false</drillEnabled>
+ <drillToDetailEnabled>false</drillToDetailEnabled>
+ <enableHover>false</enableHover>
+ <expandOthers>false</expandOthers>
+ <groupingColumn
+ >Consumable_Orderdetails__c.Product_bbname__c</groupingColumn>
+ <groupingSortProperties>
+ <groupingSorts>
+ <groupingLevel>g1</groupingLevel>
+ <sortColumn
+ >s!Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
+ <sortOrder>d</sortOrder>
+ </groupingSorts>
+ </groupingSortProperties>
+ <header>鏈湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜浜у搧</header>
+ <legendPosition>Bottom</legendPosition>
+ <maxValuesDisplayed>10</maxValuesDisplayed>
+ <report
+ >ConsumableSalesReport/CurrentMonthSalesRankByProduct</report>
+ <showPercentage>false</showPercentage>
+ <showPicturesOnCharts>false</showPicturesOnCharts>
+ <showValues>true</showValues>
+ <sortBy>RowLabelAscending</sortBy>
+ <useReportChart>false</useReportChart>
+ </dashboardComponent>
+ <rowIndex>12</rowIndex>
+ <rowSpan>13</rowSpan>
+ </dashboardGridComponents>
+ <dashboardGridComponents>
+ <colSpan>6</colSpan>
+ <columnIndex>6</columnIndex>
+ <dashboardComponent>
+ <autoselectColumnsFromReport>false</autoselectColumnsFromReport>
+ <chartAxisRange>Auto</chartAxisRange>
+ <chartSummary>
+ <aggregate>Sum</aggregate>
+ <axisBinding>y</axisBinding>
+ <column>Consumable_Orderdetails__c.Sale_amount__c</column>
+ </chartSummary>
+ <componentType>Bar</componentType>
+ <decimalPrecision>-1</decimalPrecision>
+ <displayUnits>Auto</displayUnits>
+ <drillEnabled>false</drillEnabled>
+ <drillToDetailEnabled>false</drillToDetailEnabled>
+ <enableHover>false</enableHover>
+ <expandOthers>false</expandOthers>
+ <groupingColumn
+ >Consumable_Orderdetails__c.Product_bbname__c</groupingColumn>
+ <groupingSortProperties>
+ <groupingSorts>
+ <groupingLevel>g1</groupingLevel>
+ <sortColumn
+ >s!Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
+ <sortOrder>d</sortOrder>
+ </groupingSorts>
+ </groupingSortProperties>
+ <header>涓婃湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜浜у搧</header>
+ <legendPosition>Bottom</legendPosition>
+ <maxValuesDisplayed>10</maxValuesDisplayed>
+ <report>ConsumableSalesReport/LastMonthSalesByProduct</report>
+ <showPercentage>false</showPercentage>
+ <showPicturesOnCharts>false</showPicturesOnCharts>
+ <showValues>true</showValues>
+ <sortBy>RowLabelAscending</sortBy>
+ <useReportChart>false</useReportChart>
+ </dashboardComponent>
+ <rowIndex>12</rowIndex>
+ <rowSpan>13</rowSpan>
+ </dashboardGridComponents>
+ <numberOfColumns>12</numberOfColumns>
+ <rowHeight>36</rowHeight>
+ </dashboardGridLayout>
+ <dashboardType>MyTeamUser</dashboardType>
+ <isGridLayout>true</isGridLayout>
+ <runningUser>buli@deloitte.com.cn</runningUser>
+ <textColor>#000000</textColor>
+ <title>閿�閲忎华琛ㄦ澘</title>
+ <titleColor>#000000</titleColor>
+ <titleSize>12</titleSize>
+</Dashboard>
diff --git a/force-app/main/default/dashboards/Consumable_Dashboard/ezyQWhsDlQfrUPdIMqUmGsdMeWiYAH.dashboard-meta.xml b/force-app/main/default/dashboards/Consumable_Dashboard/ezyQWhsDlQfrUPdIMqUmGsdMeWiYAH.dashboard-meta.xml
deleted file mode 100644
index d785b78..0000000
--- a/force-app/main/default/dashboards/Consumable_Dashboard/ezyQWhsDlQfrUPdIMqUmGsdMeWiYAH.dashboard-meta.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Dashboard xmlns="http://soap.sforce.com/2006/04/metadata">
- <backgroundEndColor>#FFFFFF</backgroundEndColor>
- <backgroundFadeDirection>Diagonal</backgroundFadeDirection>
- <backgroundStartColor>#FFFFFF</backgroundStartColor>
- <chartTheme>light</chartTheme>
- <colorPalette>unity</colorPalette>
- <dashboardChartTheme>light</dashboardChartTheme>
- <dashboardColorPalette>unity</dashboardColorPalette>
- <dashboardGridLayout>
- <dashboardGridComponents>
- <colSpan>6</colSpan>
- <columnIndex>0</columnIndex>
- <dashboardComponent>
- <autoselectColumnsFromReport>false</autoselectColumnsFromReport>
- <chartAxisRange>Auto</chartAxisRange>
- <chartSummary>
- <aggregate>Sum</aggregate>
- <axisBinding>y</axisBinding>
- <column>Consumable_Orderdetails__c.Sale_amount__c</column>
- </chartSummary>
- <componentType>Bar</componentType>
- <decimalPrecision>-1</decimalPrecision>
- <displayUnits>Auto</displayUnits>
- <drillEnabled>false</drillEnabled>
- <drillToDetailEnabled>false</drillToDetailEnabled>
- <enableHover>false</enableHover>
- <expandOthers>false</expandOthers>
- <groupingColumn
- >Consumable_Orderdetails__c.HospItal_Name__c</groupingColumn>
- <groupingSortProperties>
- <groupingSorts>
- <groupingLevel>g1</groupingLevel>
- <sortColumn
- >s!Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
- <sortOrder>d</sortOrder>
- </groupingSorts>
- </groupingSortProperties>
- <header>鏈湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜鍖婚櫌</header>
- <legendPosition>Bottom</legendPosition>
- <maxValuesDisplayed>10</maxValuesDisplayed>
- <report>Consumable_KC/CurrentMonthSalesRankByAccount</report>
- <showPercentage>false</showPercentage>
- <showPicturesOnCharts>false</showPicturesOnCharts>
- <showValues>true</showValues>
- <sortBy>RowLabelAscending</sortBy>
- <useReportChart>false</useReportChart>
- </dashboardComponent>
- <rowIndex>0</rowIndex>
- <rowSpan>12</rowSpan>
- </dashboardGridComponents>
- <dashboardGridComponents>
- <colSpan>6</colSpan>
- <columnIndex>6</columnIndex>
- <dashboardComponent>
- <autoselectColumnsFromReport>false</autoselectColumnsFromReport>
- <chartAxisRange>Auto</chartAxisRange>
- <chartSummary>
- <aggregate>Sum</aggregate>
- <axisBinding>y</axisBinding>
- <column>Consumable_Orderdetails__c.Sale_amount__c</column>
- </chartSummary>
- <componentType>Bar</componentType>
- <decimalPrecision>-1</decimalPrecision>
- <displayUnits>Auto</displayUnits>
- <drillEnabled>false</drillEnabled>
- <drillToDetailEnabled>false</drillToDetailEnabled>
- <enableHover>false</enableHover>
- <expandOthers>false</expandOthers>
- <groupingColumn
- >Consumable_Orderdetails__c.HospItal_Name__c</groupingColumn>
- <groupingSortProperties>
- <groupingSorts>
- <groupingLevel>g1</groupingLevel>
- <sortColumn
- >s!Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
- <sortOrder>d</sortOrder>
- </groupingSorts>
- </groupingSortProperties>
- <header>涓婃湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜鍖婚櫌</header>
- <legendPosition>Bottom</legendPosition>
- <maxValuesDisplayed>10</maxValuesDisplayed>
- <report>Consumable_KC/LastMonthSalesByAccount1</report>
- <showPercentage>false</showPercentage>
- <showPicturesOnCharts>false</showPicturesOnCharts>
- <showValues>true</showValues>
- <sortBy>RowLabelAscending</sortBy>
- <useReportChart>false</useReportChart>
- </dashboardComponent>
- <rowIndex>0</rowIndex>
- <rowSpan>12</rowSpan>
- </dashboardGridComponents>
- <dashboardGridComponents>
- <colSpan>6</colSpan>
- <columnIndex>0</columnIndex>
- <dashboardComponent>
- <autoselectColumnsFromReport>false</autoselectColumnsFromReport>
- <chartAxisRange>Auto</chartAxisRange>
- <chartSummary>
- <aggregate>Sum</aggregate>
- <axisBinding>y</axisBinding>
- <column>Consumable_Orderdetails__c.Sale_amount__c</column>
- </chartSummary>
- <componentType>Bar</componentType>
- <decimalPrecision>-1</decimalPrecision>
- <displayUnits>Auto</displayUnits>
- <drillEnabled>false</drillEnabled>
- <drillToDetailEnabled>false</drillToDetailEnabled>
- <enableHover>false</enableHover>
- <expandOthers>false</expandOthers>
- <groupingColumn
- >Consumable_Orderdetails__c.Product_bbname__c</groupingColumn>
- <groupingSortProperties>
- <groupingSorts>
- <groupingLevel>g1</groupingLevel>
- <sortColumn
- >s!Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
- <sortOrder>d</sortOrder>
- </groupingSorts>
- </groupingSortProperties>
- <header>鏈湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜浜у搧</header>
- <legendPosition>Bottom</legendPosition>
- <maxValuesDisplayed>10</maxValuesDisplayed>
- <report>Consumable_KC/CurrentMonthSalesRankByProduct</report>
- <showPercentage>false</showPercentage>
- <showPicturesOnCharts>false</showPicturesOnCharts>
- <showValues>true</showValues>
- <sortBy>RowLabelAscending</sortBy>
- <useReportChart>false</useReportChart>
- </dashboardComponent>
- <rowIndex>12</rowIndex>
- <rowSpan>13</rowSpan>
- </dashboardGridComponents>
- <dashboardGridComponents>
- <colSpan>6</colSpan>
- <columnIndex>6</columnIndex>
- <dashboardComponent>
- <autoselectColumnsFromReport>false</autoselectColumnsFromReport>
- <chartAxisRange>Auto</chartAxisRange>
- <chartSummary>
- <aggregate>Sum</aggregate>
- <axisBinding>y</axisBinding>
- <column>Consumable_Orderdetails__c.Sale_amount__c</column>
- </chartSummary>
- <componentType>Bar</componentType>
- <decimalPrecision>-1</decimalPrecision>
- <displayUnits>Auto</displayUnits>
- <drillEnabled>false</drillEnabled>
- <drillToDetailEnabled>false</drillToDetailEnabled>
- <enableHover>false</enableHover>
- <expandOthers>false</expandOthers>
- <groupingColumn
- >Consumable_Orderdetails__c.Product_bbname__c</groupingColumn>
- <groupingSortProperties>
- <groupingSorts>
- <groupingLevel>g1</groupingLevel>
- <sortColumn
- >s!Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
- <sortOrder>d</sortOrder>
- </groupingSorts>
- </groupingSortProperties>
- <header>涓婃湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜浜у搧</header>
- <legendPosition>Bottom</legendPosition>
- <maxValuesDisplayed>10</maxValuesDisplayed>
- <report>Consumable_KC/LastMonthSalesByProduct</report>
- <showPercentage>false</showPercentage>
- <showPicturesOnCharts>false</showPicturesOnCharts>
- <showValues>true</showValues>
- <sortBy>RowLabelAscending</sortBy>
- <useReportChart>false</useReportChart>
- </dashboardComponent>
- <rowIndex>12</rowIndex>
- <rowSpan>13</rowSpan>
- </dashboardGridComponents>
- <numberOfColumns>12</numberOfColumns>
- <rowHeight>36</rowHeight>
- </dashboardGridLayout>
- <dashboardType>MyTeamUser</dashboardType>
- <isGridLayout>true</isGridLayout>
- <runningUser>buli@deloitte.com.cn</runningUser>
- <textColor>#000000</textColor>
- <title>閿�閲忎华琛ㄦ澘</title>
- <titleColor>#000000</titleColor>
- <titleSize>12</titleSize>
-</Dashboard>
diff --git a/force-app/main/default/dashboards/LEX.dashboardFolder-meta.xml b/force-app/main/default/dashboards/LEX.dashboardFolder-meta.xml
deleted file mode 100644
index ad7b1cb..0000000
--- a/force-app/main/default/dashboards/LEX.dashboardFolder-meta.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<DashboardFolder xmlns="http://soap.sforce.com/2006/04/metadata">
- <folderShares>
- <accessLevel>Manage</accessLevel>
- <sharedTo>buli@deloitte.com.cn</sharedTo>
- <sharedToType>User</sharedToType>
- </folderShares>
- <name>LEX</name>
-</DashboardFolder>
diff --git a/force-app/main/default/experiences/Consumable1/brandingSets/partnerCentral.json b/force-app/main/default/experiences/Consumable1/brandingSets/partnerCentral.json
index 112d371..399d65a 100644
--- a/force-app/main/default/experiences/Consumable1/brandingSets/partnerCentral.json
+++ b/force-app/main/default/experiences/Consumable1/brandingSets/partnerCentral.json
@@ -1,56 +1,56 @@
{
- "definitionName": "prm:branding-prm-merged",
- "id": "da39013d-fbc0-4c27-a7a2-5f9d07bdb4bd",
- "label": "Partner Central",
- "type": "brandingSet",
- "values": {
- "ActionColor": "rgb(10, 129, 223)",
- "BorderColor": "#D4D4D4",
- "CardBackgroundColor": "rgba(255, 255, 255, 0)",
- "CompanyLogo": "/file-asset/OlympusCommunityLogo?v=1&height=300&width=300",
- "DetailTextColor": "rgb(51, 51, 51)",
- "ErrorFontColor": "#ff9e9e",
- "HeaderBackgroundColor": "#FFFFFF",
- "HeaderFonts": "Salesforce Sans",
- "LinkColor": "rgb(37, 116, 169)",
- "LoginBackgroundColor": "#F4F4F4",
- "LoginBackgroundImage": "/file-asset/OlympusCommunityLoginBG?v=1",
- "NavigationMenuColor": "rgb(8, 16, 132)",
- "NavigationMenuTextColor": "#FFFFFF",
- "OverlayTextColor": "#FFFFFF",
- "PageBackgroundColor": "#FFFFFF",
- "PrimaryFont": "sans-serif",
- "TextColor": "#222222",
- "TextTransformStyle": "none",
- "_ActionColorDarker": "#0865ae",
- "_ActionColorTrans": "rgba(10, 129, 223, 0.9)",
- "_BackgroundColor1": "rgb(235, 235, 235)",
- "_BackgroundColor2": "rgb(194, 194, 194)",
- "_BackgroundColor3": "rgb(133, 133, 133)",
- "_DxpPageBackgroundColor": "#FFFFFF",
- "_HeaderInputBackgroundColor": "rgba(255,255,255,.4)",
- "_HeaderPlaceholderTextColor": "rgba(85,85,85,.8)",
- "_HeaderTextColor": "rgba(34,34,34,.8)",
- "_HoverColor": "rgba(10, 129, 223, 0.05)",
- "_LinkColorDarker": "#1e5d88",
- "_NavigationMenuHoverColor": "rgba(255,255,255,.2)",
- "_NeutralColor": "#ecebea",
- "_NeutralColor1": "rgb(217, 215, 213)",
- "_NeutralColor2": "rgb(178, 174, 170)",
- "_NeutralColor3": "rgb(118, 113, 107)",
- "_NeutralForegroundColor": "#000",
- "_NeutralForegroundColor1": "#000",
- "_NeutralForegroundColor2": "#000",
- "_NeutralForegroundColor3": "#fff",
- "_OverlayTextColorShadow": "#000000",
- "_PrimaryAccentColor1": "rgb(8, 106, 184)",
- "_PrimaryAccentColor2": "rgb(5, 61, 106)",
- "_PrimaryAccentColor3": "rgb(0, 0, 0)",
- "_PrimaryAccentForegroundColor1": "rgb(255, 255, 255)",
- "_PrimaryAccentForegroundColor2": "rgb(255, 255, 255)",
- "_PrimaryAccentForegroundColor3": "rgb(255, 255, 255)",
- "_TextColor1": "rgb(14, 14, 14)",
- "_TextColor2": "rgb(0, 0, 0)",
- "_TextColor3": "rgb(0, 0, 0)"
- }
+ "definitionName": "prm:branding-prm-merged",
+ "id": "da39013d-fbc0-4c27-a7a2-5f9d07bdb4bd",
+ "label": "Partner Central",
+ "type": "brandingSet",
+ "values": {
+ "ActionColor": "rgb(10, 129, 223)",
+ "BorderColor": "rgb(212, 212, 212)",
+ "CardBackgroundColor": "rgba(255, 255, 255, 0)",
+ "CompanyLogo": "/file-asset/OlympusCommunityLogo?v=1&height=300&width=300",
+ "DetailTextColor": "rgb(51, 51, 51)",
+ "ErrorFontColor": "#ff9e9e",
+ "HeaderBackgroundColor": "#FFFFFF",
+ "HeaderFonts": "sans-serif",
+ "LinkColor": "rgb(37, 116, 169)",
+ "LoginBackgroundColor": "#F4F4F4",
+ "LoginBackgroundImage": "/file-asset/OlympusCommunityLoginBG?v=1",
+ "NavigationMenuColor": "rgb(8, 16, 132)",
+ "NavigationMenuTextColor": "#FFFFFF",
+ "OverlayTextColor": "#FFFFFF",
+ "PageBackgroundColor": "#FFFFFF",
+ "PrimaryFont": "sans-serif",
+ "TextColor": "#222222",
+ "TextTransformStyle": "none",
+ "_ActionColorDarker": "#0865ae",
+ "_ActionColorTrans": "rgba(10, 129, 223, 0.9)",
+ "_BackgroundColor1": "rgb(235, 235, 235)",
+ "_BackgroundColor2": "rgb(194, 194, 194)",
+ "_BackgroundColor3": "rgb(133, 133, 133)",
+ "_DxpPageBackgroundColor": "#FFFFFF",
+ "_HeaderInputBackgroundColor": "rgba(255,255,255,.4)",
+ "_HeaderPlaceholderTextColor": "rgba(85,85,85,.8)",
+ "_HeaderTextColor": "rgba(34,34,34,.8)",
+ "_HoverColor": "rgba(10, 129, 223, 0.05)",
+ "_LinkColorDarker": "#1e5d88",
+ "_NavigationMenuHoverColor": "rgba(255,255,255,.2)",
+ "_NeutralColor": "#ecebea",
+ "_NeutralColor1": "rgb(217, 215, 213)",
+ "_NeutralColor2": "rgb(178, 174, 170)",
+ "_NeutralColor3": "rgb(118, 113, 107)",
+ "_NeutralForegroundColor": "#000",
+ "_NeutralForegroundColor1": "#000",
+ "_NeutralForegroundColor2": "#000",
+ "_NeutralForegroundColor3": "#fff",
+ "_OverlayTextColorShadow": "#000000",
+ "_PrimaryAccentColor1": "rgb(8, 106, 184)",
+ "_PrimaryAccentColor2": "rgb(5, 61, 106)",
+ "_PrimaryAccentColor3": "rgb(0, 0, 0)",
+ "_PrimaryAccentForegroundColor1": "rgb(255, 255, 255)",
+ "_PrimaryAccentForegroundColor2": "rgb(255, 255, 255)",
+ "_PrimaryAccentForegroundColor3": "rgb(255, 255, 255)",
+ "_TextColor1": "rgb(14, 14, 14)",
+ "_TextColor2": "rgb(0, 0, 0)",
+ "_TextColor3": "rgb(0, 0, 0)"
+ }
}
diff --git "a/force-app/main/default/experiences/Consumable1/config/consumable\347\263\273\347\273\237.json" "b/force-app/main/default/experiences/Consumable1/config/consumable\347\263\273\347\273\237.json"
index f5f1010..a54003b 100644
--- "a/force-app/main/default/experiences/Consumable1/config/consumable\347\263\273\347\273\237.json"
+++ "b/force-app/main/default/experiences/Consumable1/config/consumable\347\263\273\347\273\237.json"
@@ -1,11 +1,11 @@
{
- "forgotPasswordRouteId": "543c3ca6-a340-46d3-a25b-82ce3864cf02",
- "isAvailableToGuests": false,
- "isFilteredComponentsView": false,
- "isProgressiveRenderingEnabled": false,
- "loginAppPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "mainAppPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "preferredDomain": "none",
- "selfRegistrationRouteId": "2d8061dd-a482-4608-8514-113389805fc4",
- "type": "site"
+ "forgotPasswordRouteId": "543c3ca6-a340-46d3-a25b-82ce3864cf02",
+ "isAvailableToGuests": false,
+ "isFilteredComponentsView": false,
+ "isProgressiveRenderingEnabled": false,
+ "loginAppPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "mainAppPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "preferredDomain": "none",
+ "selfRegistrationRouteId": "2d8061dd-a482-4608-8514-113389805fc4",
+ "type": "site"
}
diff --git a/force-app/main/default/experiences/Consumable1/config/languages.json b/force-app/main/default/experiences/Consumable1/config/languages.json
index c0ff54c..66141e6 100644
--- a/force-app/main/default/experiences/Consumable1/config/languages.json
+++ b/force-app/main/default/experiences/Consumable1/config/languages.json
@@ -1,6 +1,6 @@
{
- "defaultCode": "zh_CN",
- "defaultLabel": "涓枃锛堢畝浣擄級 (CN)",
- "id": "574943f7-c68f-4a1b-9b77-b2154af650ab",
- "type": "languageContainer"
+ "defaultCode": "zh_CN",
+ "defaultLabel": "涓枃锛堢畝浣擄級 (CN)",
+ "id": "574943f7-c68f-4a1b-9b77-b2154af650ab",
+ "type": "languageContainer"
}
diff --git a/force-app/main/default/experiences/Consumable1/config/loginAppPage.json b/force-app/main/default/experiences/Consumable1/config/loginAppPage.json
index dda7785..d7226e8 100644
--- a/force-app/main/default/experiences/Consumable1/config/loginAppPage.json
+++ b/force-app/main/default/experiences/Consumable1/config/loginAppPage.json
@@ -1,7 +1,7 @@
{
- "cmsSettings": {},
- "id": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "label": "login",
- "templateName": "Login Template",
- "type": "appPage"
+ "cmsSettings": {},
+ "id": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "label": "login",
+ "templateName": "Login Template",
+ "type": "appPage"
}
diff --git a/force-app/main/default/experiences/Consumable1/config/mainAppPage.json b/force-app/main/default/experiences/Consumable1/config/mainAppPage.json
index 8e0642f..defa99f 100644
--- a/force-app/main/default/experiences/Consumable1/config/mainAppPage.json
+++ b/force-app/main/default/experiences/Consumable1/config/mainAppPage.json
@@ -1,10 +1,10 @@
{
- "cmsSettings": {},
- "currentThemeId": "dc3ec245-c32a-48fc-920e-8ff30c6cff7a",
- "headMarkup": "<script>\n var homeWindowLocation = '/consumable/s/';\n window.onload = function() {\n console.log('URL' +window.location.pathname);\n if(homeWindowLocation ==window.location.pathname ){\n console.log('refresh dashboard');\n setTimeout(\n function() {\n let refreshButtonElement = document.getElementsByTagName('iframe')[0].contentWindow.document.getElementsByTagName('button')[0];\n console.log('Refresh:'+refreshButtonElement);\n refreshButtonElement.click();\n }, 10000);\n }\n\t};\n\t\n</script>",
- "id": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "isRelaxedCSPLevel": true,
- "label": "main",
- "templateName": "PRM Community Template",
- "type": "appPage"
+ "cmsSettings": {},
+ "currentThemeId": "dc3ec245-c32a-48fc-920e-8ff30c6cff7a",
+ "headMarkup": "<script>\n var homeWindowLocation = '/consumable/s/';\n window.onload = function() {\n console.log('URL' +window.location.pathname);\n if(homeWindowLocation ==window.location.pathname ){\n console.log('refresh dashboard');\n setTimeout(\n function() {\n let refreshButtonElement = document.getElementsByTagName('iframe')[0].contentWindow.document.getElementsByTagName('button')[0];\n console.log('Refresh:'+refreshButtonElement);\n refreshButtonElement.click();\n }, 10000);\n }\n \n\t};\n\t\n</script>",
+ "id": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "isRelaxedCSPLevel": true,
+ "label": "main",
+ "templateName": "PRM Community Template",
+ "type": "appPage"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/accountManagement.json b/force-app/main/default/experiences/Consumable1/routes/accountManagement.json
index f5d23d5..4a56e3f 100644
--- a/force-app/main/default/experiences/Consumable1/routes/accountManagement.json
+++ b/force-app/main/default/experiences/Consumable1/routes/accountManagement.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "198e4bed-7a3a-4a56-a15a-d354e55d5624",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "a5aefe6e-da20-437c-8ff9-ef31a22b8d4a",
- "label": "Account Management",
- "routeType": "account-management",
- "type": "route",
- "urlPrefix": "account-management"
+ "activeViewId": "198e4bed-7a3a-4a56-a15a-d354e55d5624",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "a5aefe6e-da20-437c-8ff9-ef31a22b8d4a",
+ "label": "Account Management",
+ "routeType": "account-management",
+ "type": "route",
+ "urlPrefix": "account-management"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/cICList.json b/force-app/main/default/experiences/Consumable1/routes/cICList.json
new file mode 100644
index 0000000..7c58466
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable1/routes/cICList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "8fd93390-583d-45eb-a6c5-e3b0c5480cfa",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "133bd09c-dc33-4bcd-8fcf-681f5fc571cc",
+ "label": "CIC List",
+ "routeType": "list-500",
+ "type": "route",
+ "urlPrefix": "case"
+}
diff --git a/force-app/main/default/experiences/Consumable1/routes/cICRelatedList.json b/force-app/main/default/experiences/Consumable1/routes/cICRelatedList.json
new file mode 100644
index 0000000..cc858c4
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable1/routes/cICRelatedList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "4fd2378d-1de4-4c96-b33d-8051ad75bdf6",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "19ba552f-efed-4eb3-9b02-584625e7edd4",
+ "label": "CIC Related List",
+ "routeType": "relatedlist-500",
+ "type": "route",
+ "urlPrefix": "case"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/cIC\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/cIC\343\203\252\343\202\271\343\203\210.json"
index 9a31935..35ce6f6 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/cIC\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/cIC\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "708367ab-41a2-4633-a93a-1a54141f1f48",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "2af4afc3-d788-47c6-8467-a08f67296437",
- "label": "CIC 銉偣銉�",
- "routeType": "list-500",
- "type": "route",
- "urlPrefix": "case"
+ "activeViewId": "708367ab-41a2-4633-a93a-1a54141f1f48",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "2af4afc3-d788-47c6-8467-a08f67296437",
+ "label": "CIC 銉偣銉�",
+ "routeType": "list-500",
+ "type": "route",
+ "urlPrefix": "case"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index e666e76..0f5b8ae 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "23a3c897-7fcb-41da-8cff-7a8e8c2450a7",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "fb63da32-f68a-4674-89bb-f31fade86338",
- "label": "CIC 闁㈤�c儶銈广儓",
- "routeType": "relatedlist-500",
- "type": "route",
- "urlPrefix": "case"
+ "activeViewId": "23a3c897-7fcb-41da-8cff-7a8e8c2450a7",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "fb63da32-f68a-4674-89bb-f31fade86338",
+ "label": "CIC 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-500",
+ "type": "route",
+ "urlPrefix": "case"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/campaignList.json b/force-app/main/default/experiences/Consumable1/routes/campaignList.json
index 20645b4..36ae057 100644
--- a/force-app/main/default/experiences/Consumable1/routes/campaignList.json
+++ b/force-app/main/default/experiences/Consumable1/routes/campaignList.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "f83414cc-cd96-4d24-94d6-1d6fdad65b83",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "cccb42f4-95dd-426f-a700-cbe4c839764c",
- "label": "Campaign List",
- "routeType": "list-701",
- "type": "route",
- "urlPrefix": "campaign"
+ "activeViewId": "f83414cc-cd96-4d24-94d6-1d6fdad65b83",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "cccb42f4-95dd-426f-a700-cbe4c839764c",
+ "label": "Campaign List",
+ "routeType": "list-701",
+ "type": "route",
+ "urlPrefix": "campaign"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/caseDetail.json b/force-app/main/default/experiences/Consumable1/routes/caseDetail.json
index 5f67153..1346f28 100644
--- a/force-app/main/default/experiences/Consumable1/routes/caseDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/caseDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "3b1b2646-af41-43d3-a519-528aa49f45f4",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "4601c961-03a6-4646-9c14-5db8084e379a",
- "label": "Case Detail",
- "routeType": "detail-500",
- "type": "route",
- "urlPrefix": "case"
+ "activeViewId": "3b1b2646-af41-43d3-a519-528aa49f45f4",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "4601c961-03a6-4646-9c14-5db8084e379a",
+ "label": "Case Detail",
+ "routeType": "detail-500",
+ "type": "route",
+ "urlPrefix": "case"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/checkPassword.json b/force-app/main/default/experiences/Consumable1/routes/checkPassword.json
index f6890fa..f37e971 100644
--- a/force-app/main/default/experiences/Consumable1/routes/checkPassword.json
+++ b/force-app/main/default/experiences/Consumable1/routes/checkPassword.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "82d3f50a-42f2-4aa2-b028-7b07d878cd63",
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "id": "86273d15-52e6-4761-b84b-fd899e3def47",
- "label": "Check Password",
- "routeType": "check-password",
- "type": "route",
- "urlPrefix": "CheckPasswordResetEmail"
+ "activeViewId": "82d3f50a-42f2-4aa2-b028-7b07d878cd63",
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "id": "86273d15-52e6-4761-b84b-fd899e3def47",
+ "label": "Check Password",
+ "routeType": "check-password",
+ "type": "route",
+ "urlPrefix": "CheckPasswordResetEmail"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/contactSupport.json b/force-app/main/default/experiences/Consumable1/routes/contactSupport.json
index 41670a8..f733ee4 100644
--- a/force-app/main/default/experiences/Consumable1/routes/contactSupport.json
+++ b/force-app/main/default/experiences/Consumable1/routes/contactSupport.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "e8279a27-ff8f-42fc-9bd1-53b3f59350ab",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "1237083a-e1c5-44da-a3c1-cb1d6c3f762b",
- "label": "Contact Support",
- "pageAccess": "UseParent",
- "routeType": "contactsupport",
- "type": "route",
- "urlPrefix": "contactsupport"
+ "activeViewId": "e8279a27-ff8f-42fc-9bd1-53b3f59350ab",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "1237083a-e1c5-44da-a3c1-cb1d6c3f762b",
+ "label": "Contact Support",
+ "pageAccess": "UseParent",
+ "routeType": "contactsupport",
+ "type": "route",
+ "urlPrefix": "contactsupport"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/createRecord.json b/force-app/main/default/experiences/Consumable1/routes/createRecord.json
index db0e4a0..8bd48bb 100644
--- a/force-app/main/default/experiences/Consumable1/routes/createRecord.json
+++ b/force-app/main/default/experiences/Consumable1/routes/createRecord.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "0f63dfba-f74b-4011-a0d5-75fe665d7bfb",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "ea1db874-7a52-4702-afc8-f7d4b8dbae5c",
- "label": "Create Record",
- "routeType": "createrecord",
- "type": "route",
- "urlPrefix": "createrecord"
+ "activeViewId": "0f63dfba-f74b-4011-a0d5-75fe665d7bfb",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "ea1db874-7a52-4702-afc8-f7d4b8dbae5c",
+ "label": "Create Record",
+ "routeType": "createrecord",
+ "type": "route",
+ "urlPrefix": "createrecord"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/dashboardDetail.json b/force-app/main/default/experiences/Consumable1/routes/dashboardDetail.json
index cf9c100..fd5933a 100644
--- a/force-app/main/default/experiences/Consumable1/routes/dashboardDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/dashboardDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "4544a0e2-5ddb-49d0-b154-3903b3e7fb68",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "7f941e81-8998-459a-a76b-93f5807e3db7",
- "label": "Dashboard Detail",
- "routeType": "detail-01Z",
- "type": "route",
- "urlPrefix": "dashboard"
+ "activeViewId": "4544a0e2-5ddb-49d0-b154-3903b3e7fb68",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "7f941e81-8998-459a-a76b-93f5807e3db7",
+ "label": "Dashboard Detail",
+ "routeType": "detail-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/dashboardList.json b/force-app/main/default/experiences/Consumable1/routes/dashboardList.json
index 23d2298..59bac28 100644
--- a/force-app/main/default/experiences/Consumable1/routes/dashboardList.json
+++ b/force-app/main/default/experiences/Consumable1/routes/dashboardList.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "f10a3529-b77e-4ebc-9b99-281160c97c7f",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "57493307-536a-4ebe-84db-00112d5e0e8d",
- "label": "Dashboard List",
- "routeType": "list-01Z",
- "type": "route",
- "urlPrefix": "dashboard"
+ "activeViewId": "f10a3529-b77e-4ebc-9b99-281160c97c7f",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "57493307-536a-4ebe-84db-00112d5e0e8d",
+ "label": "Dashboard List",
+ "routeType": "list-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/error.json b/force-app/main/default/experiences/Consumable1/routes/error.json
index fda5710..7c6cc60 100644
--- a/force-app/main/default/experiences/Consumable1/routes/error.json
+++ b/force-app/main/default/experiences/Consumable1/routes/error.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "f02c5a75-f64e-4716-b209-f9f1ef46d49a",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "2d27ac00-e60f-444a-8627-23c58e43d9ad",
- "label": "Error",
- "pageAccess": "UseParent",
- "routeType": "error",
- "type": "route",
- "urlPrefix": "error"
+ "activeViewId": "f02c5a75-f64e-4716-b209-f9f1ef46d49a",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "2d27ac00-e60f-444a-8627-23c58e43d9ad",
+ "label": "Error",
+ "pageAccess": "UseParent",
+ "routeType": "error",
+ "type": "route",
+ "urlPrefix": "error"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/feedDetail.json b/force-app/main/default/experiences/Consumable1/routes/feedDetail.json
index ab6cfd6..087e15f 100644
--- a/force-app/main/default/experiences/Consumable1/routes/feedDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/feedDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "eb28719b-06b5-4397-bf8d-667ec408ca46",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "cfc32bfb-64dc-442c-9c4a-ed8a75b0b9cc",
- "label": "Feed Detail",
- "routeType": "feeditem-generic",
- "type": "route",
- "urlPrefix": "feed"
+ "activeViewId": "eb28719b-06b5-4397-bf8d-667ec408ca46",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "cfc32bfb-64dc-442c-9c4a-ed8a75b0b9cc",
+ "label": "Feed Detail",
+ "routeType": "feeditem-generic",
+ "type": "route",
+ "urlPrefix": "feed"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/fileDetail.json b/force-app/main/default/experiences/Consumable1/routes/fileDetail.json
index d3e7116..067a5e4 100644
--- a/force-app/main/default/experiences/Consumable1/routes/fileDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/fileDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "2322115a-ac65-4862-9104-912d42fca69a",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "b99c3313-97ee-4e8e-88e7-3156a4d86e82",
- "label": "File Detail",
- "routeType": "detail-069",
- "type": "route",
- "urlPrefix": "contentdocument"
+ "activeViewId": "2322115a-ac65-4862-9104-912d42fca69a",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "b99c3313-97ee-4e8e-88e7-3156a4d86e82",
+ "label": "File Detail",
+ "routeType": "detail-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/fileList.json b/force-app/main/default/experiences/Consumable1/routes/fileList.json
index 6936c93..77a55ee 100644
--- a/force-app/main/default/experiences/Consumable1/routes/fileList.json
+++ b/force-app/main/default/experiences/Consumable1/routes/fileList.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "193807a6-e99f-4075-9811-62dda5b13d43",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "b891df7c-7ecf-4a9c-92d4-8bb6107eb215",
- "label": "File List",
- "routeType": "list-069",
- "type": "route",
- "urlPrefix": "contentdocument"
+ "activeViewId": "193807a6-e99f-4075-9811-62dda5b13d43",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "b891df7c-7ecf-4a9c-92d4-8bb6107eb215",
+ "label": "File List",
+ "routeType": "list-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/flow.json b/force-app/main/default/experiences/Consumable1/routes/flow.json
index 7979ff6..4a8d937 100644
--- a/force-app/main/default/experiences/Consumable1/routes/flow.json
+++ b/force-app/main/default/experiences/Consumable1/routes/flow.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "4aa9507c-1470-43b3-8000-390325f6bd7d",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "c8358de2-e646-44de-b2da-2424e96bea67",
- "label": "Flow",
- "pageAccess": "UseParent",
- "routeType": "flow",
- "type": "route",
- "urlPrefix": "flow"
+ "activeViewId": "4aa9507c-1470-43b3-8000-390325f6bd7d",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "c8358de2-e646-44de-b2da-2424e96bea67",
+ "label": "Flow",
+ "pageAccess": "UseParent",
+ "routeType": "flow",
+ "type": "route",
+ "urlPrefix": "flow"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/forgotPassword.json b/force-app/main/default/experiences/Consumable1/routes/forgotPassword.json
index c88088f..7b3081b 100644
--- a/force-app/main/default/experiences/Consumable1/routes/forgotPassword.json
+++ b/force-app/main/default/experiences/Consumable1/routes/forgotPassword.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "eac49d21-4e4d-4e8e-997e-42dfce021ff4",
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "id": "543c3ca6-a340-46d3-a25b-82ce3864cf02",
- "label": "Forgot Password",
- "routeType": "forgot-password",
- "type": "route",
- "urlPrefix": "ForgotPassword"
+ "activeViewId": "eac49d21-4e4d-4e8e-997e-42dfce021ff4",
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "id": "543c3ca6-a340-46d3-a25b-82ce3864cf02",
+ "label": "Forgot Password",
+ "routeType": "forgot-password",
+ "type": "route",
+ "urlPrefix": "ForgotPassword"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/groupDetail.json b/force-app/main/default/experiences/Consumable1/routes/groupDetail.json
index 32cc6d5..3fd159e 100644
--- a/force-app/main/default/experiences/Consumable1/routes/groupDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/groupDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "7b772cb6-1146-4bb7-8567-853ebfe7bb2c",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "ddfb3b5d-5ba5-4152-8103-754658eba70b",
- "label": "Group Detail",
- "routeType": "detail-0F9",
- "type": "route",
- "urlPrefix": "group"
+ "activeViewId": "7b772cb6-1146-4bb7-8567-853ebfe7bb2c",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "ddfb3b5d-5ba5-4152-8103-754658eba70b",
+ "label": "Group Detail",
+ "routeType": "detail-0F9",
+ "type": "route",
+ "urlPrefix": "group"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/groupList.json b/force-app/main/default/experiences/Consumable1/routes/groupList.json
index 9e3720a..654b69a 100644
--- a/force-app/main/default/experiences/Consumable1/routes/groupList.json
+++ b/force-app/main/default/experiences/Consumable1/routes/groupList.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "949c0ee3-6484-4ed7-a44f-aa417cec1835",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "34a31fa2-0d70-4d03-a4bd-d962306cb8e4",
- "label": "Group List",
- "routeType": "list-0F9",
- "type": "route",
- "urlPrefix": "group"
+ "activeViewId": "949c0ee3-6484-4ed7-a44f-aa417cec1835",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "34a31fa2-0d70-4d03-a4bd-d962306cb8e4",
+ "label": "Group List",
+ "routeType": "list-0F9",
+ "type": "route",
+ "urlPrefix": "group"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/home.json b/force-app/main/default/experiences/Consumable1/routes/home.json
index 44f93ca..309fa46 100644
--- a/force-app/main/default/experiences/Consumable1/routes/home.json
+++ b/force-app/main/default/experiences/Consumable1/routes/home.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "0b3166bc-2eec-43fa-8adf-532f629e9392",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "8e6532c1-df5e-4843-af7f-e01178398907",
- "label": "Home",
- "pageAccess": "UseParent",
- "routeType": "home",
- "type": "route",
- "urlPrefix": ""
+ "activeViewId": "0b3166bc-2eec-43fa-8adf-532f629e9392",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "8e6532c1-df5e-4843-af7f-e01178398907",
+ "label": "Home",
+ "pageAccess": "UseParent",
+ "routeType": "home",
+ "type": "route",
+ "urlPrefix": ""
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexAgencyInfo.json b/force-app/main/default/experiences/Consumable1/routes/lexAgencyInfo.json
index 6867f82..0138440 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexAgencyInfo.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexAgencyInfo.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "376ad65a-00b6-4198-aa04-19a6360969bc",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "5e5ad0fe-6812-4fd0-9c56-bfce5822bf96",
- "label": "LexAgencyInfo",
- "pageAccess": "UseParent",
- "routeType": "custom-lexagencyinfo",
- "type": "route",
- "urlPrefix": "lexagencyinfo"
+ "activeViewId": "376ad65a-00b6-4198-aa04-19a6360969bc",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "5e5ad0fe-6812-4fd0-9c56-bfce5822bf96",
+ "label": "LexAgencyInfo",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexagencyinfo",
+ "type": "route",
+ "urlPrefix": "lexagencyinfo"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexArriveGoods.json b/force-app/main/default/experiences/Consumable1/routes/lexArriveGoods.json
index acda2d1..b54832c 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexArriveGoods.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexArriveGoods.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "ec872079-c8a8-4c21-a0f2-84a95d4a93e5",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "cbb28431-553a-49de-8f9d-0d297c0dd897",
- "label": "LexArriveGoods",
- "pageAccess": "UseParent",
- "routeType": "custom-lexarrivegoods",
- "type": "route",
- "urlPrefix": "lexarrivegoods"
+ "activeViewId": "ec872079-c8a8-4c21-a0f2-84a95d4a93e5",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "cbb28431-553a-49de-8f9d-0d297c0dd897",
+ "label": "LexArriveGoods",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexarrivegoods",
+ "type": "route",
+ "urlPrefix": "lexarrivegoods"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexArriveGoodsMain.json b/force-app/main/default/experiences/Consumable1/routes/lexArriveGoodsMain.json
index ca4489f..4e761fd 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexArriveGoodsMain.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexArriveGoodsMain.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "f46aba62-01c3-4a20-93c6-f9b2362717e6",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "372e3324-9c48-41ca-8e6d-4b349f076f65",
- "label": "LexArriveGoodsMain",
- "pageAccess": "UseParent",
- "routeType": "custom-lexarrivegoodsmain",
- "type": "route",
- "urlPrefix": "lexarrivegoodsmain"
+ "activeViewId": "f46aba62-01c3-4a20-93c6-f9b2362717e6",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "372e3324-9c48-41ca-8e6d-4b349f076f65",
+ "label": "LexArriveGoodsMain",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexarrivegoodsmain",
+ "type": "route",
+ "urlPrefix": "lexarrivegoodsmain"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexArriveGsDetails.json b/force-app/main/default/experiences/Consumable1/routes/lexArriveGsDetails.json
index e2153d7..4f32d94 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexArriveGsDetails.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexArriveGsDetails.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "91695311-fdcc-4e42-87ca-c97cfd56a2b0",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "c7a297cc-a883-4507-b04c-965b15d7d470",
- "label": "LexArriveGsDetails",
- "pageAccess": "UseParent",
- "routeType": "custom-lexarrivegsdetails",
- "type": "route",
- "urlPrefix": "lexarrivegsdetails"
+ "activeViewId": "91695311-fdcc-4e42-87ca-c97cfd56a2b0",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "c7a297cc-a883-4507-b04c-965b15d7d470",
+ "label": "LexArriveGsDetails",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexarrivegsdetails",
+ "type": "route",
+ "urlPrefix": "lexarrivegsdetails"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexCancelRemoveBox.json b/force-app/main/default/experiences/Consumable1/routes/lexCancelRemoveBox.json
index c627566..9ef4e08 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexCancelRemoveBox.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexCancelRemoveBox.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "5fd84b73-2065-46d3-b121-2f8a77b76a3a",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "3289956a-758b-4222-898c-604d006a99fe",
- "label": "LexCancelRemoveBox",
- "pageAccess": "UseParent",
- "routeType": "custom-lexcancelremovebox",
- "type": "route",
- "urlPrefix": "lexcancelremovebox"
+ "activeViewId": "5fd84b73-2065-46d3-b121-2f8a77b76a3a",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "3289956a-758b-4222-898c-604d006a99fe",
+ "label": "LexCancelRemoveBox",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexcancelremovebox",
+ "type": "route",
+ "urlPrefix": "lexcancelremovebox"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexConInvoiceView.json b/force-app/main/default/experiences/Consumable1/routes/lexConInvoiceView.json
index b003312..9a1dd64 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexConInvoiceView.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexConInvoiceView.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "4bbfb3d2-f8f2-4b23-b5cf-711d448a2b51",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "40788493-ac31-4a30-b873-956597a23a37",
- "label": "LexConInvoiceView",
- "pageAccess": "UseParent",
- "routeType": "custom-lexconinvoiceview",
- "type": "route",
- "urlPrefix": "lexconinvoiceview"
+ "activeViewId": "4bbfb3d2-f8f2-4b23-b5cf-711d448a2b51",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "40788493-ac31-4a30-b873-956597a23a37",
+ "label": "LexConInvoiceView",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconinvoiceview",
+ "type": "route",
+ "urlPrefix": "lexconinvoiceview"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexConsumable.json b/force-app/main/default/experiences/Consumable1/routes/lexConsumable.json
index 2016e5b..0444543 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexConsumable.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexConsumable.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "756785e1-4fb5-4ab3-b38a-58ea679a4361",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "0460cf80-25a2-4785-acb9-587a66def46e",
- "label": "LexConsumable",
- "pageAccess": "UseParent",
- "routeType": "custom-lexconsumable",
- "type": "route",
- "urlPrefix": "lexconsumable"
+ "activeViewId": "756785e1-4fb5-4ab3-b38a-58ea679a4361",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "0460cf80-25a2-4785-acb9-587a66def46e",
+ "label": "LexConsumable",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconsumable",
+ "type": "route",
+ "urlPrefix": "lexconsumable"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexConsumableAccount.json b/force-app/main/default/experiences/Consumable1/routes/lexConsumableAccount.json
index 888bfec..9c4ff72 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexConsumableAccount.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexConsumableAccount.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "65a5c9a4-0cc9-4b00-872b-b90bc1e47411",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "7db2303f-7e83-4c85-a7ad-12fa6672974b",
- "label": "LexConsumableAccount",
- "pageAccess": "UseParent",
- "routeType": "custom-lexconsumableaccount",
- "type": "route",
- "urlPrefix": "lexconsumableaccount"
+ "activeViewId": "65a5c9a4-0cc9-4b00-872b-b90bc1e47411",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "7db2303f-7e83-4c85-a7ad-12fa6672974b",
+ "label": "LexConsumableAccount",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconsumableaccount",
+ "type": "route",
+ "urlPrefix": "lexconsumableaccount"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexConsumableAccountInfoPrint.json b/force-app/main/default/experiences/Consumable1/routes/lexConsumableAccountInfoPrint.json
index dd5eb0b..93a0332 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexConsumableAccountInfoPrint.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexConsumableAccountInfoPrint.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "5d615179-dd62-4481-a874-de16a69d7374",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "82091f6c-517f-4ee0-8ad2-8958cf953804",
- "label": "LexConsumableAccountInfoPrint",
- "pageAccess": "UseParent",
- "routeType": "custom-lexconsumableaccountinfoprint",
- "type": "route",
- "urlPrefix": "lexconsumableaccountinfoprint"
+ "activeViewId": "5d615179-dd62-4481-a874-de16a69d7374",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "82091f6c-517f-4ee0-8ad2-8958cf953804",
+ "label": "LexConsumableAccountInfoPrint",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconsumableaccountinfoprint",
+ "type": "route",
+ "urlPrefix": "lexconsumableaccountinfoprint"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexConsumableOrderManage.json b/force-app/main/default/experiences/Consumable1/routes/lexConsumableOrderManage.json
index 9852ab7..5f1f872 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexConsumableOrderManage.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexConsumableOrderManage.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "0c6f8778-bba4-4726-97f6-b639cce7c99e",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "17e0e204-7337-4cc3-8ae8-386f15253878",
- "label": "LexConsumableOrderManage",
- "pageAccess": "UseParent",
- "routeType": "custom-lexconsumableordermanage",
- "type": "route",
- "urlPrefix": "lexconsumableordermanage"
+ "activeViewId": "0c6f8778-bba4-4726-97f6-b639cce7c99e",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "17e0e204-7337-4cc3-8ae8-386f15253878",
+ "label": "LexConsumableOrderManage",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconsumableordermanage",
+ "type": "route",
+ "urlPrefix": "lexconsumableordermanage"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexInventory.json b/force-app/main/default/experiences/Consumable1/routes/lexInventory.json
index 80d4186..8aa4cef 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexInventory.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexInventory.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "5a24538d-0a99-40a3-a6a1-4496d0333a05",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "465ce810-60bc-45a4-92f4-8148664ee531",
- "label": "LexInventory",
- "pageAccess": "UseParent",
- "routeType": "custom-lexinventory",
- "type": "route",
- "urlPrefix": "lexinventory"
+ "activeViewId": "5a24538d-0a99-40a3-a6a1-4496d0333a05",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "465ce810-60bc-45a4-92f4-8148664ee531",
+ "label": "LexInventory",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexinventory",
+ "type": "route",
+ "urlPrefix": "lexinventory"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexInventoryView.json b/force-app/main/default/experiences/Consumable1/routes/lexInventoryView.json
index 0172bb1..2c56e0c 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexInventoryView.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexInventoryView.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "afb34dd9-404b-4bea-949d-07c42681d821",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "15de9dbd-a894-4fbc-8672-f2917c4addc5",
- "label": "LexInventoryView",
- "pageAccess": "UseParent",
- "routeType": "custom-lexinventoryview",
- "type": "route",
- "urlPrefix": "lexinventoryview"
+ "activeViewId": "afb34dd9-404b-4bea-949d-07c42681d821",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "15de9dbd-a894-4fbc-8672-f2917c4addc5",
+ "label": "LexInventoryView",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexinventoryview",
+ "type": "route",
+ "urlPrefix": "lexinventoryview"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexOutboundorderImport.json b/force-app/main/default/experiences/Consumable1/routes/lexOutboundorderImport.json
index 42544da..a49e9ea 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexOutboundorderImport.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexOutboundorderImport.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "e8224149-f1b9-4c44-8839-4d9737739c72",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "839786f7-032b-4c35-b6b3-7e5ad0de3ac3",
- "label": "LexOutboundorderImport",
- "pageAccess": "UseParent",
- "routeType": "custom-lexoutboundorderimport",
- "type": "route",
- "urlPrefix": "lexoutboundorderimport"
+ "activeViewId": "e8224149-f1b9-4c44-8839-4d9737739c72",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "839786f7-032b-4c35-b6b3-7e5ad0de3ac3",
+ "label": "LexOutboundorderImport",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexoutboundorderimport",
+ "type": "route",
+ "urlPrefix": "lexoutboundorderimport"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexOverdueStock.json b/force-app/main/default/experiences/Consumable1/routes/lexOverdueStock.json
index fefd0ed..2b7fb7d 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexOverdueStock.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexOverdueStock.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "b0f2e8e7-62fd-42f3-bf3a-4bdf40b02bf4",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "2c0812bd-c08f-4e4a-980f-360b54f841c4",
- "label": "LexOverdueStock",
- "pageAccess": "UseParent",
- "routeType": "custom-lexoverduestock",
- "type": "route",
- "urlPrefix": "lexoverduestock"
+ "activeViewId": "b0f2e8e7-62fd-42f3-bf3a-4bdf40b02bf4",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "2c0812bd-c08f-4e4a-980f-360b54f841c4",
+ "label": "LexOverdueStock",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexoverduestock",
+ "type": "route",
+ "urlPrefix": "lexoverduestock"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexProductLimitEdit.json b/force-app/main/default/experiences/Consumable1/routes/lexProductLimitEdit.json
index a6b998b..0c787a7 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexProductLimitEdit.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexProductLimitEdit.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "57a80c74-e471-4b90-b214-580f7d3b66cd",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "073ef0e9-4de6-4848-9f87-c9ddffb1e842",
- "label": "LexProductLimitEdit",
- "pageAccess": "UseParent",
- "routeType": "custom-lexproductlimitedit",
- "type": "route",
- "urlPrefix": "lexproductlimitedit"
+ "activeViewId": "57a80c74-e471-4b90-b214-580f7d3b66cd",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "073ef0e9-4de6-4848-9f87-c9ddffb1e842",
+ "label": "LexProductLimitEdit",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexproductlimitedit",
+ "type": "route",
+ "urlPrefix": "lexproductlimitedit"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexRemoveBox.json b/force-app/main/default/experiences/Consumable1/routes/lexRemoveBox.json
index 89c991d..1246488 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexRemoveBox.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexRemoveBox.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "b4a2ba1b-3827-4ec7-8f8e-5461c3893ce0",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "f7bab43e-2170-4980-9b2c-126154272cb0",
- "label": "LexRemoveBox",
- "pageAccess": "UseParent",
- "routeType": "custom-lexremovebox",
- "type": "route",
- "urlPrefix": "lexremovebox"
+ "activeViewId": "b4a2ba1b-3827-4ec7-8f8e-5461c3893ce0",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "f7bab43e-2170-4980-9b2c-126154272cb0",
+ "label": "LexRemoveBox",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexremovebox",
+ "type": "route",
+ "urlPrefix": "lexremovebox"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexSaleAndDelivery.json b/force-app/main/default/experiences/Consumable1/routes/lexSaleAndDelivery.json
index b03aeb9..4949754 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexSaleAndDelivery.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexSaleAndDelivery.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "e5d81e8f-b0a5-4bf3-b11b-08dd8fef1a3c",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "28c40941-a2fa-4f30-a790-936542b1cf84",
- "label": "LexSaleAndDelivery",
- "pageAccess": "UseParent",
- "routeType": "custom-lexsaleanddelivery",
- "type": "route",
- "urlPrefix": "lexsaleanddelivery"
+ "activeViewId": "e5d81e8f-b0a5-4bf3-b11b-08dd8fef1a3c",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "28c40941-a2fa-4f30-a790-936542b1cf84",
+ "label": "LexSaleAndDelivery",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexsaleanddelivery",
+ "type": "route",
+ "urlPrefix": "lexsaleanddelivery"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexSummonsCreat.json b/force-app/main/default/experiences/Consumable1/routes/lexSummonsCreat.json
index b2e13ed..2c563bf 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexSummonsCreat.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexSummonsCreat.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "c2e9c913-ab1c-4b38-899b-136fb95066fb",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "94af1a52-11ac-4e16-8f30-f6fe250ccd1e",
- "label": "LexSummonsCreat",
- "pageAccess": "UseParent",
- "routeType": "custom-lexsummonscreat",
- "type": "route",
- "urlPrefix": "lexsummonscreat"
+ "activeViewId": "c2e9c913-ab1c-4b38-899b-136fb95066fb",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "94af1a52-11ac-4e16-8f30-f6fe250ccd1e",
+ "label": "LexSummonsCreat",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexsummonscreat",
+ "type": "route",
+ "urlPrefix": "lexsummonscreat"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/lexTopPage.json b/force-app/main/default/experiences/Consumable1/routes/lexTopPage.json
index 83f8d05..ad5e78b 100644
--- a/force-app/main/default/experiences/Consumable1/routes/lexTopPage.json
+++ b/force-app/main/default/experiences/Consumable1/routes/lexTopPage.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "09c93676-a531-4ba7-8708-cc47f8458c90",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "855eeb08-6e57-404b-a5f6-072349535002",
- "label": "LexTopPage",
- "pageAccess": "UseParent",
- "routeType": "custom-lextoppage",
- "type": "route",
- "urlPrefix": "lextoppage"
+ "activeViewId": "09c93676-a531-4ba7-8708-cc47f8458c90",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "855eeb08-6e57-404b-a5f6-072349535002",
+ "label": "LexTopPage",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lextoppage",
+ "type": "route",
+ "urlPrefix": "lextoppage"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/login.json b/force-app/main/default/experiences/Consumable1/routes/login.json
index ffabca5..ba5b401 100644
--- a/force-app/main/default/experiences/Consumable1/routes/login.json
+++ b/force-app/main/default/experiences/Consumable1/routes/login.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "7c2dd152-d6d3-4652-bbfe-cb8e11d83c43",
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "id": "c7457673-c277-4525-81e4-00da62b21ee0",
- "label": "Login",
- "routeType": "login-home",
- "type": "route",
- "urlPrefix": ""
+ "activeViewId": "7c2dd152-d6d3-4652-bbfe-cb8e11d83c43",
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "id": "c7457673-c277-4525-81e4-00da62b21ee0",
+ "label": "Login",
+ "routeType": "login-home",
+ "type": "route",
+ "urlPrefix": ""
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/loginError.json b/force-app/main/default/experiences/Consumable1/routes/loginError.json
index da8109c..d201a01 100644
--- a/force-app/main/default/experiences/Consumable1/routes/loginError.json
+++ b/force-app/main/default/experiences/Consumable1/routes/loginError.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "ba40442c-80fc-411f-8c02-9cfce2ab1372",
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "id": "b0404c8e-8a84-4ed9-800b-93e742025cef",
- "label": "Login Error",
- "routeType": "login-error",
- "type": "route",
- "urlPrefix": "error"
+ "activeViewId": "ba40442c-80fc-411f-8c02-9cfce2ab1372",
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "id": "b0404c8e-8a84-4ed9-800b-93e742025cef",
+ "label": "Login Error",
+ "routeType": "login-error",
+ "type": "route",
+ "urlPrefix": "error"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/mDFAndCoop.json b/force-app/main/default/experiences/Consumable1/routes/mDFAndCoop.json
index 15451b0..ad15d89 100644
--- a/force-app/main/default/experiences/Consumable1/routes/mDFAndCoop.json
+++ b/force-app/main/default/experiences/Consumable1/routes/mDFAndCoop.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "b253bc1d-fe4a-4156-91f4-88f4725a3616",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "3e75febe-ff75-4d4f-841d-28dc994a1da1",
- "label": "MDF and Coop",
- "routeType": "mdf",
- "type": "route",
- "urlPrefix": "mdf"
+ "activeViewId": "b253bc1d-fe4a-4156-91f4-88f4725a3616",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "3e75febe-ff75-4d4f-841d-28dc994a1da1",
+ "label": "MDF and Coop",
+ "routeType": "mdf",
+ "type": "route",
+ "urlPrefix": "mdf"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/messages.json b/force-app/main/default/experiences/Consumable1/routes/messages.json
index 9b8635e..b48cb0c 100644
--- a/force-app/main/default/experiences/Consumable1/routes/messages.json
+++ b/force-app/main/default/experiences/Consumable1/routes/messages.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "55f1ae5d-c9ac-44ad-bb27-4c22dddc2a2e",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "93d1b5dd-fc4b-464f-b034-2321557eb837",
- "label": "Messages",
- "routeType": "messages",
- "type": "route",
- "urlPrefix": "messages"
+ "activeViewId": "55f1ae5d-c9ac-44ad-bb27-4c22dddc2a2e",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "93d1b5dd-fc4b-464f-b034-2321557eb837",
+ "label": "Messages",
+ "routeType": "messages",
+ "type": "route",
+ "urlPrefix": "messages"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/myAccount.json b/force-app/main/default/experiences/Consumable1/routes/myAccount.json
index 847fc5c..09ffe9c 100644
--- a/force-app/main/default/experiences/Consumable1/routes/myAccount.json
+++ b/force-app/main/default/experiences/Consumable1/routes/myAccount.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "2cd7a2df-9e65-4663-9e35-9b4134b4beb1",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "42a42c86-6517-4e0e-a630-be5ab221baf1",
- "label": "My Account",
- "routeType": "my-account",
- "type": "route",
- "urlPrefix": "comm-my-account"
+ "activeViewId": "2cd7a2df-9e65-4663-9e35-9b4134b4beb1",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "42a42c86-6517-4e0e-a630-be5ab221baf1",
+ "label": "My Account",
+ "routeType": "my-account",
+ "type": "route",
+ "urlPrefix": "comm-my-account"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/questionDetail.json b/force-app/main/default/experiences/Consumable1/routes/questionDetail.json
index c88a8f4..4159f6e 100644
--- a/force-app/main/default/experiences/Consumable1/routes/questionDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/questionDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "c29033d4-ea89-4311-9a8f-9b1cee010f96",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "d4e8748f-c126-4d7f-a4e8-43e4314bf361",
- "label": "Question Detail",
- "routeType": "feeditem",
- "type": "route",
- "urlPrefix": "question"
+ "activeViewId": "c29033d4-ea89-4311-9a8f-9b1cee010f96",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "d4e8748f-c126-4d7f-a4e8-43e4314bf361",
+ "label": "Question Detail",
+ "routeType": "feeditem",
+ "type": "route",
+ "urlPrefix": "question"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/quipDocsRelatedList.json b/force-app/main/default/experiences/Consumable1/routes/quipDocsRelatedList.json
index 23c707f..8f08478 100644
--- a/force-app/main/default/experiences/Consumable1/routes/quipDocsRelatedList.json
+++ b/force-app/main/default/experiences/Consumable1/routes/quipDocsRelatedList.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "be244254-9e8f-46bd-83e0-a6cdb3780540",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "12cc102d-f664-49b7-8b25-c78d7939a8ed",
- "label": "Quip Docs Related List",
- "pageAccess": "UseParent",
- "routeType": "extrelated-quip",
- "type": "route",
- "urlPrefix": "quip"
+ "activeViewId": "be244254-9e8f-46bd-83e0-a6cdb3780540",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "12cc102d-f664-49b7-8b25-c78d7939a8ed",
+ "label": "Quip Docs Related List",
+ "pageAccess": "UseParent",
+ "routeType": "extrelated-quip",
+ "type": "route",
+ "urlPrefix": "quip"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/recordDetail.json b/force-app/main/default/experiences/Consumable1/routes/recordDetail.json
index 73cdb56..ed2b362 100644
--- a/force-app/main/default/experiences/Consumable1/routes/recordDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/recordDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "d30889c1-09fc-407a-8d9d-155b305cce6f",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "63bae7d4-3412-48c3-9503-126a63811892",
- "label": "Record Detail",
- "routeType": "detail",
- "type": "route",
- "urlPrefix": "detail"
+ "activeViewId": "d30889c1-09fc-407a-8d9d-155b305cce6f",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "63bae7d4-3412-48c3-9503-126a63811892",
+ "label": "Record Detail",
+ "routeType": "detail",
+ "type": "route",
+ "urlPrefix": "detail"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/recordList.json b/force-app/main/default/experiences/Consumable1/routes/recordList.json
index 4ee4af5..dcb4e68 100644
--- a/force-app/main/default/experiences/Consumable1/routes/recordList.json
+++ b/force-app/main/default/experiences/Consumable1/routes/recordList.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "f14a9999-9077-4660-a62f-b9df05228f6c",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "b63deca7-c984-4812-9b2a-f757908981a0",
- "label": "Record List",
- "pageAccess": "UseParent",
- "routeType": "list",
- "type": "route",
- "urlPrefix": "recordlist"
+ "activeViewId": "f14a9999-9077-4660-a62f-b9df05228f6c",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "b63deca7-c984-4812-9b2a-f757908981a0",
+ "label": "Record List",
+ "pageAccess": "UseParent",
+ "routeType": "list",
+ "type": "route",
+ "urlPrefix": "recordlist"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/register.json b/force-app/main/default/experiences/Consumable1/routes/register.json
index 71ceac1..1528f81 100644
--- a/force-app/main/default/experiences/Consumable1/routes/register.json
+++ b/force-app/main/default/experiences/Consumable1/routes/register.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "7cadb098-b80c-40d4-a33c-714c36f8a2f3",
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "id": "2d8061dd-a482-4608-8514-113389805fc4",
- "label": "Register",
- "routeType": "self-register",
- "type": "route",
- "urlPrefix": "SelfRegister"
+ "activeViewId": "7cadb098-b80c-40d4-a33c-714c36f8a2f3",
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "id": "2d8061dd-a482-4608-8514-113389805fc4",
+ "label": "Register",
+ "routeType": "self-register",
+ "type": "route",
+ "urlPrefix": "SelfRegister"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/relatedRecordList.json b/force-app/main/default/experiences/Consumable1/routes/relatedRecordList.json
index d1002b9..f5ca1d8 100644
--- a/force-app/main/default/experiences/Consumable1/routes/relatedRecordList.json
+++ b/force-app/main/default/experiences/Consumable1/routes/relatedRecordList.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "2a182209-2527-4335-b672-176196ee6a0d",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "821d09c9-7732-4bb0-a002-f8fc3e825a20",
- "label": "Related Record List",
- "pageAccess": "UseParent",
- "routeType": "relatedlist",
- "type": "route",
- "urlPrefix": "relatedlist"
+ "activeViewId": "2a182209-2527-4335-b672-176196ee6a0d",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "821d09c9-7732-4bb0-a002-f8fc3e825a20",
+ "label": "Related Record List",
+ "pageAccess": "UseParent",
+ "routeType": "relatedlist",
+ "type": "route",
+ "urlPrefix": "relatedlist"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/reportBuilder.json b/force-app/main/default/experiences/Consumable1/routes/reportBuilder.json
index faf1862..fa2ddb5 100644
--- a/force-app/main/default/experiences/Consumable1/routes/reportBuilder.json
+++ b/force-app/main/default/experiences/Consumable1/routes/reportBuilder.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "059d5f4a-e616-4540-be96-a34b294fb2a4",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "20b2eb69-8eea-41f6-bef2-3a3e66f4ac0f",
- "label": "Report Builder",
- "routeType": "createreport",
- "type": "route",
- "urlPrefix": "createreport"
+ "activeViewId": "059d5f4a-e616-4540-be96-a34b294fb2a4",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "20b2eb69-8eea-41f6-bef2-3a3e66f4ac0f",
+ "label": "Report Builder",
+ "routeType": "createreport",
+ "type": "route",
+ "urlPrefix": "createreport"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/reportDetail.json b/force-app/main/default/experiences/Consumable1/routes/reportDetail.json
index cd17a33..41339bb 100644
--- a/force-app/main/default/experiences/Consumable1/routes/reportDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/reportDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "66e48eb0-9203-4842-9fde-8b4e7e63b8ac",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "fbba1bbe-83b3-4711-ab64-131ca5bf8e4e",
- "label": "Report Detail",
- "routeType": "detail-00O",
- "type": "route",
- "urlPrefix": "report"
+ "activeViewId": "66e48eb0-9203-4842-9fde-8b4e7e63b8ac",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "fbba1bbe-83b3-4711-ab64-131ca5bf8e4e",
+ "label": "Report Detail",
+ "routeType": "detail-00O",
+ "type": "route",
+ "urlPrefix": "report"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/reportList.json b/force-app/main/default/experiences/Consumable1/routes/reportList.json
index 6ec5e89..e1218e3 100644
--- a/force-app/main/default/experiences/Consumable1/routes/reportList.json
+++ b/force-app/main/default/experiences/Consumable1/routes/reportList.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "cbac51d9-cfc4-4fa7-bf92-603361ff1747",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "2f63d133-547c-46d3-ba43-4badc59db592",
- "label": "Report List",
- "routeType": "list-00O",
- "type": "route",
- "urlPrefix": "report"
+ "activeViewId": "cbac51d9-cfc4-4fa7-bf92-603361ff1747",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "2f63d133-547c-46d3-ba43-4badc59db592",
+ "label": "Report List",
+ "routeType": "list-00O",
+ "type": "route",
+ "urlPrefix": "report"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/resources.json b/force-app/main/default/experiences/Consumable1/routes/resources.json
index d4ebedb..3ce45e1 100644
--- a/force-app/main/default/experiences/Consumable1/routes/resources.json
+++ b/force-app/main/default/experiences/Consumable1/routes/resources.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "dc215254-3731-423c-ba11-3d87746598e8",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "84243d63-bbfd-4642-8fc2-923d714ca322",
- "label": "Resources",
- "pageAccess": "UseParent",
- "routeType": "files",
- "type": "route",
- "urlPrefix": "files"
+ "activeViewId": "dc215254-3731-423c-ba11-3d87746598e8",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "84243d63-bbfd-4642-8fc2-923d714ca322",
+ "label": "Resources",
+ "pageAccess": "UseParent",
+ "routeType": "files",
+ "type": "route",
+ "urlPrefix": "files"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/search.json b/force-app/main/default/experiences/Consumable1/routes/search.json
index 34b0cd5..4e04c14 100644
--- a/force-app/main/default/experiences/Consumable1/routes/search.json
+++ b/force-app/main/default/experiences/Consumable1/routes/search.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "74aeae6d-8d40-433e-8168-45175ee356a6",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "a891eb3e-9e90-410a-9016-65f1ad0dc887",
- "label": "Search",
- "pageAccess": "UseParent",
- "routeType": "global-search",
- "type": "route",
- "urlPrefix": "global-search"
+ "activeViewId": "74aeae6d-8d40-433e-8168-45175ee356a6",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "a891eb3e-9e90-410a-9016-65f1ad0dc887",
+ "label": "Search",
+ "pageAccess": "UseParent",
+ "routeType": "global-search",
+ "type": "route",
+ "urlPrefix": "global-search"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/streamDetail.json b/force-app/main/default/experiences/Consumable1/routes/streamDetail.json
index a0904ff..72dd66d 100644
--- a/force-app/main/default/experiences/Consumable1/routes/streamDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/streamDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "e3ef5ec3-0aba-44b3-b608-6f939cf49c88",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "363f8c18-dff6-46a3-91c7-f574cc32b412",
- "label": "Stream Detail",
- "routeType": "detail-0Fq",
- "type": "route",
- "urlPrefix": "streams"
+ "activeViewId": "e3ef5ec3-0aba-44b3-b608-6f939cf49c88",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "363f8c18-dff6-46a3-91c7-f574cc32b412",
+ "label": "Stream Detail",
+ "routeType": "detail-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/streamList.json b/force-app/main/default/experiences/Consumable1/routes/streamList.json
index aae8e1d..6b9571b 100644
--- a/force-app/main/default/experiences/Consumable1/routes/streamList.json
+++ b/force-app/main/default/experiences/Consumable1/routes/streamList.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "e1275716-f06a-4a27-a667-19c49eefb083",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "fa6fe95d-1642-4d25-8690-9b9a1504e9a0",
- "label": "Stream List",
- "routeType": "list-0Fq",
- "type": "route",
- "urlPrefix": "streams"
+ "activeViewId": "e1275716-f06a-4a27-a667-19c49eefb083",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "fa6fe95d-1642-4d25-8690-9b9a1504e9a0",
+ "label": "Stream List",
+ "routeType": "list-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/topicCatalog.json b/force-app/main/default/experiences/Consumable1/routes/topicCatalog.json
index f041210..7aad2ca 100644
--- a/force-app/main/default/experiences/Consumable1/routes/topicCatalog.json
+++ b/force-app/main/default/experiences/Consumable1/routes/topicCatalog.json
@@ -1,10 +1,10 @@
{
- "activeViewId": "3912430c-3c10-4bf3-bf37-5a619a596491",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "ecc9aeb9-aacd-4c2a-ab2e-e2e1befce726",
- "label": "Topic Catalog",
- "pageAccess": "UseParent",
- "routeType": "topic-catalog",
- "type": "route",
- "urlPrefix": "topiccatalog"
+ "activeViewId": "3912430c-3c10-4bf3-bf37-5a619a596491",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "ecc9aeb9-aacd-4c2a-ab2e-e2e1befce726",
+ "label": "Topic Catalog",
+ "pageAccess": "UseParent",
+ "routeType": "topic-catalog",
+ "type": "route",
+ "urlPrefix": "topiccatalog"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/topicDetail.json b/force-app/main/default/experiences/Consumable1/routes/topicDetail.json
index 7c1aa7e..b724f27 100644
--- a/force-app/main/default/experiences/Consumable1/routes/topicDetail.json
+++ b/force-app/main/default/experiences/Consumable1/routes/topicDetail.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "060ff5da-04b3-49de-8fb8-03decd8c188c",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "8a6adaa6-3a66-4924-aae5-ea1120239b86",
- "label": "Topic Detail",
- "routeType": "topic",
- "type": "route",
- "urlPrefix": "topic"
+ "activeViewId": "060ff5da-04b3-49de-8fb8-03decd8c188c",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "8a6adaa6-3a66-4924-aae5-ea1120239b86",
+ "label": "Topic Detail",
+ "routeType": "topic",
+ "type": "route",
+ "urlPrefix": "topic"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/userProfile.json b/force-app/main/default/experiences/Consumable1/routes/userProfile.json
index bbab40b..a228e34 100644
--- a/force-app/main/default/experiences/Consumable1/routes/userProfile.json
+++ b/force-app/main/default/experiences/Consumable1/routes/userProfile.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "b3764d11-d26d-4554-8747-e7f30fb722bd",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "a611aa58-e18f-4242-882d-e91bc8977624",
- "label": "User Profile",
- "routeType": "detail-005",
- "type": "route",
- "urlPrefix": "profile"
+ "activeViewId": "b3764d11-d26d-4554-8747-e7f30fb722bd",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "a611aa58-e18f-4242-882d-e91bc8977624",
+ "label": "User Profile",
+ "routeType": "detail-005",
+ "type": "route",
+ "urlPrefix": "profile"
}
diff --git a/force-app/main/default/experiences/Consumable1/routes/userSettings.json b/force-app/main/default/experiences/Consumable1/routes/userSettings.json
index 4a75f07..53f6d3a 100644
--- a/force-app/main/default/experiences/Consumable1/routes/userSettings.json
+++ b/force-app/main/default/experiences/Consumable1/routes/userSettings.json
@@ -1,9 +1,9 @@
{
- "activeViewId": "8225f2be-2536-4868-afe9-ed11e1c1eb15",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "cf47d325-829c-4ce7-a2b3-2440777f63c4",
- "label": "User Settings",
- "routeType": "usersettings",
- "type": "route",
- "urlPrefix": "settings"
+ "activeViewId": "8225f2be-2536-4868-afe9-ed11e1c1eb15",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "cf47d325-829c-4ce7-a2b3-2440777f63c4",
+ "label": "User Settings",
+ "routeType": "usersettings",
+ "type": "route",
+ "urlPrefix": "settings"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\344\273\252\350\241\250\346\235\277RelatedList.json" "b/force-app/main/default/experiences/Consumable1/routes/\344\273\252\350\241\250\346\235\277RelatedList.json"
new file mode 100644
index 0000000..d57b3b1
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\344\273\252\350\241\250\346\235\277RelatedList.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "9c09c70e-209c-4ed4-baa3-8dad00a95381",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "82e3cba0-cdd4-4ad2-906a-876165298af5",
+ "label": "浠〃鏉� Related List",
+ "routeType": "relatedlist-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 6c98e23..a0da898 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "97ed2657-7949-4aed-9e5d-cae9c935f730",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "81c4ebfb-629e-4689-9783-133bf5187a7e",
- "label": "浠〃鏉� 闁㈤�c儶銈广儓",
- "routeType": "relatedlist-01Z",
- "type": "route",
- "urlPrefix": "dashboard"
+ "activeViewId": "97ed2657-7949-4aed-9e5d-cae9c935f730",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "81c4ebfb-629e-4689-9783-133bf5187a7e",
+ "label": "浠〃鏉� 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255Detail.json" "b/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255Detail.json"
new file mode 100644
index 0000000..b9f839e
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255Detail.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "d1ab2f20-ffeb-42ab-a74f-01c71e2d5e74",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "c195be57-9964-40c2-b12d-2836bd580514",
+ "label": "瀛︿細銉诲煿璁� Detail",
+ "routeType": "detail-701",
+ "type": "route",
+ "urlPrefix": "campaign"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255RelatedList.json" "b/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255RelatedList.json"
new file mode 100644
index 0000000..db139e6
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255RelatedList.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "0a522fab-0926-4aef-aed4-a88ce0f77c0d",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "c70d2e31-c9f1-47f2-b4c2-9d5a4c45d6ed",
+ "label": "瀛︿細銉诲煿璁� Related List",
+ "routeType": "relatedlist-701",
+ "type": "route",
+ "urlPrefix": "campaign"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json" "b/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
index e5db28e..d6a0f98 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "0ad6b8ab-53a5-4a50-a8e4-2cb763631aab",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "dee92b99-6db0-49ba-81bc-f626f65eb503",
- "label": "瀛︿細銉诲煿璁� 瑭崇窗",
- "routeType": "detail-701",
- "type": "route",
- "urlPrefix": "campaign"
+ "activeViewId": "0ad6b8ab-53a5-4a50-a8e4-2cb763631aab",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "dee92b99-6db0-49ba-81bc-f626f65eb503",
+ "label": "瀛︿細銉诲煿璁� 瑭崇窗",
+ "routeType": "detail-701",
+ "type": "route",
+ "urlPrefix": "campaign"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 5ab9aab..871af59 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "4cf18bf4-7c54-4746-b895-ec877e8fcd43",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "663d23a2-f828-41e4-b9eb-d9c9dfaceb4d",
- "label": "瀛︿細銉诲煿璁� 闁㈤�c儶銈广儓",
- "routeType": "relatedlist-701",
- "type": "route",
- "urlPrefix": "campaign"
+ "activeViewId": "4cf18bf4-7c54-4746-b895-ec877e8fcd43",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "663d23a2-f828-41e4-b9eb-d9c9dfaceb4d",
+ "label": "瀛︿細銉诲煿璁� 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-701",
+ "type": "route",
+ "urlPrefix": "campaign"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\345\260\217\347\273\204RelatedList.json" "b/force-app/main/default/experiences/Consumable1/routes/\345\260\217\347\273\204RelatedList.json"
new file mode 100644
index 0000000..062f7e3
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\345\260\217\347\273\204RelatedList.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "95256c4b-4f81-4779-9782-9c1f067a3c0e",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "ab778236-0b8e-42eb-9411-92f52aac464b",
+ "label": "灏忕粍 Related List",
+ "routeType": "relatedlist-0F9",
+ "type": "route",
+ "urlPrefix": "group"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index ccc9df9..87a468f 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "6c787120-bb1e-4d47-b4b2-7fa80ac6d3fb",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "62e1b94d-3ec3-4306-856c-75c669288587",
- "label": "灏忕粍 闁㈤�c儶銈广儓",
- "routeType": "relatedlist-0F9",
- "type": "route",
- "urlPrefix": "group"
+ "activeViewId": "6c787120-bb1e-4d47-b4b2-7fa80ac6d3fb",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "62e1b94d-3ec3-4306-856c-75c669288587",
+ "label": "灏忕粍 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-0F9",
+ "type": "route",
+ "urlPrefix": "group"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\345\272\223\345\255\230.json" "b/force-app/main/default/experiences/Consumable1/routes/\345\272\223\345\255\230.json"
new file mode 100644
index 0000000..775c189
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\345\272\223\345\255\230.json"
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "a6d83607-a4bc-4c64-872a-a4d28a96575d",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "c1a73a85-86b9-4710-84c6-1abb2ff21cf6",
+ "label": "搴撳瓨",
+ "pageAccess": "UseParent",
+ "routeType": "custom-inventory-view",
+ "type": "route",
+ "urlPrefix": "lexInventoryView"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\345\272\223\345\255\230\344\270\212\344\270\213\351\231\220\347\274\226\350\276\221.json" "b/force-app/main/default/experiences/Consumable1/routes/\345\272\223\345\255\230\344\270\212\344\270\213\351\231\220\347\274\226\350\276\221.json"
new file mode 100644
index 0000000..9557ad0
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\345\272\223\345\255\230\344\270\212\344\270\213\351\231\220\347\274\226\350\276\221.json"
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "36bed1a3-91cc-436d-b1f6-398b8082f724",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "ad332521-8c7d-4288-9941-a7d0ebe44a9b",
+ "label": "搴撳瓨涓婁笅闄愮紪杈�",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lex-product-limit-edit",
+ "type": "route",
+ "urlPrefix": "LexProductLimitEdit"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\212\245\350\241\250RelatedList.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\212\245\350\241\250RelatedList.json"
new file mode 100644
index 0000000..de6e9b7
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\212\245\350\241\250RelatedList.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "aa256afb-6656-4526-834f-3706e4a15bca",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "e2c13a29-0674-4854-8390-9a3e3df1b1ea",
+ "label": "鎶ヨ〃 Related List",
+ "routeType": "relatedlist-00O",
+ "type": "route",
+ "urlPrefix": "report"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 5a543d2..8fba2ff 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "4dff72f1-db87-40bc-a8d6-36073e365a18",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "30959f3b-57e5-4a9f-b58c-7c1a9aaf9836",
- "label": "鎶ヨ〃 闁㈤�c儶銈广儓",
- "routeType": "relatedlist-00O",
- "type": "route",
- "urlPrefix": "report"
+ "activeViewId": "4dff72f1-db87-40bc-a8d6-36073e365a18",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "30959f3b-57e5-4a9f-b58c-7c1a9aaf9836",
+ "label": "鎶ヨ〃 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-00O",
+ "type": "route",
+ "urlPrefix": "report"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\226\207\344\273\266RelatedList.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\226\207\344\273\266RelatedList.json"
new file mode 100644
index 0000000..24c9ea1
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\226\207\344\273\266RelatedList.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "74713a2e-dcbc-464b-a87a-d1231dc118a2",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "a6a5ab12-e9b1-4fc0-9fdf-a9142ef22669",
+ "label": "鏂囦欢 Related List",
+ "routeType": "relatedlist-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 614e7d5..489577d 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "3d5f9dc6-9374-4d60-8e41-d9ae76e732e3",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "629ebafc-04f3-4bfa-bc42-e7c310c2a59f",
- "label": "鏂囦欢 闁㈤�c儶銈广儓",
- "routeType": "relatedlist-069",
- "type": "route",
- "urlPrefix": "contentdocument"
+ "activeViewId": "3d5f9dc6-9374-4d60-8e41-d9ae76e732e3",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "629ebafc-04f3-4bfa-bc42-e7c310c2a59f",
+ "label": "鏂囦欢 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\226\260\345\273\272\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\226\260\345\273\272\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225.json"
new file mode 100644
index 0000000..a293c29
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\226\260\345\273\272\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225.json"
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "375bc286-f467-4c6c-a3e1-be4bfbf27bea",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "bd66f475-4bea-4c64-a6c4-8ed16d217742",
+ "label": "鏂板缓娑堣�楀搧璁㈠崟",
+ "pageAccess": "UseParent",
+ "routeType": "custom-neworder",
+ "type": "route",
+ "urlPrefix": "neworder"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\265\201RelatedList.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\265\201RelatedList.json"
new file mode 100644
index 0000000..f254d1e
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\265\201RelatedList.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "e37f28a6-0d81-44ac-ab4d-5afbb6f43b64",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "874d9b00-d231-438c-b842-5e78d01ac371",
+ "label": "娴� Related List",
+ "routeType": "relatedlist-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 11b3253..424c871 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "cd0d3153-1cca-4111-ae2a-08454a8fe698",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "e46a24a8-7707-472e-8bb4-daae7c059165",
- "label": "娴� 闁㈤�c儶銈广儓",
- "routeType": "relatedlist-0Fq",
- "type": "route",
- "urlPrefix": "streams"
+ "activeViewId": "cd0d3153-1cca-4111-ae2a-08454a8fe698",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "e46a24a8-7707-472e-8bb4-daae7c059165",
+ "label": "娴� 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\345\210\227\350\241\250.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\345\210\227\350\241\250.json"
index ff0c838..3ae8a21 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\345\210\227\350\241\250.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\345\210\227\350\241\250.json"
@@ -1,10 +1,10 @@
{
- "activeViewId": "293921b6-1a37-49a3-a225-be2f3471a41c",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "9d3bd2d5-0b87-4b44-adad-6044a25d08aa",
- "label": "娑堣�楀搧璁㈠崟 鍒楄〃",
- "objectApiName": "Consumable_order__c",
- "routeType": "list-a2K",
- "type": "route",
- "urlPrefix": "consumable-order"
+ "activeViewId": "293921b6-1a37-49a3-a225-be2f3471a41c",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "9d3bd2d5-0b87-4b44-adad-6044a25d08aa",
+ "label": "娑堣�楀搧璁㈠崟 鍒楄〃",
+ "objectApiName": "Consumable_order__c",
+ "routeType": "list-a2K",
+ "type": "route",
+ "urlPrefix": "consumable-order"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\347\233\270\345\205\263\345\210\227\350\241\250.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\347\233\270\345\205\263\345\210\227\350\241\250.json"
index 98bd601..9e4e52f 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\347\233\270\345\205\263\345\210\227\350\241\250.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\347\233\270\345\205\263\345\210\227\350\241\250.json"
@@ -1,10 +1,10 @@
{
- "activeViewId": "54811d17-d3d4-47f5-b3a5-a9efd7a62afa",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "34031253-cc77-4f4e-8baf-c77ca2b9cc2a",
- "label": "娑堣�楀搧璁㈠崟 鐩稿叧鍒楄〃",
- "objectApiName": "Consumable_order__c",
- "routeType": "relatedlist-a2K",
- "type": "route",
- "urlPrefix": "consumable-order"
+ "activeViewId": "54811d17-d3d4-47f5-b3a5-a9efd7a62afa",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "34031253-cc77-4f4e-8baf-c77ca2b9cc2a",
+ "label": "娑堣�楀搧璁㈠崟 鐩稿叧鍒楄〃",
+ "objectApiName": "Consumable_order__c",
+ "routeType": "relatedlist-a2K",
+ "type": "route",
+ "urlPrefix": "consumable-order"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\350\257\246\347\273\206\344\277\241\346\201\257.json" "b/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\350\257\246\347\273\206\344\277\241\346\201\257.json"
index 6decf8e..7a5ebd0 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\350\257\246\347\273\206\344\277\241\346\201\257.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\350\257\246\347\273\206\344\277\241\346\201\257.json"
@@ -1,10 +1,10 @@
{
- "activeViewId": "edf32642-ece4-4435-94c9-82eb6b8f67a9",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "e7af9c90-036b-4cee-921f-06d6ef72f826",
- "label": "娑堣�楀搧璁㈠崟 璇︾粏淇℃伅",
- "objectApiName": "Consumable_order__c",
- "routeType": "detail-a2K",
- "type": "route",
- "urlPrefix": "consumable-order"
+ "activeViewId": "edf32642-ece4-4435-94c9-82eb6b8f67a9",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "e7af9c90-036b-4cee-921f-06d6ef72f826",
+ "label": "娑堣�楀搧璁㈠崟 璇︾粏淇℃伅",
+ "objectApiName": "Consumable_order__c",
+ "routeType": "detail-a2K",
+ "type": "route",
+ "urlPrefix": "consumable-order"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267List.json" "b/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267List.json"
new file mode 100644
index 0000000..3d98d11
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267List.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "ef48fff2-c579-4f2a-971d-251b61fd786e",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "43d97466-c6d8-41c4-b93a-c0fccb403e19",
+ "label": "鐢ㄦ埛 List",
+ "routeType": "list-005",
+ "type": "route",
+ "urlPrefix": "profile"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267RelatedList.json" "b/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267RelatedList.json"
new file mode 100644
index 0000000..afc9d6a
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267RelatedList.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "75664e4d-fe1a-4473-ade4-9dca081ecd40",
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "id": "7f3c9630-4b16-4605-8891-e7e316eda732",
+ "label": "鐢ㄦ埛 Related List",
+ "routeType": "relatedlist-005",
+ "type": "route",
+ "urlPrefix": "profile"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
index 0dfc94a..b40bf4c 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "09574ae1-7a1d-465b-852b-6604abee87c2",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "f61977d4-a8e8-4f2f-b5d3-52b1e7398240",
- "label": "鐢ㄦ埛 銉偣銉�",
- "routeType": "list-005",
- "type": "route",
- "urlPrefix": "profile"
+ "activeViewId": "09574ae1-7a1d-465b-852b-6604abee87c2",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "f61977d4-a8e8-4f2f-b5d3-52b1e7398240",
+ "label": "鐢ㄦ埛 銉偣銉�",
+ "routeType": "list-005",
+ "type": "route",
+ "urlPrefix": "profile"
}
diff --git "a/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 37aebbf..c5a642a 100644
--- "a/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/routes/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,9 +1,9 @@
{
- "activeViewId": "a7a75c83-a63d-4031-8a1a-524e45f77737",
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "id": "d938b950-7d64-43cc-b551-63aa85bd3198",
- "label": "鐢ㄦ埛 闁㈤�c儶銈广儓",
- "routeType": "relatedlist-005",
- "type": "route",
- "urlPrefix": "profile"
+ "activeViewId": "a7a75c83-a63d-4031-8a1a-524e45f77737",
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "id": "d938b950-7d64-43cc-b551-63aa85bd3198",
+ "label": "鐢ㄦ埛 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-005",
+ "type": "route",
+ "urlPrefix": "profile"
}
diff --git a/force-app/main/default/experiences/Consumable1/themes/partnerCentral.json b/force-app/main/default/experiences/Consumable1/themes/partnerCentral.json
index 7bb2a24..c6862df 100644
--- a/force-app/main/default/experiences/Consumable1/themes/partnerCentral.json
+++ b/force-app/main/default/experiences/Consumable1/themes/partnerCentral.json
@@ -1,184 +1,176 @@
{
- "activeBrandingSetId": "da39013d-fbc0-4c27-a7a2-5f9d07bdb4bd",
- "customCSS": ".siteforcePrmBody .cHeader .cBrandingLogo{\n width: 140px !important;\n height: 40px !important;\n}\n\n.siteforcePrmBody .comm-navigation{\n min-height:48px !important;\n}\n\n.siteforcePrmBody .comm-navigation .comm-navigation__item a, .siteforcePrmBody .comm-navigation .comm-navigation__item button{\n font-size:20px;\n}\n\ncAltToggleNav slds-icon_x-small{\n display:none;\n}\n\n.salesforceIdentityLoginBody2 .cCenterPanel{\n left:200px;\n top:-30px;\n min-width:320px !important;\n}\n.salesforceIdentityLoginForm2 .inputBox{\n min-width:180px !important;\n}\n\n.siteforcePrmBody .cHeader .forceSearchInputDesktop input, .siteforcePrmBody .cHeader .forceSearchInputDesktop input::placeholder{\n font-size:14px !important;\n}",
- "developerName": "prm",
- "id": "dc3ec245-c32a-48fc-920e-8ff30c6cff7a",
- "label": "Partner Central",
- "layouts": {
- "Inner": "27b0f619-7930-4846-b53d-3eb904a52e9e",
- "Login": "d5b47306-6295-4d2d-a5d9-cb373be9c125",
- "ServiceNotAvailable": "1ed3aeb9-9205-4229-bfb0-71096321a26b"
- },
- "type": "theme",
- "views": [
- {
- "componentAttributes": {},
- "componentName": "salesforceIdentity:loginBody2",
- "id": "d5b47306-6295-4d2d-a5d9-cb373be9c125",
- "label": "Login",
- "regions": [
- {
- "id": "74f03049-e17f-419d-b642-3406729e5ffe",
- "regionName": "header",
- "type": "region"
- },
- {
- "id": "0744fcb0-7421-49a4-8a25-eef41dc46740",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "74aa9402-e6be-4155-9d62-225d117a1754",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "type": "view"
+ "activeBrandingSetId": "da39013d-fbc0-4c27-a7a2-5f9d07bdb4bd",
+ "customCSS": ".siteforcePrmBody .cHeader .cBrandingLogo{\n width: 140px !important;\n height: 40px !important;\n pointer-events:none;\n}\n\n.siteforcePrmBody .comm-navigation{\n min-height:48px !important;\n}\n\n.siteforcePrmBody .comm-navigation .comm-navigation__item a, .siteforcePrmBody .comm-navigation .comm-navigation__item button{\n font-size:20px;\n}\n\ncAltToggleNav slds-icon_x-small{\n display:none;\n}\n\n.salesforceIdentityLoginBody2 .cCenterPanel{\n left:200px;\n top:-30px;\n min-width:320px !important;\n}\n.salesforceIdentityLoginForm2 .inputBox{\n min-width:180px !important;\n}\n\n.siteforcePrmBody .cHeader .forceSearchInputDesktop input, .siteforcePrmBody .cHeader .forceSearchInputDesktop input::placeholder{\n font-size:14px !important;\n}\n.slds-button_icon-more{\n display:none;\n}\na.slds-button{\n display:none;\n}\n\n.forcePageBlockItemView .slds-form-element .slds-button_icon {\n display: none;\n}\n.siteforcePrmBody .forceCommunityRecordDetail .forceRecordLayout .forcePageBlockSectionView .full.forcePageBlockItemView{\n pointer-events:none\n}\n\n.slds-nav-vertical__title{\n display:none;\n}\n.slds-nav-vertical__title:first-of-type {\n display: block;\n}\n.slds-nav-vertical .slds-nav-vertical__section.navItems.entityItems:nth-child(3){\n display: none!important;\n}\n.null.comm-page-list-00O .slds-table_header-fixed thead th:nth-child(6){\n display:none!important;\n}\n.null.comm-page-list-00O .slds-align_absolute-center{\n display:none!important;\n}",
+ "developerName": "prm",
+ "id": "dc3ec245-c32a-48fc-920e-8ff30c6cff7a",
+ "label": "Partner Central",
+ "layouts": {
+ "Inner": "27b0f619-7930-4846-b53d-3eb904a52e9e",
+ "Login": "d5b47306-6295-4d2d-a5d9-cb373be9c125",
+ "ServiceNotAvailable": "1ed3aeb9-9205-4229-bfb0-71096321a26b"
},
- {
- "componentAttributes": {
- "IsDefaultHeaderHidden": false,
- "IsDefaultHeaderPositionFixed": true,
- "IsDefaultNotificationsHidden": true,
- "IsSearchBarHidden": false,
- "fixedPageWidth": 1920,
- "isPageWidthFixed": true
- },
- "componentName": "siteforce:prmBody",
- "id": "27b0f619-7930-4846-b53d-3eb904a52e9e",
- "label": "Default",
- "regions": [
+ "type": "theme",
+ "views": [
{
- "id": "16bdf3ff-1315-4546-88a6-de32558d62ab",
- "regionName": "customHeader",
- "type": "region"
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:loginBody2",
+ "id": "d5b47306-6295-4d2d-a5d9-cb373be9c125",
+ "label": "Login",
+ "regions": [
+ {
+ "id": "74f03049-e17f-419d-b642-3406729e5ffe",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "0744fcb0-7421-49a4-8a25-eef41dc46740",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "74aa9402-e6be-4155-9d62-225d117a1754",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "type": "view"
},
{
- "components": [
- {
- "componentAttributes": {
- "maxAutoCompleteResults": 5,
- "searchLabel": "鎼滅储...",
- "searchObjects": [
- {
- "isPublic": false,
- "name": "Opportunity"
- },
- {
- "isPublic": false,
- "name": "Campaign"
- },
- {
- "isPublic": false,
- "name": "ContentDocument"
- },
- {
- "isPublic": true,
- "name": "Consumable_order__c"
- },
- {
- "isPublic": true,
- "name": "Consumable_order_details2__c"
- }
- ]
- },
- "componentName": "forceCommunity:globalSearchInput",
- "id": "8675f0f3-1f0a-4d4b-a1e5-f49da3a754d6",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "7af0cf8c-92cf-45b1-a808-2c4edea02007",
- "regionName": "search",
- "type": "region"
+ "componentAttributes": {
+ "IsDefaultHeaderHidden": false,
+ "IsDefaultHeaderPositionFixed": true,
+ "IsDefaultNotificationsHidden": true,
+ "IsSearchBarHidden": false,
+ "fixedPageWidth": 1920,
+ "isPageWidthFixed": true
+ },
+ "componentName": "siteforce:prmBody",
+ "id": "27b0f619-7930-4846-b53d-3eb904a52e9e",
+ "label": "Default",
+ "regions": [
+ {
+ "id": "16bdf3ff-1315-4546-88a6-de32558d62ab",
+ "regionName": "customHeader",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "maxAutoCompleteResults": 5,
+ "searchLabel": "鎼滅储...",
+ "searchObjects": [
+ {
+ "isPublic": true,
+ "name": "Consumable_order__c"
+ },
+ {
+ "isPublic": true,
+ "name": "Consumable_order_details2__c"
+ },
+ {
+ "isPublic": true,
+ "name": "ContentDocument"
+ }
+ ]
+ },
+ "componentName": "forceCommunity:globalSearchInput",
+ "id": "8675f0f3-1f0a-4d4b-a1e5-f49da3a754d6",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7af0cf8c-92cf-45b1-a808-2c4edea02007",
+ "regionName": "search",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "accountManagementLabel": "Account Management",
+ "communityBuilderLabel": "Experience Builder",
+ "communitySetupLabel": "璁剧疆",
+ "contactSupportLabel": "Contact Support",
+ "filterName": "MyCases",
+ "homeLabel": "涓婚〉",
+ "includeContactSupport": false,
+ "includeMessages": false,
+ "loginLabel": "鐧诲綍",
+ "logoutLabel": "閫�鍑�",
+ "myAccountLabel": "鎴戠殑瀹㈡埛",
+ "showAccountManagement": false,
+ "showUserSettings": false,
+ "userSettingsLabel": "My Settings",
+ "viewProfileLabel": "涓汉淇℃伅"
+ },
+ "componentName": "selfService:userProfileMenu",
+ "id": "e9f75e24-e895-4c54-83c3-936329504b74",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1f8acbb0-d430-44e9-a27f-695c6176b837",
+ "regionName": "profileMenu",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "NavigationMenuEditorRefresh": "Default_Navigation3",
+ "hideAppLauncher": true,
+ "hideHomeText": false
+ },
+ "componentName": "forceCommunity:globalNavigation",
+ "id": "ef1a7404-2c49-4de2-82fd-cfcd351cc65a",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ce986e45-573a-4449-821c-c1d048044cd6",
+ "regionName": "navBar",
+ "type": "region"
+ },
+ {
+ "id": "d389ebfc-0fde-47e7-93c5-1181c3a80075",
+ "regionName": "customRegion",
+ "type": "region"
+ },
+ {
+ "id": "773b1fa0-0bcd-4b2e-81f7-a88ac559a6bf",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "type": "view"
},
{
- "components": [
- {
- "componentAttributes": {
- "accountManagementLabel": "Account Management",
- "communityBuilderLabel": "Experience Builder",
- "communitySetupLabel": "Salesforce Setup",
- "contactSupportLabel": "Contact Support",
- "filterName": "MyCases",
- "homeLabel": "Home",
- "includeContactSupport": false,
- "includeMessages": false,
- "loginLabel": "Login",
- "logoutLabel": "Logout",
- "myAccountLabel": "My Account",
- "showAccountManagement": true,
- "showUserSettings": false,
- "userSettingsLabel": "My Settings",
- "viewProfileLabel": "My Profile"
- },
- "componentName": "selfService:userProfileMenu",
- "id": "e9f75e24-e895-4c54-83c3-936329504b74",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "1f8acbb0-d430-44e9-a27f-695c6176b837",
- "regionName": "profileMenu",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "NavigationMenuEditorRefresh": "Default_Navigation3",
- "hideAppLauncher": true,
- "hideHomeText": false
- },
- "componentName": "forceCommunity:globalNavigation",
- "id": "ef1a7404-2c49-4de2-82fd-cfcd351cc65a",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "ce986e45-573a-4449-821c-c1d048044cd6",
- "regionName": "navBar",
- "type": "region"
- },
- {
- "id": "d389ebfc-0fde-47e7-93c5-1181c3a80075",
- "regionName": "customRegion",
- "type": "region"
- },
- {
- "id": "773b1fa0-0bcd-4b2e-81f7-a88ac559a6bf",
- "regionName": "footer",
- "type": "region"
+ "componentAttributes": {
+ "fixedPageWidth": 1170,
+ "headerBgColor": "rgba(0, 0, 0, 0)",
+ "isHeaderPinned": false,
+ "isHeroUnderHeader": false,
+ "isPageWidthFixed": true,
+ "showHeader": true,
+ "showHero": true
+ },
+ "componentName": "siteforce:themeLayoutStarter",
+ "id": "1ed3aeb9-9205-4229-bfb0-71096321a26b",
+ "label": "ServiceNotAvailable",
+ "regions": [
+ {
+ "id": "a29c8ac1-de42-4098-910c-b4c76b635e54",
+ "regionName": "themeHeader",
+ "type": "region"
+ },
+ {
+ "id": "a2b35d26-5d76-47c4-9dd0-cfff946cd7c7",
+ "regionName": "themeFooter",
+ "type": "region"
+ }
+ ],
+ "type": "view"
}
- ],
- "type": "view"
- },
- {
- "componentAttributes": {
- "fixedPageWidth": 1170,
- "headerBgColor": "rgba(0, 0, 0, 0)",
- "isHeaderPinned": false,
- "isHeroUnderHeader": false,
- "isPageWidthFixed": true,
- "showHeader": true,
- "showHero": true
- },
- "componentName": "siteforce:themeLayoutStarter",
- "id": "1ed3aeb9-9205-4229-bfb0-71096321a26b",
- "label": "ServiceNotAvailable",
- "regions": [
- {
- "id": "a29c8ac1-de42-4098-910c-b4c76b635e54",
- "regionName": "themeHeader",
- "type": "region"
- },
- {
- "id": "a2b35d26-5d76-47c4-9dd0-cfff946cd7c7",
- "regionName": "themeFooter",
- "type": "region"
- }
- ],
- "type": "view"
- }
- ]
+ ]
}
diff --git a/force-app/main/default/experiences/Consumable1/variations/defaultCustomComponentPropertiesComponentProperties.json b/force-app/main/default/experiences/Consumable1/variations/defaultCustomComponentPropertiesComponentProperties.json
index 94bf10b..1c72251 100644
--- a/force-app/main/default/experiences/Consumable1/variations/defaultCustomComponentPropertiesComponentProperties.json
+++ b/force-app/main/default/experiences/Consumable1/variations/defaultCustomComponentPropertiesComponentProperties.json
@@ -1,17 +1,17 @@
{
- "componentVariants": [
- {
- "id": "5a61b685-6f3e-4b96-979f-4aa7aa2ecc1f",
- "propertyOverrides": {
- "componentAttributes": {
- "NavigationMenuEditorRefresh": "ENGUser"
+ "componentVariants": [
+ {
+ "id": "5a61b685-6f3e-4b96-979f-4aa7aa2ecc1f",
+ "propertyOverrides": {
+ "componentAttributes": {
+ "NavigationMenuEditorRefresh": "ENGUser"
+ }
+ },
+ "targetId": "ef1a7404-2c49-4de2-82fd-cfcd351cc65a",
+ "type": "componentVariant"
}
- },
- "targetId": "ef1a7404-2c49-4de2-82fd-cfcd351cc65a",
- "type": "componentVariant"
- }
- ],
- "developerName": "Default_CustomComponent_Properties_Component_Properties",
- "id": "5cd60da6-8927-4324-9ed5-e03ab9ab5da6",
- "type": "experienceVariation"
+ ],
+ "developerName": "Default_CustomComponent_Properties_Component_Properties",
+ "id": "5cd60da6-8927-4324-9ed5-e03ab9ab5da6",
+ "type": "experienceVariation"
}
diff --git a/force-app/main/default/experiences/Consumable1/variations/defaultNavigationMenuComponentProperties.json b/force-app/main/default/experiences/Consumable1/variations/defaultNavigationMenuComponentProperties.json
new file mode 100644
index 0000000..53e21c6
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable1/variations/defaultNavigationMenuComponentProperties.json
@@ -0,0 +1,17 @@
+{
+ "componentVariants": [
+ {
+ "id": "39e44bcd-8522-4e13-96bf-d3b24382c053",
+ "propertyOverrides": {
+ "componentAttributes": {
+ "NavigationMenuEditorRefresh": "Test"
+ }
+ },
+ "targetId": "932fd9d7-f187-457d-83af-d59077849505",
+ "type": "componentVariant"
+ }
+ ],
+ "developerName": "Default_Navigation_Menu_Component_Properties",
+ "id": "8c3aca63-729b-4e95-82be-437704ec4497",
+ "type": "experienceVariation"
+}
diff --git a/force-app/main/default/experiences/Consumable1/views/accountManagement.json b/force-app/main/default/experiences/Consumable1/views/accountManagement.json
index e7d9038..0f705c5 100644
--- a/force-app/main/default/experiences/Consumable1/views/accountManagement.json
+++ b/force-app/main/default/experiences/Consumable1/views/accountManagement.json
@@ -1,153 +1,153 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "198e4bed-7a3a-4a56-a15a-d354e55d5624",
- "label": "Account Management",
- "regions": [
- {
- "id": "202c6d5b-0e3e-4ee4-9327-bb9e056f5ccd",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "198e4bed-7a3a-4a56-a15a-d354e55d5624",
+ "label": "Account Management",
+ "regions": [
{
- "componentAttributes": {
- "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 20px; color: #1e2443;\">Account Management</b> </h1> "
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "23086da8-7c2e-4db2-9d92-e2cb300415db",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "202c6d5b-0e3e-4ee4-9327-bb9e056f5ccd",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {
- "tabsetConfig": {
- "UUID": "65ec293d-c556-4ebb-a718-1d2091eebe82",
- "activeTab": "tab1",
- "tabs": [
+ "components": [
{
- "UUID": "507fb429-2282-49b5-8878-f05f01f9861a",
- "allowGuestUser": false,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {
- "customTitle": "Members",
- "parentRecordId": "{!CurrentUser.accountId}",
- "relatedListName": "Users",
- "showBreadCrumbs": "false",
- "showCustomTitle": "true",
- "showManualRefreshButton": "false",
- "showRowNumbers": "false"
- },
- "fqn": "forceCommunity:relatedList"
- }
- ],
- "tabKey": "tab1",
- "tabName": "Members"
+ "componentAttributes": {
+ "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 20px; color: #1e2443;\">Account Management</b> </h1> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "23086da8-7c2e-4db2-9d92-e2cb300415db",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
},
{
- "UUID": "c61e3f16-c77e-49f2-b596-d89451128362",
- "allowGuestUser": false,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {
- "recordId": "{!CurrentUser.accountId}"
- },
- "fqn": "forceCommunity:accountBrandRecord"
- }
- ],
- "tabKey": "tab2",
- "tabName": "Branding"
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "65ec293d-c556-4ebb-a718-1d2091eebe82",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "507fb429-2282-49b5-8878-f05f01f9861a",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "customTitle": "Members",
+ "parentRecordId": "{!CurrentUser.accountId}",
+ "relatedListName": "Users",
+ "showBreadCrumbs": "false",
+ "showCustomTitle": "true",
+ "showManualRefreshButton": "false",
+ "showRowNumbers": "false"
+ },
+ "fqn": "forceCommunity:relatedList"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Members"
+ },
+ {
+ "UUID": "c61e3f16-c77e-49f2-b596-d89451128362",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "recordId": "{!CurrentUser.accountId}"
+ },
+ "fqn": "forceCommunity:accountBrandRecord"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "Branding"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "65ec293d-c556-4ebb-a718-1d2091eebe82",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "Members",
+ "parentRecordId": "{!CurrentUser.accountId}",
+ "relatedListName": "Users",
+ "showBreadCrumbs": false,
+ "showCustomTitle": true,
+ "showManualRefreshButton": false,
+ "showRowNumbers": false
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "1054405a-fda1-450b-a9ec-67e9be3839fb",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "507fb429-2282-49b5-8878-f05f01f9861a",
+ "regionLabel": "Members",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!CurrentUser.accountId}"
+ },
+ "componentName": "forceCommunity:accountBrandRecord",
+ "id": "7b84436c-612b-4042-b9c4-411d9fbe0957",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c61e3f16-c77e-49f2-b596-d89451128362",
+ "regionLabel": "Branding",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ],
- "useOverflowMenu": false
- }
- },
- "componentName": "forceCommunity:tabset",
- "id": "65ec293d-c556-4ebb-a718-1d2091eebe82",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {
- "customTitle": "Members",
- "parentRecordId": "{!CurrentUser.accountId}",
- "relatedListName": "Users",
- "showBreadCrumbs": false,
- "showCustomTitle": true,
- "showManualRefreshButton": false,
- "showRowNumbers": false
- },
- "componentName": "forceCommunity:relatedList",
- "id": "1054405a-fda1-450b-a9ec-67e9be3839fb",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "507fb429-2282-49b5-8878-f05f01f9861a",
- "regionLabel": "Members",
- "regionName": "tab1",
- "renditionMap": {},
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "recordId": "{!CurrentUser.accountId}"
- },
- "componentName": "forceCommunity:accountBrandRecord",
- "id": "7b84436c-612b-4042-b9c4-411d9fbe0957",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "c61e3f16-c77e-49f2-b596-d89451128362",
- "regionLabel": "Branding",
- "regionName": "tab2",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "9d9976f8-dd44-4d6f-91c8-06440b957386",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "3583c796-50b6-4943-86ba-e0f908a892d2",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "9d9976f8-dd44-4d6f-91c8-06440b957386",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Account Management"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "e6b1c498-01fb-4b0d-b21f-55bfa86e605b",
- "renditionMap": {},
- "type": "component"
+ "id": "3583c796-50b6-4943-86ba-e0f908a892d2",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Account Management"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "e6b1c498-01fb-4b0d-b21f-55bfa86e605b",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "786a718c-93c1-484e-8839-716d2b615d06",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "786a718c-93c1-484e-8839-716d2b615d06",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "account-management"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "account-management"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/cICList.json b/force-app/main/default/experiences/Consumable1/views/cICList.json
new file mode 100644
index 0000000..661b555
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable1/views/cICList.json
@@ -0,0 +1,52 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "8fd93390-583d-45eb-a6c5-e3b0c5480cfa",
+ "label": "CIC List",
+ "regions": [
+ {
+ "id": "13c61a0d-ae56-45bd-8dfd-f4e180fe341e",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "{!filterId}",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "{!objectName}",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "d7f341b6-2d1d-4487-882d-0e411a27ed16",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9321449e-eba6-49b1-a8ae-140a8bbe07ed",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "dfcfc4bd-4f6d-4a9d-857c-1e460c60ea3f",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-500"
+}
diff --git a/force-app/main/default/experiences/Consumable1/views/cICRelatedList.json b/force-app/main/default/experiences/Consumable1/views/cICRelatedList.json
new file mode 100644
index 0000000..9867cd6
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable1/views/cICRelatedList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "4fd2378d-1de4-4c96-b33d-8051ad75bdf6",
+ "label": "CIC Related List",
+ "regions": [
+ {
+ "id": "c4db92a7-d368-4d52-9868-fab9110f9f94",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "9f1d0e22-e08f-44b9-a6be-b0b2717f90aa",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "96759964-f58f-4fb1-8751-b807e3df6fcc",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "28ef7baf-73ad-4450-b282-7f360e7c067f",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-500"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/cIC\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/cIC\343\203\252\343\202\271\343\203\210.json"
index 9f0a890..1243546 100644
--- "a/force-app/main/default/experiences/Consumable1/views/cIC\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/cIC\343\203\252\343\202\271\343\203\210.json"
@@ -1,52 +1,52 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "708367ab-41a2-4633-a93a-1a54141f1f48",
- "label": "CIC 銉偣銉�",
- "regions": [
- {
- "id": "2c3dbc4b-bfd9-4394-af4f-e60cb9fdcb79",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "708367ab-41a2-4633-a93a-1a54141f1f48",
+ "label": "CIC 銉偣銉�",
+ "regions": [
{
- "componentAttributes": {
- "enableInlineEdit": true,
- "filterName": "{!filterId}",
- "layout": "FULL",
- "pageSize": 25,
- "scope": "{!objectName}",
- "showActionBar": true,
- "showChartsPanel": true,
- "showDisplay": "showall",
- "showFilterPanel": true,
- "showImageIcon": true,
- "showManualRefreshButton": true,
- "showObjectName": true,
- "showPinnedList": true,
- "showSearchBar": true
- },
- "componentName": "forceCommunity:objectHome",
- "id": "5f77c48f-42c0-4c08-85cc-69eedde9ea24",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "2c3dbc4b-bfd9-4394-af4f-e60cb9fdcb79",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "{!filterId}",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "{!objectName}",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "5f77c48f-42c0-4c08-85cc-69eedde9ea24",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2e605af4-63d3-4eae-beb4-fd599953e389",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "04eec419-32b1-46b5-9099-b2d8ee3f3b9f",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "2e605af4-63d3-4eae-beb4-fd599953e389",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "04eec419-32b1-46b5-9099-b2d8ee3f3b9f",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list-500"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-500"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index b2dc126..7376765 100644
--- "a/force-app/main/default/experiences/Consumable1/views/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,45 +1,45 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "23a3c897-7fcb-41da-8cff-7a8e8c2450a7",
- "label": "CIC 闁㈤�c儶銈广儓",
- "regions": [
- {
- "id": "7800ff3e-33e5-4b19-bab9-8644728f37bf",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "23a3c897-7fcb-41da-8cff-7a8e8c2450a7",
+ "label": "CIC 闁㈤�c儶銈广儓",
+ "regions": [
{
- "componentAttributes": {
- "customTitle": "",
- "parentRecordId": "{!recordId}",
- "relatedListName": "{!relationshipApiName}",
- "showBreadCrumbs": true,
- "showCustomTitle": false,
- "showManualRefreshButton": true,
- "showRowNumbers": true
- },
- "componentName": "forceCommunity:relatedList",
- "id": "9812e67b-fdc1-44ce-a0fe-a77f759b1350",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "7800ff3e-33e5-4b19-bab9-8644728f37bf",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "9812e67b-fdc1-44ce-a0fe-a77f759b1350",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a0fd5eb9-914a-4c35-b584-0ff858f8c09f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "22efa46a-6f6e-4300-8b97-ab5a253c1410",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "a0fd5eb9-914a-4c35-b584-0ff858f8c09f",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "22efa46a-6f6e-4300-8b97-ab5a253c1410",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist-500"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-500"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/campaignList.json b/force-app/main/default/experiences/Consumable1/views/campaignList.json
index 46f0c7c..6c1b500 100644
--- a/force-app/main/default/experiences/Consumable1/views/campaignList.json
+++ b/force-app/main/default/experiences/Consumable1/views/campaignList.json
@@ -1,150 +1,150 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "f83414cc-cd96-4d24-94d6-1d6fdad65b83",
- "label": "Campaign List",
- "regions": [
- {
- "id": "8cd141df-47bb-44e7-88e8-d6cf2dcb60e0",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "f83414cc-cd96-4d24-94d6-1d6fdad65b83",
+ "label": "Campaign List",
+ "regions": [
{
- "componentAttributes": {
- "tabsetConfig": {
- "UUID": "8eb696d0-116a-43bd-aacf-3dcb9d42f82a",
- "activeTab": "tab1",
- "tabs": [
+ "id": "8cd141df-47bb-44e7-88e8-d6cf2dcb60e0",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
{
- "UUID": "295af927-269e-4ae3-89c6-1065c44b9479",
- "allowGuestUser": true,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {
- "richTextValue": " <p><br/></p> <p style="text-align:left;"> Use these campaigns to generate leads and grow your business </p> "
- },
- "fqn": "forceCommunity:richTextInline"
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "8eb696d0-116a-43bd-aacf-3dcb9d42f82a",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "295af927-269e-4ae3-89c6-1065c44b9479",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "richTextValue": " <p><br/></p> <p style="text-align:left;"> Use these campaigns to generate leads and grow your business </p> "
+ },
+ "fqn": "forceCommunity:richTextInline"
+ },
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:campaignTileList"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Campaign Marketplace"
+ },
+ {
+ "UUID": "41da809c-e1f0-44f4-b742-c33cfecac7ff",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "Campaign"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "All Campaigns"
+ }
+ ],
+ "useOverflowMenu": false
+ }
},
- {
- "attributes": {},
- "fqn": "forceCommunity:campaignTileList"
- }
- ],
- "tabKey": "tab1",
- "tabName": "Campaign Marketplace"
- },
- {
- "UUID": "41da809c-e1f0-44f4-b742-c33cfecac7ff",
- "allowGuestUser": true,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {
- "filterName": "Recent",
- "scope": "Campaign"
- },
- "fqn": "forceCommunity:objectHome"
- }
- ],
- "tabKey": "tab2",
- "tabName": "All Campaigns"
+ "componentName": "forceCommunity:tabset",
+ "id": "8eb696d0-116a-43bd-aacf-3dcb9d42f82a",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <p><br/></p> <p style="text-align:left;"> Use these campaigns to generate leads and grow your business </p> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "ffe2df03-ba7f-4a7f-a8a2-c3e393c9cfaa",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "bodyField": "Description",
+ "categoryField": "__",
+ "dataFieldsConfig": "",
+ "highlight": "__",
+ "highlightColor": "#007DB8",
+ "listLabel": "",
+ "listViewName": "GIRctiveCampaignsR",
+ "showImage": true,
+ "sortBy": "Num__c",
+ "sortOrder": "Ascending",
+ "titleField": "Name"
+ },
+ "componentName": "forceCommunity:campaignTileList",
+ "id": "b697c485-7d58-4403-a0ca-3ad0490ca174",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "295af927-269e-4ae3-89c6-1065c44b9479",
+ "regionLabel": "Campaign Marketplace",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "Campaign",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "468384df-73f0-459b-8b3b-99cb260ace82",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "41da809c-e1f0-44f4-b742-c33cfecac7ff",
+ "regionLabel": "All Campaigns",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ],
- "useOverflowMenu": false
- }
- },
- "componentName": "forceCommunity:tabset",
- "id": "8eb696d0-116a-43bd-aacf-3dcb9d42f82a",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {
- "richTextValue": " <p><br/></p> <p style="text-align:left;"> Use these campaigns to generate leads and grow your business </p> "
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "ffe2df03-ba7f-4a7f-a8a2-c3e393c9cfaa",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "bodyField": "Description",
- "categoryField": "__",
- "dataFieldsConfig": "",
- "highlight": "__",
- "highlightColor": "#007DB8",
- "listLabel": "",
- "listViewName": "GIRctiveCampaignsR",
- "showImage": true,
- "sortBy": "Num__c",
- "sortOrder": "Ascending",
- "titleField": "Name"
- },
- "componentName": "forceCommunity:campaignTileList",
- "id": "b697c485-7d58-4403-a0ca-3ad0490ca174",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "295af927-269e-4ae3-89c6-1065c44b9479",
- "regionLabel": "Campaign Marketplace",
- "regionName": "tab1",
- "renditionMap": {},
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "enableInlineEdit": true,
- "filterName": "Recent",
- "layout": "FULL",
- "pageSize": 25,
- "scope": "Campaign",
- "showActionBar": true,
- "showChartsPanel": true,
- "showDisplay": "showall",
- "showFilterPanel": true,
- "showImageIcon": true,
- "showManualRefreshButton": true,
- "showObjectName": true,
- "showPinnedList": true,
- "showSearchBar": true
- },
- "componentName": "forceCommunity:objectHome",
- "id": "468384df-73f0-459b-8b3b-99cb260ace82",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "41da809c-e1f0-44f4-b742-c33cfecac7ff",
- "regionLabel": "All Campaigns",
- "regionName": "tab2",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ ],
+ "id": "f05e4448-347d-4264-ba99-7d8afeb75c23",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "7627cbac-8224-4c40-ac93-186f3a47f991",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "f05e4448-347d-4264-ba99-7d8afeb75c23",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "7627cbac-8224-4c40-ac93-186f3a47f991",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list-701"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-701"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/caseDetail.json b/force-app/main/default/experiences/Consumable1/views/caseDetail.json
index 418c9a8..8cae6b9 100644
--- a/force-app/main/default/experiences/Consumable1/views/caseDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/caseDetail.json
@@ -1,76 +1,76 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "3b1b2646-af41-43d3-a519-528aa49f45f4",
- "label": "Case Detail",
- "regions": [
- {
- "id": "1eb1822e-40d4-40a9-8504-a3bc8ae79809",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "3b1b2646-af41-43d3-a519-528aa49f45f4",
+ "label": "Case Detail",
+ "regions": [
{
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:recordHeadline",
- "id": "1602b68a-ea96-47ea-8132-0bba6301069a",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "1eb1822e-40d4-40a9-8504-a3bc8ae79809",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {
- "detailsTabLabel": "Details",
- "discussionsTabLabel": "Feed",
- "recordId": "{!recordId}",
- "relatedTabLabel": "Related",
- "showLegacyActivityComposer": false,
- "tab1Type": "details",
- "tab2Type": "related",
- "tab3Type": "chatter",
- "tab4Type": "none",
- "timelineTabLabel": "Activity"
- },
- "componentName": "forceCommunity:recordHomeTabs",
- "id": "eb5335d5-d3df-4512-91ae-50c5403ea737",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "40f59663-263d-41c7-94ea-345dca5b494e",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "c47a29f6-4120-46fd-9cfb-e9724d01b1e8",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "1602b68a-ea96-47ea-8132-0bba6301069a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "eb5335d5-d3df-4512-91ae-50c5403ea737",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "40f59663-263d-41c7-94ea-345dca5b494e",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "{!Record._Object}: {!Record._Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "f8cd34d0-3569-404e-ad02-b6abae393992",
- "renditionMap": {},
- "type": "component"
+ "id": "c47a29f6-4120-46fd-9cfb-e9724d01b1e8",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "f8cd34d0-3569-404e-ad02-b6abae393992",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "28f1ae6f-7ab6-49c0-a8b1-4819fbedcae3",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "28f1ae6f-7ab6-49c0-a8b1-4819fbedcae3",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-500"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-500"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/checkPassword.json b/force-app/main/default/experiences/Consumable1/views/checkPassword.json
index a602251..f8242b2 100644
--- a/force-app/main/default/experiences/Consumable1/views/checkPassword.json
+++ b/force-app/main/default/experiences/Consumable1/views/checkPassword.json
@@ -1,67 +1,67 @@
{
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "82d3f50a-42f2-4aa2-b028-7b07d878cd63",
- "label": "Check Password",
- "regions": [
- {
- "components": [
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "82d3f50a-42f2-4aa2-b028-7b07d878cd63",
+ "label": "Check Password",
+ "regions": [
{
- "componentAttributes": {
- "richTextValue": "<p style=\"text-align: center;\"><span style=\"font-size: 22px; color: rgb(255, 255, 255);\">璇疯緭鍏ユ偍鐨勯偖绠�</span></p>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "19245457-d13d-434e-9b0f-b0242a8ab8f4",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><span style=\"font-size: 22px; color: rgb(255, 255, 255);\">璇疯緭鍏ユ偍鐨勯偖绠�</span></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "19245457-d13d-434e-9b0f-b0242a8ab8f4",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><span style=\"color: rgb(255, 255, 255);\">妫�鏌ヤ笌鎮ㄧ殑鐢ㄦ埛鍚嶅叧鑱旂殑鐢靛瓙閭欢甯愭埛锛屼互鑾峰彇鏈夊叧閲嶇疆瀵嗙爜鐨勮鏄庛�傝璁颁綇鏌ョ湅鎮ㄧ殑鍨冨溇閭欢鏂囦欢澶癸紝鑷姩閭欢鏈夋椂浼氬湪鍏朵腑杩囨护銆傚鏋滄偍浠嶇劧鏃犳硶鐧诲綍锛岃鑱旂郴鎮ㄧ殑绠$悊鍛�</span></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "402e03d5-588a-468f-9acf-adddef37b551",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><a href=\"./\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(255, 255, 255);\"><strong>杩斿洖鐧诲綍</strong></a></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "4ad83c2b-e483-49d6-9721-2245ea3567bf",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9985d44e-a0e1-4ea8-8392-69ecd11b717a",
+ "regionName": "content",
+ "type": "region"
},
{
- "componentAttributes": {
- "richTextValue": "<p style=\"text-align: center;\"><span style=\"color: rgb(255, 255, 255);\">妫�鏌ヤ笌鎮ㄧ殑鐢ㄦ埛鍚嶅叧鑱旂殑鐢靛瓙閭欢甯愭埛锛屼互鑾峰彇鏈夊叧閲嶇疆瀵嗙爜鐨勮鏄庛�傝璁颁綇鏌ョ湅鎮ㄧ殑鍨冨溇閭欢鏂囦欢澶癸紝鑷姩閭欢鏈夋椂浼氬湪鍏朵腑杩囨护銆傚鏋滄偍浠嶇劧鏃犳硶鐧诲綍锛岃鑱旂郴鎮ㄧ殑绠$悊鍛�</span></p>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "402e03d5-588a-468f-9acf-adddef37b551",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "richTextValue": "<p style=\"text-align: center;\"><a href=\"./\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(255, 255, 255);\"><strong>杩斿洖鐧诲綍</strong></a></p>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "4ad83c2b-e483-49d6-9721-2245ea3567bf",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Check Password"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "d9766929-20bd-4383-bb47-d081a8982254",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "cfc14d85-84ee-4928-9a0e-a5b204930def",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "9985d44e-a0e1-4ea8-8392-69ecd11b717a",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Check Password"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "d9766929-20bd-4383-bb47-d081a8982254",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "cfc14d85-84ee-4928-9a0e-a5b204930def",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Login",
- "type": "view",
- "viewType": "check-password"
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "check-password"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/consumableDetailFix.json b/force-app/main/default/experiences/Consumable1/views/consumableDetailFix.json
index 7b88f3c..01f38d2 100644
--- a/force-app/main/default/experiences/Consumable1/views/consumableDetailFix.json
+++ b/force-app/main/default/experiences/Consumable1/views/consumableDetailFix.json
@@ -1,156 +1,156 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "edf32642-ece4-4435-94c9-82eb6b8f67a9",
- "label": "ConsumableDetail_fix",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "edf32642-ece4-4435-94c9-82eb6b8f67a9",
+ "label": "ConsumableDetail_fix",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "2669d21c-e835-4689-a403-f77a18c9d715",
- "columns": [
+ "components": [
{
- "UUID": "e9dbbc4b-efc6-4508-9533-9280eec53143",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
- }
- ]
- },
- "sectionHeight": 115
- },
- "componentName": "forceCommunity:section",
- "id": "2669d21c-e835-4689-a403-f77a18c9d715",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:recordHeadline",
- "id": "73412524-f13e-4a0f-b81b-94cc87c0440c",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "e9dbbc4b-efc6-4508-9533-9280eec53143",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "ca5f02db-0367-4e6f-8d40-9a4c8ea72d7b",
- "columns": [
- {
- "UUID": "4bd8dfe7-7509-4b99-ad0a-0b6c9eb193bf",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "8",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "2669d21c-e835-4689-a403-f77a18c9d715",
+ "columns": [
+ {
+ "UUID": "e9dbbc4b-efc6-4508-9533-9280eec53143",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 115
+ },
+ "componentName": "forceCommunity:section",
+ "id": "2669d21c-e835-4689-a403-f77a18c9d715",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "73412524-f13e-4a0f-b81b-94cc87c0440c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e9dbbc4b-efc6-4508-9533-9280eec53143",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
},
{
- "UUID": "3aa51a7e-96bb-475b-96b3-7cd6fe4a14af",
- "columnKey": "a2a96",
- "columnName": "Column 2",
- "columnWidth": "4",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "ca5f02db-0367-4e6f-8d40-9a4c8ea72d7b",
+ "columns": [
+ {
+ "UUID": "4bd8dfe7-7509-4b99-ad0a-0b6c9eb193bf",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "8",
+ "seedComponents": []
+ },
+ {
+ "UUID": "3aa51a7e-96bb-475b-96b3-7cd6fe4a14af",
+ "columnKey": "a2a96",
+ "columnName": "Column 2",
+ "columnWidth": "4",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "ca5f02db-0367-4e6f-8d40-9a4c8ea72d7b",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordDetail",
+ "id": "8804e9ec-b2a3-41f4-b8be-6a0443bea1e7",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4bd8dfe7-7509-4b99-ad0a-0b6c9eb193bf",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}",
+ "width": "MEDIUM"
+ },
+ "componentName": "forceCommunity:relatedRecords",
+ "id": "eda1b3f7-603a-4290-a4b4-0bdd5bfea4ec",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3aa51a7e-96bb-475b-96b3-7cd6fe4a14af",
+ "regionLabel": "Column 2",
+ "regionName": "a2a96",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "ca5f02db-0367-4e6f-8d40-9a4c8ea72d7b",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:recordDetail",
- "id": "8804e9ec-b2a3-41f4-b8be-6a0443bea1e7",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "4bd8dfe7-7509-4b99-ad0a-0b6c9eb193bf",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "recordId": "{!recordId}",
- "width": "MEDIUM"
- },
- "componentName": "forceCommunity:relatedRecords",
- "id": "eda1b3f7-603a-4290-a4b4-0bdd5bfea4ec",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "3aa51a7e-96bb-475b-96b3-7cd6fe4a14af",
- "regionLabel": "Column 2",
- "regionName": "a2a96",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "e0d975de-d0c9-499e-9c79-15b3de367011",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "e0d975de-d0c9-499e-9c79-15b3de367011",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "{!Record._Object}: {!Record._Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "d1ccd1e3-344a-42e4-b66e-81c4ac575f87",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "d1ccd1e3-344a-42e4-b66e-81c4ac575f87",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "926e94d2-26ee-49b8-9085-abb739f639ee",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "926e94d2-26ee-49b8-9085-abb739f639ee",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-a2K"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-a2K"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/contactSupport.json b/force-app/main/default/experiences/Consumable1/views/contactSupport.json
index 498b52e..722c231 100644
--- a/force-app/main/default/experiences/Consumable1/views/contactSupport.json
+++ b/force-app/main/default/experiences/Consumable1/views/contactSupport.json
@@ -1,106 +1,106 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsTwoCol66Layout",
- "dataProviders": [],
- "id": "e8279a27-ff8f-42fc-9bd1-53b3f59350ab",
- "label": "Contact Support",
- "regions": [
- {
- "id": "4ad609eb-6693-4846-a08e-e4fa961e9991",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsTwoCol66Layout",
+ "dataProviders": [],
+ "id": "e8279a27-ff8f-42fc-9bd1-53b3f59350ab",
+ "label": "Contact Support",
+ "regions": [
{
- "componentAttributes": {
- "allowAttachments": true,
- "attachmentLabel": "Upload File",
- "buttonAlignment": "center",
- "buttonBgColor": "",
- "buttonBgHoverColor": "",
- "buttonBorderColor": "",
- "buttonMaxWidth": "",
- "buttonRadius": 0,
- "buttonTextColor": "",
- "buttonTextHoverColor": "",
- "callToAction": false,
- "callToActionButtonText": "",
- "callToActionText": "",
- "callToActionUrl": "",
- "confirmationSubtext": "We鈥檒l get back to you soon.",
- "confirmationText": "Your case was created.",
- "guestQuickActionName": "閫夋嫨鎴栭厤缃叏灞�鎿嶄綔",
- "headerSubtitle": "Tell us how we can help.",
- "headerTitle": "Contact Customer Support",
- "isMicrobatch": false,
- "quickActionName": "",
- "requestSummaryText": "Case summary"
- },
- "componentName": "forceCommunity:contactSupportForm",
- "id": "31e9512a-f8de-4d46-8f19-5c2afaf7b18b",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "d2619a80-c4a9-449f-8dd4-4305e7c1e81c",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ "id": "4ad609eb-6693-4846-a08e-e4fa961e9991",
+ "regionName": "header",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "askConfirmationQuestion": true,
- "confirmationMessageLabel": "Got it!",
- "deflectionSubtitle": "Find what you need here.",
- "deflectionTitle": "Need Answers Fast?",
- "firstQuestion": "Did this content solve your issue?",
- "maxResults": 6,
- "measureDeflection": true,
- "redirectUrl": "",
- "secondQuestion": "Stop creating your case?",
- "showArticles": true,
- "showDiscussions": false,
- "topicId": ""
- },
- "componentName": "forceCommunity:caseDeflection",
- "id": "647280c4-1a9d-4551-a0fd-1323f11625af",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "3c86f83b-c2fa-41ed-bef6-f6d97c96253c",
- "regionName": "sidebar",
- "type": "region"
- },
- {
- "id": "bacb957e-44f3-481a-aa70-7b45c0c9ba1e",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "allowAttachments": true,
+ "attachmentLabel": "Upload File",
+ "buttonAlignment": "center",
+ "buttonBgColor": "",
+ "buttonBgHoverColor": "",
+ "buttonBorderColor": "",
+ "buttonMaxWidth": "",
+ "buttonRadius": 0,
+ "buttonTextColor": "",
+ "buttonTextHoverColor": "",
+ "callToAction": false,
+ "callToActionButtonText": "",
+ "callToActionText": "",
+ "callToActionUrl": "",
+ "confirmationSubtext": "We鈥檒l get back to you soon.",
+ "confirmationText": "Your case was created.",
+ "guestQuickActionName": "閫夋嫨鎴栭厤缃叏灞�鎿嶄綔",
+ "headerSubtitle": "Tell us how we can help.",
+ "headerTitle": "Contact Customer Support",
+ "isMicrobatch": false,
+ "quickActionName": "",
+ "requestSummaryText": "Case summary"
+ },
+ "componentName": "forceCommunity:contactSupportForm",
+ "id": "31e9512a-f8de-4d46-8f19-5c2afaf7b18b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d2619a80-c4a9-449f-8dd4-4305e7c1e81c",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Contact Support"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "d0de04cd-88a3-4905-a36c-bbf4e97b7707",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "askConfirmationQuestion": true,
+ "confirmationMessageLabel": "Got it!",
+ "deflectionSubtitle": "Find what you need here.",
+ "deflectionTitle": "Need Answers Fast?",
+ "firstQuestion": "Did this content solve your issue?",
+ "maxResults": 6,
+ "measureDeflection": true,
+ "redirectUrl": "",
+ "secondQuestion": "Stop creating your case?",
+ "showArticles": true,
+ "showDiscussions": false,
+ "topicId": ""
+ },
+ "componentName": "forceCommunity:caseDeflection",
+ "id": "647280c4-1a9d-4551-a0fd-1323f11625af",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3c86f83b-c2fa-41ed-bef6-f6d97c96253c",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "bacb957e-44f3-481a-aa70-7b45c0c9ba1e",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Contact Support"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "d0de04cd-88a3-4905-a36c-bbf4e97b7707",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0b6a520d-0f34-4411-a3c9-c360b06d30fa",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "0b6a520d-0f34-4411-a3c9-c360b06d30fa",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "contactsupport"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "contactsupport"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/createRecord.json b/force-app/main/default/experiences/Consumable1/views/createRecord.json
index b999d41..8d31edf 100644
--- a/force-app/main/default/experiences/Consumable1/views/createRecord.json
+++ b/force-app/main/default/experiences/Consumable1/views/createRecord.json
@@ -1,40 +1,40 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "0f63dfba-f74b-4011-a0d5-75fe665d7bfb",
- "label": "Create Record",
- "regions": [
- {
- "id": "951aa7a1-efc5-4041-8929-3d980fe6f9b7",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "0f63dfba-f74b-4011-a0d5-75fe665d7bfb",
+ "label": "Create Record",
+ "regions": [
{
- "componentAttributes": {
- "actionApiName": "{!actionApiName}",
- "isMicrobatch": false
- },
- "componentName": "forceCommunity:createRecordForm",
- "id": "21c870a6-c4cb-476f-8dde-6906530b418e",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "951aa7a1-efc5-4041-8929-3d980fe6f9b7",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "actionApiName": "{!actionApiName}",
+ "isMicrobatch": false
+ },
+ "componentName": "forceCommunity:createRecordForm",
+ "id": "21c870a6-c4cb-476f-8dde-6906530b418e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7f501f3e-1f42-4cf8-925e-d0e654c13ff3",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "23111281-f438-4296-b47a-773feea9a17e",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "7f501f3e-1f42-4cf8-925e-d0e654c13ff3",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "23111281-f438-4296-b47a-773feea9a17e",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "createrecord"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "createrecord"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/dashboardDetail.json b/force-app/main/default/experiences/Consumable1/views/dashboardDetail.json
index 5b2b002..f22aaad 100644
--- a/force-app/main/default/experiences/Consumable1/views/dashboardDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/dashboardDetail.json
@@ -1,58 +1,58 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "4544a0e2-5ddb-49d0-b154-3903b3e7fb68",
- "label": "Dashboard Detail",
- "regions": [
- {
- "id": "cf059051-9545-478c-a076-e7ff4543d95f",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "4544a0e2-5ddb-49d0-b154-3903b3e7fb68",
+ "label": "Dashboard Detail",
+ "regions": [
{
- "componentAttributes": {
- "height": "1065",
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:dashboard",
- "id": "a3426236-d100-4c2a-9655-6d6e3930b6df",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "38ddc7db-4ed1-42e3-9ee6-ef8459588b7f",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "d8f6f3ba-bac7-47a6-aa9c-12121409f9f2",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "id": "cf059051-9545-478c-a076-e7ff4543d95f",
+ "regionName": "header",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "{!Record._Object}: {!Record._Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "d12ac0ed-4451-4546-bb3f-07f3465b5d33",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "height": "1065",
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:dashboard",
+ "id": "a3426236-d100-4c2a-9655-6d6e3930b6df",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "38ddc7db-4ed1-42e3-9ee6-ef8459588b7f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "d8f6f3ba-bac7-47a6-aa9c-12121409f9f2",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "d12ac0ed-4451-4546-bb3f-07f3465b5d33",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f48d58f3-43e0-47a0-ab8b-61f57ce68b15",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "f48d58f3-43e0-47a0-ab8b-61f57ce68b15",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-01Z"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-01Z"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/dashboardList.json b/force-app/main/default/experiences/Consumable1/views/dashboardList.json
index 428c949..9ddd1b1 100644
--- a/force-app/main/default/experiences/Consumable1/views/dashboardList.json
+++ b/force-app/main/default/experiences/Consumable1/views/dashboardList.json
@@ -1,37 +1,37 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "f10a3529-b77e-4ebc-9b99-281160c97c7f",
- "label": "Dashboard List",
- "regions": [
- {
- "id": "aace5538-56aa-4a21-bb35-9a40c211bcb0",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "f10a3529-b77e-4ebc-9b99-281160c97c7f",
+ "label": "Dashboard List",
+ "regions": [
{
- "componentAttributes": {},
- "componentName": "forceCommunity:dashboardList",
- "id": "1b31f86d-98da-4daf-b754-b394d38a581a",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "aace5538-56aa-4a21-bb35-9a40c211bcb0",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:dashboardList",
+ "id": "1b31f86d-98da-4daf-b754-b394d38a581a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "45be9d35-4310-4df5-a2ce-56f3a70c91cb",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "54a7dd8d-3042-44ce-834f-6a590085586d",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "45be9d35-4310-4df5-a2ce-56f3a70c91cb",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "54a7dd8d-3042-44ce-834f-6a590085586d",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list-01Z"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-01Z"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/error.json b/force-app/main/default/experiences/Consumable1/views/error.json
index 57815bc..f9fe99b 100644
--- a/force-app/main/default/experiences/Consumable1/views/error.json
+++ b/force-app/main/default/experiences/Consumable1/views/error.json
@@ -1,55 +1,57 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "f02c5a75-f64e-4716-b209-f9f1ef46d49a",
- "label": "Error",
- "regions": [
- {
- "id": "04daa4a0-4d2d-46f9-bc70-f4ef28375c2d",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "f02c5a75-f64e-4716-b209-f9f1ef46d49a",
+ "label": "Error",
+ "regions": [
{
- "componentAttributes": {},
- "componentName": "c:lexCancelRemoveBox",
- "id": "4edc7e53-4db8-47f7-a7e7-3af22d1b5191",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "a801a07b-dbc3-4650-9e01-934eabb7a789",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "e59b2192-4edb-4144-8f08-755e9e111518",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "id": "04daa4a0-4d2d-46f9-bc70-f4ef28375c2d",
+ "regionName": "header",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Error"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "f322e8e2-b32f-471c-a992-fdb40e009539",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div class='slds-grid slds-grid--vertical slds-align--absolute-center slds-container--large'> <div class='slds-align-middle slds-m-bottom--xx-large slds-m-top--xx-large' alt='Page not available'> <img src='/sfsites/c/img/community/slds/messaging/illustration-page-not-found.png' class='slds-p-horizontal--large'/> </div> <h4 class='slds-text-align--center slds-text-heading--large slds-text-color--weak slds-m-bottom--small'>Page not available</h4> <p class='slds-text-align--center slds-text-heading--medium slds-text-color--weak'>Maybe the page was deleted, the URL is incorrect, or something else went wrong. If you know the page exists but you still can鈥檛 get to it, please ask the community administrator for help.</p> </div>"
+ },
+ "componentName": "forceCommunity:htmlBlock",
+ "id": "8f1aad62-6fd8-4a0a-bf73-603d03724841",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a801a07b-dbc3-4650-9e01-934eabb7a789",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "e59b2192-4edb-4144-8f08-755e9e111518",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Error"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "f322e8e2-b32f-471c-a992-fdb40e009539",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ac65174b-2219-479b-8ca4-6f679e28f7d4",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "ac65174b-2219-479b-8ca4-6f679e28f7d4",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "error"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "error"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/feedDetail.json b/force-app/main/default/experiences/Consumable1/views/feedDetail.json
index c56de96..0e3c3b5 100644
--- a/force-app/main/default/experiences/Consumable1/views/feedDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/feedDetail.json
@@ -1,39 +1,39 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "eb28719b-06b5-4397-bf8d-667ec408ca46",
- "label": "Feed Detail",
- "regions": [
- {
- "id": "6a9400e1-ad64-47ea-829f-6ce793c4ad02",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "eb28719b-06b5-4397-bf8d-667ec408ca46",
+ "label": "Feed Detail",
+ "regions": [
{
- "componentAttributes": {
- "id": "{!recordId}"
- },
- "componentName": "forceCommunity:feedItemDetail",
- "id": "59f29841-0c8d-40d7-83ba-c590f2214d4e",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "6a9400e1-ad64-47ea-829f-6ce793c4ad02",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}"
+ },
+ "componentName": "forceCommunity:feedItemDetail",
+ "id": "59f29841-0c8d-40d7-83ba-c590f2214d4e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d66f961b-0bba-4472-9a69-13676f89b28e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "04b45900-4d8a-4452-86c8-ca0c8b030bd5",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "d66f961b-0bba-4472-9a69-13676f89b28e",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "04b45900-4d8a-4452-86c8-ca0c8b030bd5",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "feeditem-generic"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "feeditem-generic"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/fileDetail.json b/force-app/main/default/experiences/Consumable1/views/fileDetail.json
index e2c5062..1e5c206 100644
--- a/force-app/main/default/experiences/Consumable1/views/fileDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/fileDetail.json
@@ -1,37 +1,37 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "2322115a-ac65-4862-9104-912d42fca69a",
- "label": "File Detail",
- "regions": [
- {
- "id": "d076ed42-1664-4b15-96ee-70c0eb0707ef",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "2322115a-ac65-4862-9104-912d42fca69a",
+ "label": "File Detail",
+ "regions": [
{
- "componentAttributes": {},
- "componentName": "forceCommunity:fileDetailPage",
- "id": "1782e7b6-53ac-4493-bffe-00fe18a9a42f",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "d076ed42-1664-4b15-96ee-70c0eb0707ef",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:fileDetailPage",
+ "id": "1782e7b6-53ac-4493-bffe-00fe18a9a42f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "89a0e125-284e-4240-bf7a-52e32979cf3e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "efd311f4-16ab-4cf8-9d82-bdeda1722dfb",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "89a0e125-284e-4240-bf7a-52e32979cf3e",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "efd311f4-16ab-4cf8-9d82-bdeda1722dfb",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-069"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-069"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/fileList.json b/force-app/main/default/experiences/Consumable1/views/fileList.json
index 12791b5..9c45d58 100644
--- a/force-app/main/default/experiences/Consumable1/views/fileList.json
+++ b/force-app/main/default/experiences/Consumable1/views/fileList.json
@@ -1,39 +1,39 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "193807a6-e99f-4075-9811-62dda5b13d43",
- "label": "File List",
- "regions": [
- {
- "id": "af6a54e4-65cf-4412-831e-3d55625076ae",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "193807a6-e99f-4075-9811-62dda5b13d43",
+ "label": "File List",
+ "regions": [
{
- "componentAttributes": {
- "pageSize": 25
- },
- "componentName": "forceCommunity:filesList",
- "id": "11e918ad-fc08-4907-8d8c-5aaddd9a92e8",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "af6a54e4-65cf-4412-831e-3d55625076ae",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "pageSize": 25
+ },
+ "componentName": "forceCommunity:filesList",
+ "id": "11e918ad-fc08-4907-8d8c-5aaddd9a92e8",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4a7c43a0-6939-4ea5-b8a4-b69789506c76",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "f720b89f-67f7-40d3-9eb0-f56d0fc7d379",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "4a7c43a0-6939-4ea5-b8a4-b69789506c76",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "f720b89f-67f7-40d3-9eb0-f56d0fc7d379",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list-069"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-069"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/flow.json b/force-app/main/default/experiences/Consumable1/views/flow.json
index d16697a..ffc95a0 100644
--- a/force-app/main/default/experiences/Consumable1/views/flow.json
+++ b/force-app/main/default/experiences/Consumable1/views/flow.json
@@ -1,40 +1,40 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "4aa9507c-1470-43b3-8000-390325f6bd7d",
- "label": "Flow",
- "regions": [
- {
- "id": "4d7e2fae-45a7-4b69-9005-de342f942f38",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "4aa9507c-1470-43b3-8000-390325f6bd7d",
+ "label": "Flow",
+ "regions": [
{
- "componentAttributes": {
- "flowArguments": "",
- "flowName": "{!flowName}"
- },
- "componentName": "forceCommunity:flowCommunity",
- "id": "45d0d38f-558e-4351-99c6-e14557f11731",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "4d7e2fae-45a7-4b69-9005-de342f942f38",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "flowArguments": "",
+ "flowName": "{!flowName}"
+ },
+ "componentName": "forceCommunity:flowCommunity",
+ "id": "45d0d38f-558e-4351-99c6-e14557f11731",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "96c3caa0-6524-4903-8de2-aad59a4c6e03",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "6ac44c78-d53b-4560-bbff-73d0b87baa93",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "96c3caa0-6524-4903-8de2-aad59a4c6e03",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "6ac44c78-d53b-4560-bbff-73d0b87baa93",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "flow"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "flow"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/forgotPassword.json b/force-app/main/default/experiences/Consumable1/views/forgotPassword.json
index 6006a0b..f465373 100644
--- a/force-app/main/default/experiences/Consumable1/views/forgotPassword.json
+++ b/force-app/main/default/experiences/Consumable1/views/forgotPassword.json
@@ -1,79 +1,79 @@
{
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "eac49d21-4e4d-4e8e-997e-42dfce021ff4",
- "label": "Forgot Password",
- "regions": [
- {
- "components": [
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "eac49d21-4e4d-4e8e-997e-42dfce021ff4",
+ "label": "Forgot Password",
+ "regions": [
{
- "componentAttributes": {
- "richTextValue": "<p style=\"text-align: center;\"><span style=\"font-size: 22px; color: rgb(255, 255, 255);\">閲嶇疆瀵嗙爜</span></p>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "2b141c57-9556-45f3-9e15-90ac1419a02f",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><span style=\"color: rgb(255, 255, 255); font-size: 22px;\">閲嶇疆瀵嗙爜</span></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "2b141c57-9556-45f3-9e15-90ac1419a02f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><span style=\"color: rgb(255, 255, 255); font-size: 16px;\">璇疯緭鍏ユ偍鐨勭敤鎴峰悕</span></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "203ce0df-48b9-4b50-85af-ba98cff2599e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "checkEmailUrl": "./CheckPasswordResetEmail",
+ "submitButtonLabel": "閲嶇疆瀵嗙爜",
+ "usernameLabel": "鐢ㄦ埛鍚�"
+ },
+ "componentName": "salesforceIdentity:forgotPassword2",
+ "id": "9afeb3da-d8a0-41df-8b00-4ca493eda07b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><span style=\"color: rgb(255, 255, 255);\">鍙栨秷</span></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "ac7cc923-2a73-45a7-a124-b94477b33e34",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e9992f81-cb4b-4485-a34c-4a7db847cad9",
+ "regionName": "content",
+ "type": "region"
},
{
- "componentAttributes": {
- "richTextValue": "<p style=\"text-align: center;\"><span style=\"font-size: 16px; color: rgb(255, 255, 255);\">璇疯緭鍏ユ偍鐨勭敤鎴峰悕</span></p>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "203ce0df-48b9-4b50-85af-ba98cff2599e",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "checkEmailUrl": "./CheckPasswordResetEmail",
- "submitButtonLabel": "閲嶇疆瀵嗙爜",
- "usernameLabel": "鐢ㄦ埛鍚�"
- },
- "componentName": "salesforceIdentity:forgotPassword2",
- "id": "9afeb3da-d8a0-41df-8b00-4ca493eda07b",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "richTextValue": "<p style=\"text-align: center;\"><span style=\"color: rgb(255, 255, 255);\">鍙栨秷</span></p>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "ac7cc923-2a73-45a7-a124-b94477b33e34",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Forgot Password"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "973d922a-76bf-4c04-91b9-f10851baf1c3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "47d9db7d-c4bd-478e-9a55-3d796c30b606",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "e9992f81-cb4b-4485-a34c-4a7db847cad9",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Forgot Password"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "973d922a-76bf-4c04-91b9-f10851baf1c3",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "47d9db7d-c4bd-478e-9a55-3d796c30b606",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Login",
- "type": "view",
- "viewType": "forgot-password"
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "forgot-password"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/groupDetail.json b/force-app/main/default/experiences/Consumable1/views/groupDetail.json
index c8464b2..fe4ffbd 100644
--- a/force-app/main/default/experiences/Consumable1/views/groupDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/groupDetail.json
@@ -1,62 +1,62 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "7b772cb6-1146-4bb7-8567-853ebfe7bb2c",
- "label": "Group Detail",
- "regions": [
- {
- "id": "060923b0-77f7-42e7-b254-d75fc65bc96b",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "7b772cb6-1146-4bb7-8567-853ebfe7bb2c",
+ "label": "Group Detail",
+ "regions": [
{
- "componentAttributes": {
- "detailsTabLabel": "Details",
- "engagementManagersOnly": false,
- "engagementTabLabel": "Engagement",
- "feedTabLabel": "Feed",
- "recordId": "{!recordId}",
- "relatedTabLabel": "Related"
- },
- "componentName": "forceCommunity:groupRecordHomeTabs",
- "id": "c30496d8-d218-46e9-895f-fa9ef9e054e2",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "9c183d6e-53c2-4b3a-a3db-5c3657024407",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "ac91d64b-2f65-4f8a-ab26-d6ec7656960d",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "id": "060923b0-77f7-42e7-b254-d75fc65bc96b",
+ "regionName": "header",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "{!Record._Object}: {!Record._Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "fdab4c93-fa91-4bc1-9c74-e99e5a54315c",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "engagementManagersOnly": false,
+ "engagementTabLabel": "Engagement",
+ "feedTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related"
+ },
+ "componentName": "forceCommunity:groupRecordHomeTabs",
+ "id": "c30496d8-d218-46e9-895f-fa9ef9e054e2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9c183d6e-53c2-4b3a-a3db-5c3657024407",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "ac91d64b-2f65-4f8a-ab26-d6ec7656960d",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "fdab4c93-fa91-4bc1-9c74-e99e5a54315c",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "162e1f76-59b0-40b1-98fd-e38e325cce5e",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "162e1f76-59b0-40b1-98fd-e38e325cce5e",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-0F9"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-0F9"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/groupList.json b/force-app/main/default/experiences/Consumable1/views/groupList.json
index 6667ad4..eca12c8 100644
--- a/force-app/main/default/experiences/Consumable1/views/groupList.json
+++ b/force-app/main/default/experiences/Consumable1/views/groupList.json
@@ -1,47 +1,47 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "949c0ee3-6484-4ed7-a44f-aa417cec1835",
- "label": "Group List",
- "regions": [
- {
- "id": "9a5c8668-57b0-4ed9-b08f-7db30276d775",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "949c0ee3-6484-4ed7-a44f-aa417cec1835",
+ "label": "Group List",
+ "regions": [
{
- "componentAttributes": {
- "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 20px; color: #1e2443;\">Group List</b> </h1> "
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "cbff4378-dadd-486b-b610-0c737fcc355a",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "9a5c8668-57b0-4ed9-b08f-7db30276d775",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {},
- "componentName": "forceCommunity:groupObjectHome",
- "id": "c5348791-4e5f-4115-bc57-297af7a3560b",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 20px; color: #1e2443;\">Group List</b> </h1> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "cbff4378-dadd-486b-b610-0c737fcc355a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:groupObjectHome",
+ "id": "c5348791-4e5f-4115-bc57-297af7a3560b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e9583cc1-1d2d-49a3-bab1-4e826e4cce53",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "cc1ad297-48af-47cf-b66f-373b81e275f1",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "e9583cc1-1d2d-49a3-bab1-4e826e4cce53",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "cc1ad297-48af-47cf-b66f-373b81e275f1",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list-0F9"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-0F9"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/home.json b/force-app/main/default/experiences/Consumable1/views/home.json
index 8178a9f..90960b0 100644
--- a/force-app/main/default/experiences/Consumable1/views/home.json
+++ b/force-app/main/default/experiences/Consumable1/views/home.json
@@ -1,254 +1,254 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsTwoCol84Layout",
- "dataProviders": [],
- "id": "d47db83f-301d-4624-a8db-4474a6a30bd9",
- "label": "Home",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "d47db83f-301d-4624-a8db-4474a6a30bd9",
+ "label": "Home",
+ "regions": [
{
- "componentAttributes": {
- "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 28px; color: #1e2443;\">Welcome!</b> </h1> <p style=\"text-align: center;\"> <span style=\"font-size: 20px;\">Work on leads, register deals, and track progress with analytics.</span> </p> "
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "19cbd1e7-a45d-47b4-bdad-385c5562b1b8",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "10ac200f-b20b-4ad8-8f0d-040c3a4ba494",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "richTextValue": "<img src='/sfsites/c/img/community/prm/prm-default-banner.png' alt='Banner image for Partner Central template' style='width:100%;'/>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "f55d8364-8d18-4c91-b733-ef2e9fbeead2",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 28px; color: #1e2443;\">Welcome!</b> </h1> <p style=\"text-align: center;\"> <span style=\"font-size: 20px;\">Work on leads, register deals, and track progress with analytics.</span> </p> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "19cbd1e7-a45d-47b4-bdad-385c5562b1b8",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "10ac200f-b20b-4ad8-8f0d-040c3a4ba494",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {
- "tabsetConfig": {
- "UUID": "77ed0454-75bd-4886-bc4b-6e90cc656e73",
- "activeTab": "tab1",
- "tabs": [
+ "components": [
{
- "UUID": "c6a30d6c-fc5b-4287-ae6c-eeb943d82d95",
- "allowGuestUser": true,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {},
- "fqn": "forceCommunity:dashboard"
- }
- ],
- "tabKey": "tab1",
- "tabName": "Business Summary"
+ "componentAttributes": {
+ "richTextValue": "<img src='/sfsites/c/img/community/prm/prm-default-banner.png' alt='Banner image for Partner Central template' style='width:100%;'/>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "f55d8364-8d18-4c91-b733-ef2e9fbeead2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
},
{
- "UUID": "f0c897ae-e9b5-4eff-b7e8-b3b461359b4c",
- "allowGuestUser": true,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {
- "type": "Home"
- },
- "fqn": "forceCommunity:forceCommunityFeed"
- }
- ],
- "tabKey": "tab2",
- "tabName": "News & Updates"
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "77ed0454-75bd-4886-bc4b-6e90cc656e73",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "c6a30d6c-fc5b-4287-ae6c-eeb943d82d95",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:dashboard"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Business Summary"
+ },
+ {
+ "UUID": "f0c897ae-e9b5-4eff-b7e8-b3b461359b4c",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "type": "Home"
+ },
+ "fqn": "forceCommunity:forceCommunityFeed"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "News & Updates"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "77ed0454-75bd-4886-bc4b-6e90cc656e73",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "height": "485",
+ "recordId": "01Z10000001cpWqEAI"
+ },
+ "componentName": "forceCommunity:dashboard",
+ "id": "8a7ab317-f6e5-4781-8734-86cf083bef93",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c6a30d6c-fc5b-4287-ae6c-eeb943d82d95",
+ "regionLabel": "Business Summary",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "canChangeSorting": true,
+ "defaultFilter": "",
+ "defaultSortOrderHomeFeed": "Relevance",
+ "defaultSortOrderTopicsFeed": "Relevance",
+ "feedDesign": "DEFAULT",
+ "hasFeedSearch": true,
+ "subjectId": "{!recordId}",
+ "type": "Home"
+ },
+ "componentName": "forceCommunity:forceCommunityFeed",
+ "id": "0965c626-6474-43f8-8064-7f2a06272adc",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f0c897ae-e9b5-4eff-b7e8-b3b461359b4c",
+ "regionLabel": "News & Updates",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ],
- "useOverflowMenu": false
- }
- },
- "componentName": "forceCommunity:tabset",
- "id": "77ed0454-75bd-4886-bc4b-6e90cc656e73",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {
- "height": "485",
- "recordId": "01Z10000001cpWqEAI"
- },
- "componentName": "forceCommunity:dashboard",
- "id": "8a7ab317-f6e5-4781-8734-86cf083bef93",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "c6a30d6c-fc5b-4287-ae6c-eeb943d82d95",
- "regionLabel": "Business Summary",
- "regionName": "tab1",
- "renditionMap": {},
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "canChangeSorting": true,
- "defaultFilter": "",
- "defaultSortOrderHomeFeed": "Relevance",
- "defaultSortOrderTopicsFeed": "Relevance",
- "feedDesign": "DEFAULT",
- "hasFeedSearch": true,
- "subjectId": "{!recordId}",
- "type": "Home"
- },
- "componentName": "forceCommunity:forceCommunityFeed",
- "id": "0965c626-6474-43f8-8064-7f2a06272adc",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "f0c897ae-e9b5-4eff-b7e8-b3b461359b4c",
- "regionLabel": "News & Updates",
- "regionName": "tab2",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "8642333f-fe8d-4b21-8526-34a61169f1dc",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "actions": [
- {
- "isPublic": true,
- "name": "NewLead"
- },
- {
- "isPublic": true,
- "name": "NewOpportunity"
- },
- {
- "isPublic": true,
- "name": "NewTask"
- },
- {
- "isPublic": true,
- "name": "NewCase"
- }
],
- "label": "Quick Create"
- },
- "componentName": "forceCommunity:createRecordButton",
- "id": "bd29d6d1-7296-4e0f-b89b-6670b88e8415",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "8642333f-fe8d-4b21-8526-34a61169f1dc",
+ "regionName": "content",
+ "type": "region"
},
{
- "componentAttributes": {
- "listViewIdForNavigation": "FOLLOW",
- "navigateToListView": true,
- "pageSize": 5,
- "sortBy": "CreatedDate",
- "title": "Lead Inbox"
- },
- "componentName": "forceCommunity:leadInbox",
- "id": "330e6363-913a-4cc3-a7bc-042c71d21073",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "actions": [
+ {
+ "isPublic": true,
+ "name": "NewLead"
+ },
+ {
+ "isPublic": true,
+ "name": "NewOpportunity"
+ },
+ {
+ "isPublic": true,
+ "name": "NewTask"
+ },
+ {
+ "isPublic": true,
+ "name": "NewCase"
+ }
+ ],
+ "label": "Quick Create"
+ },
+ "componentName": "forceCommunity:createRecordButton",
+ "id": "bd29d6d1-7296-4e0f-b89b-6670b88e8415",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "listViewIdForNavigation": "FOLLOW",
+ "navigateToListView": true,
+ "pageSize": 5,
+ "sortBy": "CreatedDate",
+ "title": "Lead Inbox"
+ },
+ "componentName": "forceCommunity:leadInbox",
+ "id": "330e6363-913a-4cc3-a7bc-042c71d21073",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "MyOpportunities",
+ "layout": "COMPACT",
+ "pageSize": 5,
+ "scope": "Opportunity",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "b1ba9dd2-888a-4d31-9d43-863a18ae7a92",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "OPEN",
+ "layout": "COMPACT",
+ "pageSize": 5,
+ "scope": "Task",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "94bf80cd-edef-47dd-b710-bbcbeab44d75",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "78ad9488-9cad-453f-9ee1-053f31dd7d83",
+ "regionName": "sidebar",
+ "type": "region"
},
{
- "componentAttributes": {
- "enableInlineEdit": true,
- "filterName": "MyOpportunities",
- "layout": "COMPACT",
- "pageSize": 5,
- "scope": "Opportunity",
- "showActionBar": true,
- "showChartsPanel": true,
- "showDisplay": "showall",
- "showFilterPanel": true,
- "showImageIcon": true,
- "showManualRefreshButton": true,
- "showObjectName": true,
- "showPinnedList": true,
- "showSearchBar": true
- },
- "componentName": "forceCommunity:objectHome",
- "id": "b1ba9dd2-888a-4d31-9d43-863a18ae7a92",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "5640820f-3232-4372-8fbb-2ab9bf9b9979",
+ "regionName": "footer",
+ "type": "region"
},
{
- "componentAttributes": {
- "enableInlineEdit": true,
- "filterName": "OPEN",
- "layout": "COMPACT",
- "pageSize": 5,
- "scope": "Task",
- "showActionBar": true,
- "showChartsPanel": true,
- "showDisplay": "showall",
- "showFilterPanel": true,
- "showImageIcon": true,
- "showManualRefreshButton": true,
- "showObjectName": true,
- "showPinnedList": true,
- "showSearchBar": true
- },
- "componentName": "forceCommunity:objectHome",
- "id": "94bf80cd-edef-47dd-b710-bbcbeab44d75",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "0dfbf9f2-6bd0-4150-b2a2-29107b376fef",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9b4f717e-09a8-44bd-8e53-d8e807d0d800",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "78ad9488-9cad-453f-9ee1-053f31dd7d83",
- "regionName": "sidebar",
- "type": "region"
- },
- {
- "id": "5640820f-3232-4372-8fbb-2ab9bf9b9979",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "0dfbf9f2-6bd0-4150-b2a2-29107b376fef",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "9b4f717e-09a8-44bd-8e53-d8e807d0d800",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "home"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "home"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/homeFlexible.json b/force-app/main/default/experiences/Consumable1/views/homeFlexible.json
index 5321834..ad3378f 100644
--- a/force-app/main/default/experiences/Consumable1/views/homeFlexible.json
+++ b/force-app/main/default/experiences/Consumable1/views/homeFlexible.json
@@ -1,102 +1,102 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "0b3166bc-2eec-43fa-8adf-532f629e9392",
- "label": "Home_Flexible",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "0b3166bc-2eec-43fa-8adf-532f629e9392",
+ "label": "Home_Flexible",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "8ae08b67-88c4-492b-98a8-924b20bb1544",
- "columns": [
+ "components": [
{
- "UUID": "10b668a2-336e-4764-b5b8-303f9939b7e3",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "8ae08b67-88c4-492b-98a8-924b20bb1544",
+ "columns": [
+ {
+ "UUID": "10b668a2-336e-4764-b5b8-303f9939b7e3",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "8ae08b67-88c4-492b-98a8-924b20bb1544",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><span style=\"color: rgb(0, 71, 178); font-family: sans-serif; font-size: 48px;\">娆㈣繋鐧诲綍娑堣�楀搧杩芥函绯荤粺</span></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "d14e9b8c-a3d9-40cb-8ad0-5161fe285a74",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexLicenceReminder",
+ "id": "e0232bc3-f6c4-4671-b26e-160b3d73a0a4",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "height": "800",
+ "recordId": "01Z6D000000EyGYUA0"
+ },
+ "componentName": "forceCommunity:dashboard",
+ "id": "e0024c07-3f6e-4822-9079-47ad41f4c3a8",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "10b668a2-336e-4764-b5b8-303f9939b7e3",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "8ae08b67-88c4-492b-98a8-924b20bb1544",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {
- "richTextValue": "<p style=\"text-align: center;\"><span style=\"font-size: 48px; font-family: sans-serif; color: rgb(0, 71, 178);\">娆㈣繋鐧诲綍娑堣�楀搧杩芥函绯荤粺</span></p>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "d14e9b8c-a3d9-40cb-8ad0-5161fe285a74",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {},
- "componentName": "c:lexLicenceReminder",
- "id": "e0232bc3-f6c4-4671-b26e-160b3d73a0a4",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "height": "800",
- "recordId": "01Z6D000000EvOnUAK"
- },
- "componentName": "forceCommunity:dashboard",
- "id": "e0024c07-3f6e-4822-9079-47ad41f4c3a8",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "10b668a2-336e-4764-b5b8-303f9939b7e3",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "1bac6fb4-0163-4896-8cd7-85b1f34df29f",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "1bac6fb4-0163-4896-8cd7-85b1f34df29f",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "84e91754-c40d-4c64-a0e4-9bfae8320536",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "84e91754-c40d-4c64-a0e4-9bfae8320536",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1c72742c-4f76-41b6-b8f2-7582c4245d05",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "1c72742c-4f76-41b6-b8f2-7582c4245d05",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "home"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "home"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexAgencyInfo.json b/force-app/main/default/experiences/Consumable1/views/lexAgencyInfo.json
index 078a92c..df2d682 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexAgencyInfo.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexAgencyInfo.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "376ad65a-00b6-4198-aa04-19a6360969bc",
- "label": "LexAgencyInfo",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "376ad65a-00b6-4198-aa04-19a6360969bc",
+ "label": "LexAgencyInfo",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "d682942a-eb4a-46cc-b2ba-ee37ee9f7974",
- "columns": [
+ "components": [
{
- "UUID": "2db9074f-7efa-4fc1-aef6-e94f4af43def",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "d682942a-eb4a-46cc-b2ba-ee37ee9f7974",
+ "columns": [
+ {
+ "UUID": "2db9074f-7efa-4fc1-aef6-e94f4af43def",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "d682942a-eb4a-46cc-b2ba-ee37ee9f7974",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexAgencyInfo",
+ "id": "7762e10b-5ce6-4594-ac4e-648a78b6c9b2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2db9074f-7efa-4fc1-aef6-e94f4af43def",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "d682942a-eb4a-46cc-b2ba-ee37ee9f7974",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexAgencyInfo",
- "id": "7762e10b-5ce6-4594-ac4e-648a78b6c9b2",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "2db9074f-7efa-4fc1-aef6-e94f4af43def",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "2f459a20-131e-4548-ab46-f9920697d1d7",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "2f459a20-131e-4548-ab46-f9920697d1d7",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "缁忛攢鍟嗕俊鎭� ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "2bacf8a5-3038-42e9-b2e0-3fee8cc95ea3",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "缁忛攢鍟嗕俊鎭� ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "2bacf8a5-3038-42e9-b2e0-3fee8cc95ea3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ce682a09-6e95-438e-9f22-d2fb11703354",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "ce682a09-6e95-438e-9f22-d2fb11703354",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexagencyinfo"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexagencyinfo"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexArriveGoods.json b/force-app/main/default/experiences/Consumable1/views/lexArriveGoods.json
index 2a73665..ffdb7cf 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexArriveGoods.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexArriveGoods.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "ec872079-c8a8-4c21-a0f2-84a95d4a93e5",
- "label": "LexArriveGoods",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "ec872079-c8a8-4c21-a0f2-84a95d4a93e5",
+ "label": "LexArriveGoods",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "8aedf101-f8cf-43c7-bb42-da69a742aa74",
- "columns": [
+ "components": [
{
- "UUID": "c73eacf8-7d9a-4ed8-a53a-833c19b39b47",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "8aedf101-f8cf-43c7-bb42-da69a742aa74",
+ "columns": [
+ {
+ "UUID": "c73eacf8-7d9a-4ed8-a53a-833c19b39b47",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "8aedf101-f8cf-43c7-bb42-da69a742aa74",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexArriveGoods",
+ "id": "76c84633-d7e3-48e5-bea6-6b9bd9d53b84",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c73eacf8-7d9a-4ed8-a53a-833c19b39b47",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "8aedf101-f8cf-43c7-bb42-da69a742aa74",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexArriveGoods",
- "id": "76c84633-d7e3-48e5-bea6-6b9bd9d53b84",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "c73eacf8-7d9a-4ed8-a53a-833c19b39b47",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "54f6208b-cf85-4f6d-ab18-a932c63b5761",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "54f6208b-cf85-4f6d-ab18-a932c63b5761",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "鍏ュ簱/杩斿搧 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "930825d9-d67b-4d95-8ebf-1b16db181e7c",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "鍏ュ簱/杩斿搧 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "930825d9-d67b-4d95-8ebf-1b16db181e7c",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7fbb47ad-d923-4a89-ae79-922b35d71571",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "7fbb47ad-d923-4a89-ae79-922b35d71571",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexarrivegoods"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexarrivegoods"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexArriveGoodsMain.json b/force-app/main/default/experiences/Consumable1/views/lexArriveGoodsMain.json
index a874b32..44937ba 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexArriveGoodsMain.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexArriveGoodsMain.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "f46aba62-01c3-4a20-93c6-f9b2362717e6",
- "label": "LexArriveGoodsMain",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "f46aba62-01c3-4a20-93c6-f9b2362717e6",
+ "label": "LexArriveGoodsMain",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "c31d034f-cc57-4be4-ad72-4431e59d3dc3",
- "columns": [
+ "components": [
{
- "UUID": "d25ba467-5924-40aa-bcdd-e1ac8643be08",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "c31d034f-cc57-4be4-ad72-4431e59d3dc3",
+ "columns": [
+ {
+ "UUID": "d25ba467-5924-40aa-bcdd-e1ac8643be08",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "c31d034f-cc57-4be4-ad72-4431e59d3dc3",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexArriveGoodsMain",
+ "id": "1d0f8205-b81b-446f-866b-237e69f338d9",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d25ba467-5924-40aa-bcdd-e1ac8643be08",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "c31d034f-cc57-4be4-ad72-4431e59d3dc3",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexArriveGoodsMain",
- "id": "1d0f8205-b81b-446f-866b-237e69f338d9",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "d25ba467-5924-40aa-bcdd-e1ac8643be08",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "7efb4626-0f15-4ee3-9418-cb6419fb0bcd",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "7efb4626-0f15-4ee3-9418-cb6419fb0bcd",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "鍏ュ簱/杩斿搧 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "71e9fe84-4f41-453b-a6b5-35ed5cdbfadc",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "鍏ュ簱/杩斿搧 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "71e9fe84-4f41-453b-a6b5-35ed5cdbfadc",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "da8c93ee-69b0-47b5-83bb-61150b2aa560",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "da8c93ee-69b0-47b5-83bb-61150b2aa560",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexarrivegoodsmain"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexarrivegoodsmain"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexArriveGsDetails.json b/force-app/main/default/experiences/Consumable1/views/lexArriveGsDetails.json
index 87a28dc..e854949 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexArriveGsDetails.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexArriveGsDetails.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "91695311-fdcc-4e42-87ca-c97cfd56a2b0",
- "label": "LexArriveGsDetails",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "91695311-fdcc-4e42-87ca-c97cfd56a2b0",
+ "label": "LexArriveGsDetails",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "08f6ef6f-e105-4de7-9aaa-1f114864bdc7",
- "columns": [
+ "components": [
{
- "UUID": "08d81f90-ef1a-4686-a0e9-cc3913ed0973",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "08f6ef6f-e105-4de7-9aaa-1f114864bdc7",
+ "columns": [
+ {
+ "UUID": "08d81f90-ef1a-4686-a0e9-cc3913ed0973",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "08f6ef6f-e105-4de7-9aaa-1f114864bdc7",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexArriveGsDetails",
+ "id": "18ff9dd3-7039-4ffb-8d15-faa606335456",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "08d81f90-ef1a-4686-a0e9-cc3913ed0973",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "08f6ef6f-e105-4de7-9aaa-1f114864bdc7",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexArriveGsDetails",
- "id": "18ff9dd3-7039-4ffb-8d15-faa606335456",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "08d81f90-ef1a-4686-a0e9-cc3913ed0973",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "2ed898cb-77b1-437e-8eca-16a3a98927e0",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "2ed898cb-77b1-437e-8eca-16a3a98927e0",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "鍒拌揣 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "961b31ea-175a-4e22-8256-be31f553c70c",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "鍒拌揣 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "961b31ea-175a-4e22-8256-be31f553c70c",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "034871d6-1f2c-43f2-81d3-0e46a864ad33",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "034871d6-1f2c-43f2-81d3-0e46a864ad33",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexarrivegsdetails"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexarrivegsdetails"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexCancelRemoveBox.json b/force-app/main/default/experiences/Consumable1/views/lexCancelRemoveBox.json
index 5e6c009..39f207d 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexCancelRemoveBox.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexCancelRemoveBox.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "5fd84b73-2065-46d3-b121-2f8a77b76a3a",
- "label": "LexCancelRemoveBox",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "5fd84b73-2065-46d3-b121-2f8a77b76a3a",
+ "label": "LexCancelRemoveBox",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "e015f78b-3948-452d-9df3-fb57eaf1144a",
- "columns": [
+ "components": [
{
- "UUID": "dda851ea-a46f-4c8b-8cf7-52db66e6864a",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "e015f78b-3948-452d-9df3-fb57eaf1144a",
+ "columns": [
+ {
+ "UUID": "dda851ea-a46f-4c8b-8cf7-52db66e6864a",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "e015f78b-3948-452d-9df3-fb57eaf1144a",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexCancelRemoveBox",
+ "id": "de961c6a-bc79-4956-aaf1-9b9a9329cd7b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "dda851ea-a46f-4c8b-8cf7-52db66e6864a",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "e015f78b-3948-452d-9df3-fb57eaf1144a",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexCancelRemoveBox",
- "id": "de961c6a-bc79-4956-aaf1-9b9a9329cd7b",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "dda851ea-a46f-4c8b-8cf7-52db66e6864a",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "63a06f7d-bca6-430e-b51f-04c307c741f9",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "63a06f7d-bca6-430e-b51f-04c307c741f9",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "鍙栨秷鎷嗙洅 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "495b4819-9802-4a8b-af22-b33a65ed6dde",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "鍙栨秷鎷嗙洅 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "495b4819-9802-4a8b-af22-b33a65ed6dde",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "fc3783d1-cb91-473f-87a0-62c480010a60",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "fc3783d1-cb91-473f-87a0-62c480010a60",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexcancelremovebox"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexcancelremovebox"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexConInvoiceView.json b/force-app/main/default/experiences/Consumable1/views/lexConInvoiceView.json
index 2d93d3c..2eef16f 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexConInvoiceView.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexConInvoiceView.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "4bbfb3d2-f8f2-4b23-b5cf-711d448a2b51",
- "label": "LexConInvoiceView",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "4bbfb3d2-f8f2-4b23-b5cf-711d448a2b51",
+ "label": "LexConInvoiceView",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "d52f86d0-b463-43a9-9817-40d500fcc2ad",
- "columns": [
+ "components": [
{
- "UUID": "73c51c99-c8ed-45c9-ab83-89ff66ca5239",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "d52f86d0-b463-43a9-9817-40d500fcc2ad",
+ "columns": [
+ {
+ "UUID": "73c51c99-c8ed-45c9-ab83-89ff66ca5239",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "d52f86d0-b463-43a9-9817-40d500fcc2ad",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConInvoiceView",
+ "id": "af1fd8e8-0495-4aa4-a724-b200588463eb",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "73c51c99-c8ed-45c9-ab83-89ff66ca5239",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "d52f86d0-b463-43a9-9817-40d500fcc2ad",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexConInvoiceView",
- "id": "af1fd8e8-0495-4aa4-a724-b200588463eb",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "73c51c99-c8ed-45c9-ab83-89ff66ca5239",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "87b7dcd5-40d6-4441-9443-26d7647ded5c",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "87b7dcd5-40d6-4441-9443-26d7647ded5c",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "鍙戠エ ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "0dacce9e-e531-41b1-ad79-6a6efefc9dd1",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "鍙戠エ ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "0dacce9e-e531-41b1-ad79-6a6efefc9dd1",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d415f744-fe96-4c81-90b0-73d1b66dafbb",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "d415f744-fe96-4c81-90b0-73d1b66dafbb",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexconinvoiceview"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconinvoiceview"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexConsumable.json b/force-app/main/default/experiences/Consumable1/views/lexConsumable.json
index d481027..87ed1e9 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexConsumable.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexConsumable.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "756785e1-4fb5-4ab3-b38a-58ea679a4361",
- "label": "LexConsumable",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "756785e1-4fb5-4ab3-b38a-58ea679a4361",
+ "label": "LexConsumable",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "57a191f6-fa19-4876-98e5-da8c72cb9258",
- "columns": [
+ "components": [
{
- "UUID": "6972e5ef-d04e-4c93-a2e6-07c797f78748",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "57a191f6-fa19-4876-98e5-da8c72cb9258",
+ "columns": [
+ {
+ "UUID": "6972e5ef-d04e-4c93-a2e6-07c797f78748",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "57a191f6-fa19-4876-98e5-da8c72cb9258",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConsumable",
+ "id": "f9cc8cb4-e94e-4c9e-aeac-91e4cc01875f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6972e5ef-d04e-4c93-a2e6-07c797f78748",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "57a191f6-fa19-4876-98e5-da8c72cb9258",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexConsumable",
- "id": "f9cc8cb4-e94e-4c9e-aeac-91e4cc01875f",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "6972e5ef-d04e-4c93-a2e6-07c797f78748",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "c7989e63-0c78-4086-8ad3-f9db0c99411a",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "c7989e63-0c78-4086-8ad3-f9db0c99411a",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "璁㈠崟绠$悊 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "ee494697-6008-45fc-a3c8-0bc4b904974b",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "璁㈠崟绠$悊 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "ee494697-6008-45fc-a3c8-0bc4b904974b",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "77747bb3-667b-42f0-8885-822eb331d6c9",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "77747bb3-667b-42f0-8885-822eb331d6c9",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexconsumable"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconsumable"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexConsumableAccount.json b/force-app/main/default/experiences/Consumable1/views/lexConsumableAccount.json
index a0d58ec..551fe2d 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexConsumableAccount.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexConsumableAccount.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "65a5c9a4-0cc9-4b00-872b-b90bc1e47411",
- "label": "LexConsumableAccount",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "65a5c9a4-0cc9-4b00-872b-b90bc1e47411",
+ "label": "LexConsumableAccount",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "21aff1b6-3fc5-4eaa-9c90-3909310f21fa",
- "columns": [
+ "components": [
{
- "UUID": "600f91f5-1068-4b1f-8a86-d0a193bce882",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "21aff1b6-3fc5-4eaa-9c90-3909310f21fa",
+ "columns": [
+ {
+ "UUID": "600f91f5-1068-4b1f-8a86-d0a193bce882",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "21aff1b6-3fc5-4eaa-9c90-3909310f21fa",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConsumableAccount",
+ "id": "5ad65eac-4ab2-4e31-823f-241cd8a31b77",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "600f91f5-1068-4b1f-8a86-d0a193bce882",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "21aff1b6-3fc5-4eaa-9c90-3909310f21fa",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexConsumableAccount",
- "id": "5ad65eac-4ab2-4e31-823f-241cd8a31b77",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "600f91f5-1068-4b1f-8a86-d0a193bce882",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "da25695d-f912-48f0-a829-ff77681dea16",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "da25695d-f912-48f0-a829-ff77681dea16",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "瀹㈡埛 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "34026022-6682-46cb-920f-4c24fbf656f8",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "瀹㈡埛 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "34026022-6682-46cb-920f-4c24fbf656f8",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "149173b3-ab4a-47d1-824b-c73e4cee068d",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "149173b3-ab4a-47d1-824b-c73e4cee068d",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexconsumableaccount"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconsumableaccount"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexConsumableAccountInfoPrint.json b/force-app/main/default/experiences/Consumable1/views/lexConsumableAccountInfoPrint.json
index 1eb0454..8e99a3f 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexConsumableAccountInfoPrint.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexConsumableAccountInfoPrint.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "5d615179-dd62-4481-a874-de16a69d7374",
- "label": "LexConsumableAccountInfoPrint",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "5d615179-dd62-4481-a874-de16a69d7374",
+ "label": "LexConsumableAccountInfoPrint",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "e9f987a3-92bd-470f-9afb-7804ecfcf578",
- "columns": [
+ "components": [
{
- "UUID": "81d173bc-f9c3-4758-bc9e-570e99d92545",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "e9f987a3-92bd-470f-9afb-7804ecfcf578",
+ "columns": [
+ {
+ "UUID": "81d173bc-f9c3-4758-bc9e-570e99d92545",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "e9f987a3-92bd-470f-9afb-7804ecfcf578",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConsumableAccountInfoPrint",
+ "id": "03fc88cd-8285-4d6e-878b-5c75456032a2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "81d173bc-f9c3-4758-bc9e-570e99d92545",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "e9f987a3-92bd-470f-9afb-7804ecfcf578",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexConsumableAccountInfoPrint",
- "id": "03fc88cd-8285-4d6e-878b-5c75456032a2",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "81d173bc-f9c3-4758-bc9e-570e99d92545",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "4ff49dcd-f175-4fb8-a368-30195f218e22",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "4ff49dcd-f175-4fb8-a368-30195f218e22",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "瀹㈡埛璇︾粏淇℃伅 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "d08e3a38-3069-4275-b3f5-6db7c28ced59",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "瀹㈡埛璇︾粏淇℃伅 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "d08e3a38-3069-4275-b3f5-6db7c28ced59",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6b25d2b2-bb26-48ff-9e0f-226821b3d62a",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "6b25d2b2-bb26-48ff-9e0f-226821b3d62a",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexconsumableaccountinfoprint"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconsumableaccountinfoprint"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexConsumableOrderManage.json b/force-app/main/default/experiences/Consumable1/views/lexConsumableOrderManage.json
index 6ec201a..30e2339 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexConsumableOrderManage.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexConsumableOrderManage.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "0c6f8778-bba4-4726-97f6-b639cce7c99e",
- "label": "LexConsumableOrderManage",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "0c6f8778-bba4-4726-97f6-b639cce7c99e",
+ "label": "LexConsumableOrderManage",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "c816a792-e9df-4280-a595-4f7a2de81a72",
- "columns": [
+ "components": [
{
- "UUID": "0dc2ef0d-dfb8-4347-814b-251e3e16b10b",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "c816a792-e9df-4280-a595-4f7a2de81a72",
+ "columns": [
+ {
+ "UUID": "0dc2ef0d-dfb8-4347-814b-251e3e16b10b",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "c816a792-e9df-4280-a595-4f7a2de81a72",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConsumableOrderManage",
+ "id": "480e4dee-4c0b-43d9-b81a-ba3ecd96f4e3",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0dc2ef0d-dfb8-4347-814b-251e3e16b10b",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "c816a792-e9df-4280-a595-4f7a2de81a72",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexConsumableOrderManage",
- "id": "480e4dee-4c0b-43d9-b81a-ba3ecd96f4e3",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "0dc2ef0d-dfb8-4347-814b-251e3e16b10b",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "5425b128-bc13-4529-9741-c37eca368806",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "5425b128-bc13-4529-9741-c37eca368806",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "璁㈠崟绠$悊 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "01bf62a2-fff9-4f38-8cea-6c4a8df40eda",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "璁㈠崟绠$悊 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "01bf62a2-fff9-4f38-8cea-6c4a8df40eda",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "44d87bc4-7c1d-43ce-acc5-e20a018fc57d",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "44d87bc4-7c1d-43ce-acc5-e20a018fc57d",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexconsumableordermanage"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconsumableordermanage"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexInventory.json b/force-app/main/default/experiences/Consumable1/views/lexInventory.json
index c268e94..9e7be55 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexInventory.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexInventory.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "5a24538d-0a99-40a3-a6a1-4496d0333a05",
- "label": "LexInventory",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "5a24538d-0a99-40a3-a6a1-4496d0333a05",
+ "label": "LexInventory",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "01395e1f-fbd3-4be4-9cf0-24df23b8b820",
- "columns": [
+ "components": [
{
- "UUID": "c27de1cb-1805-4399-a99e-cbd7ff3ecd10",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "01395e1f-fbd3-4be4-9cf0-24df23b8b820",
+ "columns": [
+ {
+ "UUID": "c27de1cb-1805-4399-a99e-cbd7ff3ecd10",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "01395e1f-fbd3-4be4-9cf0-24df23b8b820",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexInventory",
+ "id": "567f3188-aa85-40b7-b2fa-9caf501e4b44",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c27de1cb-1805-4399-a99e-cbd7ff3ecd10",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "01395e1f-fbd3-4be4-9cf0-24df23b8b820",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexInventory",
- "id": "567f3188-aa85-40b7-b2fa-9caf501e4b44",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "c27de1cb-1805-4399-a99e-cbd7ff3ecd10",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "45b8b9b5-bc3e-45f2-b8fb-a5c5b77924b6",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "45b8b9b5-bc3e-45f2-b8fb-a5c5b77924b6",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "搴撳瓨鐩樼偣 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "49bde76e-3088-4ae0-91e2-a0d7f68a7ca6",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "搴撳瓨鐩樼偣 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "49bde76e-3088-4ae0-91e2-a0d7f68a7ca6",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9e364a81-0317-445a-b308-8746e418eea6",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "9e364a81-0317-445a-b308-8746e418eea6",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexinventory"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexinventory"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexInventoryView.json b/force-app/main/default/experiences/Consumable1/views/lexInventoryView.json
index 2f7118e..1088048 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexInventoryView.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexInventoryView.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "afb34dd9-404b-4bea-949d-07c42681d821",
- "label": "LexInventoryView",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "afb34dd9-404b-4bea-949d-07c42681d821",
+ "label": "LexInventoryView",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "747680b6-fa7d-40b9-9fb2-5eeedec2111f",
- "columns": [
+ "components": [
{
- "UUID": "7dae9038-fe28-4dd2-beda-d90442f650d1",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "747680b6-fa7d-40b9-9fb2-5eeedec2111f",
+ "columns": [
+ {
+ "UUID": "7dae9038-fe28-4dd2-beda-d90442f650d1",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "747680b6-fa7d-40b9-9fb2-5eeedec2111f",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexinventoryViewLWC",
+ "id": "2db28040-90b0-4c1c-8793-28479780c069",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7dae9038-fe28-4dd2-beda-d90442f650d1",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "747680b6-fa7d-40b9-9fb2-5eeedec2111f",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexinventoryViewLWC",
- "id": "2db28040-90b0-4c1c-8793-28479780c069",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "7dae9038-fe28-4dd2-beda-d90442f650d1",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "f951952b-7e3c-4622-bef8-b6c333c9913d",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "f951952b-7e3c-4622-bef8-b6c333c9913d",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "搴撳瓨 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "54a2e6e2-68ec-4ad2-9e6d-e2ab853931bc",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "搴撳瓨 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "54a2e6e2-68ec-4ad2-9e6d-e2ab853931bc",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "417422ac-dd59-4afe-bf23-e35fda0bc023",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "417422ac-dd59-4afe-bf23-e35fda0bc023",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexinventoryview"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexinventoryview"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexOutboundorderImport.json b/force-app/main/default/experiences/Consumable1/views/lexOutboundorderImport.json
index 9af97c4..177a5b9 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexOutboundorderImport.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexOutboundorderImport.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "e8224149-f1b9-4c44-8839-4d9737739c72",
- "label": "LexOutboundorderImport",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "e8224149-f1b9-4c44-8839-4d9737739c72",
+ "label": "LexOutboundorderImport",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "83050955-aa3b-4e32-80a6-da5359b8362a",
- "columns": [
+ "components": [
{
- "UUID": "fbfcccd6-3c29-49b4-9a8b-ce0fadccab60",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "83050955-aa3b-4e32-80a6-da5359b8362a",
+ "columns": [
+ {
+ "UUID": "fbfcccd6-3c29-49b4-9a8b-ce0fadccab60",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "83050955-aa3b-4e32-80a6-da5359b8362a",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexOutboundorderImport",
+ "id": "68e59073-ba5b-46d7-b8cd-552587a748a2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "fbfcccd6-3c29-49b4-9a8b-ce0fadccab60",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "83050955-aa3b-4e32-80a6-da5359b8362a",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexOutboundorderImport",
- "id": "68e59073-ba5b-46d7-b8cd-552587a748a2",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "fbfcccd6-3c29-49b4-9a8b-ce0fadccab60",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "f58362fc-b12d-41ba-bb99-fce2e6dba3fb",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "f58362fc-b12d-41ba-bb99-fce2e6dba3fb",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "鍑哄簱 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "e562ea3b-ac29-4271-9010-481f74d59780",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "鍑哄簱 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "e562ea3b-ac29-4271-9010-481f74d59780",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ddc00cfb-8eb3-49b7-8d9a-44ac4fe1979b",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "ddc00cfb-8eb3-49b7-8d9a-44ac4fe1979b",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexoutboundorderimport"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexoutboundorderimport"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexOverdueStock.json b/force-app/main/default/experiences/Consumable1/views/lexOverdueStock.json
index 28ec6e3..846bbc0 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexOverdueStock.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexOverdueStock.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "b0f2e8e7-62fd-42f3-bf3a-4bdf40b02bf4",
- "label": "LexOverdueStock",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "b0f2e8e7-62fd-42f3-bf3a-4bdf40b02bf4",
+ "label": "LexOverdueStock",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "cdbb12a5-9c06-495c-97bd-111a00ed0880",
- "columns": [
+ "components": [
{
- "UUID": "4d9b4158-4336-47ad-8d7f-f2814c843237",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "cdbb12a5-9c06-495c-97bd-111a00ed0880",
+ "columns": [
+ {
+ "UUID": "4d9b4158-4336-47ad-8d7f-f2814c843237",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "cdbb12a5-9c06-495c-97bd-111a00ed0880",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexOverdueStock",
+ "id": "1840dac3-e335-4628-b86b-d46d31831af5",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4d9b4158-4336-47ad-8d7f-f2814c843237",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "cdbb12a5-9c06-495c-97bd-111a00ed0880",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexOverdueStock",
- "id": "1840dac3-e335-4628-b86b-d46d31831af5",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "4d9b4158-4336-47ad-8d7f-f2814c843237",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "70a9cbdd-d242-44d6-9ade-f12aa57a6101",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "70a9cbdd-d242-44d6-9ade-f12aa57a6101",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "杩囨湡搴撳瓨閿�瀛� ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "65ba038f-9318-496d-9863-751d9b084cb0",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "杩囨湡搴撳瓨閿�瀛� ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "65ba038f-9318-496d-9863-751d9b084cb0",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "87ad5976-ac2f-446f-aa1e-f9a0d34525fb",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "87ad5976-ac2f-446f-aa1e-f9a0d34525fb",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexoverduestock"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexoverduestock"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexProductLimitEdit.json b/force-app/main/default/experiences/Consumable1/views/lexProductLimitEdit.json
index 99f9a97..9fd72cd 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexProductLimitEdit.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexProductLimitEdit.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "57a80c74-e471-4b90-b214-580f7d3b66cd",
- "label": "LexProductLimitEdit",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "57a80c74-e471-4b90-b214-580f7d3b66cd",
+ "label": "LexProductLimitEdit",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "59856db5-4bb3-414f-83d5-8ae14ccfc0d6",
- "columns": [
+ "components": [
{
- "UUID": "b78140a7-5f4e-4685-a3c4-0a92ba950dc7",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "59856db5-4bb3-414f-83d5-8ae14ccfc0d6",
+ "columns": [
+ {
+ "UUID": "b78140a7-5f4e-4685-a3c4-0a92ba950dc7",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "59856db5-4bb3-414f-83d5-8ae14ccfc0d6",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexProductLimitEdit",
+ "id": "a096dd49-afe0-4796-8af0-cedd62664f2c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "b78140a7-5f4e-4685-a3c4-0a92ba950dc7",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "59856db5-4bb3-414f-83d5-8ae14ccfc0d6",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexProductLimitEdit",
- "id": "a096dd49-afe0-4796-8af0-cedd62664f2c",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "b78140a7-5f4e-4685-a3c4-0a92ba950dc7",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "d17f6f02-da3e-4235-81d9-1502e0ec6ca3",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "d17f6f02-da3e-4235-81d9-1502e0ec6ca3",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "搴撳瓨涓婁笅闄� ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "f5b7eb44-8ce3-40c9-b71a-d5d9f3552955",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "搴撳瓨涓婁笅闄� ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "f5b7eb44-8ce3-40c9-b71a-d5d9f3552955",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2257c0fb-ca9b-4e22-9e82-b20b1c22eb1d",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "2257c0fb-ca9b-4e22-9e82-b20b1c22eb1d",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexproductlimitedit"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexproductlimitedit"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexRemoveBox.json b/force-app/main/default/experiences/Consumable1/views/lexRemoveBox.json
index 88a99f3..bc2fc69 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexRemoveBox.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexRemoveBox.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "b4a2ba1b-3827-4ec7-8f8e-5461c3893ce0",
- "label": "LexRemoveBox",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "b4a2ba1b-3827-4ec7-8f8e-5461c3893ce0",
+ "label": "LexRemoveBox",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "c8d284bf-b761-4de7-88ad-d976e03783c2",
- "columns": [
+ "components": [
{
- "UUID": "74d9ee71-cdf0-46f9-87e0-56feb724f0de",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "c8d284bf-b761-4de7-88ad-d976e03783c2",
+ "columns": [
+ {
+ "UUID": "74d9ee71-cdf0-46f9-87e0-56feb724f0de",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "c8d284bf-b761-4de7-88ad-d976e03783c2",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexRemoveBox",
+ "id": "ff8f68eb-eb9b-40db-94ca-6aec9fb379c3",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "74d9ee71-cdf0-46f9-87e0-56feb724f0de",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "c8d284bf-b761-4de7-88ad-d976e03783c2",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexRemoveBox",
- "id": "ff8f68eb-eb9b-40db-94ca-6aec9fb379c3",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "74d9ee71-cdf0-46f9-87e0-56feb724f0de",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "e555311d-b588-4ab1-add1-4f830b0ebc03",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "e555311d-b588-4ab1-add1-4f830b0ebc03",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "鎷嗙洅 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "ad6dcd28-5872-4bac-b016-ea09e096a6c3",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "鎷嗙洅 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "ad6dcd28-5872-4bac-b016-ea09e096a6c3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7c28cb01-e082-404a-81a8-7afe5f78c023",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "7c28cb01-e082-404a-81a8-7afe5f78c023",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexremovebox"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexremovebox"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexSaleAndDelivery.json b/force-app/main/default/experiences/Consumable1/views/lexSaleAndDelivery.json
index a90d8f3..8b7ef80 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexSaleAndDelivery.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexSaleAndDelivery.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "e5d81e8f-b0a5-4bf3-b11b-08dd8fef1a3c",
- "label": "LexSaleAndDelivery",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "e5d81e8f-b0a5-4bf3-b11b-08dd8fef1a3c",
+ "label": "LexSaleAndDelivery",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "02b47908-d44c-4ffe-89b4-6aad09343bd0",
- "columns": [
+ "components": [
{
- "UUID": "a1846e1c-c395-4e77-9218-5375bac83cb8",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "02b47908-d44c-4ffe-89b4-6aad09343bd0",
+ "columns": [
+ {
+ "UUID": "a1846e1c-c395-4e77-9218-5375bac83cb8",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "02b47908-d44c-4ffe-89b4-6aad09343bd0",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexSaleAndDelivery",
+ "id": "b77b243f-d2ce-42ff-8349-048ba0100837",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a1846e1c-c395-4e77-9218-5375bac83cb8",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "02b47908-d44c-4ffe-89b4-6aad09343bd0",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexSaleAndDelivery",
- "id": "b77b243f-d2ce-42ff-8349-048ba0100837",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "a1846e1c-c395-4e77-9218-5375bac83cb8",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "ed598892-294e-43c2-b91c-4df7dae88a1b",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "ed598892-294e-43c2-b91c-4df7dae88a1b",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "鍑哄簱 ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "5ee61636-ae06-4737-9d50-20fd9a6971db",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "鍑哄簱 ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "5ee61636-ae06-4737-9d50-20fd9a6971db",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e27b9d74-50aa-4022-bffa-7f6a08f707b8",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "e27b9d74-50aa-4022-bffa-7f6a08f707b8",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexsaleanddelivery"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexsaleanddelivery"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexSummonsCreat.json b/force-app/main/default/experiences/Consumable1/views/lexSummonsCreat.json
index df400e3..ae40f95 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexSummonsCreat.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexSummonsCreat.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "c2e9c913-ab1c-4b38-899b-136fb95066fb",
- "label": "LexSummonsCreat",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "c2e9c913-ab1c-4b38-899b-136fb95066fb",
+ "label": "LexSummonsCreat",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "2f081513-f8b1-4a18-93ed-07528785644e",
- "columns": [
+ "components": [
{
- "UUID": "0034a928-ed12-4a8f-8b61-e2a879be675e",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "2f081513-f8b1-4a18-93ed-07528785644e",
+ "columns": [
+ {
+ "UUID": "0034a928-ed12-4a8f-8b61-e2a879be675e",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "2f081513-f8b1-4a18-93ed-07528785644e",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexSummonsCreat",
+ "id": "78274e15-2cc6-4863-8ce4-2d10e89d802f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0034a928-ed12-4a8f-8b61-e2a879be675e",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "2f081513-f8b1-4a18-93ed-07528785644e",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexSummonsCreat",
- "id": "78274e15-2cc6-4863-8ce4-2d10e89d802f",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "0034a928-ed12-4a8f-8b61-e2a879be675e",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "74103ed0-eb74-4ae0-a9f5-aa1bed790517",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "74103ed0-eb74-4ae0-a9f5-aa1bed790517",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "鍑哄簱鍗曟槑缁� ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "569ba6aa-c702-4a13-aed6-79a792706f37",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "鍑哄簱鍗曟槑缁� ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "569ba6aa-c702-4a13-aed6-79a792706f37",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "cf2865b2-d5a1-434f-b53f-927218bca79c",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "cf2865b2-d5a1-434f-b53f-927218bca79c",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lexsummonscreat"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexsummonscreat"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/lexTopPage.json b/force-app/main/default/experiences/Consumable1/views/lexTopPage.json
index 9a07076..5e105da 100644
--- a/force-app/main/default/experiences/Consumable1/views/lexTopPage.json
+++ b/force-app/main/default/experiences/Consumable1/views/lexTopPage.json
@@ -1,81 +1,81 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "09c93676-a531-4ba7-8708-cc47f8458c90",
- "label": "LexTopPage",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "09c93676-a531-4ba7-8708-cc47f8458c90",
+ "label": "LexTopPage",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "3493c458-56a0-4990-8499-772754716049",
- "columns": [
+ "components": [
{
- "UUID": "9eb85cd6-22f0-4d6c-89bf-bfdf13eb4889",
- "columnKey": "1",
- "columnName": "Column 1",
- "columnWidth": "12",
- "seedComponents": []
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "3493c458-56a0-4990-8499-772754716049",
+ "columns": [
+ {
+ "UUID": "9eb85cd6-22f0-4d6c-89bf-bfdf13eb4889",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "3493c458-56a0-4990-8499-772754716049",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexTopPage",
+ "id": "a987052c-27fc-4881-a10a-76813f6f1a37",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9eb85cd6-22f0-4d6c-89bf-bfdf13eb4889",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 300
- },
- "componentName": "forceCommunity:section",
- "id": "3493c458-56a0-4990-8499-772754716049",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {},
- "componentName": "c:lexTopPage",
- "id": "a987052c-27fc-4881-a10a-76813f6f1a37",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "9eb85cd6-22f0-4d6c-89bf-bfdf13eb4889",
- "regionLabel": "Column 1",
- "regionName": "1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "fef29330-80e6-40e7-83ce-74b60dd68887",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ ],
+ "id": "fef29330-80e6-40e7-83ce-74b60dd68887",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "璁㈠崟鎻愮ず ~ 娑堣�楀搧绠$悊绯荤粺"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "6dbf3064-0f5f-4648-a787-4a09f1d915fe",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "璁㈠崟鎻愮ず ~ 娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "6dbf3064-0f5f-4648-a787-4a09f1d915fe",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8cd1759d-130c-40a0-99b0-395cdd92cdc8",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "8cd1759d-130c-40a0-99b0-395cdd92cdc8",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "custom-lextoppage"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lextoppage"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/login.json b/force-app/main/default/experiences/Consumable1/views/login.json
index 51663e1..c452118 100644
--- a/force-app/main/default/experiences/Consumable1/views/login.json
+++ b/force-app/main/default/experiences/Consumable1/views/login.json
@@ -1,74 +1,74 @@
{
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "7c2dd152-d6d3-4652-bbfe-cb8e11d83c43",
- "label": "Login",
- "regions": [
- {
- "components": [
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "7c2dd152-d6d3-4652-bbfe-cb8e11d83c43",
+ "label": "Login",
+ "regions": [
{
- "componentAttributes": {},
- "componentName": "salesforceIdentity:communityLogo2",
- "id": "a96beff8-2727-4f74-b08a-e908ab6e72be",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:communityLogo2",
+ "id": "a96beff8-2727-4f74-b08a-e908ab6e72be",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "forgotPasswordLabel": "蹇樿瀵嗙爜锛�",
+ "forgotPasswordUrl": "/ForgotPassword",
+ "loginButtonLabel": "鐧诲綍",
+ "passwordLabel": "瀵嗙爜",
+ "selfRegisterLabel": "Not a member?",
+ "selfRegisterUrl": "/SelfRegister",
+ "startUrl": "",
+ "usernameLabel": "鐢ㄦ埛鍚�"
+ },
+ "componentName": "salesforceIdentity:loginForm2",
+ "id": "2de8135d-cb57-4614-9afe-2453f1cbe676",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "headerText": "",
+ "showHeader": false,
+ "useCommunityDomainSso": true
+ },
+ "componentName": "salesforceIdentity:socialLogin2",
+ "id": "f4d72a64-5e5f-48d8-8bb7-4253a8309b40",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "11b4798e-fa84-4594-beea-500d991e23f2",
+ "regionName": "content",
+ "type": "region"
},
{
- "componentAttributes": {
- "forgotPasswordLabel": "蹇樿瀵嗙爜锛�",
- "forgotPasswordUrl": "/ForgotPassword",
- "loginButtonLabel": "鐧诲綍",
- "passwordLabel": "瀵嗙爜",
- "selfRegisterLabel": "Not a member?",
- "selfRegisterUrl": "/SelfRegister",
- "startUrl": "",
- "usernameLabel": "鐢ㄦ埛鍚�"
- },
- "componentName": "salesforceIdentity:loginForm2",
- "id": "2de8135d-cb57-4614-9afe-2453f1cbe676",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "headerText": "",
- "showHeader": false,
- "useCommunityDomainSso": true
- },
- "componentName": "salesforceIdentity:socialLogin2",
- "id": "f4d72a64-5e5f-48d8-8bb7-4253a8309b40",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Login"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "c72bcc7d-29ea-40e6-969c-c818f267f8f4",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "02d41dc1-9a37-47cf-90c8-438d40bba670",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "11b4798e-fa84-4594-beea-500d991e23f2",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Login"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "c72bcc7d-29ea-40e6-969c-c818f267f8f4",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "02d41dc1-9a37-47cf-90c8-438d40bba670",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Login",
- "type": "view",
- "viewType": "login-home"
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "login-home"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/loginError.json b/force-app/main/default/experiences/Consumable1/views/loginError.json
index 7446d54..b550b31 100644
--- a/force-app/main/default/experiences/Consumable1/views/loginError.json
+++ b/force-app/main/default/experiences/Consumable1/views/loginError.json
@@ -1,57 +1,57 @@
{
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "ba40442c-80fc-411f-8c02-9cfce2ab1372",
- "label": "Login Error",
- "regions": [
- {
- "id": "18c0d543-48fc-4503-82bf-96cb3cb61e53",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "ba40442c-80fc-411f-8c02-9cfce2ab1372",
+ "label": "Login Error",
+ "regions": [
{
- "componentAttributes": {
- "richTextValue": "<div style=\"text-align: center;\">Invalid Page</div>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "98a859f9-d38a-4454-b376-39558ba5a564",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "6778281e-69dc-4122-abff-15414362a3e3",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "562ba090-15e4-4844-baa3-568c08ef67be",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "id": "18c0d543-48fc-4503-82bf-96cb3cb61e53",
+ "regionName": "header",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Login Error"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "1367586b-b337-4e9b-b465-e2acd34738f8",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\">Invalid Page</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "98a859f9-d38a-4454-b376-39558ba5a564",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6778281e-69dc-4122-abff-15414362a3e3",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "562ba090-15e4-4844-baa3-568c08ef67be",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Login Error"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "1367586b-b337-4e9b-b465-e2acd34738f8",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "012e5756-ea8f-4d49-9778-29654974830d",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "012e5756-ea8f-4d49-9778-29654974830d",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Login",
- "type": "view",
- "viewType": "login-error"
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "login-error"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/mDFAndCoop.json b/force-app/main/default/experiences/Consumable1/views/mDFAndCoop.json
index 2a46b71..c49ad34 100644
--- a/force-app/main/default/experiences/Consumable1/views/mDFAndCoop.json
+++ b/force-app/main/default/experiences/Consumable1/views/mDFAndCoop.json
@@ -1,198 +1,198 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "b253bc1d-fe4a-4156-91f4-88f4725a3616",
- "label": "MDF and Coop",
- "regions": [
- {
- "id": "b9dd4ac2-817d-4d34-874f-58def515fa47",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "b253bc1d-fe4a-4156-91f4-88f4725a3616",
+ "label": "MDF and Coop",
+ "regions": [
{
- "componentAttributes": {
- "richTextValue": " <p> <span style=\"font-size: 20px;\">Request and Manage your Market Developments Funds.</span> </p> "
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "d8f1484b-ac5d-4563-adc7-7c5635d6cf40",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "b9dd4ac2-817d-4d34-874f-58def515fa47",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {
- "tabsetConfig": {
- "UUID": "08adad9c-71b1-4370-8572-a165f1f855a9",
- "activeTab": "tab1",
- "tabs": [
+ "components": [
{
- "UUID": "dcaa5816-93b6-44fe-ae88-a3854c2c8863",
- "allowGuestUser": false,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {
- "filterName": "Recent",
- "scope": "PartnerFundAllocation"
- },
- "fqn": "forceCommunity:objectHome"
- }
- ],
- "tabKey": "tab1",
- "tabName": "Fund Allocations"
+ "componentAttributes": {
+ "richTextValue": " <p> <span style=\"font-size: 20px;\">Request and Manage your Market Developments Funds.</span> </p> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "d8f1484b-ac5d-4563-adc7-7c5635d6cf40",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
},
{
- "UUID": "24cea51a-4f10-469b-ab68-750473d6a847",
- "allowGuestUser": false,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {
- "filterName": "Recent",
- "scope": "PartnerFundRequest"
- },
- "fqn": "forceCommunity:objectHome"
- }
- ],
- "tabKey": "tab2",
- "tabName": "Fund Requests"
- },
- {
- "UUID": "46f65d8c-5983-4c38-9ea8-df27e49d3084",
- "allowGuestUser": false,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {
- "filterName": "Recent",
- "scope": "PartnerFundClaim"
- },
- "fqn": "forceCommunity:objectHome"
- }
- ],
- "tabKey": "tab3",
- "tabName": "Fund Claims"
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "08adad9c-71b1-4370-8572-a165f1f855a9",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "dcaa5816-93b6-44fe-ae88-a3854c2c8863",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "PartnerFundAllocation"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Fund Allocations"
+ },
+ {
+ "UUID": "24cea51a-4f10-469b-ab68-750473d6a847",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "PartnerFundRequest"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "Fund Requests"
+ },
+ {
+ "UUID": "46f65d8c-5983-4c38-9ea8-df27e49d3084",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "PartnerFundClaim"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab3",
+ "tabName": "Fund Claims"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "08adad9c-71b1-4370-8572-a165f1f855a9",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "PartnerFundAllocation",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "26811630-f8f1-4326-91cc-25e8d8f712b3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "dcaa5816-93b6-44fe-ae88-a3854c2c8863",
+ "regionLabel": "Fund Allocations",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "PartnerFundRequest",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "8a6128de-fe3d-4cf1-b3a3-a81eefa1afd5",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "24cea51a-4f10-469b-ab68-750473d6a847",
+ "regionLabel": "Fund Requests",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "PartnerFundClaim",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "d838a652-cd5d-4c9c-bce0-37ec29b10b2b",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "46f65d8c-5983-4c38-9ea8-df27e49d3084",
+ "regionLabel": "Fund Claims",
+ "regionName": "tab3",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ],
- "useOverflowMenu": false
- }
- },
- "componentName": "forceCommunity:tabset",
- "id": "08adad9c-71b1-4370-8572-a165f1f855a9",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {
- "enableInlineEdit": true,
- "filterName": "Recent",
- "layout": "FULL",
- "pageSize": 25,
- "scope": "PartnerFundAllocation",
- "showActionBar": true,
- "showChartsPanel": true,
- "showDisplay": "showall",
- "showFilterPanel": true,
- "showImageIcon": true,
- "showManualRefreshButton": true,
- "showObjectName": true,
- "showPinnedList": true,
- "showSearchBar": true
- },
- "componentName": "forceCommunity:objectHome",
- "id": "26811630-f8f1-4326-91cc-25e8d8f712b3",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "dcaa5816-93b6-44fe-ae88-a3854c2c8863",
- "regionLabel": "Fund Allocations",
- "regionName": "tab1",
- "renditionMap": {},
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "enableInlineEdit": true,
- "filterName": "Recent",
- "layout": "FULL",
- "pageSize": 25,
- "scope": "PartnerFundRequest",
- "showActionBar": true,
- "showChartsPanel": true,
- "showDisplay": "showall",
- "showFilterPanel": true,
- "showImageIcon": true,
- "showManualRefreshButton": true,
- "showObjectName": true,
- "showPinnedList": true,
- "showSearchBar": true
- },
- "componentName": "forceCommunity:objectHome",
- "id": "8a6128de-fe3d-4cf1-b3a3-a81eefa1afd5",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "24cea51a-4f10-469b-ab68-750473d6a847",
- "regionLabel": "Fund Requests",
- "regionName": "tab2",
- "renditionMap": {},
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "enableInlineEdit": true,
- "filterName": "Recent",
- "layout": "FULL",
- "pageSize": 25,
- "scope": "PartnerFundClaim",
- "showActionBar": true,
- "showChartsPanel": true,
- "showDisplay": "showall",
- "showFilterPanel": true,
- "showImageIcon": true,
- "showManualRefreshButton": true,
- "showObjectName": true,
- "showPinnedList": true,
- "showSearchBar": true
- },
- "componentName": "forceCommunity:objectHome",
- "id": "d838a652-cd5d-4c9c-bce0-37ec29b10b2b",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "46f65d8c-5983-4c38-9ea8-df27e49d3084",
- "regionLabel": "Fund Claims",
- "regionName": "tab3",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ ],
+ "id": "4a8ad10b-ad7d-4821-90e2-73e4e75738fe",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "d8a1fe61-f24d-4969-bfa9-9745db5d1021",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "4a8ad10b-ad7d-4821-90e2-73e4e75738fe",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "d8a1fe61-f24d-4969-bfa9-9745db5d1021",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "mdf"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "mdf"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/messages.json b/force-app/main/default/experiences/Consumable1/views/messages.json
index 590fccd..ff7bc29 100644
--- a/force-app/main/default/experiences/Consumable1/views/messages.json
+++ b/force-app/main/default/experiences/Consumable1/views/messages.json
@@ -1,27 +1,27 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "55f1ae5d-c9ac-44ad-bb27-4c22dddc2a2e",
- "label": "Messages",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "55f1ae5d-c9ac-44ad-bb27-4c22dddc2a2e",
+ "label": "Messages",
+ "regions": [
{
- "componentAttributes": {},
- "componentName": "forceChatter:messages",
- "id": "e42525c8-73ea-4e9f-8306-81021473d168",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceChatter:messages",
+ "id": "e42525c8-73ea-4e9f-8306-81021473d168",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a60f42f5-2ed2-4a01-93e5-dff8f3f5552f",
+ "regionName": "content",
+ "type": "region"
}
- ],
- "id": "a60f42f5-2ed2-4a01-93e5-dff8f3f5552f",
- "regionName": "content",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "messages"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "messages"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/myAccount.json b/force-app/main/default/experiences/Consumable1/views/myAccount.json
index 182110b..6c25530 100644
--- a/force-app/main/default/experiences/Consumable1/views/myAccount.json
+++ b/force-app/main/default/experiences/Consumable1/views/myAccount.json
@@ -1,109 +1,109 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:dynamicLayout",
- "dataProviders": [],
- "id": "2cd7a2df-9e65-4663-9e35-9b4134b4beb1",
- "label": "My Account",
- "regions": [
- {
- "id": "23da0649-b638-4675-96dc-b2c9ab32b443",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "2cd7a2df-9e65-4663-9e35-9b4134b4beb1",
+ "label": "My Account",
+ "regions": [
{
- "componentAttributes": {
- "background": "background: rgba(0,0,0,0)",
- "backgroundOverlay": "rgba(0,0,0,0.5)",
- "contentAreaWidth": 100,
- "sectionConfig": {
- "UUID": "f07182ad-75fc-4431-b6ba-400214c3d0ac",
- "columns": [
+ "id": "23da0649-b638-4675-96dc-b2c9ab32b443",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
{
- "UUID": "3e85aad9-15c8-45da-bc0d-22dc37dd17d0",
- "columnKey": "col1",
- "columnName": "column 1",
- "columnWidth": "12",
- "seedComponents": [
- {
- "attributes": {
- "recordId": "{!CurrentUser.accountId}",
- "sfdc:identifier": "forceCommunity_recordHeadline"
- },
- "fqn": "forceCommunity:recordHeadline"
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "f07182ad-75fc-4431-b6ba-400214c3d0ac",
+ "columns": [
+ {
+ "UUID": "3e85aad9-15c8-45da-bc0d-22dc37dd17d0",
+ "columnKey": "col1",
+ "columnName": "column 1",
+ "columnWidth": "12",
+ "seedComponents": [
+ {
+ "attributes": {
+ "recordId": "{!CurrentUser.accountId}",
+ "sfdc:identifier": "forceCommunity_recordHeadline"
+ },
+ "fqn": "forceCommunity:recordHeadline"
+ },
+ {
+ "attributes": {
+ "recordId": "{!CurrentUser.accountId}",
+ "sfdc:identifier": "forceCommunity_recordHomeTabs"
+ },
+ "fqn": "forceCommunity:recordHomeTabs"
+ }
+ ]
+ }
+ ]
+ },
+ "sectionHeight": 32
},
- {
- "attributes": {
- "recordId": "{!CurrentUser.accountId}",
- "sfdc:identifier": "forceCommunity_recordHomeTabs"
- },
- "fqn": "forceCommunity:recordHomeTabs"
- }
- ]
+ "componentName": "forceCommunity:section",
+ "id": "f07182ad-75fc-4431-b6ba-400214c3d0ac",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!CurrentUser.accountId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "76e15d29-c38a-4c72-94b5-08c54a39de76",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!CurrentUser.accountId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "7d8fefed-3819-4d75-8e8a-4757c623ab25",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3e85aad9-15c8-45da-bc0d-22dc37dd17d0",
+ "regionLabel": "column 1",
+ "regionName": "col1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ]
- },
- "sectionHeight": 32
- },
- "componentName": "forceCommunity:section",
- "id": "f07182ad-75fc-4431-b6ba-400214c3d0ac",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {
- "recordId": "{!CurrentUser.accountId}"
- },
- "componentName": "forceCommunity:recordHeadline",
- "id": "76e15d29-c38a-4c72-94b5-08c54a39de76",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "detailsTabLabel": "Details",
- "discussionsTabLabel": "Feed",
- "recordId": "{!CurrentUser.accountId}",
- "relatedTabLabel": "Related",
- "showLegacyActivityComposer": false,
- "tab1Type": "details",
- "tab2Type": "related",
- "tab3Type": "chatter",
- "tab4Type": "none",
- "timelineTabLabel": "Activity"
- },
- "componentName": "forceCommunity:recordHomeTabs",
- "id": "7d8fefed-3819-4d75-8e8a-4757c623ab25",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "3e85aad9-15c8-45da-bc0d-22dc37dd17d0",
- "regionLabel": "column 1",
- "regionName": "col1",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ ],
+ "id": "b79a556f-e9df-45e1-bdab-1be9be91cfff",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "f4a5b0fd-e283-47e3-9183-5364ef798372",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "b79a556f-e9df-45e1-bdab-1be9be91cfff",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "f4a5b0fd-e283-47e3-9183-5364ef798372",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "my-account"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "my-account"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/neworder.json b/force-app/main/default/experiences/Consumable1/views/neworder.json
new file mode 100644
index 0000000..08515e3
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable1/views/neworder.json
@@ -0,0 +1,71 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "375bc286-f467-4c6c-a3e1-be4bfbf27bea",
+ "label": "neworder",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "08d89588-c1ce-4bc1-9bdd-d012e47b026f",
+ "columns": [
+ {
+ "UUID": "83df4bfa-1d2a-4829-9ba9-65834d4f3f05",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "08d89588-c1ce-4bc1-9bdd-d012e47b026f",
+ "regions": [
+ {
+ "id": "83df4bfa-1d2a-4829-9ba9-65834d4f3f05",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1c6349c5-8998-4e97-9ba1-2d71ee91f017",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "neworder"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "6e91d4af-e050-40e5-b64a-b1643c6a8624",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e35f5e98-87aa-4104-8e79-549130296571",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-neworder"
+}
diff --git a/force-app/main/default/experiences/Consumable1/views/questionDetail.json b/force-app/main/default/experiences/Consumable1/views/questionDetail.json
index 4436c56..8c6ec3a 100644
--- a/force-app/main/default/experiences/Consumable1/views/questionDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/questionDetail.json
@@ -1,105 +1,105 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsTwoCol84Layout",
- "dataProviders": [],
- "id": "c29033d4-ea89-4311-9a8f-9b1cee010f96",
- "label": "Question Detail",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "c29033d4-ea89-4311-9a8f-9b1cee010f96",
+ "label": "Question Detail",
+ "regions": [
{
- "componentAttributes": {
- "bannerText": "",
- "bannerTextWithKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineArticles\">articles</a> and <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
- "bannerTextWithoutKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
- "pageType": "discussion",
- "showSubTopics": true,
- "title": "Welcome!",
- "uniqueNameOrId": "{!recordId}"
- },
- "componentName": "forceCommunity:headline",
- "id": "84f7129f-6ae2-44fa-8479-fda420f20cf4",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "eb922188-1611-42f3-be3f-671128373c93",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "id": "{!feedItemId}"
- },
- "componentName": "forceCommunity:feedItemDetail",
- "id": "5f16c8ce-8910-4700-bf92-03bebb56d251",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "23ae6845-c63c-4df8-b294-1460939daf5b",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "numberOfItems": 5,
- "showViewCounts": true,
- "title": "Related Questions"
- },
- "componentName": "selfService:similarQuestions",
- "id": "2560050a-7f4a-4fe3-833b-4086f89d7cae",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "bannerText": "",
+ "bannerTextWithKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineArticles\">articles</a> and <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "bannerTextWithoutKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "pageType": "discussion",
+ "showSubTopics": true,
+ "title": "Welcome!",
+ "uniqueNameOrId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:headline",
+ "id": "84f7129f-6ae2-44fa-8479-fda420f20cf4",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "eb922188-1611-42f3-be3f-671128373c93",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {
- "channel": "DefaultChannel",
- "title": ""
- },
- "componentName": "forceCommunity:recommendations",
- "id": "fefd9c6b-eac3-425b-a0a6-2721a4131d4f",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "386f4a49-d920-4888-a249-1ae1f4c1b0d8",
- "regionName": "sidebar",
- "type": "region"
- },
- {
- "id": "efd4c33f-e3bf-4021-abf9-be0b741a0cd7",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!feedItemId}"
+ },
+ "componentName": "forceCommunity:feedItemDetail",
+ "id": "5f16c8ce-8910-4700-bf92-03bebb56d251",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "23ae6845-c63c-4df8-b294-1460939daf5b",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "{!Record.Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "f0017168-74ce-4587-8af7-4c5e0dc965eb",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "numberOfItems": 5,
+ "showViewCounts": true,
+ "title": "Related Questions"
+ },
+ "componentName": "selfService:similarQuestions",
+ "id": "2560050a-7f4a-4fe3-833b-4086f89d7cae",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "channel": "DefaultChannel",
+ "title": ""
+ },
+ "componentName": "forceCommunity:recommendations",
+ "id": "fefd9c6b-eac3-425b-a0a6-2721a4131d4f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "386f4a49-d920-4888-a249-1ae1f4c1b0d8",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "efd4c33f-e3bf-4021-abf9-be0b741a0cd7",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record.Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "f0017168-74ce-4587-8af7-4c5e0dc965eb",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "05ba98f5-e29b-47ce-8099-b16e50e34f30",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "05ba98f5-e29b-47ce-8099-b16e50e34f30",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "feeditem"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "feeditem"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/quipDocsRelatedList.json b/force-app/main/default/experiences/Consumable1/views/quipDocsRelatedList.json
index 3729346..a21cde0 100644
--- a/force-app/main/default/experiences/Consumable1/views/quipDocsRelatedList.json
+++ b/force-app/main/default/experiences/Consumable1/views/quipDocsRelatedList.json
@@ -1,39 +1,39 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "be244254-9e8f-46bd-83e0-a6cdb3780540",
- "label": "Quip Docs Related List",
- "regions": [
- {
- "id": "2a9b05d7-cafd-4e4d-8f30-067e7e2f45ed",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "be244254-9e8f-46bd-83e0-a6cdb3780540",
+ "label": "Quip Docs Related List",
+ "regions": [
{
- "componentAttributes": {
- "parentRecordId": "{!recordId}"
- },
- "componentName": "forceCommunity:relatedQuipItemsView",
- "id": "a2c16258-72fb-4eb3-8b04-b80f8b4beafb",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "2a9b05d7-cafd-4e4d-8f30-067e7e2f45ed",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "parentRecordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:relatedQuipItemsView",
+ "id": "a2c16258-72fb-4eb3-8b04-b80f8b4beafb",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9bc5f2b8-7b65-47fc-a3d5-1d83ada44a72",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "73a8a853-5872-4055-8a42-9723c11db0e9",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "9bc5f2b8-7b65-47fc-a3d5-1d83ada44a72",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "73a8a853-5872-4055-8a42-9723c11db0e9",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "extrelated-quip"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "extrelated-quip"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/recordDetail.json b/force-app/main/default/experiences/Consumable1/views/recordDetail.json
index 13612d3..ff168a2 100644
--- a/force-app/main/default/experiences/Consumable1/views/recordDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/recordDetail.json
@@ -1,76 +1,76 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "d30889c1-09fc-407a-8d9d-155b305cce6f",
- "label": "Record Detail",
- "regions": [
- {
- "id": "58b8dc89-c614-4b2a-be76-1cd2733c7a2d",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "d30889c1-09fc-407a-8d9d-155b305cce6f",
+ "label": "Record Detail",
+ "regions": [
{
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:recordHeadline",
- "id": "d6471194-6314-4cc2-ad8d-8844760b584f",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "58b8dc89-c614-4b2a-be76-1cd2733c7a2d",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {
- "detailsTabLabel": "Details",
- "discussionsTabLabel": "Feed",
- "recordId": "{!recordId}",
- "relatedTabLabel": "Related",
- "showLegacyActivityComposer": false,
- "tab1Type": "details",
- "tab2Type": "related",
- "tab3Type": "chatter",
- "tab4Type": "none",
- "timelineTabLabel": "Activity"
- },
- "componentName": "forceCommunity:recordHomeTabs",
- "id": "43f7a144-34dd-4fe7-a4d6-9b4ce60a2633",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "79ac024a-2855-4c3d-ad2e-1529cb3588a7",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "73ccaf9e-c514-4a24-aaf6-c5c0d176c356",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "d6471194-6314-4cc2-ad8d-8844760b584f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "none",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "43f7a144-34dd-4fe7-a4d6-9b4ce60a2633",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "79ac024a-2855-4c3d-ad2e-1529cb3588a7",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "{!Record._Object}: {!Record._Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "23c28297-68e4-4693-b7c2-eddb3a672965",
- "renditionMap": {},
- "type": "component"
+ "id": "73ccaf9e-c514-4a24-aaf6-c5c0d176c356",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "23c28297-68e4-4693-b7c2-eddb3a672965",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "06f1cca0-baa5-4d1c-b943-72735f101956",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "06f1cca0-baa5-4d1c-b943-72735f101956",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/recordList.json b/force-app/main/default/experiences/Consumable1/views/recordList.json
index 0c5d6e8..2839f7e 100644
--- a/force-app/main/default/experiences/Consumable1/views/recordList.json
+++ b/force-app/main/default/experiences/Consumable1/views/recordList.json
@@ -1,52 +1,52 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "f14a9999-9077-4660-a62f-b9df05228f6c",
- "label": "Record List",
- "regions": [
- {
- "id": "c142f9c9-d513-4938-8678-c78cb05ca097",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "f14a9999-9077-4660-a62f-b9df05228f6c",
+ "label": "Record List",
+ "regions": [
{
- "componentAttributes": {
- "enableInlineEdit": true,
- "filterName": "{!filterId}",
- "layout": "FULL",
- "pageSize": 25,
- "scope": "{!objectName}",
- "showActionBar": true,
- "showChartsPanel": true,
- "showDisplay": "showall",
- "showFilterPanel": true,
- "showImageIcon": true,
- "showManualRefreshButton": true,
- "showObjectName": true,
- "showPinnedList": true,
- "showSearchBar": true
- },
- "componentName": "forceCommunity:objectHome",
- "id": "9cf46f79-994f-4674-9cf3-8f1309488f9e",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "c142f9c9-d513-4938-8678-c78cb05ca097",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "{!filterId}",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "{!objectName}",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "9cf46f79-994f-4674-9cf3-8f1309488f9e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2d62ef08-0512-4116-8b2c-877e41412967",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "53ed7ccf-2c5e-428f-84aa-9c122f0a2031",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "2d62ef08-0512-4116-8b2c-877e41412967",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "53ed7ccf-2c5e-428f-84aa-9c122f0a2031",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/register.json b/force-app/main/default/experiences/Consumable1/views/register.json
index 25ecd2f..7fe0302 100644
--- a/force-app/main/default/experiences/Consumable1/views/register.json
+++ b/force-app/main/default/experiences/Consumable1/views/register.json
@@ -1,96 +1,96 @@
{
- "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "7cadb098-b80c-40d4-a33c-714c36f8a2f3",
- "label": "Register",
- "regions": [
- {
- "components": [
+ "appPageId": "7756c67f-7774-4fe1-b1c2-eecb19f9c6a5",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "7cadb098-b80c-40d4-a33c-714c36f8a2f3",
+ "label": "Register",
+ "regions": [
{
- "componentAttributes": {},
- "componentName": "salesforceIdentity:communityLogo2",
- "id": "03d0e758-407a-4e8e-83ee-5a0ab3c4e2a0",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:communityLogo2",
+ "id": "03d0e758-407a-4e8e-83ee-5a0ab3c4e2a0",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\" class=\"inverseTextColor\">Join the community to receive personalized information and customer support.</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "59a3555f-3c74-470e-a473-bb10cbe44afb",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "confirmPasswordLabel": "Confirm Password",
+ "emailLabel": "Email",
+ "extraFieldsFieldSet": "",
+ "firstnameLabel": "First Name",
+ "includePasswordField": false,
+ "lastnameLabel": "Last Name",
+ "passwordLabel": "Create Password",
+ "regConfirmUrl": "./CheckPasswordResetEmail",
+ "startUrl": "",
+ "submitButtonLabel": "Sign Up"
+ },
+ "componentName": "salesforceIdentity:selfRegister2",
+ "id": "b4dd7cc4-4fc4-4f38-bd0e-c89b1f32590b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "headerText": "",
+ "showHeader": false,
+ "useCommunityDomainSso": true
+ },
+ "componentName": "salesforceIdentity:socialLogin2",
+ "id": "3af49aa2-c5df-472d-a9f8-d1320b632c9a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><a class=\"inverseTextColor\" href=\"./\">Already have an account?</a></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "a1dd5955-819a-4921-80e5-29882955ca7e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4d46ac5c-75c6-4730-a2ac-bc191a179149",
+ "regionName": "content",
+ "type": "region"
},
{
- "componentAttributes": {
- "richTextValue": "<div style=\"text-align: center;\" class=\"inverseTextColor\">Join the community to receive personalized information and customer support.</div>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "59a3555f-3c74-470e-a473-bb10cbe44afb",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "confirmPasswordLabel": "Confirm Password",
- "emailLabel": "Email",
- "extraFieldsFieldSet": "",
- "firstnameLabel": "First Name",
- "includePasswordField": false,
- "lastnameLabel": "Last Name",
- "passwordLabel": "Create Password",
- "regConfirmUrl": "./CheckPasswordResetEmail",
- "startUrl": "",
- "submitButtonLabel": "Sign Up"
- },
- "componentName": "salesforceIdentity:selfRegister2",
- "id": "b4dd7cc4-4fc4-4f38-bd0e-c89b1f32590b",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "headerText": "",
- "showHeader": false,
- "useCommunityDomainSso": true
- },
- "componentName": "salesforceIdentity:socialLogin2",
- "id": "3af49aa2-c5df-472d-a9f8-d1320b632c9a",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- },
- {
- "componentAttributes": {
- "richTextValue": "<div style=\"text-align: center;\"><a class=\"inverseTextColor\" href=\"./\">Already have an account?</a></div>"
- },
- "componentName": "forceCommunity:richTextInline",
- "id": "a1dd5955-819a-4921-80e5-29882955ca7e",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Register"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "fce946a1-2d69-4ed8-bf94-2a246fc10291",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7d12b5c7-f9c8-45e9-a4e8-71d4639011af",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "4d46ac5c-75c6-4730-a2ac-bc191a179149",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Register"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "fce946a1-2d69-4ed8-bf94-2a246fc10291",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "7d12b5c7-f9c8-45e9-a4e8-71d4639011af",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Login",
- "type": "view",
- "viewType": "self-register"
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "self-register"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/relatedRecordList.json b/force-app/main/default/experiences/Consumable1/views/relatedRecordList.json
index 1f008e0..6533c3b 100644
--- a/force-app/main/default/experiences/Consumable1/views/relatedRecordList.json
+++ b/force-app/main/default/experiences/Consumable1/views/relatedRecordList.json
@@ -1,45 +1,45 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "2a182209-2527-4335-b672-176196ee6a0d",
- "label": "Related Record List",
- "regions": [
- {
- "id": "6caa2d71-5392-4b0c-b738-9ac48f16aa52",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "2a182209-2527-4335-b672-176196ee6a0d",
+ "label": "Related Record List",
+ "regions": [
{
- "componentAttributes": {
- "customTitle": "",
- "parentRecordId": "{!recordId}",
- "relatedListName": "{!relationshipApiName}",
- "showBreadCrumbs": true,
- "showCustomTitle": false,
- "showManualRefreshButton": true,
- "showRowNumbers": true
- },
- "componentName": "forceCommunity:relatedList",
- "id": "d476d8c7-4802-4819-951f-39a101f6be63",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "6caa2d71-5392-4b0c-b738-9ac48f16aa52",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "d476d8c7-4802-4819-951f-39a101f6be63",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "715ead5b-8d41-4edc-bf80-4daebe3464c7",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "d6ef29fb-2766-4065-a1c9-2e251d3a24da",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "715ead5b-8d41-4edc-bf80-4daebe3464c7",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "d6ef29fb-2766-4065-a1c9-2e251d3a24da",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/reportBuilder.json b/force-app/main/default/experiences/Consumable1/views/reportBuilder.json
index 4160705..bb9974c 100644
--- a/force-app/main/default/experiences/Consumable1/views/reportBuilder.json
+++ b/force-app/main/default/experiences/Consumable1/views/reportBuilder.json
@@ -1,39 +1,39 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "059d5f4a-e616-4540-be96-a34b294fb2a4",
- "label": "Report Builder",
- "regions": [
- {
- "id": "b0668fae-e6be-4e0f-85ad-0bd2ff51e3f4",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "059d5f4a-e616-4540-be96-a34b294fb2a4",
+ "label": "Report Builder",
+ "regions": [
{
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:reportBuilder",
- "id": "2d38f9cf-474d-490e-92d0-ab02343f9c7a",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "b0668fae-e6be-4e0f-85ad-0bd2ff51e3f4",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:reportBuilder",
+ "id": "2d38f9cf-474d-490e-92d0-ab02343f9c7a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "69520259-ca39-49a9-bc51-28a53ce45025",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "2bcf6747-9ca7-4726-8e9a-dd1334643433",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "69520259-ca39-49a9-bc51-28a53ce45025",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "2bcf6747-9ca7-4726-8e9a-dd1334643433",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "createreport"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "createreport"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/reportDetail.json b/force-app/main/default/experiences/Consumable1/views/reportDetail.json
index 60dc5ef..3c2c1f8 100644
--- a/force-app/main/default/experiences/Consumable1/views/reportDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/reportDetail.json
@@ -1,57 +1,57 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "66e48eb0-9203-4842-9fde-8b4e7e63b8ac",
- "label": "Report Detail",
- "regions": [
- {
- "id": "993df7e2-02c2-4043-80f2-75b1fc26b624",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "66e48eb0-9203-4842-9fde-8b4e7e63b8ac",
+ "label": "Report Detail",
+ "regions": [
{
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:reportPage",
- "id": "a1126338-71f3-4c8b-9fad-fdb3915a12a4",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "993ff9cc-3b17-46b6-a40d-f1f97c4db48c",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "8429749f-ee7b-4be7-b953-ce1a28fe724e",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "id": "993df7e2-02c2-4043-80f2-75b1fc26b624",
+ "regionName": "header",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "{!Record._Object}: {!Record._Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "a848b6bf-1473-4426-ad50-f3e85894c8c2",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:reportPage",
+ "id": "a1126338-71f3-4c8b-9fad-fdb3915a12a4",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "993ff9cc-3b17-46b6-a40d-f1f97c4db48c",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "8429749f-ee7b-4be7-b953-ce1a28fe724e",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "a848b6bf-1473-4426-ad50-f3e85894c8c2",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c3a6a3e2-ce86-4417-ba50-39bb2e8d6939",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "c3a6a3e2-ce86-4417-ba50-39bb2e8d6939",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-00O"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-00O"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/reportList.json b/force-app/main/default/experiences/Consumable1/views/reportList.json
index 7b61f1a..20bce34 100644
--- a/force-app/main/default/experiences/Consumable1/views/reportList.json
+++ b/force-app/main/default/experiences/Consumable1/views/reportList.json
@@ -1,37 +1,37 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "cbac51d9-cfc4-4fa7-bf92-603361ff1747",
- "label": "Report List",
- "regions": [
- {
- "id": "21fd7f4b-ed35-4d5e-ba32-40b7cabd6c5a",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "cbac51d9-cfc4-4fa7-bf92-603361ff1747",
+ "label": "Report List",
+ "regions": [
{
- "componentAttributes": {},
- "componentName": "forceCommunity:reportList",
- "id": "48d0998f-cc83-4f4d-8467-473e2648f1d5",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "21fd7f4b-ed35-4d5e-ba32-40b7cabd6c5a",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:reportList",
+ "id": "48d0998f-cc83-4f4d-8467-473e2648f1d5",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "165cdeb7-c542-4a6a-8c42-214baade96e1",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "1fce8eb4-ac5b-4828-9fea-364d5916925b",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "165cdeb7-c542-4a6a-8c42-214baade96e1",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "1fce8eb4-ac5b-4828-9fea-364d5916925b",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list-00O"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-00O"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/resources.json b/force-app/main/default/experiences/Consumable1/views/resources.json
index e48ff3e..932c41e 100644
--- a/force-app/main/default/experiences/Consumable1/views/resources.json
+++ b/force-app/main/default/experiences/Consumable1/views/resources.json
@@ -1,75 +1,75 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsTwoCol84Layout",
- "dataProviders": [],
- "id": "dc215254-3731-423c-ba11-3d87746598e8",
- "label": "Resources",
- "regions": [
- {
- "id": "72cef312-c96f-46e1-859d-1dfc1ac2c05a",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "dc215254-3731-423c-ba11-3d87746598e8",
+ "label": "Resources",
+ "regions": [
{
- "componentAttributes": {
- "librariesHeaderLabel": "Libraries",
- "showWorkspaceImage": true
- },
- "componentName": "forceCommunity:workspacesList",
- "id": "d02b982c-c404-4ee6-b7eb-81cc247d2e58",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "a5fb005e-9493-44c8-be82-daa9ed4855db",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ "id": "72cef312-c96f-46e1-859d-1dfc1ac2c05a",
+ "regionName": "header",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "title": "Popular Now"
- },
- "componentName": "forceChatter:recommendationsBig",
- "id": "2a81731a-6fd2-4087-a360-23531384ce7b",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "5f304697-36f3-4e31-985d-b54afad66c28",
- "regionName": "sidebar",
- "type": "region"
- },
- {
- "id": "31ffad04-7009-47aa-b99a-01f08cb17d10",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "librariesHeaderLabel": "Libraries",
+ "showWorkspaceImage": true
+ },
+ "componentName": "forceCommunity:workspacesList",
+ "id": "d02b982c-c404-4ee6-b7eb-81cc247d2e58",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a5fb005e-9493-44c8-be82-daa9ed4855db",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Resources"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "a49b7653-081c-4721-ab11-85ec5590cf32",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {
+ "title": "Popular Now"
+ },
+ "componentName": "forceChatter:recommendationsBig",
+ "id": "2a81731a-6fd2-4087-a360-23531384ce7b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5f304697-36f3-4e31-985d-b54afad66c28",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "31ffad04-7009-47aa-b99a-01f08cb17d10",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Resources"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "a49b7653-081c-4721-ab11-85ec5590cf32",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "85fe3418-3e87-45e0-ab01-9530875c41c3",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "85fe3418-3e87-45e0-ab01-9530875c41c3",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "files"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "files"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/search.json b/force-app/main/default/experiences/Consumable1/views/search.json
index df70c64..fd3e32a 100644
--- a/force-app/main/default/experiences/Consumable1/views/search.json
+++ b/force-app/main/default/experiences/Consumable1/views/search.json
@@ -1,59 +1,55 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "74aeae6d-8d40-433e-8168-45175ee356a6",
- "label": "Search",
- "regions": [
- {
- "id": "f0168968-61fd-41cb-b7af-1eff3f8b32f3",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "74aeae6d-8d40-433e-8168-45175ee356a6",
+ "label": "Search",
+ "regions": [
{
- "componentAttributes": {
- "scopes": [
- {
- "isPublic": false,
- "name": "Lead"
- },
- {
- "isPublic": false,
- "name": "Opportunity"
- },
- {
- "isPublic": false,
- "name": "Campaign"
- },
- {
- "isPublic": false,
- "name": "ContentDocument"
- }
+ "id": "f0168968-61fd-41cb-b7af-1eff3f8b32f3",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "scopes": [
+ {
+ "isPublic": false,
+ "name": "ContentDocument"
+ },
+ {
+ "isPublic": true,
+ "name": "Consumable_order__c"
+ },
+ {
+ "isPublic": true,
+ "name": "Consumable_order_details2__c"
+ }
+ ],
+ "searchResultFiltering": true,
+ "searchTerm": "{!term}",
+ "showTopResults": true
+ },
+ "componentName": "forceCommunity:search",
+ "id": "5f9e6d47-2bcc-4097-a92c-1ed613352db1",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
],
- "searchResultFiltering": true,
- "searchTerm": "{!term}",
- "showTopResults": true
- },
- "componentName": "forceCommunity:search",
- "id": "5f9e6d47-2bcc-4097-a92c-1ed613352db1",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "5724ab02-cf0e-4aa8-b6d9-27c93918f75f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "de00bfc5-bb66-40f6-8d83-e45d83c02f17",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "5724ab02-cf0e-4aa8-b6d9-27c93918f75f",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "de00bfc5-bb66-40f6-8d83-e45d83c02f17",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "global-search"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "global-search"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/streamDetail.json b/force-app/main/default/experiences/Consumable1/views/streamDetail.json
index 2ec526e..5eed214 100644
--- a/force-app/main/default/experiences/Consumable1/views/streamDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/streamDetail.json
@@ -1,39 +1,39 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "e3ef5ec3-0aba-44b3-b608-6f939cf49c88",
- "label": "Stream Detail",
- "regions": [
- {
- "id": "48e57d3b-e3d0-4f72-be2f-a2fae7b65a0a",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "e3ef5ec3-0aba-44b3-b608-6f939cf49c88",
+ "label": "Stream Detail",
+ "regions": [
{
- "componentAttributes": {
- "id": "{!recordId}"
- },
- "componentName": "forceCommunity:streamDetail",
- "id": "8c078f23-692d-4f99-a755-99025f03a1b5",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "48e57d3b-e3d0-4f72-be2f-a2fae7b65a0a",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}"
+ },
+ "componentName": "forceCommunity:streamDetail",
+ "id": "8c078f23-692d-4f99-a755-99025f03a1b5",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "cd36c50d-c89e-4a33-a381-6e21077775b9",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "a16a1ef4-47ac-4970-9d30-9cc7d15dd873",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "cd36c50d-c89e-4a33-a381-6e21077775b9",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "a16a1ef4-47ac-4970-9d30-9cc7d15dd873",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-0Fq"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-0Fq"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/streamList.json b/force-app/main/default/experiences/Consumable1/views/streamList.json
index 3e39578..937c4cc 100644
--- a/force-app/main/default/experiences/Consumable1/views/streamList.json
+++ b/force-app/main/default/experiences/Consumable1/views/streamList.json
@@ -1,27 +1,27 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "e1275716-f06a-4a27-a667-19c49eefb083",
- "label": "Stream List",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "e1275716-f06a-4a27-a667-19c49eefb083",
+ "label": "Stream List",
+ "regions": [
{
- "componentAttributes": {},
- "componentName": "forceCommunity:streamList",
- "id": "c55e158b-0343-40b2-bca0-888ab4e1ae18",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:streamList",
+ "id": "c55e158b-0343-40b2-bca0-888ab4e1ae18",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e93a4c80-2373-4f62-a413-6b91c74928e1",
+ "regionName": "content",
+ "type": "region"
}
- ],
- "id": "e93a4c80-2373-4f62-a413-6b91c74928e1",
- "regionName": "content",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list-0Fq"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-0Fq"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/topicCatalog.json b/force-app/main/default/experiences/Consumable1/views/topicCatalog.json
index 5253a92..6a820dd 100644
--- a/force-app/main/default/experiences/Consumable1/views/topicCatalog.json
+++ b/force-app/main/default/experiences/Consumable1/views/topicCatalog.json
@@ -1,73 +1,73 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "3912430c-3c10-4bf3-bf37-5a619a596491",
- "label": "Topic Catalog",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "3912430c-3c10-4bf3-bf37-5a619a596491",
+ "label": "Topic Catalog",
+ "regions": [
{
- "componentAttributes": {
- "bannerText": "",
- "bannerTextWithKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineArticles\">articles</a> and <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
- "bannerTextWithoutKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
- "pageType": "",
- "showSubTopics": true,
- "title": "Topics",
- "uniqueNameOrId": ""
- },
- "componentName": "forceCommunity:headline",
- "id": "bb3cf42e-7839-4d1b-9397-61f43400e885",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "e0161633-e87a-4873-a308-f87278393077",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "bannerText": "",
+ "bannerTextWithKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineArticles\">articles</a> and <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "bannerTextWithoutKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "pageType": "",
+ "showSubTopics": true,
+ "title": "Topics",
+ "uniqueNameOrId": ""
+ },
+ "componentName": "forceCommunity:headline",
+ "id": "bb3cf42e-7839-4d1b-9397-61f43400e885",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e0161633-e87a-4873-a308-f87278393077",
+ "regionName": "header",
+ "type": "region"
+ },
{
- "componentAttributes": {},
- "componentName": "forceCommunity:topicCatalog",
- "id": "c4149a20-518c-4518-8f16-363ca10cb9fd",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "0250f471-2b7a-48e8-894e-775d5d3edb11",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "36965db0-cc03-4916-b508-0b3747f12f39",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:topicCatalog",
+ "id": "c4149a20-518c-4518-8f16-363ca10cb9fd",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0250f471-2b7a-48e8-894e-775d5d3edb11",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "Topic Catalog"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "e81daa52-bbe0-4f2d-bd9e-a43f4156623b",
- "renditionMap": {},
- "type": "component"
+ "id": "36965db0-cc03-4916-b508-0b3747f12f39",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Topic Catalog"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "e81daa52-bbe0-4f2d-bd9e-a43f4156623b",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "44a8bb9f-9013-450a-ab7d-d6da72269e33",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "44a8bb9f-9013-450a-ab7d-d6da72269e33",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "topic-catalog"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "topic-catalog"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/topicDetail.json b/force-app/main/default/experiences/Consumable1/views/topicDetail.json
index c4af326..78f499a 100644
--- a/force-app/main/default/experiences/Consumable1/views/topicDetail.json
+++ b/force-app/main/default/experiences/Consumable1/views/topicDetail.json
@@ -1,93 +1,93 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsTwoCol84Layout",
- "dataProviders": [],
- "id": "060ff5da-04b3-49de-8fb8-03decd8c188c",
- "label": "Topic Detail",
- "regions": [
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "060ff5da-04b3-49de-8fb8-03decd8c188c",
+ "label": "Topic Detail",
+ "regions": [
{
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:recordHeadline",
- "id": "09e98f13-f206-43ee-bf41-828332156a3f",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "e0e7dbc4-3b5b-442a-b4ee-700038c2f223",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "09e98f13-f206-43ee-bf41-828332156a3f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e0e7dbc4-3b5b-442a-b4ee-700038c2f223",
+ "regionName": "header",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "canChangeSorting": false,
- "defaultFilter": "",
- "defaultSortOrderHomeFeed": "Relevance",
- "defaultSortOrderTopicsFeed": "Relevance",
- "feedDesign": "DEFAULT",
- "hasFeedSearch": false,
- "subjectId": "{!recordId}",
- "type": "Topics"
- },
- "componentName": "forceCommunity:forceCommunityFeed",
- "id": "6016edf0-5479-47bd-83af-b01e58fe5b1c",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "0ed07a83-ddeb-4f62-ae37-d5b0acfc6584",
- "regionName": "content",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "canChangeSorting": false,
+ "defaultFilter": "",
+ "defaultSortOrderHomeFeed": "Relevance",
+ "defaultSortOrderTopicsFeed": "Relevance",
+ "feedDesign": "DEFAULT",
+ "hasFeedSearch": false,
+ "subjectId": "{!recordId}",
+ "type": "Topics"
+ },
+ "componentName": "forceCommunity:forceCommunityFeed",
+ "id": "6016edf0-5479-47bd-83af-b01e58fe5b1c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0ed07a83-ddeb-4f62-ae37-d5b0acfc6584",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:recordDetail",
- "id": "33d2426c-2eb9-4abf-8059-25a02fdc20a1",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "ca54845f-e7c2-4d40-9243-8e253709523b",
- "regionName": "sidebar",
- "type": "region"
- },
- {
- "id": "f2cc39b9-f4a1-44dd-98eb-928de7f45b4f",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordDetail",
+ "id": "33d2426c-2eb9-4abf-8059-25a02fdc20a1",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ca54845f-e7c2-4d40-9243-8e253709523b",
+ "regionName": "sidebar",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "{!Record.Description}",
- "title": "{!Record._Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "e3d92037-2073-4756-a86f-90c4c43998ec",
- "renditionMap": {},
- "type": "component"
+ "id": "f2cc39b9-f4a1-44dd-98eb-928de7f45b4f",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "{!Record.Description}",
+ "title": "{!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "e3d92037-2073-4756-a86f-90c4c43998ec",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c559cbc3-8107-4482-b65e-0fc253417b1c",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "c559cbc3-8107-4482-b65e-0fc253417b1c",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "topic"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "topic"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/userProfile.json b/force-app/main/default/experiences/Consumable1/views/userProfile.json
index 2e84cd7..915a9ca 100644
--- a/force-app/main/default/experiences/Consumable1/views/userProfile.json
+++ b/force-app/main/default/experiences/Consumable1/views/userProfile.json
@@ -1,121 +1,121 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "b3764d11-d26d-4554-8747-e7f30fb722bd",
- "label": "User Profile",
- "regions": [
- {
- "id": "089ae725-a61b-476e-aab7-3ea5bf1ef011",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "b3764d11-d26d-4554-8747-e7f30fb722bd",
+ "label": "User Profile",
+ "regions": [
{
- "componentAttributes": {
- "id": "{!recordId}",
- "showFullPhotoAsCircle": true,
- "showReputation": false
- },
- "componentName": "forceCommunity:userProfileHeader",
- "id": "7ef45f8f-cc14-404a-8867-e6d3557f32d3",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "089ae725-a61b-476e-aab7-3ea5bf1ef011",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {
- "tabsetConfig": {
- "UUID": "b4db8bb9-4fa9-4f41-8919-a300735d0ef6",
- "activeTab": "tab1",
- "tabs": [
+ "components": [
{
- "UUID": "ffc31b37-4e88-44ab-a58e-8c8952bddf50",
- "allowGuestUser": false,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {},
- "fqn": "forceCommunity:userProfileDetail"
- }
- ],
- "tabKey": "tab1",
- "tabName": "Details"
+ "componentAttributes": {
+ "id": "{!recordId}",
+ "showFullPhotoAsCircle": true,
+ "showReputation": false
+ },
+ "componentName": "forceCommunity:userProfileHeader",
+ "id": "7ef45f8f-cc14-404a-8867-e6d3557f32d3",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
},
{
- "UUID": "02c71e1a-5c7b-4265-8ff5-486737b59caf",
- "allowGuestUser": false,
- "locked": false,
- "seedComponents": [
- {
- "attributes": {},
- "fqn": "forceCommunity:userRelatedList"
- }
- ],
- "tabKey": "tab2",
- "tabName": "Related"
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "b4db8bb9-4fa9-4f41-8919-a300735d0ef6",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "ffc31b37-4e88-44ab-a58e-8c8952bddf50",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:userProfileDetail"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Details"
+ },
+ {
+ "UUID": "02c71e1a-5c7b-4265-8ff5-486737b59caf",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:userRelatedList"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "Related"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "b4db8bb9-4fa9-4f41-8919-a300735d0ef6",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}"
+ },
+ "componentName": "forceCommunity:userProfileDetail",
+ "id": "3910b7ed-af10-4a8e-9858-6780fc312390",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ffc31b37-4e88-44ab-a58e-8c8952bddf50",
+ "regionLabel": "Details",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "userId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:userRelatedList",
+ "id": "ffeb3b47-04b8-455c-be55-69b69096f017",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "02c71e1a-5c7b-4265-8ff5-486737b59caf",
+ "regionLabel": "Related",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
}
- ],
- "useOverflowMenu": false
- }
- },
- "componentName": "forceCommunity:tabset",
- "id": "b4db8bb9-4fa9-4f41-8919-a300735d0ef6",
- "regions": [
- {
- "components": [
- {
- "componentAttributes": {
- "id": "{!recordId}"
- },
- "componentName": "forceCommunity:userProfileDetail",
- "id": "3910b7ed-af10-4a8e-9858-6780fc312390",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "ffc31b37-4e88-44ab-a58e-8c8952bddf50",
- "regionLabel": "Details",
- "regionName": "tab1",
- "renditionMap": {},
- "type": "region"
- },
- {
- "components": [
- {
- "componentAttributes": {
- "userId": "{!recordId}"
- },
- "componentName": "forceCommunity:userRelatedList",
- "id": "ffeb3b47-04b8-455c-be55-69b69096f017",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "02c71e1a-5c7b-4265-8ff5-486737b59caf",
- "regionLabel": "Related",
- "regionName": "tab2",
- "renditionMap": {},
- "type": "region"
- }
- ],
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ ],
+ "id": "4ad735e0-ad67-4c2b-9b52-717f1be31466",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "d9fb20dc-9a48-4767-b7ab-fc7c8a5cb56a",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "4ad735e0-ad67-4c2b-9b52-717f1be31466",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "d9fb20dc-9a48-4767-b7ab-fc7c8a5cb56a",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-005"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-005"
}
diff --git a/force-app/main/default/experiences/Consumable1/views/userSettings.json b/force-app/main/default/experiences/Consumable1/views/userSettings.json
index c989893..ee1a522 100644
--- a/force-app/main/default/experiences/Consumable1/views/userSettings.json
+++ b/force-app/main/default/experiences/Consumable1/views/userSettings.json
@@ -1,60 +1,60 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "8225f2be-2536-4868-afe9-ed11e1c1eb15",
- "label": "User Settings",
- "regions": [
- {
- "id": "0e29e12f-82e2-4770-9056-00412cb4914b",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "8225f2be-2536-4868-afe9-ed11e1c1eb15",
+ "label": "User Settings",
+ "regions": [
{
- "componentAttributes": {
- "accountSectionTitle": "Account",
- "accountTabName": "Account Management",
- "connectedSourcesTabName": "Connected Sources",
- "deleteAccountButtonTitle": "Deactivate My Account",
- "deleteAccountConfirmationPopupBody": "After you deactivate your account, you'll lose access to this site.",
- "deleteAccountConfirmationPopupButtonTitle": "Got It",
- "deleteAccountConfirmationPopupTitle": "Deactivate your account?",
- "deleteAccountErrorMessage": "Something went wrong. Contact your site administrator.",
- "deleteAccountSectionTitle": "Deactivate Account",
- "emailNotificationsTitle": "Email Notifications",
- "emailSectionDescText": "When email notifications are enabled, email me when someone:",
- "hideAccountDeleteSection": true,
- "hideChatterNotificationSettings": false,
- "hideConnectedSources": false,
- "hideEmailNotificationSettings": false,
- "hideProfileVisibilitySettings": false,
- "id": "{!recordId}",
- "locationTitle": "Location",
- "profileSectionDescText": "Customize who is able to see what on your profile page",
- "profileSectionToolTipText": "Restricted: Visible to the employees of the company that created the site. Members: Visible to logged-in members. Public: Visible to anyone viewing pages that don't require login.",
- "profileVisibilityTitle": "Profile Visibility",
- "settingsPageTitle": "My Settings"
- },
- "componentName": "forceCommunity:userSettingsCustomizable",
- "id": "be9a963a-9ad1-4190-845c-c1f479b4c9f2",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "0e29e12f-82e2-4770-9056-00412cb4914b",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "accountSectionTitle": "Account",
+ "accountTabName": "Account Management",
+ "connectedSourcesTabName": "Connected Sources",
+ "deleteAccountButtonTitle": "Deactivate My Account",
+ "deleteAccountConfirmationPopupBody": "After you deactivate your account, you'll lose access to this site.",
+ "deleteAccountConfirmationPopupButtonTitle": "Got It",
+ "deleteAccountConfirmationPopupTitle": "Deactivate your account?",
+ "deleteAccountErrorMessage": "Something went wrong. Contact your site administrator.",
+ "deleteAccountSectionTitle": "Deactivate Account",
+ "emailNotificationsTitle": "Email Notifications",
+ "emailSectionDescText": "When email notifications are enabled, email me when someone:",
+ "hideAccountDeleteSection": true,
+ "hideChatterNotificationSettings": false,
+ "hideConnectedSources": false,
+ "hideEmailNotificationSettings": false,
+ "hideProfileVisibilitySettings": false,
+ "id": "{!recordId}",
+ "locationTitle": "Location",
+ "profileSectionDescText": "Customize who is able to see what on your profile page",
+ "profileSectionToolTipText": "Restricted: Visible to the employees of the company that created the site. Members: Visible to logged-in members. Public: Visible to anyone viewing pages that don't require login.",
+ "profileVisibilityTitle": "Profile Visibility",
+ "settingsPageTitle": "My Settings"
+ },
+ "componentName": "forceCommunity:userSettingsCustomizable",
+ "id": "be9a963a-9ad1-4190-845c-c1f479b4c9f2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7eb02000-7cb9-48f9-8463-eae4dfa60e4c",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "f99dd3f8-ab5f-49e4-b57e-b51dc2ab9ccd",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "7eb02000-7cb9-48f9-8463-eae4dfa60e4c",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "f99dd3f8-ab5f-49e4-b57e-b51dc2ab9ccd",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "usersettings"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "usersettings"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\344\273\252\350\241\250\346\235\277RelatedList.json" "b/force-app/main/default/experiences/Consumable1/views/\344\273\252\350\241\250\346\235\277RelatedList.json"
new file mode 100644
index 0000000..2c660fa
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\344\273\252\350\241\250\346\235\277RelatedList.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "9c09c70e-209c-4ed4-baa3-8dad00a95381",
+ "label": "浠〃鏉� Related List",
+ "regions": [
+ {
+ "id": "72c45cc3-7d42-489d-bd24-907d85b68797",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "31464dde-0c5a-44b1-b128-ea96c5a23992",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c74d8383-50cc-46ba-966c-af0cb672eed6",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "2460ae3c-8d16-41ae-a300-673f769f91d9",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-01Z"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 1dd0eff..1e0569e 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,45 +1,45 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "97ed2657-7949-4aed-9e5d-cae9c935f730",
- "label": "浠〃鏉� 闁㈤�c儶銈广儓",
- "regions": [
- {
- "id": "c5f2427e-9a5d-4db5-9929-e3d6e633475f",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "97ed2657-7949-4aed-9e5d-cae9c935f730",
+ "label": "浠〃鏉� 闁㈤�c儶銈广儓",
+ "regions": [
{
- "componentAttributes": {
- "customTitle": "",
- "parentRecordId": "{!recordId}",
- "relatedListName": "{!relationshipApiName}",
- "showBreadCrumbs": true,
- "showCustomTitle": false,
- "showManualRefreshButton": true,
- "showRowNumbers": true
- },
- "componentName": "forceCommunity:relatedList",
- "id": "eafc91e0-39e9-432d-b9c2-680c80c3601d",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "c5f2427e-9a5d-4db5-9929-e3d6e633475f",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "eafc91e0-39e9-432d-b9c2-680c80c3601d",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4b9072b6-40de-478a-a460-c3aa1d3e286d",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "d682a0cb-7ab6-47e0-8f11-c18f2d49ea91",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "4b9072b6-40de-478a-a460-c3aa1d3e286d",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "d682a0cb-7ab6-47e0-8f11-c18f2d49ea91",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist-01Z"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-01Z"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255Detail.json" "b/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255Detail.json"
new file mode 100644
index 0000000..c493abe
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255Detail.json"
@@ -0,0 +1,76 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "d1ab2f20-ffeb-42ab-a74f-01c71e2d5e74",
+ "label": "瀛︿細銉诲煿璁� Detail",
+ "regions": [
+ {
+ "id": "e8ef3ad8-5862-4201-b4b9-477aec3dad1e",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "d0177a8c-13c8-4d4e-9b3e-2d83ac3425de",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "5160d097-10a7-4eea-9a6d-14806942e27b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8266e171-9be5-4b9d-8867-4c5483414770",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "bee715d1-5c38-49cf-a8a7-e9cf347e39bb",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "bec33f2f-56d7-4178-805b-d5a7270071fe",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a63321aa-8f8b-4730-99e9-368e011aada6",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-701"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255RelatedList.json" "b/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255RelatedList.json"
new file mode 100644
index 0000000..ba5623f
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255RelatedList.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "0a522fab-0926-4aef-aed4-a88ce0f77c0d",
+ "label": "瀛︿細銉诲煿璁� Related List",
+ "regions": [
+ {
+ "id": "85f65e2c-e7b1-4b06-b490-6390b5e64c9b",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "0f2cfe81-edd3-4e41-943d-625be1485248",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "59d30058-1c1b-431b-b3fb-23e8243f0011",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "21336e2b-817d-417b-99fa-15ff86c87af7",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-701"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json" "b/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
index 4d166f4..b2a90ea 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
@@ -1,76 +1,76 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "0ad6b8ab-53a5-4a50-a8e4-2cb763631aab",
- "label": "瀛︿細銉诲煿璁� 瑭崇窗",
- "regions": [
- {
- "id": "a8e33a85-eba0-4b3c-972d-7829e6b042b4",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "0ad6b8ab-53a5-4a50-a8e4-2cb763631aab",
+ "label": "瀛︿細銉诲煿璁� 瑭崇窗",
+ "regions": [
{
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:recordHeadline",
- "id": "592d5f10-3298-4046-9188-b6d553c00d61",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "a8e33a85-eba0-4b3c-972d-7829e6b042b4",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {
- "detailsTabLabel": "Details",
- "discussionsTabLabel": "Feed",
- "recordId": "{!recordId}",
- "relatedTabLabel": "Related",
- "showLegacyActivityComposer": false,
- "tab1Type": "details",
- "tab2Type": "related",
- "tab3Type": "chatter",
- "tab4Type": "none",
- "timelineTabLabel": "Activity"
- },
- "componentName": "forceCommunity:recordHomeTabs",
- "id": "d832effc-9f0a-4aca-bc93-87384e150066",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "898fe2f9-0d89-483a-b133-91df0a115989",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "3c9b71ac-95f1-4237-b65e-45a8dbcbf70e",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "592d5f10-3298-4046-9188-b6d553c00d61",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "d832effc-9f0a-4aca-bc93-87384e150066",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "898fe2f9-0d89-483a-b133-91df0a115989",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "{!Record._Object}: {!Record._Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "f68810fc-4086-4193-a0d7-a8e8d181c7e2",
- "renditionMap": {},
- "type": "component"
+ "id": "3c9b71ac-95f1-4237-b65e-45a8dbcbf70e",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "f68810fc-4086-4193-a0d7-a8e8d181c7e2",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "b9a30282-520a-436a-9688-5153df33ee48",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "b9a30282-520a-436a-9688-5153df33ee48",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-701"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-701"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 50ce61e..8d36973 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,45 +1,45 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "4cf18bf4-7c54-4746-b895-ec877e8fcd43",
- "label": "瀛︿細銉诲煿璁� 闁㈤�c儶銈广儓",
- "regions": [
- {
- "id": "bbdd3f25-7b32-4aaa-bb84-0fd898f088da",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "4cf18bf4-7c54-4746-b895-ec877e8fcd43",
+ "label": "瀛︿細銉诲煿璁� 闁㈤�c儶銈广儓",
+ "regions": [
{
- "componentAttributes": {
- "customTitle": "",
- "parentRecordId": "{!recordId}",
- "relatedListName": "{!relationshipApiName}",
- "showBreadCrumbs": true,
- "showCustomTitle": false,
- "showManualRefreshButton": true,
- "showRowNumbers": true
- },
- "componentName": "forceCommunity:relatedList",
- "id": "fe11ad25-e5fb-406f-95c5-ff7b7f461956",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "bbdd3f25-7b32-4aaa-bb84-0fd898f088da",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "fe11ad25-e5fb-406f-95c5-ff7b7f461956",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ca0496e5-65f5-481b-80db-1aa60c6eb160",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "024970ab-9ccf-4185-8637-88e1279fa959",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "ca0496e5-65f5-481b-80db-1aa60c6eb160",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "024970ab-9ccf-4185-8637-88e1279fa959",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist-701"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-701"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\345\260\217\347\273\204RelatedList.json" "b/force-app/main/default/experiences/Consumable1/views/\345\260\217\347\273\204RelatedList.json"
new file mode 100644
index 0000000..02dd0b3
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\345\260\217\347\273\204RelatedList.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "95256c4b-4f81-4779-9782-9c1f067a3c0e",
+ "label": "灏忕粍 Related List",
+ "regions": [
+ {
+ "id": "0e7b0d9f-76f3-4fcc-82dc-c4a0a8b9ff00",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "75fb6a2a-7bfa-4e93-ad09-4a45f9ddeb46",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "26794ab2-dc3a-4fba-878d-81fe5efc5297",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "5bf0540b-4361-4c60-adc2-6f6f5a1dcf53",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-0F9"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index f89e7c9..f4cf39a 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,45 +1,45 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "6c787120-bb1e-4d47-b4b2-7fa80ac6d3fb",
- "label": "灏忕粍 闁㈤�c儶銈广儓",
- "regions": [
- {
- "id": "adf7a874-f08a-4835-9975-94719db0529e",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "6c787120-bb1e-4d47-b4b2-7fa80ac6d3fb",
+ "label": "灏忕粍 闁㈤�c儶銈广儓",
+ "regions": [
{
- "componentAttributes": {
- "customTitle": "",
- "parentRecordId": "{!recordId}",
- "relatedListName": "{!relationshipApiName}",
- "showBreadCrumbs": true,
- "showCustomTitle": false,
- "showManualRefreshButton": true,
- "showRowNumbers": true
- },
- "componentName": "forceCommunity:relatedList",
- "id": "3efd7ea2-7bc2-44d6-8b5a-03a4be12b602",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "adf7a874-f08a-4835-9975-94719db0529e",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "3efd7ea2-7bc2-44d6-8b5a-03a4be12b602",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "df80875a-1086-4356-98d6-a7300c39507e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "1a614d08-a4e0-4aba-9233-cfab0ef016f3",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "df80875a-1086-4356-98d6-a7300c39507e",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "1a614d08-a4e0-4aba-9233-cfab0ef016f3",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist-0F9"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-0F9"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\345\272\223\345\255\230.json" "b/force-app/main/default/experiences/Consumable1/views/\345\272\223\345\255\230.json"
new file mode 100644
index 0000000..623b7fb
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\345\272\223\345\255\230.json"
@@ -0,0 +1,81 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "a6d83607-a4bc-4c64-872a-a4d28a96575d",
+ "label": "搴撳瓨",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "70e90603-679b-4e10-9cb4-c92970eb0b6c",
+ "columns": [
+ {
+ "UUID": "f82e2bbc-5736-4b3f-9b4a-1e22981f6668",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "70e90603-679b-4e10-9cb4-c92970eb0b6c",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexinventoryViewLWC",
+ "id": "9dc8bca9-ca76-4758-b2f3-2d6970644d43",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f82e2bbc-5736-4b3f-9b4a-1e22981f6668",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6f226eed-af1a-477c-9888-20c0b37db4b0",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "搴撳瓨绠$悊~娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "a484eac3-6170-4866-b74f-62e83c39d59e",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a17996d7-1152-4609-8064-b05d5211ee93",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-inventory-view"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\345\272\223\345\255\230\344\270\212\344\270\213\351\231\220\347\274\226\350\276\221.json" "b/force-app/main/default/experiences/Consumable1/views/\345\272\223\345\255\230\344\270\212\344\270\213\351\231\220\347\274\226\350\276\221.json"
new file mode 100644
index 0000000..4d3ee36
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\345\272\223\345\255\230\344\270\212\344\270\213\351\231\220\347\274\226\350\276\221.json"
@@ -0,0 +1,81 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "36bed1a3-91cc-436d-b1f6-398b8082f724",
+ "label": "搴撳瓨涓婁笅闄愮紪杈�",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "c01fae88-8b08-40dd-a166-d4015a1ef6ef",
+ "columns": [
+ {
+ "UUID": "ce235a8d-f8d3-40fb-be4f-8cd1623b15a8",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "c01fae88-8b08-40dd-a166-d4015a1ef6ef",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexProductLimitEdit",
+ "id": "fabcdda4-3b28-468b-a184-903a7e2173b8",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ce235a8d-f8d3-40fb-be4f-8cd1623b15a8",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "23074b8e-a4a3-491e-a1bc-344dcf42c76b",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "娑堣�楀搧绠$悊绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "4447a437-0906-4337-a289-ba3a707b867b",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4d226ea4-6f55-4200-bf80-f4708bd4ed73",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lex-product-limit-edit"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\346\212\245\350\241\250RelatedList.json" "b/force-app/main/default/experiences/Consumable1/views/\346\212\245\350\241\250RelatedList.json"
new file mode 100644
index 0000000..e33a7eb
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\346\212\245\350\241\250RelatedList.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "aa256afb-6656-4526-834f-3706e4a15bca",
+ "label": "鎶ヨ〃 Related List",
+ "regions": [
+ {
+ "id": "4af26569-7a4d-4cbc-baae-3170b22d62e7",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "63b90747-41ce-4d7d-b234-147c1d016018",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8b705b5b-ecae-45fd-99d0-1abb08214ce0",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "dd232688-98a8-49c5-9304-c3b087346c29",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-00O"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index f08a1a1..e186599 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,45 +1,45 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "4dff72f1-db87-40bc-a8d6-36073e365a18",
- "label": "鎶ヨ〃 闁㈤�c儶銈广儓",
- "regions": [
- {
- "id": "255f30d3-0419-4484-a86a-69463e5ecf61",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "4dff72f1-db87-40bc-a8d6-36073e365a18",
+ "label": "鎶ヨ〃 闁㈤�c儶銈广儓",
+ "regions": [
{
- "componentAttributes": {
- "customTitle": "",
- "parentRecordId": "{!recordId}",
- "relatedListName": "{!relationshipApiName}",
- "showBreadCrumbs": true,
- "showCustomTitle": false,
- "showManualRefreshButton": true,
- "showRowNumbers": true
- },
- "componentName": "forceCommunity:relatedList",
- "id": "cac72015-0863-46e3-870d-ca43f081d76c",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "255f30d3-0419-4484-a86a-69463e5ecf61",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "cac72015-0863-46e3-870d-ca43f081d76c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9e86bc1f-69aa-47e8-95ef-91fb76147818",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "7d5f8a26-65a3-408e-a2f1-ac0e6e5aab59",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "9e86bc1f-69aa-47e8-95ef-91fb76147818",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "7d5f8a26-65a3-408e-a2f1-ac0e6e5aab59",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist-00O"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-00O"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\346\226\207\344\273\266RelatedList.json" "b/force-app/main/default/experiences/Consumable1/views/\346\226\207\344\273\266RelatedList.json"
new file mode 100644
index 0000000..c3ded0b
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\346\226\207\344\273\266RelatedList.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "74713a2e-dcbc-464b-a87a-d1231dc118a2",
+ "label": "鏂囦欢 Related List",
+ "regions": [
+ {
+ "id": "cc1adb44-f946-462b-b222-1331cad51921",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "2dca1386-0d3e-471e-b422-cf1b862c1421",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "384d173b-899e-47f8-9828-f4133c314c3e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "3a3a7843-7123-4eb3-89e9-982f4a73fc88",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-069"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index a45f8a0..89ca2ae 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,45 +1,45 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "3d5f9dc6-9374-4d60-8e41-d9ae76e732e3",
- "label": "鏂囦欢 闁㈤�c儶銈广儓",
- "regions": [
- {
- "id": "746cff4c-6e69-4feb-a676-a5a1d40dda0b",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "3d5f9dc6-9374-4d60-8e41-d9ae76e732e3",
+ "label": "鏂囦欢 闁㈤�c儶銈广儓",
+ "regions": [
{
- "componentAttributes": {
- "customTitle": "",
- "parentRecordId": "{!recordId}",
- "relatedListName": "{!relationshipApiName}",
- "showBreadCrumbs": true,
- "showCustomTitle": false,
- "showManualRefreshButton": true,
- "showRowNumbers": true
- },
- "componentName": "forceCommunity:relatedList",
- "id": "966621e8-a647-4bdb-9a9e-63d9f46132d4",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "746cff4c-6e69-4feb-a676-a5a1d40dda0b",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "966621e8-a647-4bdb-9a9e-63d9f46132d4",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5f5b300a-ff22-4632-8889-d9ed5bc3399d",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "2ce507fd-d529-4d11-a2cc-e0c9cd56c0f1",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "5f5b300a-ff22-4632-8889-d9ed5bc3399d",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "2ce507fd-d529-4d11-a2cc-e0c9cd56c0f1",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist-069"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-069"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\346\265\201RelatedList.json" "b/force-app/main/default/experiences/Consumable1/views/\346\265\201RelatedList.json"
new file mode 100644
index 0000000..1af1cdd
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\346\265\201RelatedList.json"
@@ -0,0 +1,27 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "e37f28a6-0d81-44ac-ab4d-5afbb6f43b64",
+ "label": "娴� Related List",
+ "regions": [
+ {
+ "id": "8f851348-e301-458f-8dc1-97317f787fb5",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "d246db26-8cec-4c3c-bebc-4f6cf1559a9e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "b3573847-3f67-4e31-a54f-e39688460f38",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-0Fq"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 6fba246..34f6239 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,27 +1,27 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "cd0d3153-1cca-4111-ae2a-08454a8fe698",
- "label": "娴� 闁㈤�c儶銈广儓",
- "regions": [
- {
- "id": "97c8b536-fe44-45cf-ab4d-c97c3b43ef67",
- "regionName": "header",
- "type": "region"
- },
- {
- "id": "13171fdc-cefa-466f-8796-f827886547e4",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "f0cd4e02-22fe-4c43-ad6d-fb48a0ee400a",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist-0Fq"
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "cd0d3153-1cca-4111-ae2a-08454a8fe698",
+ "label": "娴� 闁㈤�c儶銈广儓",
+ "regions": [
+ {
+ "id": "97c8b536-fe44-45cf-ab4d-c97c3b43ef67",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "13171fdc-cefa-466f-8796-f827886547e4",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "f0cd4e02-22fe-4c43-ad6d-fb48a0ee400a",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-0Fq"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\345\210\227\350\241\250.json" "b/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\345\210\227\350\241\250.json"
index d8f5d24..7c1e1f2 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\345\210\227\350\241\250.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\345\210\227\350\241\250.json"
@@ -1,52 +1,52 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "293921b6-1a37-49a3-a225-be2f3471a41c",
- "label": "娑堣�楀搧璁㈠崟 鍒楄〃",
- "regions": [
- {
- "id": "c1c91ef1-d313-4e66-b600-3b5ece7f6488",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "293921b6-1a37-49a3-a225-be2f3471a41c",
+ "label": "娑堣�楀搧璁㈠崟 鍒楄〃",
+ "regions": [
{
- "componentAttributes": {
- "enableInlineEdit": true,
- "filterName": "{!filterId}",
- "layout": "FULL",
- "pageSize": 25,
- "scope": "{!objectName}",
- "showActionBar": true,
- "showChartsPanel": true,
- "showDisplay": "showall",
- "showFilterPanel": true,
- "showImageIcon": true,
- "showManualRefreshButton": true,
- "showObjectName": true,
- "showPinnedList": true,
- "showSearchBar": true
- },
- "componentName": "forceCommunity:objectHome",
- "id": "5a679d55-a414-4a30-9e45-410f58926560",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "c1c91ef1-d313-4e66-b600-3b5ece7f6488",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": false,
+ "filterName": "D00_approved_view",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "Consumable_order__c",
+ "showActionBar": false,
+ "showChartsPanel": false,
+ "showDisplay": "grid",
+ "showFilterPanel": false,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": false,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "5a679d55-a414-4a30-9e45-410f58926560",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5b054b02-44fa-4d1a-a233-bc406c227ab1",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "93caa3c5-152b-4c37-a27c-6711bafd7493",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "5b054b02-44fa-4d1a-a233-bc406c227ab1",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "93caa3c5-152b-4c37-a27c-6711bafd7493",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list-a2K"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-a2K"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\347\233\270\345\205\263\345\210\227\350\241\250.json" "b/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\347\233\270\345\205\263\345\210\227\350\241\250.json"
index 651790f..b9ad837 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\347\233\270\345\205\263\345\210\227\350\241\250.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\347\233\270\345\205\263\345\210\227\350\241\250.json"
@@ -1,45 +1,45 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "54811d17-d3d4-47f5-b3a5-a9efd7a62afa",
- "label": "娑堣�楀搧璁㈠崟 鐩稿叧鍒楄〃",
- "regions": [
- {
- "id": "19e75fde-55d3-4d05-ad35-859e9253f3e3",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "54811d17-d3d4-47f5-b3a5-a9efd7a62afa",
+ "label": "娑堣�楀搧璁㈠崟 鐩稿叧鍒楄〃",
+ "regions": [
{
- "componentAttributes": {
- "customTitle": "",
- "parentRecordId": "{!recordId}",
- "relatedListName": "{!relationshipApiName}",
- "showBreadCrumbs": true,
- "showCustomTitle": false,
- "showManualRefreshButton": true,
- "showRowNumbers": true
- },
- "componentName": "forceCommunity:relatedList",
- "id": "a56b04ba-b611-4311-b693-60df1d15bc41",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "19e75fde-55d3-4d05-ad35-859e9253f3e3",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "a56b04ba-b611-4311-b693-60df1d15bc41",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "b73a78fe-8a2a-495c-a415-0e6b1f3d5bba",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "508cdb2d-9f19-489c-88ea-d56da66f3360",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "b73a78fe-8a2a-495c-a415-0e6b1f3d5bba",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "508cdb2d-9f19-489c-88ea-d56da66f3360",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist-a2K"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-a2K"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\350\257\246\347\273\206\344\277\241\346\201\257.json" "b/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\350\257\246\347\273\206\344\277\241\346\201\257.json"
index 6e2a0f5..3fae5ea 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\350\257\246\347\273\206\344\277\241\346\201\257.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225\350\257\246\347\273\206\344\277\241\346\201\257.json"
@@ -1,76 +1,76 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "2757e7e7-c2ba-4c5b-9480-4877420e6c40",
- "label": "娑堣�楀搧璁㈠崟 璇︾粏淇℃伅",
- "regions": [
- {
- "id": "002e3e28-a40b-4f71-924f-b04dbb3aad57",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "2757e7e7-c2ba-4c5b-9480-4877420e6c40",
+ "label": "娑堣�楀搧璁㈠崟 璇︾粏淇℃伅",
+ "regions": [
{
- "componentAttributes": {
- "recordId": "{!recordId}"
- },
- "componentName": "forceCommunity:recordHeadline",
- "id": "e347f5d6-b40e-48b3-ad46-ed15d001bfc2",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "002e3e28-a40b-4f71-924f-b04dbb3aad57",
+ "regionName": "header",
+ "type": "region"
},
{
- "componentAttributes": {
- "detailsTabLabel": "Details",
- "discussionsTabLabel": "Feed",
- "recordId": "{!recordId}",
- "relatedTabLabel": "Related",
- "showLegacyActivityComposer": false,
- "tab1Type": "details",
- "tab2Type": "related",
- "tab3Type": "chatter",
- "tab4Type": "none",
- "timelineTabLabel": "Activity"
- },
- "componentName": "forceCommunity:recordHomeTabs",
- "id": "777d94b0-f4e1-4de6-93ff-6b5126fc0ba4",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
- }
- ],
- "id": "4e4ee28e-35eb-4682-95d4-3279649fa4fe",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "19a87d46-ec32-40b1-b8b5-c4fd0a79b588",
- "regionName": "footer",
- "type": "region"
- },
- {
- "components": [
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "e347f5d6-b40e-48b3-ad46-ed15d001bfc2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "777d94b0-f4e1-4de6-93ff-6b5126fc0ba4",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4e4ee28e-35eb-4682-95d4-3279649fa4fe",
+ "regionName": "content",
+ "type": "region"
+ },
{
- "componentAttributes": {
- "customHeadTags": "",
- "description": "",
- "title": "{!Record._Object}: {!Record._Title}"
- },
- "componentName": "forceCommunity:seoAssistant",
- "id": "7cf01a81-80f5-40bf-a99a-131727098aea",
- "renditionMap": {},
- "type": "component"
+ "id": "19a87d46-ec32-40b1-b8b5-c4fd0a79b588",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "7cf01a81-80f5-40bf-a99a-131727098aea",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5ce72d1c-5178-4e9a-8405-5fb99e32ed6b",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
}
- ],
- "id": "5ce72d1c-5178-4e9a-8405-5fb99e32ed6b",
- "regionName": "sfdcHiddenRegion",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "detail-a2K"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-a2K"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267List.json" "b/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267List.json"
new file mode 100644
index 0000000..a5ad5c7
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267List.json"
@@ -0,0 +1,27 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "ef48fff2-c579-4f2a-971d-251b61fd786e",
+ "label": "鐢ㄦ埛 List",
+ "regions": [
+ {
+ "id": "5cc16b6b-e70e-40bf-aec8-08356b6a7600",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "2c04ab42-66a0-46d7-bbca-286c8fb8f897",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "a93dd703-2f6d-4dac-aba8-70f129d88312",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-005"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267RelatedList.json" "b/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267RelatedList.json"
new file mode 100644
index 0000000..3a9bc30
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267RelatedList.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "fb9cc21a-bfdf-4b55-b21d-d99514ec9374",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "75664e4d-fe1a-4473-ade4-9dca081ecd40",
+ "label": "鐢ㄦ埛 Related List",
+ "regions": [
+ {
+ "id": "659dcb46-6f82-4ba7-aa1d-5bffa2be7207",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "ba2d5a9d-c5f5-4acc-9112-32bc3c09545c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "bd425283-dfc5-4681-a46f-121ec05b09a6",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "9b940744-2029-43d1-a108-955231d85e57",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-005"
+}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
index 9b3863d..71a6cdc 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
@@ -1,27 +1,27 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "09574ae1-7a1d-465b-852b-6604abee87c2",
- "label": "鐢ㄦ埛 銉偣銉�",
- "regions": [
- {
- "id": "4b35d932-84a2-442d-9b0c-e5cb790b6580",
- "regionName": "header",
- "type": "region"
- },
- {
- "id": "b109e1ab-8757-414e-ba5d-cddeafb4eff1",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "6c741f21-5b6e-443a-a0af-4b7fb5151480",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "list-005"
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "09574ae1-7a1d-465b-852b-6604abee87c2",
+ "label": "鐢ㄦ埛 銉偣銉�",
+ "regions": [
+ {
+ "id": "4b35d932-84a2-442d-9b0c-e5cb790b6580",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "b109e1ab-8757-414e-ba5d-cddeafb4eff1",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "6c741f21-5b6e-443a-a0af-4b7fb5151480",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-005"
}
diff --git "a/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
index 482dc3d..643b4f8 100644
--- "a/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
+++ "b/force-app/main/default/experiences/Consumable1/views/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -1,45 +1,45 @@
{
- "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
- "componentName": "siteforce:sldsOneColLayout",
- "dataProviders": [],
- "id": "a7a75c83-a63d-4031-8a1a-524e45f77737",
- "label": "鐢ㄦ埛 闁㈤�c儶銈广儓",
- "regions": [
- {
- "id": "5504b9cc-87ba-4a13-a6de-882db87b1ef9",
- "regionName": "header",
- "type": "region"
- },
- {
- "components": [
+ "appPageId": "27f1ea49-dcbd-4afc-b1b9-faf0852c745e",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "a7a75c83-a63d-4031-8a1a-524e45f77737",
+ "label": "鐢ㄦ埛 闁㈤�c儶銈广儓",
+ "regions": [
{
- "componentAttributes": {
- "customTitle": "",
- "parentRecordId": "{!recordId}",
- "relatedListName": "{!relationshipApiName}",
- "showBreadCrumbs": true,
- "showCustomTitle": false,
- "showManualRefreshButton": true,
- "showRowNumbers": true
- },
- "componentName": "forceCommunity:relatedList",
- "id": "99b7c2fd-07f6-4cca-bc65-4801c3c91a29",
- "renderPriority": "NEUTRAL",
- "renditionMap": {},
- "type": "component"
+ "id": "5504b9cc-87ba-4a13-a6de-882db87b1ef9",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "99b7c2fd-07f6-4cca-bc65-4801c3c91a29",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "90a88344-631c-4a99-bfb9-5b5918c98cdc",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "c8110fe8-136a-4078-a991-8810167e994a",
+ "regionName": "footer",
+ "type": "region"
}
- ],
- "id": "90a88344-631c-4a99-bfb9-5b5918c98cdc",
- "regionName": "content",
- "type": "region"
- },
- {
- "id": "c8110fe8-136a-4078-a991-8810167e994a",
- "regionName": "footer",
- "type": "region"
- }
- ],
- "themeLayoutType": "Inner",
- "type": "view",
- "viewType": "relatedlist-005"
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-005"
}
diff --git a/force-app/main/default/experiences/Consumable_21.site-meta.xml b/force-app/main/default/experiences/Consumable_21.site-meta.xml
new file mode 100644
index 0000000..61a4812
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21.site-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <label>Consumable绯荤粺2</label>
+ <type>ChatterNetworkPicasso</type>
+</ExperienceBundle>
diff --git a/force-app/main/default/experiences/Consumable_21/brandingSets/partnerCentral.json b/force-app/main/default/experiences/Consumable_21/brandingSets/partnerCentral.json
new file mode 100644
index 0000000..0b2491f
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/brandingSets/partnerCentral.json
@@ -0,0 +1,56 @@
+{
+ "definitionName": "prm:branding-prm-merged",
+ "id": "1fc6a9e7-4b7f-4325-9684-6583be52aabf",
+ "label": "Partner Central",
+ "type": "brandingSet",
+ "values": {
+ "ActionColor": "rgb(10, 129, 223)",
+ "BorderColor": "#D4D4D4",
+ "CardBackgroundColor": "rgba(255, 255, 255, 0)",
+ "CompanyLogo": "/file-asset/OlympusCommunityLogo?v=1&height=300&width=300",
+ "DetailTextColor": "rgb(34, 34, 34)",
+ "ErrorFontColor": "rgb(224, 75, 32)",
+ "HeaderBackgroundColor": "#FFFFFF",
+ "HeaderFonts": "sans-serif",
+ "LinkColor": "rgb(37, 116, 169)",
+ "LoginBackgroundColor": "rgb(216, 233, 229)",
+ "LoginBackgroundImage": "/file-asset/OlympusCommunityLoginBG?v=1",
+ "NavigationMenuColor": "rgb(8, 16, 132)",
+ "NavigationMenuTextColor": "#FFFFFF",
+ "OverlayTextColor": "#FFFFFF",
+ "PageBackgroundColor": "#FFFFFF",
+ "PrimaryFont": "sans-serif",
+ "TextColor": "rgb(34, 34, 34)",
+ "TextTransformStyle": "none",
+ "_ActionColorDarker": "#0865ae",
+ "_ActionColorTrans": "rgba(10, 129, 223, 0.9)",
+ "_BackgroundColor1": "rgb(235, 235, 235)",
+ "_BackgroundColor2": "rgb(194, 194, 194)",
+ "_BackgroundColor3": "rgb(133, 133, 133)",
+ "_DxpPageBackgroundColor": "#FFFFFF",
+ "_HeaderInputBackgroundColor": "rgba(255,255,255,.4)",
+ "_HeaderPlaceholderTextColor": "rgba(85,85,85,.8)",
+ "_HeaderTextColor": "rgba(34,34,34,.8)",
+ "_HoverColor": "rgba(10, 129, 223, 0.05)",
+ "_LinkColorDarker": "#1e5d88",
+ "_NavigationMenuHoverColor": "rgba(255,255,255,.2)",
+ "_NeutralColor": "#ecebea",
+ "_NeutralColor1": "rgb(217, 215, 213)",
+ "_NeutralColor2": "rgb(178, 174, 170)",
+ "_NeutralColor3": "rgb(118, 113, 107)",
+ "_NeutralForegroundColor": "#000",
+ "_NeutralForegroundColor1": "#000",
+ "_NeutralForegroundColor2": "#000",
+ "_NeutralForegroundColor3": "#fff",
+ "_OverlayTextColorShadow": "#000000",
+ "_PrimaryAccentColor1": "rgb(8, 106, 184)",
+ "_PrimaryAccentColor2": "rgb(5, 61, 106)",
+ "_PrimaryAccentColor3": "rgb(0, 0, 0)",
+ "_PrimaryAccentForegroundColor1": "rgb(255, 255, 255)",
+ "_PrimaryAccentForegroundColor2": "rgb(255, 255, 255)",
+ "_PrimaryAccentForegroundColor3": "rgb(255, 255, 255)",
+ "_TextColor1": "rgb(14, 14, 14)",
+ "_TextColor2": "rgb(0, 0, 0)",
+ "_TextColor3": "rgb(0, 0, 0)"
+ }
+}
diff --git "a/force-app/main/default/experiences/Consumable_21/config/consumable\347\263\273\347\273\2372.json" "b/force-app/main/default/experiences/Consumable_21/config/consumable\347\263\273\347\273\2372.json"
new file mode 100644
index 0000000..c305554
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable_21/config/consumable\347\263\273\347\273\2372.json"
@@ -0,0 +1,11 @@
+{
+ "forgotPasswordRouteId": "4cfab14e-4605-4e93-b8d1-cbaec0413e1a",
+ "isAvailableToGuests": false,
+ "isFilteredComponentsView": false,
+ "isProgressiveRenderingEnabled": false,
+ "loginAppPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "mainAppPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "preferredDomain": "none",
+ "selfRegistrationRouteId": "dce32c5e-d7db-43df-89ed-04a41d3d695b",
+ "type": "site"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/config/languages.json b/force-app/main/default/experiences/Consumable_21/config/languages.json
new file mode 100644
index 0000000..38bd2b2
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/config/languages.json
@@ -0,0 +1,6 @@
+{
+ "defaultCode": "zh_CN",
+ "defaultLabel": "Chinese (Simplified) (CN)",
+ "id": "41cad458-8dc0-4a33-9678-40e315f408e3",
+ "type": "languageContainer"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/config/loginAppPage.json b/force-app/main/default/experiences/Consumable_21/config/loginAppPage.json
new file mode 100644
index 0000000..ab39082
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/config/loginAppPage.json
@@ -0,0 +1,7 @@
+{
+ "cmsSettings": {},
+ "id": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "label": "login",
+ "templateName": "Login Template",
+ "type": "appPage"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/config/mainAppPage.json b/force-app/main/default/experiences/Consumable_21/config/mainAppPage.json
new file mode 100644
index 0000000..e416a34
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/config/mainAppPage.json
@@ -0,0 +1,10 @@
+{
+ "cmsSettings": {},
+ "currentThemeId": "edb413a4-972c-45c8-b42e-425feb9ae035",
+ "headMarkup": "<script>\n var homeWindowLocation = '/consumable2/s/';\n var reportwindowLocation = 'report'\n window.onload = function() {\n console.log('URL' +window.location.pathname);\n if(homeWindowLocation ==window.location.pathname ){\n console.log('refresh dashboard');\n setTimeout(\n function() {\n let refreshButtonElement = document.getElementsByTagName('iframe')[0].contentWindow.document.getElementsByTagName('button')[0];\n console.log('Refresh:'+refreshButtonElement);\n refreshButtonElement.click();\n }, 10000);\n }\n\t};\n\t\n</script>",
+ "id": "928a593f-f341-403e-8346-df32afe29b52",
+ "isRelaxedCSPLevel": true,
+ "label": "main",
+ "templateName": "PRM Community Template",
+ "type": "appPage"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/accountManagement.json b/force-app/main/default/experiences/Consumable_21/routes/accountManagement.json
new file mode 100644
index 0000000..1a4b280
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/accountManagement.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "5706f451-4ea7-4379-ab9d-3d9ee781afe5",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "23c6055c-ba79-41af-ab3e-c8cce27838ff",
+ "label": "Account Management",
+ "routeType": "account-management",
+ "type": "route",
+ "urlPrefix": "account-management"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/cICList.json b/force-app/main/default/experiences/Consumable_21/routes/cICList.json
new file mode 100644
index 0000000..17ffdb8
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/cICList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "ac325945-afdb-4168-98de-43523e77ce57",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "ad6e2fc5-300b-48f2-b928-5d814426add2",
+ "label": "CIC List",
+ "routeType": "list-500",
+ "type": "route",
+ "urlPrefix": "case"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/cICRelatedList.json b/force-app/main/default/experiences/Consumable_21/routes/cICRelatedList.json
new file mode 100644
index 0000000..479617f
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/cICRelatedList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "e98228d4-1ac0-43c4-acc5-40c683a105b5",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "02f0f3af-40b1-431c-931b-54c09f94a56e",
+ "label": "CIC Related List",
+ "routeType": "relatedlist-500",
+ "type": "route",
+ "urlPrefix": "case"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/campaignDetail.json b/force-app/main/default/experiences/Consumable_21/routes/campaignDetail.json
new file mode 100644
index 0000000..0c17b37
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/campaignDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "1381b060-8269-4816-a237-1811716a29c0",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "69fd6c18-cc17-4290-b21b-1c1df2978184",
+ "label": "Campaign Detail",
+ "routeType": "detail-701",
+ "type": "route",
+ "urlPrefix": "campaign"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/campaignList.json b/force-app/main/default/experiences/Consumable_21/routes/campaignList.json
new file mode 100644
index 0000000..9619a99
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/campaignList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "54678bd4-0573-4f0c-ac3b-179c2ba32014",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "27d7373b-294a-4f07-ab1a-59a5c68049ad",
+ "label": "Campaign List",
+ "routeType": "list-701",
+ "type": "route",
+ "urlPrefix": "campaign"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/campaignRelatedList.json b/force-app/main/default/experiences/Consumable_21/routes/campaignRelatedList.json
new file mode 100644
index 0000000..81d375b
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/campaignRelatedList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "68254983-8fbc-42d1-b203-0c42e888a5cb",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "b8e93375-2ced-4baf-bdf1-d8256c165a28",
+ "label": "Campaign Related List",
+ "routeType": "relatedlist-701",
+ "type": "route",
+ "urlPrefix": "campaign"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/caseDetail.json b/force-app/main/default/experiences/Consumable_21/routes/caseDetail.json
new file mode 100644
index 0000000..266cc12
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/caseDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "98a72e3e-7cd8-4258-8d63-861e01aaa5e5",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "a5695ba2-d6e2-4eeb-8410-c29ce1c88899",
+ "label": "Case Detail",
+ "routeType": "detail-500",
+ "type": "route",
+ "urlPrefix": "case"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/checkPassword.json b/force-app/main/default/experiences/Consumable_21/routes/checkPassword.json
new file mode 100644
index 0000000..38d621f
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/checkPassword.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "fde21273-a399-4352-84bd-df7f1081488c",
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "id": "8cde76d3-0f1e-4a08-83d2-05fc8f80047e",
+ "label": "Check Password",
+ "routeType": "check-password",
+ "type": "route",
+ "urlPrefix": "CheckPasswordResetEmail"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/contactSupport.json b/force-app/main/default/experiences/Consumable_21/routes/contactSupport.json
new file mode 100644
index 0000000..71917c8
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/contactSupport.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "9a1c5092-99cc-4742-8767-2ad633077bc2",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "09665e31-a2a5-48be-81b3-3b70a3076007",
+ "label": "Contact Support",
+ "pageAccess": "UseParent",
+ "routeType": "contactsupport",
+ "type": "route",
+ "urlPrefix": "contactsupport"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/createRecord.json b/force-app/main/default/experiences/Consumable_21/routes/createRecord.json
new file mode 100644
index 0000000..17f05f8
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/createRecord.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "f3337021-df6f-459b-afd9-2b8ad6a459cd",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "60011ea5-55a3-48c2-9c88-eb7807f8b7ed",
+ "label": "Create Record",
+ "routeType": "createrecord",
+ "type": "route",
+ "urlPrefix": "createrecord"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/dashboardDetail.json b/force-app/main/default/experiences/Consumable_21/routes/dashboardDetail.json
new file mode 100644
index 0000000..dc3c746
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/dashboardDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "62c1cd02-8480-40fa-904f-418af2153eca",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "dc43e4ea-4ba5-4d3c-a79d-d6dd13cc5ae9",
+ "label": "Dashboard Detail",
+ "routeType": "detail-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/dashboardList.json b/force-app/main/default/experiences/Consumable_21/routes/dashboardList.json
new file mode 100644
index 0000000..990a8e6
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/dashboardList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "5ac09d10-30b2-49e0-a01b-26452f691876",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "ddbcc321-c30b-4b9c-ae12-7bb381b968e1",
+ "label": "Dashboard List",
+ "routeType": "list-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/dashboardRelatedList.json b/force-app/main/default/experiences/Consumable_21/routes/dashboardRelatedList.json
new file mode 100644
index 0000000..829e8f9
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/dashboardRelatedList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "94363bda-5a07-47b2-b3e1-24e907ba96b5",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "a6bd8683-c1e7-43cb-bc1c-d5930191a85e",
+ "label": "Dashboard Related List",
+ "routeType": "relatedlist-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/error.json b/force-app/main/default/experiences/Consumable_21/routes/error.json
new file mode 100644
index 0000000..d090f94
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/error.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "4ed83537-68ba-4209-9169-b3f3c6caa6d1",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "db1ab393-ef17-424d-a280-aa923db3869b",
+ "label": "Error",
+ "pageAccess": "UseParent",
+ "routeType": "error",
+ "type": "route",
+ "urlPrefix": "error"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/feedDetail.json b/force-app/main/default/experiences/Consumable_21/routes/feedDetail.json
new file mode 100644
index 0000000..6da19fd
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/feedDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "4f882b97-0aa4-44fc-8b69-c5dbeb0bcbdb",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "e1bc2b37-cdd0-4d17-bcff-5b754d9655a9",
+ "label": "Feed Detail",
+ "routeType": "feeditem-generic",
+ "type": "route",
+ "urlPrefix": "feed"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/fileDetail.json b/force-app/main/default/experiences/Consumable_21/routes/fileDetail.json
new file mode 100644
index 0000000..3e0bc91
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/fileDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "f6c3b312-c29c-4c90-843e-9f36ade323f8",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "4085fc95-4a91-42b6-90c6-085ace9b960c",
+ "label": "File Detail",
+ "routeType": "detail-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/fileList.json b/force-app/main/default/experiences/Consumable_21/routes/fileList.json
new file mode 100644
index 0000000..ead09f3
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/fileList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "27e5ec62-67fd-485d-af35-ecaae97389b3",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "1b229ad8-7ea5-4c59-bb30-6288578ad8bd",
+ "label": "File List",
+ "routeType": "list-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/fileRelatedList.json b/force-app/main/default/experiences/Consumable_21/routes/fileRelatedList.json
new file mode 100644
index 0000000..4fb80d8
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/fileRelatedList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "fe2be2e9-572d-46e3-9d57-0434b26626d1",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "04010a2b-dbbf-471c-a904-b5ef7382f595",
+ "label": "File Related List",
+ "routeType": "relatedlist-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/flow.json b/force-app/main/default/experiences/Consumable_21/routes/flow.json
new file mode 100644
index 0000000..89489ef
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/flow.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "585885fb-a1ef-4d95-8292-c21afacfe18e",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "3720315f-e0de-403a-abc9-0d41d1443d98",
+ "label": "Flow",
+ "pageAccess": "UseParent",
+ "routeType": "flow",
+ "type": "route",
+ "urlPrefix": "flow"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/forgotPassword.json b/force-app/main/default/experiences/Consumable_21/routes/forgotPassword.json
new file mode 100644
index 0000000..5c67e18
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/forgotPassword.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "a510a65f-dca4-40d1-9a3f-c54fa0216469",
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "id": "4cfab14e-4605-4e93-b8d1-cbaec0413e1a",
+ "label": "Forgot Password",
+ "routeType": "forgot-password",
+ "type": "route",
+ "urlPrefix": "ForgotPassword"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/groupDetail.json b/force-app/main/default/experiences/Consumable_21/routes/groupDetail.json
new file mode 100644
index 0000000..7850554
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/groupDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "e569b760-98dd-445a-821e-7694873d00da",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "c065e50e-7992-4dcc-8152-3bc05e611ef4",
+ "label": "Group Detail",
+ "routeType": "detail-0F9",
+ "type": "route",
+ "urlPrefix": "group"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/groupList.json b/force-app/main/default/experiences/Consumable_21/routes/groupList.json
new file mode 100644
index 0000000..0f66e47
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/groupList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "17c81c60-07b5-4f1d-aa66-bfbce557b616",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "183fbac8-6145-42e2-b945-c40c1fe45a9b",
+ "label": "Group List",
+ "routeType": "list-0F9",
+ "type": "route",
+ "urlPrefix": "group"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/groupRelatedList.json b/force-app/main/default/experiences/Consumable_21/routes/groupRelatedList.json
new file mode 100644
index 0000000..b3e3c9f
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/groupRelatedList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "df0800d2-f262-47bd-b7ab-3b61daaa3f08",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "29e1b18b-bff4-474d-87b0-8aed87da0871",
+ "label": "Group Related List",
+ "routeType": "relatedlist-0F9",
+ "type": "route",
+ "urlPrefix": "group"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/home.json b/force-app/main/default/experiences/Consumable_21/routes/home.json
new file mode 100644
index 0000000..2e0a87d
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/home.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "39de1ffe-657d-431a-a91f-78a24fffef09",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "185ade5d-fc7e-47d8-aae5-73e1125d1db3",
+ "label": "Home",
+ "pageAccess": "UseParent",
+ "routeType": "home",
+ "type": "route",
+ "urlPrefix": ""
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexAgencyInfo.json b/force-app/main/default/experiences/Consumable_21/routes/lexAgencyInfo.json
new file mode 100644
index 0000000..c5fc35b
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexAgencyInfo.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "c558f76d-08aa-4c90-87d5-79689fdd7e19",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "30e01823-1ef2-4a5a-9f2c-7776fb9dd6f9",
+ "label": "lexAgencyInfo",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexagencyinfo",
+ "type": "route",
+ "urlPrefix": "lexagencyinfo"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexArriveGoods.json b/force-app/main/default/experiences/Consumable_21/routes/lexArriveGoods.json
new file mode 100644
index 0000000..1fb7001
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexArriveGoods.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "34b57eb7-60b0-4af7-93d2-e97bd3871568",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "d9fe5303-011f-4052-a93d-bf27ccbfe0ec",
+ "label": "LexArriveGoods",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexarrivegoods",
+ "type": "route",
+ "urlPrefix": "lexarrivegoods"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexArriveGoodsMain.json b/force-app/main/default/experiences/Consumable_21/routes/lexArriveGoodsMain.json
new file mode 100644
index 0000000..261834c
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexArriveGoodsMain.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "5229d999-bdf4-4629-9b67-0d0803232c20",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "3b8d893a-f328-44e0-afd4-6a754659deee",
+ "label": "LexArriveGoodsMain",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexarrivegoodsmain",
+ "type": "route",
+ "urlPrefix": "lexarrivegoodsmain"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexArriveGsDetails.json b/force-app/main/default/experiences/Consumable_21/routes/lexArriveGsDetails.json
new file mode 100644
index 0000000..6ca02d5
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexArriveGsDetails.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "a4c209b0-404f-4e68-bfd1-621ee6f32c54",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "b8dd3b08-d168-4d1c-af9c-a552f47f4e2d",
+ "label": "LexArriveGsDetails",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexarrivegsdetails",
+ "type": "route",
+ "urlPrefix": "lexarrivegsdetails"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexCancelRemoveBox.json b/force-app/main/default/experiences/Consumable_21/routes/lexCancelRemoveBox.json
new file mode 100644
index 0000000..847935a
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexCancelRemoveBox.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "b3dcfa91-44f1-4f34-849a-cd6a51997236",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "11848c25-fad2-4f2a-b996-bd6a449645f3",
+ "label": "lexCancelRemoveBox",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexcancelremovebox",
+ "type": "route",
+ "urlPrefix": "lexcancelremovebox"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexConInvoiceView.json b/force-app/main/default/experiences/Consumable_21/routes/lexConInvoiceView.json
new file mode 100644
index 0000000..b757aea
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexConInvoiceView.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "34ccaf78-16dd-46ab-80fa-d0d080e218ca",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "44f63a08-ece1-4a2c-ba93-67ca62ceee21",
+ "label": "LexConInvoiceView",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconinvoiceview",
+ "type": "route",
+ "urlPrefix": "lexconinvoiceview"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexConsumable.json b/force-app/main/default/experiences/Consumable_21/routes/lexConsumable.json
new file mode 100644
index 0000000..df49104
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexConsumable.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "ba77614e-6f6b-4e0f-95b1-7f08a6b87196",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "bb299531-bfb2-42e2-9aac-9292440c2908",
+ "label": "LexConsumable",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconsumable",
+ "type": "route",
+ "urlPrefix": "lexconsumable"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexConsumableAccount.json b/force-app/main/default/experiences/Consumable_21/routes/lexConsumableAccount.json
new file mode 100644
index 0000000..7ed0d6c
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexConsumableAccount.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "16367a78-cbc2-45e0-adc8-99e2b57f9943",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "097bd8dd-986b-42f0-8eb8-232371a61b98",
+ "label": "LexConsumableAccount",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconsumableaccount",
+ "type": "route",
+ "urlPrefix": "lexconsumableaccount"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexConsumableAccountInfoPrint.json b/force-app/main/default/experiences/Consumable_21/routes/lexConsumableAccountInfoPrint.json
new file mode 100644
index 0000000..b8969ad
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexConsumableAccountInfoPrint.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "6d539cfe-d011-486d-ac5f-7ee2764809a5",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "56408b2a-d765-4141-a23c-1ffa3d4f722d",
+ "label": "LexConsumableAccountInfoPrint",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconsumableaccountinfoprint",
+ "type": "route",
+ "urlPrefix": "lexconsumableaccountinfoprint"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexConsumableOrderManage.json b/force-app/main/default/experiences/Consumable_21/routes/lexConsumableOrderManage.json
new file mode 100644
index 0000000..d02408f
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexConsumableOrderManage.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "2623448a-1cdd-4bb7-a610-921f58adcd80",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "e634013f-b25d-47ad-9096-3fae1268d6d8",
+ "label": "LexConsumableOrderManage",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexconsumableordermanage",
+ "type": "route",
+ "urlPrefix": "lexconsumableordermanage"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexInventory.json b/force-app/main/default/experiences/Consumable_21/routes/lexInventory.json
new file mode 100644
index 0000000..cf2c639
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexInventory.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "722903fc-3cad-4105-ac41-ffedd4715265",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "d0230c69-9172-464d-867d-7fbdef1eb209",
+ "label": "lexInventory",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexinventory",
+ "type": "route",
+ "urlPrefix": "lexinventory"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexInventoryView.json b/force-app/main/default/experiences/Consumable_21/routes/lexInventoryView.json
new file mode 100644
index 0000000..4290798
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexInventoryView.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "293d6201-3895-490a-a6a9-665d2186863b",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "dbb85f9d-5510-46ce-a23d-09642f5a416a",
+ "label": "lexInventoryView",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexinventoryview",
+ "type": "route",
+ "urlPrefix": "lexinventoryview"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexOutboundorderImport.json b/force-app/main/default/experiences/Consumable_21/routes/lexOutboundorderImport.json
new file mode 100644
index 0000000..5eb1e67
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexOutboundorderImport.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "da82669a-9527-4f47-a2bb-7a0d376ff837",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "02cbfc11-ed43-4060-9236-a7c35371156b",
+ "label": "LexOutboundorderImport",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexoutboundorderimport",
+ "type": "route",
+ "urlPrefix": "lexoutboundorderimport"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexOverdueStock.json b/force-app/main/default/experiences/Consumable_21/routes/lexOverdueStock.json
new file mode 100644
index 0000000..7fd0983
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexOverdueStock.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "d58143e6-fa98-4c6b-b61e-205921ce7586",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "6c349540-fc72-4b5c-bd66-587222f2c9db",
+ "label": "lexOverdueStock",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexoverduestock",
+ "type": "route",
+ "urlPrefix": "lexoverduestock"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexProductLimitEdit.json b/force-app/main/default/experiences/Consumable_21/routes/lexProductLimitEdit.json
new file mode 100644
index 0000000..05535c6
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexProductLimitEdit.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "2f3874fe-b561-465d-b1e4-83f32af06a3d",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "25e1447c-50c9-423c-a651-c933559a89b7",
+ "label": "LexProductLimitEdit",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexproductlimitedit",
+ "type": "route",
+ "urlPrefix": "lexproductlimitedit"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexRemoveBox.json b/force-app/main/default/experiences/Consumable_21/routes/lexRemoveBox.json
new file mode 100644
index 0000000..c4a2885
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexRemoveBox.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "d2e89610-42e7-4a89-811b-88ffc7616a93",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "ea96d0f0-c88f-4862-83f6-a9eae933ea21",
+ "label": "LexRemoveBox",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexremovebox",
+ "type": "route",
+ "urlPrefix": "lexremovebox"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexSaleAndDelivery.json b/force-app/main/default/experiences/Consumable_21/routes/lexSaleAndDelivery.json
new file mode 100644
index 0000000..f295e50
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexSaleAndDelivery.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "90a77753-3af8-4953-b01c-06879a91e3f4",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "54be330b-d4f9-402f-be99-0891dd969559",
+ "label": "LexSaleAndDelivery",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexsaleanddelivery",
+ "type": "route",
+ "urlPrefix": "lexsaleanddelivery"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexSummonsCreat.json b/force-app/main/default/experiences/Consumable_21/routes/lexSummonsCreat.json
new file mode 100644
index 0000000..80440a0
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexSummonsCreat.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "f6f1703b-2bcc-4415-af63-84125a42b0ee",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "0fcd3432-3ff2-4561-a1ec-6a8d49bd9715",
+ "label": "LexSummonsCreat",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lexsummonscreat",
+ "type": "route",
+ "urlPrefix": "lexsummonscreat"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/lexTopPage.json b/force-app/main/default/experiences/Consumable_21/routes/lexTopPage.json
new file mode 100644
index 0000000..dd62e56
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/lexTopPage.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "ebcd3791-2f46-43d4-ae43-74c3e5fb70d9",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "c36ffad3-7613-41d3-b717-075a5c92a1bf",
+ "label": "lexTopPage",
+ "pageAccess": "UseParent",
+ "routeType": "custom-lextoppage",
+ "type": "route",
+ "urlPrefix": "lextoppage"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/login.json b/force-app/main/default/experiences/Consumable_21/routes/login.json
new file mode 100644
index 0000000..f977160
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/login.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "be3be526-74c7-4da5-a294-7c1b8c76c714",
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "id": "6ce8c932-1831-48ee-8cb9-b7a7249e2ef0",
+ "label": "Login",
+ "routeType": "login-home",
+ "type": "route",
+ "urlPrefix": ""
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/loginError.json b/force-app/main/default/experiences/Consumable_21/routes/loginError.json
new file mode 100644
index 0000000..65f6e96
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/loginError.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "98860cc1-5078-4acf-adfa-a3eae3c02cea",
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "id": "85e27f5f-87b6-459f-b703-0e7927c1ce7b",
+ "label": "Login Error",
+ "routeType": "login-error",
+ "type": "route",
+ "urlPrefix": "error"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/mDFAndCoop.json b/force-app/main/default/experiences/Consumable_21/routes/mDFAndCoop.json
new file mode 100644
index 0000000..2106608
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/mDFAndCoop.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "8cdc8a97-c168-4bdf-ad37-0b57212fe2d1",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "3e61c1e7-7ed1-479f-8cbe-bc3f3652458e",
+ "label": "MDF and Coop",
+ "routeType": "mdf",
+ "type": "route",
+ "urlPrefix": "mdf"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/messages.json b/force-app/main/default/experiences/Consumable_21/routes/messages.json
new file mode 100644
index 0000000..177ce94
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/messages.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "123209be-ec9f-4805-8350-748a0596aa39",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "c169b72e-9628-4bdb-9431-d1b9cc5f5165",
+ "label": "Messages",
+ "routeType": "messages",
+ "type": "route",
+ "urlPrefix": "messages"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/myAccount.json b/force-app/main/default/experiences/Consumable_21/routes/myAccount.json
new file mode 100644
index 0000000..6d4386f
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/myAccount.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "aad67d03-498d-4caa-899f-c4876e7361b8",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "926e805d-7acb-4259-bf62-8093a96c20ea",
+ "label": "My Account",
+ "routeType": "my-account",
+ "type": "route",
+ "urlPrefix": "comm-my-account"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/questionDetail.json b/force-app/main/default/experiences/Consumable_21/routes/questionDetail.json
new file mode 100644
index 0000000..9781dad
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/questionDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "23b8f630-4e99-452a-8efb-a540f425e9a2",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "1d300f2a-99d6-402b-b655-a8c03cde3edd",
+ "label": "Question Detail",
+ "routeType": "feeditem",
+ "type": "route",
+ "urlPrefix": "question"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/quipDocsRelatedList.json b/force-app/main/default/experiences/Consumable_21/routes/quipDocsRelatedList.json
new file mode 100644
index 0000000..3fe7e18
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/quipDocsRelatedList.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "2fc4be36-f891-460b-89b4-b1a6cfe34c04",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "7cb4c494-190c-4f18-be5b-c70dce47743b",
+ "label": "Quip Docs Related List",
+ "pageAccess": "UseParent",
+ "routeType": "extrelated-quip",
+ "type": "route",
+ "urlPrefix": "quip"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/recordDetail.json b/force-app/main/default/experiences/Consumable_21/routes/recordDetail.json
new file mode 100644
index 0000000..793bcff
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/recordDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "b798f2b2-7d07-49a1-95d4-75b0a6456758",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "5f56a036-8029-4dc8-9b29-3c93880f3152",
+ "label": "Record Detail",
+ "routeType": "detail",
+ "type": "route",
+ "urlPrefix": "detail"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/recordList.json b/force-app/main/default/experiences/Consumable_21/routes/recordList.json
new file mode 100644
index 0000000..3909cc4
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/recordList.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "fc17b90e-324f-4f45-9fb0-fdb77ae3ddba",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "9fb6ff64-f654-4a4a-b2c0-6ef1f6dfa5f7",
+ "label": "Record List",
+ "pageAccess": "UseParent",
+ "routeType": "list",
+ "type": "route",
+ "urlPrefix": "recordlist"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/register.json b/force-app/main/default/experiences/Consumable_21/routes/register.json
new file mode 100644
index 0000000..0ca6e74
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/register.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "293d892f-ceae-4d05-8c96-7ba490f34de8",
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "id": "dce32c5e-d7db-43df-89ed-04a41d3d695b",
+ "label": "Register",
+ "routeType": "self-register",
+ "type": "route",
+ "urlPrefix": "SelfRegister"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/relatedRecordList.json b/force-app/main/default/experiences/Consumable_21/routes/relatedRecordList.json
new file mode 100644
index 0000000..33f510b
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/relatedRecordList.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "1e2080ea-54bd-44f2-b74e-3ba7c4b9cea4",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "769157c0-b494-4bd8-a82f-f0658c22ca89",
+ "label": "Related Record List",
+ "pageAccess": "UseParent",
+ "routeType": "relatedlist",
+ "type": "route",
+ "urlPrefix": "relatedlist"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/reportBuilder.json b/force-app/main/default/experiences/Consumable_21/routes/reportBuilder.json
new file mode 100644
index 0000000..bffbd19
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/reportBuilder.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "eafc25fd-4415-48ab-bd26-616e299447aa",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "c43ac9aa-2c73-4a27-8ded-60f2d1566df0",
+ "label": "Report Builder",
+ "routeType": "createreport",
+ "type": "route",
+ "urlPrefix": "createreport"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/reportDetail.json b/force-app/main/default/experiences/Consumable_21/routes/reportDetail.json
new file mode 100644
index 0000000..02a1f03
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/reportDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "f74c2f86-84ce-4157-a76d-542bd0ca8351",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "46eed663-c1c8-448a-b5cd-44773eace6af",
+ "label": "Report Detail",
+ "routeType": "detail-00O",
+ "type": "route",
+ "urlPrefix": "report"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/reportList.json b/force-app/main/default/experiences/Consumable_21/routes/reportList.json
new file mode 100644
index 0000000..b904996
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/reportList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "aec1e1b3-f846-4a3c-bb16-dc3a06c86c45",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "abe45e27-76c1-498b-9e74-de5b9fcd5074",
+ "label": "Report List",
+ "routeType": "list-00O",
+ "type": "route",
+ "urlPrefix": "report"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/reportRelatedList.json b/force-app/main/default/experiences/Consumable_21/routes/reportRelatedList.json
new file mode 100644
index 0000000..a8bc2fa
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/reportRelatedList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "5ef4528c-1506-481f-9e40-09780b302953",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "95de221f-d530-4d25-83ed-47bdde730bb5",
+ "label": "Report Related List",
+ "routeType": "relatedlist-00O",
+ "type": "route",
+ "urlPrefix": "report"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/resources.json b/force-app/main/default/experiences/Consumable_21/routes/resources.json
new file mode 100644
index 0000000..e41c4be
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/resources.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "44c441b8-d720-4387-950a-7eab9bad908b",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "ab4fca8d-2a7c-4669-b3dc-cea7cd9537b0",
+ "label": "Resources",
+ "pageAccess": "UseParent",
+ "routeType": "files",
+ "type": "route",
+ "urlPrefix": "files"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/search.json b/force-app/main/default/experiences/Consumable_21/routes/search.json
new file mode 100644
index 0000000..e204770
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/search.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "4bc3474e-802a-4cfb-be03-93255e2f9176",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "c574616d-abd4-4acd-919e-c0f68c553309",
+ "label": "Search",
+ "pageAccess": "UseParent",
+ "routeType": "global-search",
+ "type": "route",
+ "urlPrefix": "global-search"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/streamDetail.json b/force-app/main/default/experiences/Consumable_21/routes/streamDetail.json
new file mode 100644
index 0000000..2ae6aa4
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/streamDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "2ed3971e-2e0b-49e1-957a-db8edf28e905",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "f9e593ce-0aee-40e6-8e2d-f7c08933639b",
+ "label": "Stream Detail",
+ "routeType": "detail-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/streamList.json b/force-app/main/default/experiences/Consumable_21/routes/streamList.json
new file mode 100644
index 0000000..72a5a2d
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/streamList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "7b44c578-cb31-4b50-93b6-a47a13e14547",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "f05e0761-96f0-4da8-93ae-8c5be5bc2039",
+ "label": "Stream List",
+ "routeType": "list-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/streamRelatedList.json b/force-app/main/default/experiences/Consumable_21/routes/streamRelatedList.json
new file mode 100644
index 0000000..dba3dc1
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/streamRelatedList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "c7dfa990-4229-4b61-bd62-fc491d749f9e",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "660a539f-f633-4e43-9d55-6df243d548c8",
+ "label": "Stream Related List",
+ "routeType": "relatedlist-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/topicCatalog.json b/force-app/main/default/experiences/Consumable_21/routes/topicCatalog.json
new file mode 100644
index 0000000..e7c28d3
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/topicCatalog.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "beef814b-071b-4cc4-b306-273e36bcd4e1",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "78907806-e9ec-44d2-8cbd-4894911b6349",
+ "label": "Topic Catalog",
+ "pageAccess": "UseParent",
+ "routeType": "topic-catalog",
+ "type": "route",
+ "urlPrefix": "topiccatalog"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/topicDetail.json b/force-app/main/default/experiences/Consumable_21/routes/topicDetail.json
new file mode 100644
index 0000000..3ce58d8
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/topicDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "b9923519-ef19-44ef-bd24-28ecae2ca1d0",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "94a94f05-af4f-43f1-9e16-334dff1b7dc1",
+ "label": "Topic Detail",
+ "routeType": "topic",
+ "type": "route",
+ "urlPrefix": "topic"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/userList.json b/force-app/main/default/experiences/Consumable_21/routes/userList.json
new file mode 100644
index 0000000..992c4d4
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/userList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "d02d6cf0-9943-4eae-87c2-4204b97a6232",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "9f0e28fe-f397-40bd-bd30-5d024cf77cb2",
+ "label": "User List",
+ "routeType": "list-005",
+ "type": "route",
+ "urlPrefix": "profile"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/userProfile.json b/force-app/main/default/experiences/Consumable_21/routes/userProfile.json
new file mode 100644
index 0000000..b3b2f2e
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/userProfile.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "bd2f032f-6a01-4173-8efd-f248d6d6af26",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "45c0d04e-bcbc-484d-94ad-f881b2e56b4c",
+ "label": "User Profile",
+ "routeType": "detail-005",
+ "type": "route",
+ "urlPrefix": "profile"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/userRelatedList.json b/force-app/main/default/experiences/Consumable_21/routes/userRelatedList.json
new file mode 100644
index 0000000..5a50dc1
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/userRelatedList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "c449b307-105f-42b0-aea1-e06c8080480a",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "97d8e3b2-695a-4f0e-be34-2a9cd251ea1b",
+ "label": "User Related List",
+ "routeType": "relatedlist-005",
+ "type": "route",
+ "urlPrefix": "profile"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/routes/userSettings.json b/force-app/main/default/experiences/Consumable_21/routes/userSettings.json
new file mode 100644
index 0000000..8a4fa7e
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/routes/userSettings.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "c3057516-9b03-4f0d-97b8-17a86dbc1ec8",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "d012918b-1353-4e46-adfe-ab69e9c8f0ac",
+ "label": "User Settings",
+ "routeType": "usersettings",
+ "type": "route",
+ "urlPrefix": "settings"
+}
diff --git "a/force-app/main/default/experiences/Consumable_21/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225Detail.json" "b/force-app/main/default/experiences/Consumable_21/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225Detail.json"
new file mode 100644
index 0000000..66bbf73
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable_21/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225Detail.json"
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "1691b1e6-3801-4345-8e26-61efe24a1221",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "d2dfc10f-52db-42be-a01b-76762abd4f27",
+ "label": "娑堣�楀搧璁㈠崟 Detail",
+ "objectApiName": "Consumable_order__c",
+ "routeType": "detail-a2K",
+ "type": "route",
+ "urlPrefix": "consumable-order"
+}
diff --git "a/force-app/main/default/experiences/Consumable_21/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225List.json" "b/force-app/main/default/experiences/Consumable_21/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225List.json"
new file mode 100644
index 0000000..1927045
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable_21/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225List.json"
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "c9f4f647-56ee-42d8-a323-0e34383a4ec2",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "c945e6e5-2fc5-4966-bfc0-09183e1ac76b",
+ "label": "娑堣�楀搧璁㈠崟 List",
+ "objectApiName": "Consumable_order__c",
+ "routeType": "list-a2K",
+ "type": "route",
+ "urlPrefix": "consumable-order"
+}
diff --git "a/force-app/main/default/experiences/Consumable_21/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225RelatedList.json" "b/force-app/main/default/experiences/Consumable_21/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225RelatedList.json"
new file mode 100644
index 0000000..8a0b11d
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable_21/routes/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225RelatedList.json"
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "3f6ef9a9-d9a1-413c-920b-c0eb491a355e",
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "id": "a11b1b55-0bf6-4736-9c20-3a851e653c68",
+ "label": "娑堣�楀搧璁㈠崟 Related List",
+ "objectApiName": "Consumable_order__c",
+ "routeType": "relatedlist-a2K",
+ "type": "route",
+ "urlPrefix": "consumable-order"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/themes/partnerCentral.json b/force-app/main/default/experiences/Consumable_21/themes/partnerCentral.json
new file mode 100644
index 0000000..669565b
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/themes/partnerCentral.json
@@ -0,0 +1,184 @@
+{
+ "activeBrandingSetId": "1fc6a9e7-4b7f-4325-9684-6583be52aabf",
+ "customCSS": ".siteforcePrmBody .cHeader .cBrandingLogo{\n width: 140px !important;\n height: 40px !important;\n pointer-events:none;\n}\n\n.siteforcePrmBody .comm-navigation{\n min-height:48px !important;\n}\n\n.siteforcePrmBody .comm-navigation .comm-navigation__item a, .siteforcePrmBody .comm-navigation .comm-navigation__item button{\n font-size:20px;\n}\n\ncAltToggleNav slds-icon_x-small{\n display:none;\n}\n\n.salesforceIdentityLoginBody2 .cCenterPanel{\n left:200px;\n top:-30px;\n min-width:320px !important;\n}\n.salesforceIdentityLoginForm2 .inputBox{\n min-width:180px !important;\n}\n\n.siteforcePrmBody .cHeader .forceSearchInputDesktop input, .siteforcePrmBody .cHeader .forceSearchInputDesktop input::placeholder{\n font-size:14px !important;\n}\n.slds-button_icon-more{\n display:none;\n}\na.slds-button{\n display:none;\n}\n.forcePageBlockItemView .slds-form-element .slds-button_icon {\n display: none;\n}\n.siteforcePrmBody .forceCommunityRecordDetail .forceRecordLayout .forcePageBlockSectionView .full.forcePageBlockItemView{\n pointer-events:none\n}\n.slds-nav-vertical .slds-nav-vertical__section.navItems.entityItems:nth-child(3){\n display: none!important;\n}\n.null.comm-page-list-00O .slds-table_header-fixed thead th:nth-child(6){\n display:none!important;\n}\n.null.comm-page-list-00O .slds-align_absolute-center{\n display:none!important;\n}\n.slds-m-left_xx-small, .slds-m-left--xx-small{\n display:none;\n}",
+ "developerName": "prm",
+ "id": "edb413a4-972c-45c8-b42e-425feb9ae035",
+ "label": "Partner Central",
+ "layouts": {
+ "Inner": "0d49bc27-e1ab-4ff8-af6d-05d9b75eb390",
+ "Login": "e7b66c02-3a4b-4e63-8d9a-e7755f8d5117",
+ "ServiceNotAvailable": "ed739e76-98ba-4df8-a212-7d6e924df751"
+ },
+ "type": "theme",
+ "views": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:loginBody2",
+ "id": "e7b66c02-3a4b-4e63-8d9a-e7755f8d5117",
+ "label": "Login",
+ "regions": [
+ {
+ "id": "8c5d60ec-fe51-458d-9654-f7f441fc0161",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "8ce1b9ff-c913-421d-ad63-9bc38c23fa50",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "ed3a4f90-b378-46f5-8107-c59aad9af8c8",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "type": "view"
+ },
+ {
+ "componentAttributes": {
+ "IsDefaultHeaderHidden": false,
+ "IsDefaultHeaderPositionFixed": true,
+ "IsDefaultNotificationsHidden": true,
+ "IsSearchBarHidden": false,
+ "fixedPageWidth": 1920,
+ "isPageWidthFixed": true
+ },
+ "componentName": "siteforce:prmBody",
+ "id": "0d49bc27-e1ab-4ff8-af6d-05d9b75eb390",
+ "label": "Default",
+ "regions": [
+ {
+ "id": "4c6177df-c884-45d7-9063-6f4dfe6f4a3b",
+ "regionName": "customHeader",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "maxAutoCompleteResults": 5,
+ "searchLabel": "鎼滅储...",
+ "searchObjects": [
+ {
+ "isPublic": false,
+ "name": "Lead"
+ },
+ {
+ "isPublic": false,
+ "name": "Opportunity"
+ },
+ {
+ "isPublic": false,
+ "name": "Campaign"
+ },
+ {
+ "isPublic": false,
+ "name": "ContentDocument"
+ },
+ {
+ "isPublic": true,
+ "name": "Consumable_order__c"
+ }
+ ]
+ },
+ "componentName": "forceCommunity:globalSearchInput",
+ "id": "6ad9ba92-3388-4e83-9d1b-9b0730a8cd1f",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8b36c48e-5c51-4615-90af-11a950aba002",
+ "regionName": "search",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "accountManagementLabel": "Account Management",
+ "communityBuilderLabel": "Experience Builder",
+ "communitySetupLabel": "Salesforce Setup",
+ "contactSupportLabel": "Contact Support",
+ "filterName": "MyCases",
+ "homeLabel": "涓婚〉",
+ "includeContactSupport": false,
+ "includeMessages": false,
+ "loginLabel": "Login",
+ "logoutLabel": "娉ㄩ攢",
+ "myAccountLabel": "My Account",
+ "showAccountManagement": true,
+ "showUserSettings": false,
+ "userSettingsLabel": "My Settings",
+ "viewProfileLabel": "鎴戠殑璁剧疆"
+ },
+ "componentName": "selfService:userProfileMenu",
+ "id": "2d1bd7ed-1242-445f-9e9d-8ca24c7a1afb",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "47b440e8-6961-4d71-b0bb-cfc67bb8b426",
+ "regionName": "profileMenu",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "NavigationMenuEditorRefresh": "",
+ "hideAppLauncher": true,
+ "hideHomeText": false
+ },
+ "componentName": "forceCommunity:globalNavigation",
+ "id": "9ebb5bcb-8e8f-4bd0-ab01-231cc5aed2bc",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "70ad55e0-6a9d-4809-af80-241dd72e3ada",
+ "regionName": "navBar",
+ "type": "region"
+ },
+ {
+ "id": "eae7c0a3-89ab-4594-aa1b-e1d2d4810d4b",
+ "regionName": "customRegion",
+ "type": "region"
+ },
+ {
+ "id": "2228ceec-f4f7-49ce-bc3e-f64f1efcc3b3",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "type": "view"
+ },
+ {
+ "componentAttributes": {
+ "fixedPageWidth": 1170,
+ "headerBgColor": "rgba(0, 0, 0, 0)",
+ "isHeaderPinned": false,
+ "isHeroUnderHeader": false,
+ "isPageWidthFixed": true,
+ "showHeader": true,
+ "showHero": true
+ },
+ "componentName": "siteforce:themeLayoutStarter",
+ "id": "ed739e76-98ba-4df8-a212-7d6e924df751",
+ "label": "ServiceNotAvailable",
+ "regions": [
+ {
+ "id": "5440a29f-bf39-4b13-9699-c0c76a2d4631",
+ "regionName": "themeHeader",
+ "type": "region"
+ },
+ {
+ "id": "d16a7090-9cb9-4c34-b66d-918f800158f6",
+ "regionName": "themeFooter",
+ "type": "region"
+ }
+ ],
+ "type": "view"
+ }
+ ]
+}
diff --git a/force-app/main/default/experiences/Consumable_21/variations/defaultNavigationMenuComponentProperties.json b/force-app/main/default/experiences/Consumable_21/variations/defaultNavigationMenuComponentProperties.json
new file mode 100644
index 0000000..05aecd6
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/variations/defaultNavigationMenuComponentProperties.json
@@ -0,0 +1,17 @@
+{
+ "componentVariants": [
+ {
+ "id": "513f46c4-6c7a-4bad-bc61-bd8ca0e820c4",
+ "propertyOverrides": {
+ "componentAttributes": {
+ "NavigationMenuEditorRefresh": "ENGUser1"
+ }
+ },
+ "targetId": "9ebb5bcb-8e8f-4bd0-ab01-231cc5aed2bc",
+ "type": "componentVariant"
+ }
+ ],
+ "developerName": "Default_Navigation_Menu_Component_Properties",
+ "id": "17c75696-bc3e-429d-86f0-966bdc3e9713",
+ "type": "experienceVariation"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/accountManagement.json b/force-app/main/default/experiences/Consumable_21/views/accountManagement.json
new file mode 100644
index 0000000..c8413c3
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/accountManagement.json
@@ -0,0 +1,153 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "5706f451-4ea7-4379-ab9d-3d9ee781afe5",
+ "label": "Account Management",
+ "regions": [
+ {
+ "id": "662c5b52-3e43-4064-9ace-48d044bca012",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 20px; color: #1e2443;\">Account Management</b> </h1> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "4c0e78cf-1b68-42f3-88ad-c43ea45fdb3d",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "cecf76bb-0d32-40b6-a3cd-6a4402b8971e",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "28895372-24f3-44de-9f5e-28cfe85352a7",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "customTitle": "Members",
+ "parentRecordId": "{!CurrentUser.accountId}",
+ "relatedListName": "Users",
+ "showBreadCrumbs": "false",
+ "showCustomTitle": "true",
+ "showManualRefreshButton": "false",
+ "showRowNumbers": "false"
+ },
+ "fqn": "forceCommunity:relatedList"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Members"
+ },
+ {
+ "UUID": "d0485f4a-3912-4d40-ad69-3fe19e39de66",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "recordId": "{!CurrentUser.accountId}"
+ },
+ "fqn": "forceCommunity:accountBrandRecord"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "Branding"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "cecf76bb-0d32-40b6-a3cd-6a4402b8971e",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "Members",
+ "parentRecordId": "{!CurrentUser.accountId}",
+ "relatedListName": "Users",
+ "showBreadCrumbs": false,
+ "showCustomTitle": true,
+ "showManualRefreshButton": false,
+ "showRowNumbers": false
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "cedfa9df-49c7-436f-b126-4e932bd728ab",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "28895372-24f3-44de-9f5e-28cfe85352a7",
+ "regionLabel": "Members",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!CurrentUser.accountId}"
+ },
+ "componentName": "forceCommunity:accountBrandRecord",
+ "id": "a1c5adc5-52cf-48ed-a978-ba7b1b3e0020",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d0485f4a-3912-4d40-ad69-3fe19e39de66",
+ "regionLabel": "Branding",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1edbc0ab-4547-45de-879e-5d4ef884139f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "12c3f14a-540c-4bdd-bc77-49464fbf4ff4",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Account Management"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "90a3e074-564a-49d3-b3fd-26787acf056e",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "69e596d7-b594-4fdd-bdf7-cd1602460b4b",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "account-management"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/cICList.json b/force-app/main/default/experiences/Consumable_21/views/cICList.json
new file mode 100644
index 0000000..39df15e
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/cICList.json
@@ -0,0 +1,52 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "ac325945-afdb-4168-98de-43523e77ce57",
+ "label": "CIC List",
+ "regions": [
+ {
+ "id": "1a604b93-7a5b-49e4-b1d8-df262d3214b8",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "{!filterId}",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "{!objectName}",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "ae7b16bf-7a3f-4b72-8733-0eaa391382db",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e1ec6c97-dd9b-4b41-8380-6c68c6e72044",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "b0005656-95c1-4976-9bef-ed4057a546cf",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-500"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/cICRelatedList.json b/force-app/main/default/experiences/Consumable_21/views/cICRelatedList.json
new file mode 100644
index 0000000..0a97ab7
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/cICRelatedList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "e98228d4-1ac0-43c4-acc5-40c683a105b5",
+ "label": "CIC Related List",
+ "regions": [
+ {
+ "id": "2b02b44b-6d15-4c6d-93f0-55a075509086",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "74541195-784a-4b70-9f8e-b063367ce4cf",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e5a38288-2dee-4535-a284-e0a93b24dc03",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "6a854211-2c97-472a-b717-2bf2599e8699",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-500"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/campaignDetail.json b/force-app/main/default/experiences/Consumable_21/views/campaignDetail.json
new file mode 100644
index 0000000..a5a9b59
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/campaignDetail.json
@@ -0,0 +1,76 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "1381b060-8269-4816-a237-1811716a29c0",
+ "label": "Campaign Detail",
+ "regions": [
+ {
+ "id": "b31c1404-d255-4a4b-b5cc-b634ada00c66",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "1e35b9bc-03f7-4189-8914-d32cc8eb3742",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "41abd47c-5c90-41b5-abe4-2e25dd7d44b8",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "268b3105-a2d0-467c-9d5e-f070a6bb9735",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "1d68d089-8bf5-41b7-955a-21ab3609384f",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "af78ab95-2fa4-48e5-beb9-305c06401db7",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "13c22c77-00bc-4f28-ab26-84eb48bd4d1a",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-701"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/campaignList.json b/force-app/main/default/experiences/Consumable_21/views/campaignList.json
new file mode 100644
index 0000000..3e29217
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/campaignList.json
@@ -0,0 +1,150 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "54678bd4-0573-4f0c-ac3b-179c2ba32014",
+ "label": "Campaign List",
+ "regions": [
+ {
+ "id": "92125f5b-f051-4f1d-808f-6c0d80996645",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "3849ce1d-6d64-451f-9592-26017f7c8dbe",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "ae78fd08-264c-4155-b7fa-cf68c1a0132e",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "richTextValue": " <p><br/></p> <p style="text-align:left;"> Use these campaigns to generate leads and grow your business </p> "
+ },
+ "fqn": "forceCommunity:richTextInline"
+ },
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:campaignTileList"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Campaign Marketplace"
+ },
+ {
+ "UUID": "5ef3e96f-b60a-4a3d-bf68-e0d8aef2212b",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "Campaign"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "All Campaigns"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "3849ce1d-6d64-451f-9592-26017f7c8dbe",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <p><br/></p> <p style="text-align:left;"> Use these campaigns to generate leads and grow your business </p> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "197c7ab3-5836-4a2b-9032-3b14d20441cc",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "bodyField": "Description",
+ "categoryField": "__",
+ "dataFieldsConfig": "",
+ "highlight": "__",
+ "highlightColor": "#007DB8",
+ "listLabel": "",
+ "listViewName": "GIRctiveCampaignsR",
+ "showImage": true,
+ "sortBy": "Num__c",
+ "sortOrder": "Ascending",
+ "titleField": "Name"
+ },
+ "componentName": "forceCommunity:campaignTileList",
+ "id": "5d58dad6-1eac-4672-9753-d882850f8e9f",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ae78fd08-264c-4155-b7fa-cf68c1a0132e",
+ "regionLabel": "Campaign Marketplace",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "Campaign",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "13db499a-8283-409e-8767-0112d3bf25e6",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5ef3e96f-b60a-4a3d-bf68-e0d8aef2212b",
+ "regionLabel": "All Campaigns",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0c7e77e5-fbf3-4804-a870-fe89ce918a42",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "515a9646-71b3-4ae2-a44c-5cd45e265a2a",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-701"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/campaignRelatedList.json b/force-app/main/default/experiences/Consumable_21/views/campaignRelatedList.json
new file mode 100644
index 0000000..f3fc068
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/campaignRelatedList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "68254983-8fbc-42d1-b203-0c42e888a5cb",
+ "label": "Campaign Related List",
+ "regions": [
+ {
+ "id": "a44ecd72-c2e5-46a1-a72b-1ab78946433d",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "058a25eb-7688-4d34-a947-f1dc7b56e65a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e82bb41a-29d0-4a10-ad63-5bd0d95556ef",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "6b2dc14c-4dac-4c87-b313-e5d8207d39e8",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-701"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/caseDetail.json b/force-app/main/default/experiences/Consumable_21/views/caseDetail.json
new file mode 100644
index 0000000..8f78f97
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/caseDetail.json
@@ -0,0 +1,76 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "98a72e3e-7cd8-4258-8d63-861e01aaa5e5",
+ "label": "Case Detail",
+ "regions": [
+ {
+ "id": "48e4a9cf-a85f-43b8-ad27-e59c23759908",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "7341ec10-85f2-4996-b95e-da37115f6f99",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "b00ba5be-9e2f-4541-bd39-e9e10e09539d",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "54e9e054-0c75-43c7-be08-6cbd3e629f0a",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "c491da0e-840b-4839-9326-db90922256ed",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "6cd58fc5-d684-4c4c-81e5-79daf342f5b3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "01edd9cd-6a9b-4cd9-a411-58597a87f5c4",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-500"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/checkPassword.json b/force-app/main/default/experiences/Consumable_21/views/checkPassword.json
new file mode 100644
index 0000000..6322384
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/checkPassword.json
@@ -0,0 +1,67 @@
+{
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "fde21273-a399-4352-84bd-df7f1081488c",
+ "label": "Check Password",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><span style=\"font-size:22px\">NOW, CHECK YOUR EMAIL</span></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "632b43b2-b321-494e-9a57-b1f7908b99a3",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\">Check the email account associated with your user name for instructions on resetting your password. Remember to look in your spam folder, where automated messages sometimes filter. If you still can't log in, contact your administrator.</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "a4d8f2ce-78dc-4ccc-8c23-4edeac459453",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><a class=\"inverseTextColor\" href=\"./\">Back to login</a></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "a0a98e5e-54ab-4923-a170-2cc5458b576c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0c9fafcc-3ab2-4a5d-8502-ed3596149297",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Check Password"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "89e29191-a1ff-4603-bc80-efdbd4320217",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2f359d06-d5b7-48bd-ba53-7561473e3b10",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "check-password"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/consumableDetailFix.json b/force-app/main/default/experiences/Consumable_21/views/consumableDetailFix.json
new file mode 100644
index 0000000..6546356
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/consumableDetailFix.json
@@ -0,0 +1,156 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "053adf6c-c32c-454f-b078-ce941bb524da",
+ "label": "ConsumableDetail_fix",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "b443b410-e01d-41a4-a75e-c7bf4592f523",
+ "columns": [
+ {
+ "UUID": "8ad26dbb-b7fa-423e-876d-dd3e7a239f56",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 115
+ },
+ "componentName": "forceCommunity:section",
+ "id": "b443b410-e01d-41a4-a75e-c7bf4592f523",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "a7899391-fd54-4ffc-959c-f87fe3babe82",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8ad26dbb-b7fa-423e-876d-dd3e7a239f56",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "22caba0f-40e9-4198-a21d-193b2930b1ab",
+ "columns": [
+ {
+ "UUID": "1b56517c-4e93-43c3-a993-1a53404784c8",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "8",
+ "seedComponents": []
+ },
+ {
+ "UUID": "8a1505f9-3b0f-48dd-b59c-7a7b8d34fdfc",
+ "columnKey": "24965",
+ "columnName": "Column 2",
+ "columnWidth": "4",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "22caba0f-40e9-4198-a21d-193b2930b1ab",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordDetail",
+ "id": "268f2e6e-11c2-4fa2-98a4-615a63ed0118",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1b56517c-4e93-43c3-a993-1a53404784c8",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}",
+ "width": "MEDIUM"
+ },
+ "componentName": "forceCommunity:relatedRecords",
+ "id": "46312953-4394-4dec-ac91-2fdb1adb4980",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8a1505f9-3b0f-48dd-b59c-7a7b8d34fdfc",
+ "regionLabel": "Column 2",
+ "regionName": "24965",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3b2c12d0-c146-4a04-9d20-e8d760b01721",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "8c3296b9-45a0-4c69-8371-0597ff257f60",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "b8fdd624-9d5e-4b80-9965-d0259f2f2507",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-a2K"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/contactSupport.json b/force-app/main/default/experiences/Consumable_21/views/contactSupport.json
new file mode 100644
index 0000000..e4a95dd
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/contactSupport.json
@@ -0,0 +1,106 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsTwoCol66Layout",
+ "dataProviders": [],
+ "id": "9a1c5092-99cc-4742-8767-2ad633077bc2",
+ "label": "Contact Support",
+ "regions": [
+ {
+ "id": "d68b6d73-150f-4de3-8e43-a0ad52ae785d",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "allowAttachments": true,
+ "attachmentLabel": "Upload File",
+ "buttonAlignment": "center",
+ "buttonBgColor": "",
+ "buttonBgHoverColor": "",
+ "buttonBorderColor": "",
+ "buttonMaxWidth": "",
+ "buttonRadius": 0,
+ "buttonTextColor": "",
+ "buttonTextHoverColor": "",
+ "callToAction": false,
+ "callToActionButtonText": "",
+ "callToActionText": "",
+ "callToActionUrl": "",
+ "confirmationSubtext": "We鈥檒l get back to you soon.",
+ "confirmationText": "Your case was created.",
+ "guestQuickActionName": "Select or configure a global action",
+ "headerSubtitle": "Tell us how we can help.",
+ "headerTitle": "Contact Customer Support",
+ "isMicrobatch": false,
+ "quickActionName": "",
+ "requestSummaryText": "Case summary"
+ },
+ "componentName": "forceCommunity:contactSupportForm",
+ "id": "af6e69c6-b73f-42e8-a9eb-e88addd59307",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9f206282-4fd3-4b8c-8c79-0d244492a28b",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "askConfirmationQuestion": true,
+ "confirmationMessageLabel": "Got it!",
+ "deflectionSubtitle": "Find what you need here.",
+ "deflectionTitle": "Need Answers Fast?",
+ "firstQuestion": "Did this content solve your issue?",
+ "maxResults": 6,
+ "measureDeflection": true,
+ "redirectUrl": "",
+ "secondQuestion": "Stop creating your case?",
+ "showArticles": true,
+ "showDiscussions": false,
+ "topicId": ""
+ },
+ "componentName": "forceCommunity:caseDeflection",
+ "id": "f9fb18d0-a727-4374-a1a2-30240bda00a6",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "98aec9b9-d33f-42b9-8f02-689e6eca9c9b",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "8f0087d1-398f-4c12-bc1d-f0c1dda3bd1e",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Contact Support"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "6d6aa851-37cb-4017-96d1-40805beb3392",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "94beda1d-4b5e-44a1-8249-b8a7c1fb2129",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "contactsupport"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/createRecord.json b/force-app/main/default/experiences/Consumable_21/views/createRecord.json
new file mode 100644
index 0000000..4df7a60
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/createRecord.json
@@ -0,0 +1,40 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "f3337021-df6f-459b-afd9-2b8ad6a459cd",
+ "label": "Create Record",
+ "regions": [
+ {
+ "id": "f9a7cbcb-c8e3-4766-8202-8900a6ac3369",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "actionApiName": "{!actionApiName}",
+ "isMicrobatch": false
+ },
+ "componentName": "forceCommunity:createRecordForm",
+ "id": "119c4809-25fa-4755-abba-0f76faf67b8e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "581148df-547f-4ee4-9abe-ee2ae8666a3e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "73518618-27ee-4b48-a2b9-0582bc983c05",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "createrecord"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/dashboardDetail.json b/force-app/main/default/experiences/Consumable_21/views/dashboardDetail.json
new file mode 100644
index 0000000..9e9c8a2
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/dashboardDetail.json
@@ -0,0 +1,58 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "62c1cd02-8480-40fa-904f-418af2153eca",
+ "label": "Dashboard Detail",
+ "regions": [
+ {
+ "id": "22074c71-247e-4d46-9592-b1a9bcdfe024",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "height": "1065",
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:dashboard",
+ "id": "e6c192bc-4e57-484e-a5ac-141d4a624b2a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3327088d-8b39-452b-bf17-63cc1b96a0a3",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "08cb94c4-e4c4-4324-bf97-57dea84fc9fc",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "e9d8fbd5-8938-4934-969d-6764066bd2b8",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8e50cedc-f527-4b9c-9a9a-cf585c7e3091",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-01Z"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/dashboardList.json b/force-app/main/default/experiences/Consumable_21/views/dashboardList.json
new file mode 100644
index 0000000..03a3bbd
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/dashboardList.json
@@ -0,0 +1,37 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "5ac09d10-30b2-49e0-a01b-26452f691876",
+ "label": "Dashboard List",
+ "regions": [
+ {
+ "id": "daa6e8e3-77f0-4065-9901-711c8efaa5a7",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:dashboardList",
+ "id": "c7146be9-1bfc-412e-96b0-91ac3ea31fe3",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "cd7bf953-8f03-4944-bd82-3de39e50e3bc",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "2ac5c3dc-eb46-4a8d-b777-c1890d995fde",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-01Z"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/dashboardRelatedList.json b/force-app/main/default/experiences/Consumable_21/views/dashboardRelatedList.json
new file mode 100644
index 0000000..cb891cc
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/dashboardRelatedList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "94363bda-5a07-47b2-b3e1-24e907ba96b5",
+ "label": "Dashboard Related List",
+ "regions": [
+ {
+ "id": "a4247675-6565-403a-8790-b494db3a4143",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "5953be37-84f7-4f11-8ef8-047b5eedbc78",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a62c76a5-102c-4e7c-b8c4-57ff34f2b518",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "b7e2ebb7-7994-4e97-8e3b-5cf66fd5e80d",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-01Z"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/error.json b/force-app/main/default/experiences/Consumable_21/views/error.json
new file mode 100644
index 0000000..7b23967
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/error.json
@@ -0,0 +1,57 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "4ed83537-68ba-4209-9169-b3f3c6caa6d1",
+ "label": "Error",
+ "regions": [
+ {
+ "id": "06635844-dd80-4ce6-aee6-7db0a4a40480",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <div class='slds-grid slds-grid--vertical slds-align--absolute-center slds-container--large'> <div class='slds-align-middle slds-m-bottom--xx-large slds-m-top--xx-large' alt='Page not available'> <img src='/sfsites/c/img/community/slds/messaging/illustration-page-not-found.png' class='slds-p-horizontal--large'/> </div> <h4 class='slds-text-align--center slds-text-heading--large slds-text-color--weak slds-m-bottom--small'>Page not available</h4> <p class='slds-text-align--center slds-text-heading--medium slds-text-color--weak'>Maybe the page was deleted, the URL is incorrect, or something else went wrong. If you know the page exists but you still can鈥檛 get to it, please ask the community administrator for help.</p> </div>"
+ },
+ "componentName": "forceCommunity:htmlBlock",
+ "id": "258583c5-41d5-4ce8-a2af-f2180469dc39",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2723f24f-60c0-486f-b4a3-79d1bbc05021",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "11c0105f-d87f-4383-a8aa-7455a4995efa",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Error"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "6b771e82-ce20-4dbd-839d-4c100fb020cd",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d6d1304a-35b4-4070-93a8-d3a729266b4b",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "error"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/feedDetail.json b/force-app/main/default/experiences/Consumable_21/views/feedDetail.json
new file mode 100644
index 0000000..1aa6f8d
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/feedDetail.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "4f882b97-0aa4-44fc-8b69-c5dbeb0bcbdb",
+ "label": "Feed Detail",
+ "regions": [
+ {
+ "id": "966eeeac-7c3c-4931-be8f-b55ab1e3f6fd",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}"
+ },
+ "componentName": "forceCommunity:feedItemDetail",
+ "id": "a27a4c94-f053-4d21-81a2-fb90fe86f99b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5109e2d7-f6f0-4352-9c75-73b9ed3d32da",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "3ba76c63-06b7-41d2-ad7f-3eae958165d5",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "feeditem-generic"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/fileDetail.json b/force-app/main/default/experiences/Consumable_21/views/fileDetail.json
new file mode 100644
index 0000000..8d069df
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/fileDetail.json
@@ -0,0 +1,37 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "f6c3b312-c29c-4c90-843e-9f36ade323f8",
+ "label": "File Detail",
+ "regions": [
+ {
+ "id": "be48bd9c-1c38-4b32-806e-ad8fc737987c",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:fileDetailPage",
+ "id": "c7a0135b-e638-4b4b-aced-72e4ae72b32b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9c426842-1aed-46f6-b01e-07e55415efeb",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "0c7f53cd-011d-47ab-8e88-7d1a9e0ca672",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-069"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/fileList.json b/force-app/main/default/experiences/Consumable_21/views/fileList.json
new file mode 100644
index 0000000..732cf49
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/fileList.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "27e5ec62-67fd-485d-af35-ecaae97389b3",
+ "label": "File List",
+ "regions": [
+ {
+ "id": "c9685e9b-711f-4dd4-977e-6d9137647e8e",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "pageSize": 25
+ },
+ "componentName": "forceCommunity:filesList",
+ "id": "476a5a8b-b8f1-4b8d-9ab6-bceba74700b1",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5b604875-3c1f-4b95-a594-195fe6ce6ae7",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "6f280e8d-47b7-4352-8282-30dfe204ea50",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-069"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/fileRelatedList.json b/force-app/main/default/experiences/Consumable_21/views/fileRelatedList.json
new file mode 100644
index 0000000..b66fc74
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/fileRelatedList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "fe2be2e9-572d-46e3-9d57-0434b26626d1",
+ "label": "File Related List",
+ "regions": [
+ {
+ "id": "2cbe69d2-9b30-4a18-8028-0dad474d8d61",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "4ef912a2-8538-41f4-8870-fe18ab4d5427",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "14a66256-1835-4316-8a14-2d0f89fc2ac5",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "54dd98a9-0b03-4ad6-9000-d307f080f77f",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-069"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/flow.json b/force-app/main/default/experiences/Consumable_21/views/flow.json
new file mode 100644
index 0000000..b2243b0
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/flow.json
@@ -0,0 +1,40 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "585885fb-a1ef-4d95-8292-c21afacfe18e",
+ "label": "Flow",
+ "regions": [
+ {
+ "id": "f4616871-b78c-4a6c-af1c-9db69882e2cc",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "flowArguments": "",
+ "flowName": "{!flowName}"
+ },
+ "componentName": "forceCommunity:flowCommunity",
+ "id": "8372bd3c-e7b7-4fe0-bf67-427a51da6ccd",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d8ae14d8-6c6a-4cf9-92de-51c84f9df98d",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "c256a7da-41ba-4951-bc47-2465b2845133",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "flow"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/forgotPassword.json b/force-app/main/default/experiences/Consumable_21/views/forgotPassword.json
new file mode 100644
index 0000000..6ab20d5
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/forgotPassword.json
@@ -0,0 +1,79 @@
+{
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "a510a65f-dca4-40d1-9a3f-c54fa0216469",
+ "label": "Forgot Password",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><span style=\"font-size: 22px; color: rgb(255, 255, 255);\">閲嶇疆瀵嗙爜</span></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "00626b2d-2d2d-4d87-bf08-4267058c8f26",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><span style=\"color: rgb(255, 255, 255);\">璇疯緭鍏ユ偍鐨勭敤鎴峰悕</span></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "b94d860f-947e-4945-8c4c-b2f3cd66c9ba",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "checkEmailUrl": "./CheckPasswordResetEmail",
+ "submitButtonLabel": "閲嶇疆瀵嗙爜",
+ "usernameLabel": "鐢ㄦ埛鍚�"
+ },
+ "componentName": "salesforceIdentity:forgotPassword2",
+ "id": "02c6d7c6-70b5-4dfe-bb64-428302610ecd",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><a href=\"./\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(255, 255, 255);\">鍙栨秷</a></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "3557095c-4f38-47e6-8bc0-79a7267ba62d",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3c8d4ae3-e30f-47b6-a15f-b19507127941",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Forgot Password"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "1fd5a5ef-20b4-457e-b33c-2e4b64d08e75",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "35d35915-02ae-458d-b2fe-831363621638",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "forgot-password"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/groupDetail.json b/force-app/main/default/experiences/Consumable_21/views/groupDetail.json
new file mode 100644
index 0000000..bb14d3c
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/groupDetail.json
@@ -0,0 +1,62 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "e569b760-98dd-445a-821e-7694873d00da",
+ "label": "Group Detail",
+ "regions": [
+ {
+ "id": "3e422bed-e2ef-4fd3-8132-8bf00020d139",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "engagementManagersOnly": false,
+ "engagementTabLabel": "Engagement",
+ "feedTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related"
+ },
+ "componentName": "forceCommunity:groupRecordHomeTabs",
+ "id": "19bda303-66db-43df-865e-26799c340d2a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f9ece1f5-e14d-4248-a917-e90d6d493c9e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "0b0e39cb-3f0f-492a-a379-7b9ca09a4c8f",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "06287af9-c6d9-4412-a3fe-49694e4be7e3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "391034d2-180c-4af1-80da-3df12c915f02",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-0F9"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/groupList.json b/force-app/main/default/experiences/Consumable_21/views/groupList.json
new file mode 100644
index 0000000..29fc053
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/groupList.json
@@ -0,0 +1,47 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "17c81c60-07b5-4f1d-aa66-bfbce557b616",
+ "label": "Group List",
+ "regions": [
+ {
+ "id": "75fdfe61-9408-4141-a7b4-3571884e5934",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 20px; color: #1e2443;\">Group List</b> </h1> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "5a939614-19b9-427e-89c0-9305073ae9b0",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:groupObjectHome",
+ "id": "4e182d69-c1a5-415c-9c4c-d5de4f32690f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "39ba5e1e-7a4e-42db-92c7-3dfcc2f60f44",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "f57608d4-5fd8-477f-8d3c-8fe98f25fe3b",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-0F9"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/groupRelatedList.json b/force-app/main/default/experiences/Consumable_21/views/groupRelatedList.json
new file mode 100644
index 0000000..290cf29
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/groupRelatedList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "df0800d2-f262-47bd-b7ab-3b61daaa3f08",
+ "label": "Group Related List",
+ "regions": [
+ {
+ "id": "b21d1e47-a866-4381-997a-ae1aca38cd90",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "b656a563-2f12-4d30-80b0-296eb770428a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "59a71983-1586-48f1-869e-4cb6dea450d6",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "eb69adf9-fe44-4090-9e9c-c865350e8cd7",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-0F9"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/home.json b/force-app/main/default/experiences/Consumable_21/views/home.json
new file mode 100644
index 0000000..b1f5d61
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/home.json
@@ -0,0 +1,254 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "0ddea6e9-464e-450e-a641-c0ec497e194a",
+ "label": "Home",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 28px; color: #1e2443;\">Welcome!</b> </h1> <p style=\"text-align: center;\"> <span style=\"font-size: 20px;\">Work on leads, register deals, and track progress with analytics.</span> </p> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "d6694e3d-a9d2-463b-87f4-13dd92236b03",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5c70ee3a-b215-4512-8839-ca761d363708",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<img src='/sfsites/c/img/community/prm/prm-default-banner.png' alt='Banner image for Partner Central template' style='width:100%;'/>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "0846d96b-6bd9-40d9-94b3-abd65ec169fb",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "ccfcd17d-981c-4025-aecd-f4ad1459e38e",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "9742a4bb-5fcc-46b2-9422-fc9f420914d0",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:dashboard"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Business Summary"
+ },
+ {
+ "UUID": "5ec2fc04-8fa1-4cc5-aec1-d678b694fc12",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "type": "Home"
+ },
+ "fqn": "forceCommunity:forceCommunityFeed"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "News & Updates"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "ccfcd17d-981c-4025-aecd-f4ad1459e38e",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "height": "485",
+ "recordId": "01Z10000001cpWqEAI"
+ },
+ "componentName": "forceCommunity:dashboard",
+ "id": "2a9e242c-261f-444a-87b6-8d6c57418c5f",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9742a4bb-5fcc-46b2-9422-fc9f420914d0",
+ "regionLabel": "Business Summary",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "canChangeSorting": true,
+ "defaultFilter": "",
+ "defaultSortOrderHomeFeed": "Relevance",
+ "defaultSortOrderTopicsFeed": "Relevance",
+ "feedDesign": "DEFAULT",
+ "hasFeedSearch": true,
+ "subjectId": "{!recordId}",
+ "type": "Home"
+ },
+ "componentName": "forceCommunity:forceCommunityFeed",
+ "id": "1bffe837-94b3-46ee-ae7b-d8ae1974d6af",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5ec2fc04-8fa1-4cc5-aec1-d678b694fc12",
+ "regionLabel": "News & Updates",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3b9d9d92-176b-4533-ba21-634f59471be6",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "actions": [
+ {
+ "isPublic": true,
+ "name": "NewLead"
+ },
+ {
+ "isPublic": true,
+ "name": "NewOpportunity"
+ },
+ {
+ "isPublic": true,
+ "name": "NewTask"
+ },
+ {
+ "isPublic": true,
+ "name": "NewCase"
+ }
+ ],
+ "label": "Quick Create"
+ },
+ "componentName": "forceCommunity:createRecordButton",
+ "id": "dc4cd4d8-f933-4575-91be-ba3871604a9d",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "listViewIdForNavigation": "FOLLOW",
+ "navigateToListView": true,
+ "pageSize": 5,
+ "sortBy": "CreatedDate",
+ "title": "Lead Inbox"
+ },
+ "componentName": "forceCommunity:leadInbox",
+ "id": "e841377e-969c-4844-b2c7-11870250939c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "MyOpportunities",
+ "layout": "COMPACT",
+ "pageSize": 5,
+ "scope": "Opportunity",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "d01cdeab-2460-43d2-aa7c-7dec4cd97518",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "OPEN",
+ "layout": "COMPACT",
+ "pageSize": 5,
+ "scope": "Task",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "7174c84a-0672-4320-8965-c5246cfcbcb3",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a19e09a2-4708-4c7f-bfc0-420a144f2b5a",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "6efe04b8-0360-4e60-be5c-4dfe74ac5314",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Home"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "50bb81ca-c930-4362-afc3-757f7595b34a",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d66dbec3-37a7-40d6-835a-eb0810305193",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "home"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/homeFlexible.json b/force-app/main/default/experiences/Consumable_21/views/homeFlexible.json
new file mode 100644
index 0000000..cf2c005
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/homeFlexible.json
@@ -0,0 +1,102 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "39de1ffe-657d-431a-a91f-78a24fffef09",
+ "label": "Home_Flexible",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "42e03150-3b89-4a0e-ae58-10a1849e97f2",
+ "columns": [
+ {
+ "UUID": "ec77531a-aa85-4cdf-a8f3-6e501f362481",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "42e03150-3b89-4a0e-ae58-10a1849e97f2",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\"><span style=\"font-size: 48px; color: rgb(0, 71, 178);\">娆㈣繋鐧诲綍娑堣�楀搧杩芥函绯荤粺</span></p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "c2bbc3ee-42d6-426e-bae3-186eae2ad1fe",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexLicenceReminder",
+ "id": "e123bb48-e1f9-4dc7-80ac-ac105a67f019",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "height": "800",
+ "recordId": "01Z6D000000EyGYUA0"
+ },
+ "componentName": "forceCommunity:dashboard",
+ "id": "59fb2dc5-2852-4033-b305-9f0674546441",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ec77531a-aa85-4cdf-a8f3-6e501f362481",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "58b50363-ac2c-4227-8a26-3124c76ca3ea",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Home"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "947a50f9-e898-480b-ae6f-53f7945eea7d",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "19888308-454c-4b74-ad0a-1b02ef8ba938",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "home"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexAgencyInfo.json b/force-app/main/default/experiences/Consumable_21/views/lexAgencyInfo.json
new file mode 100644
index 0000000..2b67ced
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexAgencyInfo.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "c558f76d-08aa-4c90-87d5-79689fdd7e19",
+ "label": "lexAgencyInfo",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "0fe31625-b19d-42b8-9d16-3714b25e7e8f",
+ "columns": [
+ {
+ "UUID": "74b857cd-a540-4852-9593-c13bf98f0b6b",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "0fe31625-b19d-42b8-9d16-3714b25e7e8f",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexAgencyInfo",
+ "id": "2a46aa63-fedf-4b2f-a934-5befed84050a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "74b857cd-a540-4852-9593-c13bf98f0b6b",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1259aff9-b8a9-42e3-8a11-df7baf08bbc0",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "lexAgencyInfo"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "a2f6086c-ee22-481f-9251-1f7d78a76694",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "00c48920-25c9-4e42-ad29-b45ece6bd1e4",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexagencyinfo"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexArriveGoods.json b/force-app/main/default/experiences/Consumable_21/views/lexArriveGoods.json
new file mode 100644
index 0000000..c8651ad
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexArriveGoods.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "34b57eb7-60b0-4af7-93d2-e97bd3871568",
+ "label": "LexArriveGoods",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "fab072b8-cfe9-4fc4-92ef-169966c92f2e",
+ "columns": [
+ {
+ "UUID": "cabdb2a6-fa8b-46b9-9444-310e02c792ec",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "fab072b8-cfe9-4fc4-92ef-169966c92f2e",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexArriveGoods",
+ "id": "f265ac1a-a311-4c81-8657-3e89f9fe0a40",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "cabdb2a6-fa8b-46b9-9444-310e02c792ec",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a7efd8ce-da78-4e00-a6c7-b98cad1cfc0e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexArriveGoods"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "541faf05-86f2-431f-9595-0321d1850db3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "699a6330-1a2e-4834-9513-563517ff24e9",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexarrivegoods"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexArriveGoodsMain.json b/force-app/main/default/experiences/Consumable_21/views/lexArriveGoodsMain.json
new file mode 100644
index 0000000..0c02b0b
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexArriveGoodsMain.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "5229d999-bdf4-4629-9b67-0d0803232c20",
+ "label": "LexArriveGoodsMain",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "dafe5c5f-2136-4a21-8961-f3c222264cd8",
+ "columns": [
+ {
+ "UUID": "101239d7-1162-4451-b857-73c94262aacf",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "dafe5c5f-2136-4a21-8961-f3c222264cd8",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexArriveGoodsMain",
+ "id": "8cfedcbe-05fa-49b6-984e-3dbd9f37ea7e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "101239d7-1162-4451-b857-73c94262aacf",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "71efcbd5-7ebd-4648-96cb-7a1ee293b21d",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexArriveGoodsMain"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "75291bd4-f89c-4248-914c-2e4da5e6c5e6",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6f468177-4b60-4359-933c-15686733131f",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexarrivegoodsmain"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexArriveGsDetails.json b/force-app/main/default/experiences/Consumable_21/views/lexArriveGsDetails.json
new file mode 100644
index 0000000..326d2bf
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexArriveGsDetails.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "a4c209b0-404f-4e68-bfd1-621ee6f32c54",
+ "label": "LexArriveGsDetails",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "e00bc5e4-f1af-41af-b3bf-fb12225249b6",
+ "columns": [
+ {
+ "UUID": "ff1a0009-56a0-4897-a90c-9e8c88caf4d1",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "e00bc5e4-f1af-41af-b3bf-fb12225249b6",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexArriveGsDetails",
+ "id": "843125e6-3ec5-433d-82da-c16d8a1b6f13",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ff1a0009-56a0-4897-a90c-9e8c88caf4d1",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "b2206fc6-0629-47d0-9e11-b1870e6dcc79",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexArriveGsDetails"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "3207e4cf-433a-4346-8f9b-15a3e7c63d65",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "41aa55a5-a8e5-460a-80db-c73c3ff9df25",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexarrivegsdetails"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexCancelRemoveBox.json b/force-app/main/default/experiences/Consumable_21/views/lexCancelRemoveBox.json
new file mode 100644
index 0000000..3314035
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexCancelRemoveBox.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "b3dcfa91-44f1-4f34-849a-cd6a51997236",
+ "label": "lexCancelRemoveBox",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "6023505f-311a-452d-9dbe-5cf6fe7c24ca",
+ "columns": [
+ {
+ "UUID": "ea372780-94b0-4a02-8210-16cd6dac417b",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "6023505f-311a-452d-9dbe-5cf6fe7c24ca",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexCancelRemoveBox",
+ "id": "fca16c60-9266-4f5c-8c9d-f1a4142a33f8",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ea372780-94b0-4a02-8210-16cd6dac417b",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d36c5678-9f93-41e0-91ee-37b8b5e58f1d",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "lexCancelRemoveBox"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "bc2283b4-e055-4dbb-aaee-7c69c6832f7b",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "75009416-b5c8-458c-b5e0-13c07f25390e",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexcancelremovebox"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexConInvoiceView.json b/force-app/main/default/experiences/Consumable_21/views/lexConInvoiceView.json
new file mode 100644
index 0000000..3d09bbe
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexConInvoiceView.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "34ccaf78-16dd-46ab-80fa-d0d080e218ca",
+ "label": "LexConInvoiceView",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "20c57393-6120-4663-b627-c0db5e3b3d11",
+ "columns": [
+ {
+ "UUID": "c673beed-af76-4dfe-a795-e95080cbc0e0",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "20c57393-6120-4663-b627-c0db5e3b3d11",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConInvoiceView",
+ "id": "284f2e12-1361-4d38-9e5a-5a5e465f1e81",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c673beed-af76-4dfe-a795-e95080cbc0e0",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "73d3375b-301b-40d0-b5fc-f42b9c2d7a29",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexConInvoiceView"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "e087e3e4-7080-45da-8b93-7e266022e485",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "fd6e89f5-10c2-4c8a-b854-c58bfb13c3c8",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconinvoiceview"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexConsumable.json b/force-app/main/default/experiences/Consumable_21/views/lexConsumable.json
new file mode 100644
index 0000000..e46a6fa
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexConsumable.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "ba77614e-6f6b-4e0f-95b1-7f08a6b87196",
+ "label": "LexConsumable",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "f20097d1-9c45-4f02-be74-79abd158eaea",
+ "columns": [
+ {
+ "UUID": "9023b66f-a63a-4d1c-a624-7c0d829521d6",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "f20097d1-9c45-4f02-be74-79abd158eaea",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConsumable",
+ "id": "83a022af-30b7-4422-9fb7-349acf61bf64",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9023b66f-a63a-4d1c-a624-7c0d829521d6",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f69f6c55-69ba-4d81-ba80-74e22b66a0c0",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexConsumable"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "450ae28a-55c6-4faa-9766-e1fbe8a7f446",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f4976d52-3cf0-42be-ac65-e6d343395f80",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconsumable"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexConsumableAccount.json b/force-app/main/default/experiences/Consumable_21/views/lexConsumableAccount.json
new file mode 100644
index 0000000..760f9e8
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexConsumableAccount.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "16367a78-cbc2-45e0-adc8-99e2b57f9943",
+ "label": "LexConsumableAccount",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "7fb38e47-b5f5-48a4-8fe0-ccd66b524eab",
+ "columns": [
+ {
+ "UUID": "a743a69e-c758-414b-932d-7e169d91c32a",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "7fb38e47-b5f5-48a4-8fe0-ccd66b524eab",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConsumableAccount",
+ "id": "771ed559-d10b-4ae8-a13f-b5927e3d5d0e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a743a69e-c758-414b-932d-7e169d91c32a",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e23ebf56-14cd-4e0b-b80f-d35fc1d66098",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexConsumableAccount"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "90e4cf9a-eb53-4b45-bbd2-0b89515a7cb1",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9e3d45cd-91df-4280-908e-9f7ffc8bb8ce",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconsumableaccount"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexConsumableAccountInfoPrint.json b/force-app/main/default/experiences/Consumable_21/views/lexConsumableAccountInfoPrint.json
new file mode 100644
index 0000000..6081290
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexConsumableAccountInfoPrint.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "6d539cfe-d011-486d-ac5f-7ee2764809a5",
+ "label": "LexConsumableAccountInfoPrint",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "f25c9d9e-88c0-45fb-9c46-3f6f5ec8a4b3",
+ "columns": [
+ {
+ "UUID": "3276a32c-0a7f-4d38-be16-53dba1c55704",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "f25c9d9e-88c0-45fb-9c46-3f6f5ec8a4b3",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConsumableAccountInfoPrint",
+ "id": "e8c7e5f0-2c4a-4dd5-bd08-03e35ead56d4",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3276a32c-0a7f-4d38-be16-53dba1c55704",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e6b8c3f8-7f0f-44de-95d6-d834d69520c6",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexConsumableAccountInfoPrint"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "6398f7d8-c5ed-4132-854f-bed857252caa",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "dd4d3bb1-9c82-4519-91b1-c03d5a03a880",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconsumableaccountinfoprint"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexConsumableOrderManage.json b/force-app/main/default/experiences/Consumable_21/views/lexConsumableOrderManage.json
new file mode 100644
index 0000000..d2c14f8
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexConsumableOrderManage.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "2623448a-1cdd-4bb7-a610-921f58adcd80",
+ "label": "LexConsumableOrderManage",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "78cf86c2-ac79-4bec-be85-3679272d86c2",
+ "columns": [
+ {
+ "UUID": "28ca8afb-2630-4e26-b2aa-a59817fe16d0",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "78cf86c2-ac79-4bec-be85-3679272d86c2",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexConsumableOrderManage",
+ "id": "9c244a3a-fd9e-4c10-8379-79cf5230e64c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "28ca8afb-2630-4e26-b2aa-a59817fe16d0",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "389f115f-8479-44dd-9912-abf349ba6701",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexConsumableOrderManage"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "784a7c58-1d99-405f-848f-0cb10712a18b",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "15a651b0-aa1f-4bd6-982f-c697cbeeb3c9",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexconsumableordermanage"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexInventory.json b/force-app/main/default/experiences/Consumable_21/views/lexInventory.json
new file mode 100644
index 0000000..1129c45
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexInventory.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "722903fc-3cad-4105-ac41-ffedd4715265",
+ "label": "lexInventory",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "be345baf-9b02-491b-90f7-050873f8da06",
+ "columns": [
+ {
+ "UUID": "56938588-65c1-4e07-a812-296ebd5a0307",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "be345baf-9b02-491b-90f7-050873f8da06",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexInventory",
+ "id": "c5ac8741-177c-4682-8800-319a3715a4d6",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "56938588-65c1-4e07-a812-296ebd5a0307",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e7802b34-5b8f-4d7e-8060-b41e591ab91c",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "lexInventory"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "37a67184-5c7e-4a45-86c9-2b595a0aa9f6",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3e010503-32fc-4119-8f78-d9af02dcd62a",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexinventory"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexInventoryView.json b/force-app/main/default/experiences/Consumable_21/views/lexInventoryView.json
new file mode 100644
index 0000000..f751b85
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexInventoryView.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "293d6201-3895-490a-a6a9-665d2186863b",
+ "label": "lexInventoryView",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "67a37a42-a10c-4f5d-a503-804f76292c90",
+ "columns": [
+ {
+ "UUID": "916c97a5-d46e-4464-9c34-8f4e968e68da",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "67a37a42-a10c-4f5d-a503-804f76292c90",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexinventoryViewLWC",
+ "id": "4f4dca89-7053-40cb-99fa-e4c41d33506f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "916c97a5-d46e-4464-9c34-8f4e968e68da",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8df334a1-1fe9-4f78-a3ce-5f779b3725c5",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "lexInventoryView"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "db8939f2-931b-4dc5-acca-a80c470e81d6",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1e982ac7-8cb0-4be4-b9fb-621824fed264",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexinventoryview"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexOutboundorderImport.json b/force-app/main/default/experiences/Consumable_21/views/lexOutboundorderImport.json
new file mode 100644
index 0000000..660b49c
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexOutboundorderImport.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "da82669a-9527-4f47-a2bb-7a0d376ff837",
+ "label": "LexOutboundorderImport",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "880736f4-f8ff-43bb-86a9-c959ec773790",
+ "columns": [
+ {
+ "UUID": "701c3f2f-5e69-40cb-89c4-d76f3a957ed4",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "880736f4-f8ff-43bb-86a9-c959ec773790",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexOutboundorderImport",
+ "id": "0cb1d200-6ac7-44af-b69b-26e6146d2b00",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "701c3f2f-5e69-40cb-89c4-d76f3a957ed4",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "898ab149-4525-4afc-b602-539b03d84a17",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexOutboundorderImport"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "835ecf2b-de96-4886-b447-e52a6c6f0597",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "535c283f-05f1-4c67-b47b-702fc383cd1d",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexoutboundorderimport"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexOverdueStock.json b/force-app/main/default/experiences/Consumable_21/views/lexOverdueStock.json
new file mode 100644
index 0000000..38fbd2d
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexOverdueStock.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "d58143e6-fa98-4c6b-b61e-205921ce7586",
+ "label": "lexOverdueStock",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "b5f8ed57-3632-4b40-bcee-58cccd7aff48",
+ "columns": [
+ {
+ "UUID": "36b0d4c2-ba9e-4d2d-952a-f5ff15e575c9",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "b5f8ed57-3632-4b40-bcee-58cccd7aff48",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexOverdueStock",
+ "id": "796b2bfd-f2bf-4cf6-bb67-ff2932ce76b8",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "36b0d4c2-ba9e-4d2d-952a-f5ff15e575c9",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "272771ba-89cd-4a85-8856-0935f895b06e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "lexOverdueStock"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "04811b07-ae7b-4446-b938-d51b4a82e8a9",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3c217eab-097a-48c5-a1bf-e42b1b4dd402",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexoverduestock"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexProductLimitEdit.json b/force-app/main/default/experiences/Consumable_21/views/lexProductLimitEdit.json
new file mode 100644
index 0000000..737762d
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexProductLimitEdit.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "2f3874fe-b561-465d-b1e4-83f32af06a3d",
+ "label": "LexProductLimitEdit",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "fc9a630c-2b34-468e-8586-f38f2ec99977",
+ "columns": [
+ {
+ "UUID": "4bbc01a0-3a8e-4f79-a278-102421b64c19",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "fc9a630c-2b34-468e-8586-f38f2ec99977",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexProductLimitEdit",
+ "id": "aacf514f-1447-4791-a5c6-b08e923143b7",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4bbc01a0-3a8e-4f79-a278-102421b64c19",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6e7f2b08-c906-4841-b165-27973c0c7436",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexProductLimitEdit"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "e3374f0a-79c6-4db6-8558-109bec9be36f",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c7485782-42bf-474e-b2fa-e3be306d2735",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexproductlimitedit"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexRemoveBox.json b/force-app/main/default/experiences/Consumable_21/views/lexRemoveBox.json
new file mode 100644
index 0000000..afc6c2f
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexRemoveBox.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "d2e89610-42e7-4a89-811b-88ffc7616a93",
+ "label": "LexRemoveBox",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "eb3dcb68-ca63-4485-bb83-0555b0053a37",
+ "columns": [
+ {
+ "UUID": "1a674342-55bd-40f4-ba01-a666a9193984",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "eb3dcb68-ca63-4485-bb83-0555b0053a37",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexRemoveBox",
+ "id": "fb2f30d8-1c08-40e8-bde3-80551d722d19",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1a674342-55bd-40f4-ba01-a666a9193984",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0b761058-de22-4b3f-891f-a6900f8a6db8",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexRemoveBox"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "9303032b-91e4-4b55-adaa-e59ba086b7a3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2aed1452-6477-41b1-95b5-ecc54275d6b3",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexremovebox"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexSaleAndDelivery.json b/force-app/main/default/experiences/Consumable_21/views/lexSaleAndDelivery.json
new file mode 100644
index 0000000..aa2813b
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexSaleAndDelivery.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "90a77753-3af8-4953-b01c-06879a91e3f4",
+ "label": "LexSaleAndDelivery",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "1b511ff5-fc63-4b50-8d9c-e25054c9c6bd",
+ "columns": [
+ {
+ "UUID": "c252b9f1-a94f-4c1f-9315-3fd3233d5e2f",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "1b511ff5-fc63-4b50-8d9c-e25054c9c6bd",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexSaleAndDelivery",
+ "id": "5dfcfce1-e6cb-4dd7-aa79-e95c0073efc2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c252b9f1-a94f-4c1f-9315-3fd3233d5e2f",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6b4b4e72-48df-4f01-a984-20e35f648911",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexSaleAndDelivery"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "f33162e6-aed9-44bd-b176-d09ee7ae9969",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ba34748e-afdc-4436-8a0b-15bffcb270b2",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexsaleanddelivery"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexSummonsCreat.json b/force-app/main/default/experiences/Consumable_21/views/lexSummonsCreat.json
new file mode 100644
index 0000000..982783d
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexSummonsCreat.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "f6f1703b-2bcc-4415-af63-84125a42b0ee",
+ "label": "LexSummonsCreat",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "aa888470-04f2-4660-b6c6-8d99622107c7",
+ "columns": [
+ {
+ "UUID": "2e69199b-872c-4035-a0a7-cbdc6dbbd77e",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "aa888470-04f2-4660-b6c6-8d99622107c7",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexSummonsCreat",
+ "id": "e2a4023b-4c0c-4d42-963c-f22b93cf4563",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2e69199b-872c-4035-a0a7-cbdc6dbbd77e",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "36813fe4-e487-4809-8354-5cfc9c0e2107",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "LexSummonsCreat"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "4b7ca8d4-50ae-4d0d-bcb9-1a2069122e74",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "721b0894-38f5-4ec9-a690-7db724d10b0a",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lexsummonscreat"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/lexTopPage.json b/force-app/main/default/experiences/Consumable_21/views/lexTopPage.json
new file mode 100644
index 0000000..99f539b
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/lexTopPage.json
@@ -0,0 +1,81 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "ebcd3791-2f46-43d4-ae43-74c3e5fb70d9",
+ "label": "lexTopPage",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "c541bbfc-fe47-4bf8-8c80-50855667bccc",
+ "columns": [
+ {
+ "UUID": "7e013056-95f1-460a-8b80-abd38e3ed001",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "c541bbfc-fe47-4bf8-8c80-50855667bccc",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:lexTopPage",
+ "id": "fd710b8d-e9cd-4bbc-8193-4a31c8e5b1b2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7e013056-95f1-460a-8b80-abd38e3ed001",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2bc57e55-7a82-432f-b562-3dbe1cfc958c",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "lexTopPage"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "6f886864-7027-4fb9-b887-7219405693f6",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "db35182e-31a5-4306-8114-a8c71a8a1d08",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-lextoppage"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/login.json b/force-app/main/default/experiences/Consumable_21/views/login.json
new file mode 100644
index 0000000..a4ca17c
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/login.json
@@ -0,0 +1,84 @@
+{
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "be3be526-74c7-4da5-a294-7c1b8c76c714",
+ "label": "Login",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:communityLogo2",
+ "id": "8840fb81-2fb9-4359-ad4d-57aedd5614e9",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "forgotPasswordLabel": "蹇樿瀵嗙爜锛�",
+ "forgotPasswordUrl": "/ForgotPassword",
+ "loginButtonLabel": "鐧诲綍",
+ "passwordLabel": "瀵嗙爜",
+ "selfRegisterLabel": "Not a member?",
+ "selfRegisterUrl": "/SelfRegister",
+ "startUrl": "",
+ "usernameLabel": "鐢ㄦ埛鍚�"
+ },
+ "componentName": "salesforceIdentity:loginForm2",
+ "id": "8ead5baf-ed64-430c-a475-b6cdc3eb3b5c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "headerText": "",
+ "showHeader": false,
+ "useCommunityDomainSso": true
+ },
+ "componentName": "salesforceIdentity:socialLogin2",
+ "id": "66f76f11-5317-435a-bfc6-3e59f8978cc6",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "employeeLoginLinkLabel": "Are you an employee? Login here"
+ },
+ "componentName": "salesforceIdentity:employeeLoginLink2",
+ "id": "e8e38ed8-1ddf-4a59-88ca-f270b0f0ebe0",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "51954b6d-bf9e-46f7-bd96-0e3d0cbdca43",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Login"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "73410d9b-2aff-4d43-ad50-56db757ad791",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "93e7f8cf-1ccf-4fb8-9b1f-50e44e20ddcb",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "login-home"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/loginError.json b/force-app/main/default/experiences/Consumable_21/views/loginError.json
new file mode 100644
index 0000000..a8b0f1c
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/loginError.json
@@ -0,0 +1,57 @@
+{
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "98860cc1-5078-4acf-adfa-a3eae3c02cea",
+ "label": "Login Error",
+ "regions": [
+ {
+ "id": "237d9340-be24-4f2d-961b-bd05627406c7",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\">Invalid Page</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "f3a2220a-a94e-4420-b2e0-49606c02ef85",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c092f109-38aa-480c-812e-fd10e09eb23d",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "eb6a93ee-abdb-4ff4-aba6-b3f563e1c9a5",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Login Error"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "7133ba02-4672-47f9-85a2-5bc3cc264f3c",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "90940012-f896-472c-84cb-c29bf5a85604",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "login-error"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/mDFAndCoop.json b/force-app/main/default/experiences/Consumable_21/views/mDFAndCoop.json
new file mode 100644
index 0000000..103d4f9
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/mDFAndCoop.json
@@ -0,0 +1,198 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "8cdc8a97-c168-4bdf-ad37-0b57212fe2d1",
+ "label": "MDF and Coop",
+ "regions": [
+ {
+ "id": "c39df155-40cb-4525-8bd2-cb09ec4454f5",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <p> <span style=\"font-size: 20px;\">Request and Manage your Market Developments Funds.</span> </p> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "9eb0bf5e-180c-4b73-85c2-f399a0b4d029",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "cb082463-749a-4434-940f-d2bb4d9c7895",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "2a0a312e-5eb7-47d9-a335-0a8060cee89b",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "PartnerFundAllocation"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Fund Allocations"
+ },
+ {
+ "UUID": "77abe2ef-9eea-467a-afd7-169ddefc094d",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "PartnerFundRequest"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "Fund Requests"
+ },
+ {
+ "UUID": "bdf6af67-9a69-4a20-a1dc-00e6dc9062c8",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "PartnerFundClaim"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab3",
+ "tabName": "Fund Claims"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "cb082463-749a-4434-940f-d2bb4d9c7895",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "PartnerFundAllocation",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "00e0b085-2e87-4a1b-ab91-45db0bf14162",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2a0a312e-5eb7-47d9-a335-0a8060cee89b",
+ "regionLabel": "Fund Allocations",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "PartnerFundRequest",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "4a64756b-bbe6-42aa-8716-493fcb035c2a",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "77abe2ef-9eea-467a-afd7-169ddefc094d",
+ "regionLabel": "Fund Requests",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "PartnerFundClaim",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "86ebb406-d33d-44b0-a137-7d007d88fa08",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "bdf6af67-9a69-4a20-a1dc-00e6dc9062c8",
+ "regionLabel": "Fund Claims",
+ "regionName": "tab3",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "dc60e26e-8f85-40dc-88b1-1afdeef90994",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "32d8dbea-0b80-4fa3-bbde-7c9b77ebc1f4",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "mdf"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/messages.json b/force-app/main/default/experiences/Consumable_21/views/messages.json
new file mode 100644
index 0000000..5009b36
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/messages.json
@@ -0,0 +1,27 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "123209be-ec9f-4805-8350-748a0596aa39",
+ "label": "Messages",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceChatter:messages",
+ "id": "856e32c5-bf3e-448d-95b2-dd31f6699c88",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e1c5a01f-e01b-4d10-9e51-754ac54c621b",
+ "regionName": "content",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "messages"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/myAccount.json b/force-app/main/default/experiences/Consumable_21/views/myAccount.json
new file mode 100644
index 0000000..50bdd2f
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/myAccount.json
@@ -0,0 +1,109 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "aad67d03-498d-4caa-899f-c4876e7361b8",
+ "label": "My Account",
+ "regions": [
+ {
+ "id": "0e502abc-a1cf-4bf6-a377-b1d46fc201a7",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "d3c93280-e94b-4efb-9f19-54d139ea03a6",
+ "columns": [
+ {
+ "UUID": "2351fbff-96a6-46bf-8fc8-2bdf71e7fef6",
+ "columnKey": "col1",
+ "columnName": "column 1",
+ "columnWidth": "12",
+ "seedComponents": [
+ {
+ "attributes": {
+ "recordId": "{!CurrentUser.accountId}",
+ "sfdc:identifier": "forceCommunity_recordHeadline"
+ },
+ "fqn": "forceCommunity:recordHeadline"
+ },
+ {
+ "attributes": {
+ "recordId": "{!CurrentUser.accountId}",
+ "sfdc:identifier": "forceCommunity_recordHomeTabs"
+ },
+ "fqn": "forceCommunity:recordHomeTabs"
+ }
+ ]
+ }
+ ]
+ },
+ "sectionHeight": 32
+ },
+ "componentName": "forceCommunity:section",
+ "id": "d3c93280-e94b-4efb-9f19-54d139ea03a6",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!CurrentUser.accountId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "07793973-937e-430c-8acf-859dbbeb8c04",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!CurrentUser.accountId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "b88fcbd7-d143-43eb-800b-81b98e424c6f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2351fbff-96a6-46bf-8fc8-2bdf71e7fef6",
+ "regionLabel": "column 1",
+ "regionName": "col1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ffaa45b5-953e-49f2-8b6a-a8580f8e1a20",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "e0f9bc9b-14dc-41d3-b619-1f5b27c8ee34",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "my-account"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/questionDetail.json b/force-app/main/default/experiences/Consumable_21/views/questionDetail.json
new file mode 100644
index 0000000..e45f145
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/questionDetail.json
@@ -0,0 +1,105 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "23b8f630-4e99-452a-8efb-a540f425e9a2",
+ "label": "Question Detail",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "bannerText": "",
+ "bannerTextWithKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineArticles\">articles</a> and <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "bannerTextWithoutKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "pageType": "discussion",
+ "showSubTopics": true,
+ "title": "Welcome!",
+ "uniqueNameOrId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:headline",
+ "id": "0b5d0845-1fb2-46c4-b834-9ed197200ca3",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ce20a5f9-1be2-41ba-be17-da95bffa1a27",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!feedItemId}"
+ },
+ "componentName": "forceCommunity:feedItemDetail",
+ "id": "247d8ac5-67ba-43a4-aaf2-3221af685a45",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "aa6c4503-827e-4235-be1b-f1ab519362ce",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "numberOfItems": 5,
+ "showViewCounts": true,
+ "title": "Related Questions"
+ },
+ "componentName": "selfService:similarQuestions",
+ "id": "ec417e87-69ec-4f91-8a91-6a6ec316979b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "channel": "DefaultChannel",
+ "title": ""
+ },
+ "componentName": "forceCommunity:recommendations",
+ "id": "84126489-e6a4-4f69-a027-b9fa77ac4c19",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1e976db8-b931-4d94-8b2d-049bd1035eb9",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "12569838-a105-4b0a-a2c5-842fafca8360",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record.Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "4917bd28-047d-4be3-a1dd-c3e3c1bde442",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "b054c70e-3d23-4b1e-b170-314aa3090222",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "feeditem"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/quipDocsRelatedList.json b/force-app/main/default/experiences/Consumable_21/views/quipDocsRelatedList.json
new file mode 100644
index 0000000..3d69a01
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/quipDocsRelatedList.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "2fc4be36-f891-460b-89b4-b1a6cfe34c04",
+ "label": "Quip Docs Related List",
+ "regions": [
+ {
+ "id": "bedcaec4-8838-419c-917c-2a30baa7907c",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "parentRecordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:relatedQuipItemsView",
+ "id": "e07dec82-72d4-4013-96eb-d82f642b28f9",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "cc1b041f-0c31-4f66-8a60-0683bff46277",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "eece2f7a-c541-46d9-9838-967228b55600",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "extrelated-quip"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/recordDetail.json b/force-app/main/default/experiences/Consumable_21/views/recordDetail.json
new file mode 100644
index 0000000..a292393
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/recordDetail.json
@@ -0,0 +1,76 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "b798f2b2-7d07-49a1-95d4-75b0a6456758",
+ "label": "Record Detail",
+ "regions": [
+ {
+ "id": "e618db98-39b7-4d13-ae75-0fae2602dbe6",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "9d26ce01-3f56-4bf3-a9db-e0331130c818",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "bcc00066-bb84-4c29-b4e3-418587e03ca7",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "540958df-33c5-438f-987a-ade20bb7e7e8",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "c255233a-6d13-4469-a84b-238e91b4e354",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "12785787-0030-45c6-8c12-2cf1fbed7987",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "64d5462a-172f-4a76-bafb-8b46847a91dc",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/recordList.json b/force-app/main/default/experiences/Consumable_21/views/recordList.json
new file mode 100644
index 0000000..3297e4d
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/recordList.json
@@ -0,0 +1,52 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "fc17b90e-324f-4f45-9fb0-fdb77ae3ddba",
+ "label": "Record List",
+ "regions": [
+ {
+ "id": "fa120507-18e4-4a22-8643-65cf9c8ff591",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "{!filterId}",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "{!objectName}",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "69da3246-c8e4-4cef-b716-ef4d0df8f0c0",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4b10df19-b7d7-4ae9-bb7e-e43a88e18c17",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "5bd531a6-7ad0-4d73-8be0-9fe73d710d7e",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/register.json b/force-app/main/default/experiences/Consumable_21/views/register.json
new file mode 100644
index 0000000..709b5cd
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/register.json
@@ -0,0 +1,96 @@
+{
+ "appPageId": "e8609e96-b5d8-40fb-a7e5-29203d1e7f60",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "293d892f-ceae-4d05-8c96-7ba490f34de8",
+ "label": "Register",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:communityLogo2",
+ "id": "8f467206-92c9-41c9-aff5-c2388da19a12",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\" class=\"inverseTextColor\">Join the community to receive personalized information and customer support.</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "67223c93-e6d8-495c-b642-c9085394d057",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "confirmPasswordLabel": "Confirm Password",
+ "emailLabel": "Email",
+ "extraFieldsFieldSet": "",
+ "firstnameLabel": "First Name",
+ "includePasswordField": false,
+ "lastnameLabel": "Last Name",
+ "passwordLabel": "Create Password",
+ "regConfirmUrl": "./CheckPasswordResetEmail",
+ "startUrl": "",
+ "submitButtonLabel": "Sign Up"
+ },
+ "componentName": "salesforceIdentity:selfRegister2",
+ "id": "e4994606-dc20-4a4d-bcaf-8bed951eb746",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "headerText": "",
+ "showHeader": false,
+ "useCommunityDomainSso": true
+ },
+ "componentName": "salesforceIdentity:socialLogin2",
+ "id": "dc361ca0-4823-405b-8e90-37e3a7bfe1ef",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><a class=\"inverseTextColor\" href=\"./\">Already have an account?</a></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "22a72d94-5bbd-44f9-a507-382e3917c564",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a6ea37ce-f6f0-4858-83d9-3b19d8e4d6b7",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Register"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "1ab32b4d-30ab-4387-b56d-1a78a70d65c0",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8f4d062e-e9fc-477e-9dd5-a2dd189869de",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "self-register"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/relatedRecordList.json b/force-app/main/default/experiences/Consumable_21/views/relatedRecordList.json
new file mode 100644
index 0000000..809fc9a
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/relatedRecordList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "1e2080ea-54bd-44f2-b74e-3ba7c4b9cea4",
+ "label": "Related Record List",
+ "regions": [
+ {
+ "id": "8ae3483d-41a9-4ca7-8ac6-5bacf9a46861",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "4c63e341-d0e5-40be-b153-5ca84addc6ce",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ba286f44-cde4-4a0d-a44a-e5e1abb11876",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "dfae6024-0a98-4ef5-8cce-181d0b30ad5d",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/reportBuilder.json b/force-app/main/default/experiences/Consumable_21/views/reportBuilder.json
new file mode 100644
index 0000000..af38490
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/reportBuilder.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "eafc25fd-4415-48ab-bd26-616e299447aa",
+ "label": "Report Builder",
+ "regions": [
+ {
+ "id": "b596a6ca-387b-436f-a19e-f1c516657f72",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:reportBuilder",
+ "id": "cae9e88e-997a-4c4d-bf50-67e40e02cad6",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7d0aa063-0a6f-45aa-b35e-928d1d9561e2",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "c1e55d0c-e215-4165-9ad4-b99b860726d5",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "createreport"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/reportDetail.json b/force-app/main/default/experiences/Consumable_21/views/reportDetail.json
new file mode 100644
index 0000000..2264104
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/reportDetail.json
@@ -0,0 +1,57 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "f74c2f86-84ce-4157-a76d-542bd0ca8351",
+ "label": "Report Detail",
+ "regions": [
+ {
+ "id": "a42fdd13-c95f-41c9-b991-5bd43876bbe1",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:reportPage",
+ "id": "bc478db1-7a45-45dd-918b-1a4004b401a1",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "dd41d526-05b9-46dc-a994-6960b904c88c",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "5eac274a-5499-47b1-ae2d-33aea9633ab0",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "8dd3f7b0-ab94-4fc9-96f2-9b235d28ef75",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4158b198-2e76-4527-84b1-0545f38f1e67",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-00O"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/reportList.json b/force-app/main/default/experiences/Consumable_21/views/reportList.json
new file mode 100644
index 0000000..25b9801
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/reportList.json
@@ -0,0 +1,37 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "aec1e1b3-f846-4a3c-bb16-dc3a06c86c45",
+ "label": "Report List",
+ "regions": [
+ {
+ "id": "dab5410c-8cfd-4048-b659-d23d7723c9f3",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:reportList",
+ "id": "be602af9-57bc-4622-863c-e55016dc1180",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e6143314-c99f-4efb-9d10-b4b81c74bc57",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "c0089849-7e79-4b6f-ae67-578aaa75c9ed",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-00O"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/reportRelatedList.json b/force-app/main/default/experiences/Consumable_21/views/reportRelatedList.json
new file mode 100644
index 0000000..f77a49c
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/reportRelatedList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "5ef4528c-1506-481f-9e40-09780b302953",
+ "label": "Report Related List",
+ "regions": [
+ {
+ "id": "98d89750-5fc4-45e0-aa8e-ff0a6ec767cf",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "ba22a515-65b3-4597-827f-247bb5aa37ad",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "018d101c-cb38-404d-afa8-4082630e18d7",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "238d792e-d912-4f38-bb12-2d943dc006e9",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-00O"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/resources.json b/force-app/main/default/experiences/Consumable_21/views/resources.json
new file mode 100644
index 0000000..778de09
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/resources.json
@@ -0,0 +1,75 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "44c441b8-d720-4387-950a-7eab9bad908b",
+ "label": "Resources",
+ "regions": [
+ {
+ "id": "698b303d-fc23-4316-8084-1dd7ae053003",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "librariesHeaderLabel": "Libraries",
+ "showWorkspaceImage": true
+ },
+ "componentName": "forceCommunity:workspacesList",
+ "id": "def8bfa0-49a9-4f57-b7b3-f4395a275866",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a2c8316f-45dc-4f04-b705-ce31c1f6c16f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "title": "Popular Now"
+ },
+ "componentName": "forceChatter:recommendationsBig",
+ "id": "1cb35a34-2c43-4719-89b9-937ed3d90fae",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2e4ac245-8f59-44a9-8d53-a18ed468b764",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "46c2c329-6f6c-466b-983f-2106ec94bb49",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Resources"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "4bac126d-d734-41ce-94d1-bd4822d2532d",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e5fbf554-0cd5-471b-bc9a-b869a6b1d960",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "files"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/search.json b/force-app/main/default/experiences/Consumable_21/views/search.json
new file mode 100644
index 0000000..5e0d1a7
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/search.json
@@ -0,0 +1,55 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "4bc3474e-802a-4cfb-be03-93255e2f9176",
+ "label": "Search",
+ "regions": [
+ {
+ "id": "d34b44c4-5c00-4759-bed9-56af0652a875",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "scopes": [
+ {
+ "isPublic": true,
+ "name": "Consumable_order__c"
+ },
+ {
+ "isPublic": true,
+ "name": "Agency_Report_Header__c"
+ },
+ {
+ "isPublic": false,
+ "name": "ContentDocument"
+ }
+ ],
+ "searchResultFiltering": true,
+ "searchTerm": "{!term}",
+ "showTopResults": true
+ },
+ "componentName": "forceCommunity:search",
+ "id": "8616ac21-b5fa-4879-9c6b-3836a1b837cf",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "22ee9bd4-2a6f-4192-af88-2d8d01aef8cc",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "324664c2-a1b0-499b-ab5c-1aec5f631a2f",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "global-search"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/streamDetail.json b/force-app/main/default/experiences/Consumable_21/views/streamDetail.json
new file mode 100644
index 0000000..fca4d4a
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/streamDetail.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "2ed3971e-2e0b-49e1-957a-db8edf28e905",
+ "label": "Stream Detail",
+ "regions": [
+ {
+ "id": "582d5e1d-8c96-49ff-b99a-00ab45faa387",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}"
+ },
+ "componentName": "forceCommunity:streamDetail",
+ "id": "b1c70c13-2121-4b60-b495-fca4784c9745",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f548dc0e-20e8-4f9d-b3de-575f397d1117",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "a5e84e98-5bc5-4d9c-95d0-70aa6cdd6004",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-0Fq"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/streamList.json b/force-app/main/default/experiences/Consumable_21/views/streamList.json
new file mode 100644
index 0000000..c1762bb
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/streamList.json
@@ -0,0 +1,27 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "7b44c578-cb31-4b50-93b6-a47a13e14547",
+ "label": "Stream List",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:streamList",
+ "id": "5205b934-769e-4f35-ae54-aa8ba648e02d",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2ce11f7f-7b38-4778-a26a-40f79d06afa9",
+ "regionName": "content",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-0Fq"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/streamRelatedList.json b/force-app/main/default/experiences/Consumable_21/views/streamRelatedList.json
new file mode 100644
index 0000000..45da71f
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/streamRelatedList.json
@@ -0,0 +1,27 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "c7dfa990-4229-4b61-bd62-fc491d749f9e",
+ "label": "Stream Related List",
+ "regions": [
+ {
+ "id": "6d0437ee-354c-4323-aab1-cf97dd4793fa",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "a34af264-29b8-43c6-9bb5-9ba87a894ae2",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "fbae4ddd-5a56-4752-8beb-3ba7b8374c66",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-0Fq"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/topicCatalog.json b/force-app/main/default/experiences/Consumable_21/views/topicCatalog.json
new file mode 100644
index 0000000..2da1632
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/topicCatalog.json
@@ -0,0 +1,73 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "beef814b-071b-4cc4-b306-273e36bcd4e1",
+ "label": "Topic Catalog",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "bannerText": "",
+ "bannerTextWithKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineArticles\">articles</a> and <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "bannerTextWithoutKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "pageType": "",
+ "showSubTopics": true,
+ "title": "Topics",
+ "uniqueNameOrId": ""
+ },
+ "componentName": "forceCommunity:headline",
+ "id": "2a44ee73-57c5-42ef-8001-90f21054b7d9",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9114b0eb-f41b-446c-8e81-ae276fbf3f9f",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:topicCatalog",
+ "id": "cc2cb5e4-126f-4489-8fce-4bd5a04ff383",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5e5f78d5-b0aa-4dd8-8bf2-32b440a067a3",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "23f9bcb5-de3e-4c2d-a041-a0a604ed4c07",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Topic Catalog"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "27892553-0439-44fd-9450-4a9ff77715ed",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "aae63a44-aa78-4738-bd23-f6bbf32434e6",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "topic-catalog"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/topicDetail.json b/force-app/main/default/experiences/Consumable_21/views/topicDetail.json
new file mode 100644
index 0000000..25aab28
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/topicDetail.json
@@ -0,0 +1,93 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "b9923519-ef19-44ef-bd24-28ecae2ca1d0",
+ "label": "Topic Detail",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "60366746-9a8f-4431-a310-6cefc32cfacb",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "27f41546-f62e-4391-9687-1ef04fb4b429",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "canChangeSorting": false,
+ "defaultFilter": "",
+ "defaultSortOrderHomeFeed": "Relevance",
+ "defaultSortOrderTopicsFeed": "Relevance",
+ "feedDesign": "DEFAULT",
+ "hasFeedSearch": false,
+ "subjectId": "{!recordId}",
+ "type": "Topics"
+ },
+ "componentName": "forceCommunity:forceCommunityFeed",
+ "id": "c4bbca55-d58a-42e3-8db8-8425b0efbdaa",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "62d570bc-1a80-4f67-9ecf-76991f24a2b4",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordDetail",
+ "id": "be7c7d85-bb00-4992-9080-3c212ebd17ed",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "89d17053-a116-4fc4-bdfd-9b2fa68fe0e7",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "aa44781d-51a2-4097-a64d-43b2d964a66c",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "{!Record.Description}",
+ "title": "{!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "edfe1dec-458c-471e-9b8d-3b2d1d16f24d",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c89d726d-95b1-49b4-86e6-cd374e3ca09d",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "topic"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/userList.json b/force-app/main/default/experiences/Consumable_21/views/userList.json
new file mode 100644
index 0000000..dd79979
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/userList.json
@@ -0,0 +1,27 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "d02d6cf0-9943-4eae-87c2-4204b97a6232",
+ "label": "User List",
+ "regions": [
+ {
+ "id": "ef2c75bf-d9a0-4858-8847-809ab4bc10cc",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "80014acf-9da0-4466-9bbe-ae3042455267",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "52a10fdc-f3ae-4174-87ad-0367681b5e2d",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-005"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/userProfile.json b/force-app/main/default/experiences/Consumable_21/views/userProfile.json
new file mode 100644
index 0000000..d8bfa87
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/userProfile.json
@@ -0,0 +1,121 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "bd2f032f-6a01-4173-8efd-f248d6d6af26",
+ "label": "User Profile",
+ "regions": [
+ {
+ "id": "cbd8f643-36eb-4bd0-bf56-0ec7025bcfdf",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}",
+ "showFullPhotoAsCircle": true,
+ "showReputation": false
+ },
+ "componentName": "forceCommunity:userProfileHeader",
+ "id": "667b1264-8f9e-41ad-822c-6df945cc81a9",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "e4669bca-930e-491d-8977-b173852cec6b",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "8dfbda62-101c-4887-89d7-125c2143cbb3",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:userProfileDetail"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Details"
+ },
+ {
+ "UUID": "d9a6a4df-565b-4871-bb12-e684002269d0",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:userRelatedList"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "Related"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "e4669bca-930e-491d-8977-b173852cec6b",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}"
+ },
+ "componentName": "forceCommunity:userProfileDetail",
+ "id": "9949d39e-dea5-42c8-88d2-ed85afde6832",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8dfbda62-101c-4887-89d7-125c2143cbb3",
+ "regionLabel": "Details",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "userId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:userRelatedList",
+ "id": "1c7bb32e-9426-421d-87c4-25e953196459",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d9a6a4df-565b-4871-bb12-e684002269d0",
+ "regionLabel": "Related",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "b771f8bf-d968-4a0a-9245-80368fd2350a",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "0d34e92d-ee25-4d7f-b798-5b9ea82ffc72",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-005"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/userRelatedList.json b/force-app/main/default/experiences/Consumable_21/views/userRelatedList.json
new file mode 100644
index 0000000..1cc1074
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/userRelatedList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "c449b307-105f-42b0-aea1-e06c8080480a",
+ "label": "User Related List",
+ "regions": [
+ {
+ "id": "be7ce0a1-6734-400d-88c5-d6d786282caf",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "49ac6200-2ed3-4008-9f09-73382697e7de",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9f2d070f-cdaf-477d-9b69-42c67d105530",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "344397fc-c228-4f69-8630-5460d6cd4f3d",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-005"
+}
diff --git a/force-app/main/default/experiences/Consumable_21/views/userSettings.json b/force-app/main/default/experiences/Consumable_21/views/userSettings.json
new file mode 100644
index 0000000..c940eb3
--- /dev/null
+++ b/force-app/main/default/experiences/Consumable_21/views/userSettings.json
@@ -0,0 +1,60 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "c3057516-9b03-4f0d-97b8-17a86dbc1ec8",
+ "label": "User Settings",
+ "regions": [
+ {
+ "id": "28551545-5fab-4b9b-a38f-e424e5c82960",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "accountSectionTitle": "Account",
+ "accountTabName": "Account Management",
+ "connectedSourcesTabName": "Connected Sources",
+ "deleteAccountButtonTitle": "Deactivate My Account",
+ "deleteAccountConfirmationPopupBody": "After you deactivate your account, you'll lose access to this site.",
+ "deleteAccountConfirmationPopupButtonTitle": "Got It",
+ "deleteAccountConfirmationPopupTitle": "Deactivate your account?",
+ "deleteAccountErrorMessage": "Something went wrong. Contact your site administrator.",
+ "deleteAccountSectionTitle": "Deactivate Account",
+ "emailNotificationsTitle": "Email Notifications",
+ "emailSectionDescText": "When email notifications are enabled, email me when someone:",
+ "hideAccountDeleteSection": true,
+ "hideChatterNotificationSettings": false,
+ "hideConnectedSources": false,
+ "hideEmailNotificationSettings": false,
+ "hideProfileVisibilitySettings": false,
+ "id": "{!recordId}",
+ "locationTitle": "Location",
+ "profileSectionDescText": "Customize who is able to see what on your profile page",
+ "profileSectionToolTipText": "Restricted: Visible to the employees of the company that created the site. Members: Visible to logged-in members. Public: Visible to anyone viewing pages that don't require login.",
+ "profileVisibilityTitle": "Profile Visibility",
+ "settingsPageTitle": "My Settings"
+ },
+ "componentName": "forceCommunity:userSettingsCustomizable",
+ "id": "55119c21-7eda-46f2-90f2-7fa45d27434c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c568d916-69a4-4cd4-a151-a4b046f055dd",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "e0d85731-0135-4cb9-aec8-309721cfc4a5",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "usersettings"
+}
diff --git "a/force-app/main/default/experiences/Consumable_21/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225Detail.json" "b/force-app/main/default/experiences/Consumable_21/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225Detail.json"
new file mode 100644
index 0000000..de8ce25
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable_21/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225Detail.json"
@@ -0,0 +1,76 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "1691b1e6-3801-4345-8e26-61efe24a1221",
+ "label": "娑堣�楀搧璁㈠崟 Detail",
+ "regions": [
+ {
+ "id": "4dfafba4-ebb9-421b-84d5-1dd47087b3d6",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "9a16b291-bb52-4fbe-82bd-afb0596a71a1",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "c9ce8c2d-a67f-49b7-b5b7-10eda3f11221",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e9ba4418-9650-4cbb-95c8-48d950f36b96",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "edc5392e-c836-4e2e-876b-ddadb2938087",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "af55a81d-0722-4809-9ebc-fe919fafc20d",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c5d8d626-e408-4614-98ba-c5d7f05b4dc5",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-a2K"
+}
diff --git "a/force-app/main/default/experiences/Consumable_21/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225List.json" "b/force-app/main/default/experiences/Consumable_21/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225List.json"
new file mode 100644
index 0000000..c4df577
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable_21/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225List.json"
@@ -0,0 +1,52 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "c9f4f647-56ee-42d8-a323-0e34383a4ec2",
+ "label": "娑堣�楀搧璁㈠崟 List",
+ "regions": [
+ {
+ "id": "1b06df73-32d3-48b7-93e9-086b7f64c126",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": false,
+ "filterName": "{!filterId}",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "{!objectName}",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "1de998fc-a513-4f6e-859d-9c7041a7fc21",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "948b39de-c179-4cd1-8455-971e89dfe76f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "01f672e2-ff7c-48f2-a2a8-652c1fb8dff3",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-a2K"
+}
diff --git "a/force-app/main/default/experiences/Consumable_21/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225RelatedList.json" "b/force-app/main/default/experiences/Consumable_21/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225RelatedList.json"
new file mode 100644
index 0000000..f205036
--- /dev/null
+++ "b/force-app/main/default/experiences/Consumable_21/views/\346\266\210\350\200\227\345\223\201\350\256\242\345\215\225RelatedList.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "928a593f-f341-403e-8346-df32afe29b52",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "3f6ef9a9-d9a1-413c-920b-c0eb491a355e",
+ "label": "娑堣�楀搧璁㈠崟 Related List",
+ "regions": [
+ {
+ "id": "660a2e02-5624-42fc-a541-7d6f463cab65",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "6cb6af19-2231-4111-848e-2dab5dd4407a",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "811fe500-355d-4d0c-9c64-8648e154546c",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "379d2395-18be-4192-939c-de22185c613f",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-a2K"
+}
diff --git a/force-app/main/default/experiences/Partner21.site-meta.xml b/force-app/main/default/experiences/Partner21.site-meta.xml
new file mode 100644
index 0000000..ee33882
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21.site-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <label>Partner2</label>
+ <type>ChatterNetworkPicasso</type>
+</ExperienceBundle>
diff --git a/force-app/main/default/experiences/Partner21/brandingSets/partnerCentral.json b/force-app/main/default/experiences/Partner21/brandingSets/partnerCentral.json
new file mode 100644
index 0000000..6d04fc3
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/brandingSets/partnerCentral.json
@@ -0,0 +1,56 @@
+{
+ "definitionName": "prm:branding-prm-merged",
+ "id": "2bafe70c-3369-45be-8bc4-ae2816db3a7c",
+ "label": "Partner Central",
+ "type": "brandingSet",
+ "values": {
+ "ActionColor": "#0E63AC",
+ "BorderColor": "#D4D4D4",
+ "CardBackgroundColor": "rgba(255, 255, 255, 0)",
+ "CompanyLogo": "",
+ "DetailTextColor": "#5A5A5A",
+ "ErrorFontColor": "#ff9e9e",
+ "HeaderBackgroundColor": "#FFFFFF",
+ "HeaderFonts": "Open Sans",
+ "LinkColor": "#3558D6",
+ "LoginBackgroundColor": "#F4F4F4",
+ "LoginBackgroundImage": "../../../../sfsites/picasso/core/external/salesforceIdentity/images/background.jpg?v=1",
+ "NavigationMenuColor": "#1E2443",
+ "NavigationMenuTextColor": "#FFFFFF",
+ "OverlayTextColor": "#FFFFFF",
+ "PageBackgroundColor": "#FFFFFF",
+ "PrimaryFont": "Work Sans",
+ "TextColor": "#222222",
+ "TextTransformStyle": "none",
+ "_ActionColorDarker": "#135F90",
+ "_ActionColorTrans": "rgba(25, 124, 190, 0.9)",
+ "_BackgroundColor1": "rgb(235, 235, 235)",
+ "_BackgroundColor2": "rgb(194, 194, 194)",
+ "_BackgroundColor3": "rgb(133, 133, 133)",
+ "_DxpPageBackgroundColor": "#FFFFFF",
+ "_HeaderInputBackgroundColor": "rgba(255,255,255,.4)",
+ "_HeaderPlaceholderTextColor": "rgba(85,85,85,.8)",
+ "_HeaderTextColor": "rgba(34,34,34,.8)",
+ "_HoverColor": "rgba(25, 124, 190, 0.05)",
+ "_LinkColorDarker": "#135F90",
+ "_NavigationMenuHoverColor": "rgba(255,255,255,.2)",
+ "_NeutralColor": "#ecebea",
+ "_NeutralColor1": "rgb(217, 215, 213)",
+ "_NeutralColor2": "rgb(178, 174, 170)",
+ "_NeutralColor3": "rgb(118, 113, 107)",
+ "_NeutralForegroundColor": "#000",
+ "_NeutralForegroundColor1": "#000",
+ "_NeutralForegroundColor2": "#000",
+ "_NeutralForegroundColor3": "#fff",
+ "_OverlayTextColorShadow": "#000000",
+ "_PrimaryAccentColor1": "rgb(11, 77, 134)",
+ "_PrimaryAccentColor2": "rgb(5, 34, 59)",
+ "_PrimaryAccentColor3": "rgb(0, 0, 0)",
+ "_PrimaryAccentForegroundColor1": "rgb(255, 255, 255)",
+ "_PrimaryAccentForegroundColor2": "rgb(255, 255, 255)",
+ "_PrimaryAccentForegroundColor3": "rgb(255, 255, 255)",
+ "_TextColor1": "rgb(14, 14, 14)",
+ "_TextColor2": "rgb(0, 0, 0)",
+ "_TextColor3": "rgb(0, 0, 0)"
+ }
+}
diff --git a/force-app/main/default/experiences/Partner21/config/languages.json b/force-app/main/default/experiences/Partner21/config/languages.json
new file mode 100644
index 0000000..182ec2f
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/config/languages.json
@@ -0,0 +1,6 @@
+{
+ "defaultCode": "en_US",
+ "defaultLabel": "English (US)",
+ "id": "819c8e80-6cf0-49e9-a1d6-345ae45d7a90",
+ "type": "languageContainer"
+}
diff --git a/force-app/main/default/experiences/Partner21/config/loginAppPage.json b/force-app/main/default/experiences/Partner21/config/loginAppPage.json
new file mode 100644
index 0000000..4f94b2c
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/config/loginAppPage.json
@@ -0,0 +1,7 @@
+{
+ "cmsSettings": {},
+ "id": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "label": "login",
+ "templateName": "Login Template",
+ "type": "appPage"
+}
diff --git a/force-app/main/default/experiences/Partner21/config/mainAppPage.json b/force-app/main/default/experiences/Partner21/config/mainAppPage.json
new file mode 100644
index 0000000..dd457d3
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/config/mainAppPage.json
@@ -0,0 +1,10 @@
+{
+ "cmsSettings": {},
+ "currentThemeId": "18ac5de3-f2b2-40fd-9a94-810f6223e1a1",
+ "headMarkup": null,
+ "id": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "isRelaxedCSPLevel": false,
+ "label": "main",
+ "templateName": "PRM Community Template",
+ "type": "appPage"
+}
diff --git a/force-app/main/default/experiences/Partner21/config/partner2.json b/force-app/main/default/experiences/Partner21/config/partner2.json
new file mode 100644
index 0000000..7d1544d
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/config/partner2.json
@@ -0,0 +1,11 @@
+{
+ "forgotPasswordRouteId": "a32b55eb-72d8-4660-8a65-ec40e5dc3abd",
+ "isAvailableToGuests": false,
+ "isFilteredComponentsView": false,
+ "isProgressiveRenderingEnabled": false,
+ "loginAppPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "mainAppPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "preferredDomain": "none",
+ "selfRegistrationRouteId": "580cfa3b-bb16-4945-8e74-7c2dda9cba0c",
+ "type": "site"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/accountManagement.json b/force-app/main/default/experiences/Partner21/routes/accountManagement.json
new file mode 100644
index 0000000..abfd354
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/accountManagement.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "73ead53d-982c-4218-84a8-b8cbe2b05939",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "51f30ea6-78e9-4149-b251-f8125360315a",
+ "label": "Account Management",
+ "routeType": "account-management",
+ "type": "route",
+ "urlPrefix": "account-management"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/cIC\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/cIC\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..cc08aaf
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/cIC\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "d3445d25-786e-4fb4-8d9a-9dd4fdcb902f",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "335429f2-951c-4d1e-bb5e-6a2eaa42be65",
+ "label": "CIC 銉偣銉�",
+ "routeType": "list-500",
+ "type": "route",
+ "urlPrefix": "case"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..e449923
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "bef54924-1293-4a23-a8c1-c97ddc81b694",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "0dd0e835-aa8b-4309-a1ca-bc05e658877a",
+ "label": "CIC 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-500",
+ "type": "route",
+ "urlPrefix": "case"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/campaignList.json b/force-app/main/default/experiences/Partner21/routes/campaignList.json
new file mode 100644
index 0000000..e3ac2b3
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/campaignList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "a8f90e92-695a-4455-9d74-59268e559b6f",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "3e1ec945-7b12-41d6-891a-3b92c996fbd2",
+ "label": "Campaign List",
+ "routeType": "list-701",
+ "type": "route",
+ "urlPrefix": "campaign"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/caseDetail.json b/force-app/main/default/experiences/Partner21/routes/caseDetail.json
new file mode 100644
index 0000000..c582bc1
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/caseDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "31166d77-4e5c-4bb8-9256-d2ab6ac88944",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "9f298cb4-b31d-43e1-870d-328644dac746",
+ "label": "Case Detail",
+ "routeType": "detail-500",
+ "type": "route",
+ "urlPrefix": "case"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/checkPassword.json b/force-app/main/default/experiences/Partner21/routes/checkPassword.json
new file mode 100644
index 0000000..b3c7bb6
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/checkPassword.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "93eba445-abcb-402d-807a-17793aede814",
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "id": "8682c9b4-ec5d-4d2b-a60d-0a241eeb66b8",
+ "label": "Check Password",
+ "routeType": "check-password",
+ "type": "route",
+ "urlPrefix": "CheckPasswordResetEmail"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/contactSupport.json b/force-app/main/default/experiences/Partner21/routes/contactSupport.json
new file mode 100644
index 0000000..c9261b4
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/contactSupport.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "5960b934-e0b0-4c75-a297-71843d6b25d1",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "93c4747d-62d3-4166-a9b4-115b6640ac76",
+ "label": "Contact Support",
+ "pageAccess": "UseParent",
+ "routeType": "contactsupport",
+ "type": "route",
+ "urlPrefix": "contactsupport"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/createRecord.json b/force-app/main/default/experiences/Partner21/routes/createRecord.json
new file mode 100644
index 0000000..1f83f20
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/createRecord.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "a7dcd30a-fcf7-436e-9319-602f77df9596",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "f8c4cb05-f669-485b-8a5f-5bebe9249cd0",
+ "label": "Create Record",
+ "routeType": "createrecord",
+ "type": "route",
+ "urlPrefix": "createrecord"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/dashboardDetail.json b/force-app/main/default/experiences/Partner21/routes/dashboardDetail.json
new file mode 100644
index 0000000..45a8089
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/dashboardDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "b3170d2d-dc66-4e6d-a921-7278926fbf83",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "3504379f-73f4-4df7-97b0-f76e423ed581",
+ "label": "Dashboard Detail",
+ "routeType": "detail-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/dashboardList.json b/force-app/main/default/experiences/Partner21/routes/dashboardList.json
new file mode 100644
index 0000000..b25792b
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/dashboardList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "ce1cde06-6dcb-4da1-a5c9-7b2b099ddebb",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "76b4a2a7-fb5d-48b5-b4f8-87959b076fe4",
+ "label": "Dashboard List",
+ "routeType": "list-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/error.json b/force-app/main/default/experiences/Partner21/routes/error.json
new file mode 100644
index 0000000..f59ca79
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/error.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "a4b25394-ceb2-44ff-b562-067f8854d1c1",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "00fbcecf-a9bf-48af-9fb8-b9c481adf31f",
+ "label": "Error",
+ "pageAccess": "UseParent",
+ "routeType": "error",
+ "type": "route",
+ "urlPrefix": "error"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/feedDetail.json b/force-app/main/default/experiences/Partner21/routes/feedDetail.json
new file mode 100644
index 0000000..074f2a1
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/feedDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "c7ee8d3e-fb1b-4f58-8292-3ad0cc4824f9",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "983bfa20-13c3-42fb-a95e-1db14fb5340d",
+ "label": "Feed Detail",
+ "routeType": "feeditem-generic",
+ "type": "route",
+ "urlPrefix": "feed"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/fileDetail.json b/force-app/main/default/experiences/Partner21/routes/fileDetail.json
new file mode 100644
index 0000000..fb13a03
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/fileDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "5a4b2af7-b7b8-45c6-abc7-bf66bb847a7d",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "2a4fbb36-a668-4782-9a2b-a6aa402e8ec9",
+ "label": "File Detail",
+ "routeType": "detail-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/fileList.json b/force-app/main/default/experiences/Partner21/routes/fileList.json
new file mode 100644
index 0000000..3ce38ef
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/fileList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "2df51d40-f4c7-4917-b90b-e435c1d6a14e",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "e0659f99-76b5-4fce-a436-4037e570bc8a",
+ "label": "File List",
+ "routeType": "list-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/flow.json b/force-app/main/default/experiences/Partner21/routes/flow.json
new file mode 100644
index 0000000..0b3062e
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/flow.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "87c1c576-6744-474b-9e97-f16fc38fe2bb",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "b45aa6b5-4c24-4c68-acf5-d6b60dbf6972",
+ "label": "Flow",
+ "pageAccess": "UseParent",
+ "routeType": "flow",
+ "type": "route",
+ "urlPrefix": "flow"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/forgotPassword.json b/force-app/main/default/experiences/Partner21/routes/forgotPassword.json
new file mode 100644
index 0000000..d94b605
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/forgotPassword.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "c97e5e6e-dc54-450d-9151-4a62fb2e007c",
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "id": "a32b55eb-72d8-4660-8a65-ec40e5dc3abd",
+ "label": "Forgot Password",
+ "routeType": "forgot-password",
+ "type": "route",
+ "urlPrefix": "ForgotPassword"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/groupDetail.json b/force-app/main/default/experiences/Partner21/routes/groupDetail.json
new file mode 100644
index 0000000..3c65f04
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/groupDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "1e79f9ca-bc4c-4e37-b6b7-6abfebba388a",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "478b821a-de35-441e-b6a8-eb97f8e82381",
+ "label": "Group Detail",
+ "routeType": "detail-0F9",
+ "type": "route",
+ "urlPrefix": "group"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/groupList.json b/force-app/main/default/experiences/Partner21/routes/groupList.json
new file mode 100644
index 0000000..294728f
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/groupList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "11907c7a-7b32-438d-94d9-27f526ea69a6",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "158ea18b-cdf0-465a-9ca9-35a7028b9dab",
+ "label": "Group List",
+ "routeType": "list-0F9",
+ "type": "route",
+ "urlPrefix": "group"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/home.json b/force-app/main/default/experiences/Partner21/routes/home.json
new file mode 100644
index 0000000..59f418e
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/home.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "4fa3fa38-4d0f-4247-9f1d-cccfa436763a",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "d637320e-1e70-48e6-8e98-0fda4b808781",
+ "label": "Home",
+ "pageAccess": "UseParent",
+ "routeType": "home",
+ "type": "route",
+ "urlPrefix": ""
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/login.json b/force-app/main/default/experiences/Partner21/routes/login.json
new file mode 100644
index 0000000..2f8ce25
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/login.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "6a024f98-3cde-4f9a-8648-4fd1e841d503",
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "id": "537d03d3-4bd8-4207-bf3f-0309e45225e5",
+ "label": "Login",
+ "routeType": "login-home",
+ "type": "route",
+ "urlPrefix": ""
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/loginError.json b/force-app/main/default/experiences/Partner21/routes/loginError.json
new file mode 100644
index 0000000..8560d5c
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/loginError.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "8da2d7f7-7500-4481-bad7-50d7a131e76e",
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "id": "3d15f08c-42ed-4275-9d4e-f280c7a65755",
+ "label": "Login Error",
+ "routeType": "login-error",
+ "type": "route",
+ "urlPrefix": "error"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/mDFAndCoop.json b/force-app/main/default/experiences/Partner21/routes/mDFAndCoop.json
new file mode 100644
index 0000000..e53747a
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/mDFAndCoop.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "9c5c1b27-82e3-433b-b987-a98a033bc129",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "3263e290-ebd2-42ee-80be-6295d0d63d57",
+ "label": "MDF and Coop",
+ "routeType": "mdf",
+ "type": "route",
+ "urlPrefix": "mdf"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/messages.json b/force-app/main/default/experiences/Partner21/routes/messages.json
new file mode 100644
index 0000000..f69d6ed
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/messages.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "295d4564-bf29-48ed-b213-e39c211fcca0",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "82ae3bda-5f70-4539-ad6f-eb0cde64cf5a",
+ "label": "Messages",
+ "routeType": "messages",
+ "type": "route",
+ "urlPrefix": "messages"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/myAccount.json b/force-app/main/default/experiences/Partner21/routes/myAccount.json
new file mode 100644
index 0000000..c656106
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/myAccount.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "4f2502be-3471-4328-98e2-65da8b475fba",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "5c4c7d56-84cd-449f-b860-2ae61fc89b74",
+ "label": "My Account",
+ "routeType": "my-account",
+ "type": "route",
+ "urlPrefix": "comm-my-account"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/questionDetail.json b/force-app/main/default/experiences/Partner21/routes/questionDetail.json
new file mode 100644
index 0000000..2831fd1
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/questionDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "bf327277-7072-4df9-90f8-29eb8b39b81d",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "0b618e15-dbc6-410f-8510-af7b6a02aa5b",
+ "label": "Question Detail",
+ "routeType": "feeditem",
+ "type": "route",
+ "urlPrefix": "question"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/quipDocsRelatedList.json b/force-app/main/default/experiences/Partner21/routes/quipDocsRelatedList.json
new file mode 100644
index 0000000..208d9bf
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/quipDocsRelatedList.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "7bb87352-7c83-46dd-ad49-c8f579c0b0fc",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "229ba801-02bf-47dd-83ab-2f7fec1676d1",
+ "label": "Quip Docs Related List",
+ "pageAccess": "UseParent",
+ "routeType": "extrelated-quip",
+ "type": "route",
+ "urlPrefix": "quip"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/recordDetail.json b/force-app/main/default/experiences/Partner21/routes/recordDetail.json
new file mode 100644
index 0000000..2baa3fa
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/recordDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "07b95556-b1a0-4d51-9ad9-912c6af1d763",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "e792d445-e6fb-4c3a-8d31-8d9053e06715",
+ "label": "Record Detail",
+ "routeType": "detail",
+ "type": "route",
+ "urlPrefix": "detail"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/recordList.json b/force-app/main/default/experiences/Partner21/routes/recordList.json
new file mode 100644
index 0000000..830b76b
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/recordList.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "c0dfcf8e-1f28-474c-ba52-6824250808ec",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "09d17516-4c41-480c-86da-3862cacd8641",
+ "label": "Record List",
+ "pageAccess": "UseParent",
+ "routeType": "list",
+ "type": "route",
+ "urlPrefix": "recordlist"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/register.json b/force-app/main/default/experiences/Partner21/routes/register.json
new file mode 100644
index 0000000..56d5416
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/register.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "43c8d59e-3839-4334-aedf-f3d9c6af1843",
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "id": "580cfa3b-bb16-4945-8e74-7c2dda9cba0c",
+ "label": "Register",
+ "routeType": "self-register",
+ "type": "route",
+ "urlPrefix": "SelfRegister"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/relatedRecordList.json b/force-app/main/default/experiences/Partner21/routes/relatedRecordList.json
new file mode 100644
index 0000000..a02c597
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/relatedRecordList.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "525210ce-dc91-4637-8aad-dcc79ef5149c",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "d0db632e-1566-4cf0-9705-97344981881a",
+ "label": "Related Record List",
+ "pageAccess": "UseParent",
+ "routeType": "relatedlist",
+ "type": "route",
+ "urlPrefix": "relatedlist"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/reportBuilder.json b/force-app/main/default/experiences/Partner21/routes/reportBuilder.json
new file mode 100644
index 0000000..bdb8d8b
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/reportBuilder.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "24910809-77c3-4ea5-80c3-ea0db9afb5de",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "11651c0d-08d4-4516-b3aa-2e0aa2bf2ce4",
+ "label": "Report Builder",
+ "routeType": "createreport",
+ "type": "route",
+ "urlPrefix": "createreport"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/reportDetail.json b/force-app/main/default/experiences/Partner21/routes/reportDetail.json
new file mode 100644
index 0000000..2a4627b
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/reportDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "621a5818-46f1-42c5-9717-fc999ba75df9",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "62c0d91e-c673-4640-9e5b-0f86093b731a",
+ "label": "Report Detail",
+ "routeType": "detail-00O",
+ "type": "route",
+ "urlPrefix": "report"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/reportList.json b/force-app/main/default/experiences/Partner21/routes/reportList.json
new file mode 100644
index 0000000..af4a079
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/reportList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "94db8a50-134d-4517-bddc-eb54dc151c59",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "a6c91f42-2b88-4b55-801a-62126c85bc28",
+ "label": "Report List",
+ "routeType": "list-00O",
+ "type": "route",
+ "urlPrefix": "report"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/resources.json b/force-app/main/default/experiences/Partner21/routes/resources.json
new file mode 100644
index 0000000..500f4a7
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/resources.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "fe6b6a28-688d-44ad-921f-8ad8124e9a5d",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "5a522dfa-a384-4731-b742-7bdb27788f7c",
+ "label": "Resources",
+ "pageAccess": "UseParent",
+ "routeType": "files",
+ "type": "route",
+ "urlPrefix": "files"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/search.json b/force-app/main/default/experiences/Partner21/routes/search.json
new file mode 100644
index 0000000..f010a8a
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/search.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "858b90d6-5f26-4a9a-9080-746e17a9f4b5",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "1b06bb4e-f96b-4a4b-a632-1c2f87338fcc",
+ "label": "Search",
+ "pageAccess": "UseParent",
+ "routeType": "global-search",
+ "type": "route",
+ "urlPrefix": "global-search"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/streamDetail.json b/force-app/main/default/experiences/Partner21/routes/streamDetail.json
new file mode 100644
index 0000000..ed28163
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/streamDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "ef1f7586-66a3-4110-80c5-073271e404e6",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "10ad641a-4dac-4a97-907b-9829dbb0f4fa",
+ "label": "Stream Detail",
+ "routeType": "detail-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/streamList.json b/force-app/main/default/experiences/Partner21/routes/streamList.json
new file mode 100644
index 0000000..41a64b5
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/streamList.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "ee631fe0-502b-4dfe-ac53-311079fadd89",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "af6eccfe-1bc5-469a-b6ad-ab3e909c8d67",
+ "label": "Stream List",
+ "routeType": "list-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/topicCatalog.json b/force-app/main/default/experiences/Partner21/routes/topicCatalog.json
new file mode 100644
index 0000000..bb92731
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/topicCatalog.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "d006b952-023c-4964-88f1-151e2b013a67",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "d5e7e488-a9f0-478d-a0ec-521beb1fae74",
+ "label": "Topic Catalog",
+ "pageAccess": "UseParent",
+ "routeType": "topic-catalog",
+ "type": "route",
+ "urlPrefix": "topiccatalog"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/topicDetail.json b/force-app/main/default/experiences/Partner21/routes/topicDetail.json
new file mode 100644
index 0000000..5385445
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/topicDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "38e59688-3353-4124-b571-862a162dff11",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "c6ad2c0d-3c7d-4e9e-b4c7-dae3cba30ced",
+ "label": "Topic Detail",
+ "routeType": "topic",
+ "type": "route",
+ "urlPrefix": "topic"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/userProfile.json b/force-app/main/default/experiences/Partner21/routes/userProfile.json
new file mode 100644
index 0000000..7007fc7
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/userProfile.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "4053070a-c5f6-483a-b96a-0ac64d32bfc6",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "9f4260e2-fbc6-42b4-bebe-8886bcd55e66",
+ "label": "User Profile",
+ "routeType": "detail-005",
+ "type": "route",
+ "urlPrefix": "profile"
+}
diff --git a/force-app/main/default/experiences/Partner21/routes/userSettings.json b/force-app/main/default/experiences/Partner21/routes/userSettings.json
new file mode 100644
index 0000000..af2754b
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/routes/userSettings.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "3d201ab3-fa88-4304-85c5-c338df54401e",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "9d004b4f-2a89-4e4a-980c-f62b28536266",
+ "label": "User Settings",
+ "routeType": "usersettings",
+ "type": "route",
+ "urlPrefix": "settings"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..d0345e3
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "b8dd7d14-b832-40b7-9081-a684d75e13c4",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "6e023302-b965-457c-b4c9-8a4b5dca7bb0",
+ "label": "浠〃鏉� 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-01Z",
+ "type": "route",
+ "urlPrefix": "dashboard"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json" "b/force-app/main/default/experiences/Partner21/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
new file mode 100644
index 0000000..308f43d
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "85625454-b547-4267-8193-1220b85224c0",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "abcbe601-f39b-4f61-8a9b-297688232ea7",
+ "label": "瀛︿細銉诲煿璁� 瑭崇窗",
+ "routeType": "detail-701",
+ "type": "route",
+ "urlPrefix": "campaign"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..2abfe4b
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "c151821c-4405-4da0-b2dd-279fbb65bd86",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "2e701358-38dd-4068-b3ab-8d91cac9d359",
+ "label": "瀛︿細銉诲煿璁� 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-701",
+ "type": "route",
+ "urlPrefix": "campaign"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..db6a6c1
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "2bfba25e-daf0-49ff-924f-f69f9d9fb327",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "5ca84e92-f681-451a-a465-c9ad81c9e4f4",
+ "label": "灏忕粍 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-0F9",
+ "type": "route",
+ "urlPrefix": "group"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..b7a67a0
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "217b4959-2595-4925-825f-0e46a2edf850",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "77fd078e-cd8f-476e-8bd7-556f21ad97d7",
+ "label": "鎶ヨ〃 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-00O",
+ "type": "route",
+ "urlPrefix": "report"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..40dcb78
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "972321da-7487-4d80-afa0-7731e16694d9",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "9592b508-4ea1-44a3-90fd-83881462ac86",
+ "label": "鏂囦欢 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-069",
+ "type": "route",
+ "urlPrefix": "contentdocument"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..e25e36e
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "cc7589b2-7f8c-4682-9007-5aa6a8b4c110",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "905b3765-bfbf-4204-9356-e13233d56dd7",
+ "label": "娴� 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-0Fq",
+ "type": "route",
+ "urlPrefix": "streams"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..1695f75
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "33b1c4cb-6778-4461-9977-a79f65eb2665",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "bc57eb02-e26e-4855-86b9-bd3369fddb36",
+ "label": "鐢ㄦ埛 銉偣銉�",
+ "routeType": "list-005",
+ "type": "route",
+ "urlPrefix": "profile"
+}
diff --git "a/force-app/main/default/experiences/Partner21/routes/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/routes/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..73fffc9
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/routes/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "e627e296-efd0-45d5-87ed-ea680a2015b0",
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "id": "1729dcc7-2e1c-4232-8df1-1aaf533f87b6",
+ "label": "鐢ㄦ埛 闁㈤�c儶銈广儓",
+ "routeType": "relatedlist-005",
+ "type": "route",
+ "urlPrefix": "profile"
+}
diff --git a/force-app/main/default/experiences/Partner21/themes/partnerCentral.json b/force-app/main/default/experiences/Partner21/themes/partnerCentral.json
new file mode 100644
index 0000000..f6d78e6
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/themes/partnerCentral.json
@@ -0,0 +1,180 @@
+{
+ "activeBrandingSetId": "2bafe70c-3369-45be-8bc4-ae2816db3a7c",
+ "customCSS": "",
+ "developerName": "prm",
+ "id": "18ac5de3-f2b2-40fd-9a94-810f6223e1a1",
+ "label": "Partner Central",
+ "layouts": {
+ "Inner": "711e306b-2592-417d-831a-472636179fe5",
+ "Login": "b81dea57-c4df-4a1f-9c8a-bf2b8e8e6c93",
+ "ServiceNotAvailable": "964c1332-6afa-42a3-954d-244ecef6afb6"
+ },
+ "type": "theme",
+ "views": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:loginBody2",
+ "id": "b81dea57-c4df-4a1f-9c8a-bf2b8e8e6c93",
+ "label": "Login",
+ "regions": [
+ {
+ "id": "1c505db0-1022-4a27-8ae1-2d2b6b993a46",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "f8e77897-363b-4d07-bfd6-4c249730578d",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "cade8788-fc75-4f2b-87c6-2e2bef131b51",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "type": "view"
+ },
+ {
+ "componentAttributes": {
+ "IsDefaultHeaderHidden": false,
+ "IsDefaultHeaderPositionFixed": true,
+ "IsDefaultNotificationsHidden": false,
+ "IsSearchBarHidden": false,
+ "fixedPageWidth": 1440,
+ "isPageWidthFixed": true
+ },
+ "componentName": "siteforce:prmBody",
+ "id": "711e306b-2592-417d-831a-472636179fe5",
+ "label": "Default",
+ "regions": [
+ {
+ "id": "cd2ea61d-578b-4275-ac18-3eb3bcd7133d",
+ "regionName": "customHeader",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "maxAutoCompleteResults": 5,
+ "searchLabel": "Search...",
+ "searchObjects": [
+ {
+ "isPublic": false,
+ "name": "Lead"
+ },
+ {
+ "isPublic": false,
+ "name": "Opportunity"
+ },
+ {
+ "isPublic": false,
+ "name": "Campaign"
+ },
+ {
+ "isPublic": false,
+ "name": "ContentDocument"
+ }
+ ]
+ },
+ "componentName": "forceCommunity:globalSearchInput",
+ "id": "8aa62845-0beb-4f33-83b8-42dbef6cd97e",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0b7f9984-948c-438f-a720-16b84d3fa138",
+ "regionName": "search",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "accountManagementLabel": "Account Management",
+ "communityBuilderLabel": "Experience Builder",
+ "communitySetupLabel": "Salesforce Setup",
+ "contactSupportLabel": "Contact Support",
+ "filterName": "MyCases",
+ "homeLabel": "Home",
+ "includeContactSupport": false,
+ "includeMessages": false,
+ "loginLabel": "Login",
+ "logoutLabel": "Logout",
+ "myAccountLabel": "My Account",
+ "showAccountManagement": true,
+ "showUserSettings": false,
+ "userSettingsLabel": "My Settings",
+ "viewProfileLabel": "My Profile"
+ },
+ "componentName": "selfService:userProfileMenu",
+ "id": "467d5832-3fbf-4f0c-9ef8-7938bc92eb8f",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "aa801fc2-3559-4e32-8e13-61c430053451",
+ "regionName": "profileMenu",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "NavigationMenuEditorRefresh": "Default_Navigation4",
+ "hideAppLauncher": true,
+ "hideHomeText": true
+ },
+ "componentName": "forceCommunity:globalNavigation",
+ "id": "cf7112d5-3ad4-4276-9647-7e6d7cba8037",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "bdcf6726-5007-42ab-8e9d-3ce8d751e309",
+ "regionName": "navBar",
+ "type": "region"
+ },
+ {
+ "id": "1f9efb2d-a25d-47a7-9529-68f578b350d1",
+ "regionName": "customRegion",
+ "type": "region"
+ },
+ {
+ "id": "d2899bfc-caae-4999-8ac3-43dadd330ca3",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "type": "view"
+ },
+ {
+ "componentAttributes": {
+ "fixedPageWidth": 1170,
+ "headerBgColor": "rgba(0, 0, 0, 0)",
+ "isHeaderPinned": false,
+ "isHeroUnderHeader": false,
+ "isPageWidthFixed": true,
+ "showHeader": true,
+ "showHero": true
+ },
+ "componentName": "siteforce:themeLayoutStarter",
+ "id": "964c1332-6afa-42a3-954d-244ecef6afb6",
+ "label": "ServiceNotAvailable",
+ "regions": [
+ {
+ "id": "1e628a8b-dbce-4b06-9819-9f5d55ebf4d7",
+ "regionName": "themeHeader",
+ "type": "region"
+ },
+ {
+ "id": "ddd8e1cd-a5c8-45ae-adf4-9dce674b2eb8",
+ "regionName": "themeFooter",
+ "type": "region"
+ }
+ ],
+ "type": "view"
+ }
+ ]
+}
diff --git a/force-app/main/default/experiences/Partner21/views/accountManagement.json b/force-app/main/default/experiences/Partner21/views/accountManagement.json
new file mode 100644
index 0000000..662020e
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/accountManagement.json
@@ -0,0 +1,153 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "73ead53d-982c-4218-84a8-b8cbe2b05939",
+ "label": "Account Management",
+ "regions": [
+ {
+ "id": "75ac8442-9b04-4609-a05e-8042dd4c3c8c",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 20px; color: #1e2443;\">Account Management</b> </h1> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "e9e11296-fe3c-4a5f-8479-ce8bf05d84f4",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "3dee618e-f330-4db7-b062-566ceab31c3d",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "8febda41-31c1-4c7f-a232-d72af9d9d82b",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "customTitle": "Members",
+ "parentRecordId": "{!CurrentUser.accountId}",
+ "relatedListName": "Users",
+ "showBreadCrumbs": "false",
+ "showCustomTitle": "true",
+ "showManualRefreshButton": "false",
+ "showRowNumbers": "false"
+ },
+ "fqn": "forceCommunity:relatedList"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Members"
+ },
+ {
+ "UUID": "340431ae-d9ab-43e9-a819-4e88af0dd59b",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "recordId": "{!CurrentUser.accountId}"
+ },
+ "fqn": "forceCommunity:accountBrandRecord"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "Branding"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "3dee618e-f330-4db7-b062-566ceab31c3d",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "Members",
+ "parentRecordId": "{!CurrentUser.accountId}",
+ "relatedListName": "Users",
+ "showBreadCrumbs": false,
+ "showCustomTitle": true,
+ "showManualRefreshButton": false,
+ "showRowNumbers": false
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "8e782b1a-94c9-474e-9f8c-d5eed815de8b",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8febda41-31c1-4c7f-a232-d72af9d9d82b",
+ "regionLabel": "Members",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!CurrentUser.accountId}"
+ },
+ "componentName": "forceCommunity:accountBrandRecord",
+ "id": "b70b8cab-ba82-44f6-8a0b-3c2357e0a4a0",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "340431ae-d9ab-43e9-a819-4e88af0dd59b",
+ "regionLabel": "Branding",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "58411304-a141-4fff-8466-d12b6d97fe55",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "94dc5f2a-03f3-41af-b034-6e7dbd42a631",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Account Management"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "4e836585-1ed3-4251-8956-86786bb266c8",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "249afd16-fd9e-491a-9a22-7973fecb8a36",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "account-management"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/cIC\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/cIC\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..868a61f
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/cIC\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,52 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "d3445d25-786e-4fb4-8d9a-9dd4fdcb902f",
+ "label": "CIC 銉偣銉�",
+ "regions": [
+ {
+ "id": "ee519ce3-035e-431b-b852-753a14d979b1",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "{!filterId}",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "{!objectName}",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "f8a925b7-5b82-48da-a031-b8028153450f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ffdd7020-bd29-4500-a19d-26b1ab110a8e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "6a08e347-3c78-4891-b591-035928adcbc3",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-500"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..4272571
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/cIC\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "bef54924-1293-4a23-a8c1-c97ddc81b694",
+ "label": "CIC 闁㈤�c儶銈广儓",
+ "regions": [
+ {
+ "id": "69e890aa-f351-4bc0-890c-47f11a325dfe",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "2c201e26-885d-41fa-980b-c3c3257b1190",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "22569f37-1aec-4b2a-b6db-2fd9e81de53e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "b7b67c9f-f344-410e-a68f-fb7568922a02",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-500"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/campaignList.json b/force-app/main/default/experiences/Partner21/views/campaignList.json
new file mode 100644
index 0000000..68d61b4
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/campaignList.json
@@ -0,0 +1,150 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "a8f90e92-695a-4455-9d74-59268e559b6f",
+ "label": "Campaign List",
+ "regions": [
+ {
+ "id": "ce731825-682f-460a-adcf-d63dd3e9d804",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "9cb80b7f-c41e-4ada-b99c-5daa8767bc67",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "e76921bf-811e-4705-9780-cbdeb84f7fd6",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "richTextValue": " <p><br/></p> <p style="text-align:left;"> Use these campaigns to generate leads and grow your business </p> "
+ },
+ "fqn": "forceCommunity:richTextInline"
+ },
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:campaignTileList"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Campaign Marketplace"
+ },
+ {
+ "UUID": "6fb107ce-204f-4a5b-aa66-1e54823626e0",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "Campaign"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "All Campaigns"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "9cb80b7f-c41e-4ada-b99c-5daa8767bc67",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <p><br/></p> <p style="text-align:left;"> Use these campaigns to generate leads and grow your business </p> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "37d2fc89-1b66-4ddc-b639-1f378680fda1",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "bodyField": "Description",
+ "categoryField": "__",
+ "dataFieldsConfig": "",
+ "highlight": "__",
+ "highlightColor": "#007DB8",
+ "listLabel": "",
+ "listViewName": "GIRctiveCampaignsR",
+ "showImage": true,
+ "sortBy": "Num__c",
+ "sortOrder": "Ascending",
+ "titleField": "Name"
+ },
+ "componentName": "forceCommunity:campaignTileList",
+ "id": "0fc28447-8e4a-4497-a6f9-8a675c02fa1b",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e76921bf-811e-4705-9780-cbdeb84f7fd6",
+ "regionLabel": "Campaign Marketplace",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "Campaign",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "35151a2f-b5cb-4df5-a822-f57b70823ab3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6fb107ce-204f-4a5b-aa66-1e54823626e0",
+ "regionLabel": "All Campaigns",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1496147b-f700-4aac-8d23-2b5753367987",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "1f8988cb-ce2b-4042-b3c9-23bb8cca7de8",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-701"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/caseDetail.json b/force-app/main/default/experiences/Partner21/views/caseDetail.json
new file mode 100644
index 0000000..63780fa
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/caseDetail.json
@@ -0,0 +1,76 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "31166d77-4e5c-4bb8-9256-d2ab6ac88944",
+ "label": "Case Detail",
+ "regions": [
+ {
+ "id": "f4ea7f26-8780-4827-81e0-276ab1bf71ae",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "6e9dd3cc-f9ef-4bf6-9558-a48e1251b915",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "f28ca3a2-1a35-4fd5-9f39-a573ebb0bc22",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c0943f43-9565-410e-a804-ae56600c4715",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "083009eb-5078-400f-8e91-47eec449125f",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "62d4e06a-96b5-4fd3-bb06-06d430b102fb",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a3e0bc10-2e00-4d45-bdc4-f28669bc4874",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-500"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/checkPassword.json b/force-app/main/default/experiences/Partner21/views/checkPassword.json
new file mode 100644
index 0000000..e7411ff
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/checkPassword.json
@@ -0,0 +1,67 @@
+{
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "93eba445-abcb-402d-807a-17793aede814",
+ "label": "Check Password",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><span style=\"font-size:22px\">NOW, CHECK YOUR EMAIL</span></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "35058217-b6a5-4217-8a59-2c11a2925c76",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\">Check the email account associated with your user name for instructions on resetting your password. Remember to look in your spam folder, where automated messages sometimes filter. If you still can't log in, contact your administrator.</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "04b07c60-f55b-4727-a4f0-39b0d497425b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><a class=\"inverseTextColor\" href=\"./\">Back to login</a></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "30f22127-2521-4799-a201-e59573456a4f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "454da39d-f19a-4f9f-ba16-db2e6804e95e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Check Password"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "3ecbc87a-69b0-4542-9710-72336d4e71ff",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "56694f02-935a-4f10-bcc8-b0878436d140",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "check-password"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/contactSupport.json b/force-app/main/default/experiences/Partner21/views/contactSupport.json
new file mode 100644
index 0000000..940d7ad
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/contactSupport.json
@@ -0,0 +1,106 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsTwoCol66Layout",
+ "dataProviders": [],
+ "id": "5960b934-e0b0-4c75-a297-71843d6b25d1",
+ "label": "Contact Support",
+ "regions": [
+ {
+ "id": "b8447668-18e2-4318-8ea4-53c960c1555c",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "allowAttachments": true,
+ "attachmentLabel": "Upload File",
+ "buttonAlignment": "center",
+ "buttonBgColor": "",
+ "buttonBgHoverColor": "",
+ "buttonBorderColor": "",
+ "buttonMaxWidth": "",
+ "buttonRadius": 0,
+ "buttonTextColor": "",
+ "buttonTextHoverColor": "",
+ "callToAction": false,
+ "callToActionButtonText": "",
+ "callToActionText": "",
+ "callToActionUrl": "",
+ "confirmationSubtext": "We鈥檒l get back to you soon.",
+ "confirmationText": "Your case was created.",
+ "guestQuickActionName": "閫夋嫨鎴栭厤缃叏灞�鎿嶄綔",
+ "headerSubtitle": "Tell us how we can help.",
+ "headerTitle": "Contact Customer Support",
+ "isMicrobatch": false,
+ "quickActionName": "",
+ "requestSummaryText": "Case summary"
+ },
+ "componentName": "forceCommunity:contactSupportForm",
+ "id": "07161c69-c942-4786-8014-4f067a980af0",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e638cb6e-2768-44b5-9aeb-0c33bf5cccf7",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "askConfirmationQuestion": true,
+ "confirmationMessageLabel": "Got it!",
+ "deflectionSubtitle": "Find what you need here.",
+ "deflectionTitle": "Need Answers Fast?",
+ "firstQuestion": "Did this content solve your issue?",
+ "maxResults": 6,
+ "measureDeflection": true,
+ "redirectUrl": "",
+ "secondQuestion": "Stop creating your case?",
+ "showArticles": true,
+ "showDiscussions": false,
+ "topicId": ""
+ },
+ "componentName": "forceCommunity:caseDeflection",
+ "id": "7cb514f6-3bbb-45a0-bbc2-b5831a132eea",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "59e82318-c671-4884-9afd-1c0b8ea99917",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "44dd6477-9295-4ca9-ae6c-0a19f6f0a350",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Contact Support"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "34d4ebf8-e237-4d15-a47f-d98f29ce14be",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "51b5abdd-0959-4bfa-9720-66cc9f5eec38",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "contactsupport"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/createRecord.json b/force-app/main/default/experiences/Partner21/views/createRecord.json
new file mode 100644
index 0000000..b5fa579
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/createRecord.json
@@ -0,0 +1,40 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "a7dcd30a-fcf7-436e-9319-602f77df9596",
+ "label": "Create Record",
+ "regions": [
+ {
+ "id": "d202a124-8b33-4d13-ad05-fd133edbed9a",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "actionApiName": "{!actionApiName}",
+ "isMicrobatch": false
+ },
+ "componentName": "forceCommunity:createRecordForm",
+ "id": "4fb084b2-392a-4bfe-98bd-9e5b8f83f407",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a210a8ec-0bd9-48e4-90b1-395f0d962bed",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "1971ca17-d6d0-4152-a036-4ed33412c132",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "createrecord"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/dashboardDetail.json b/force-app/main/default/experiences/Partner21/views/dashboardDetail.json
new file mode 100644
index 0000000..1072436
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/dashboardDetail.json
@@ -0,0 +1,58 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "b3170d2d-dc66-4e6d-a921-7278926fbf83",
+ "label": "Dashboard Detail",
+ "regions": [
+ {
+ "id": "c02a9a61-e5d2-4e9b-a37e-36ce93392187",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "height": "1065",
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:dashboard",
+ "id": "370e8627-0dfd-499b-9f72-f2d59132e028",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9eba1fe5-b997-4ed0-8f03-323318093860",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "5e60c2d4-1848-4006-b1e3-d93c35864c4c",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "66344302-5db9-4851-8252-cb85076a22c4",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a9511d76-385c-4065-938c-eb74f56334c6",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-01Z"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/dashboardList.json b/force-app/main/default/experiences/Partner21/views/dashboardList.json
new file mode 100644
index 0000000..509b939
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/dashboardList.json
@@ -0,0 +1,37 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "ce1cde06-6dcb-4da1-a5c9-7b2b099ddebb",
+ "label": "Dashboard List",
+ "regions": [
+ {
+ "id": "5283c75e-fb23-48aa-8a8e-3f52597821b3",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:dashboardList",
+ "id": "8e2ffa33-9821-4cf4-a83f-9fb10cdb4c38",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "641a8fff-3d0f-41f6-853b-a4b3c3c945b5",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "1e88f5b9-c7a6-44b1-a7e0-f6acd2dd30d0",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-01Z"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/error.json b/force-app/main/default/experiences/Partner21/views/error.json
new file mode 100644
index 0000000..4259b20
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/error.json
@@ -0,0 +1,57 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "a4b25394-ceb2-44ff-b562-067f8854d1c1",
+ "label": "Error",
+ "regions": [
+ {
+ "id": "3cbd1395-a841-42ab-adfa-eadb431e48d5",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <div class='slds-grid slds-grid--vertical slds-align--absolute-center slds-container--large'> <div class='slds-align-middle slds-m-bottom--xx-large slds-m-top--xx-large' alt='Page not available'> <img src='/sfsites/c/img/community/slds/messaging/illustration-page-not-found.png' class='slds-p-horizontal--large'/> </div> <h4 class='slds-text-align--center slds-text-heading--large slds-text-color--weak slds-m-bottom--small'>Page not available</h4> <p class='slds-text-align--center slds-text-heading--medium slds-text-color--weak'>Maybe the page was deleted, the URL is incorrect, or something else went wrong. If you know the page exists but you still can鈥檛 get to it, please ask the community administrator for help.</p> </div>"
+ },
+ "componentName": "forceCommunity:htmlBlock",
+ "id": "f05a8ea1-d0db-4a33-8a23-caa6b1f2883f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "db25733f-c49d-46fa-a8a8-23cf269c71a4",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "deff90c2-9ddc-4806-a9e6-c71da2bdd37e",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Error"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "65756ca3-26b8-41ba-84cf-24a2f7d0a6d5",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ffb391ca-2e13-4380-8be9-58de94ae5cfe",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "error"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/feedDetail.json b/force-app/main/default/experiences/Partner21/views/feedDetail.json
new file mode 100644
index 0000000..7b2bdbd
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/feedDetail.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "c7ee8d3e-fb1b-4f58-8292-3ad0cc4824f9",
+ "label": "Feed Detail",
+ "regions": [
+ {
+ "id": "74c42e50-e42f-4346-9860-b8af7c69da3c",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}"
+ },
+ "componentName": "forceCommunity:feedItemDetail",
+ "id": "7227390c-acad-4d43-b9a3-ffa23063c2d5",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "87eb773e-465a-48c1-9414-21797f36e225",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "6b730d6e-03c4-4e6b-ad47-627110fa35a9",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "feeditem-generic"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/fileDetail.json b/force-app/main/default/experiences/Partner21/views/fileDetail.json
new file mode 100644
index 0000000..e628819
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/fileDetail.json
@@ -0,0 +1,37 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "5a4b2af7-b7b8-45c6-abc7-bf66bb847a7d",
+ "label": "File Detail",
+ "regions": [
+ {
+ "id": "9a0638a5-4e97-4c4a-9d92-bd2604d736e4",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:fileDetailPage",
+ "id": "7878932a-d262-47b9-b7fc-a49328cd4782",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "18539e1b-1a94-4a4c-80d1-7b99f87b04a9",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "9c377a34-ec71-4128-801d-ec5038ddd330",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-069"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/fileList.json b/force-app/main/default/experiences/Partner21/views/fileList.json
new file mode 100644
index 0000000..5f77d87
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/fileList.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "2df51d40-f4c7-4917-b90b-e435c1d6a14e",
+ "label": "File List",
+ "regions": [
+ {
+ "id": "9a7ed8e0-c201-4b86-b139-c238d2a4cc75",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "pageSize": 25
+ },
+ "componentName": "forceCommunity:filesList",
+ "id": "70949d4f-857d-45fc-acf2-8d7786af98f0",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d332e2f8-2b07-4dac-b6e5-38d0882b44a2",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "234e65c9-b500-461e-aa23-c1997d7b318d",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-069"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/flow.json b/force-app/main/default/experiences/Partner21/views/flow.json
new file mode 100644
index 0000000..472f641
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/flow.json
@@ -0,0 +1,40 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "87c1c576-6744-474b-9e97-f16fc38fe2bb",
+ "label": "Flow",
+ "regions": [
+ {
+ "id": "1f2335d9-cba5-45fd-b3e8-9a8187399562",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "flowArguments": "",
+ "flowName": "{!flowName}"
+ },
+ "componentName": "forceCommunity:flowCommunity",
+ "id": "a216c407-67a7-4b5a-9937-ac1721b1f20c",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8acdc309-e025-4b75-8d16-5ca5f325c999",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "f65c79b7-acf1-4079-ab20-34a867030d1d",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "flow"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/forgotPassword.json b/force-app/main/default/experiences/Partner21/views/forgotPassword.json
new file mode 100644
index 0000000..96106f5
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/forgotPassword.json
@@ -0,0 +1,79 @@
+{
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "c97e5e6e-dc54-450d-9151-4a62fb2e007c",
+ "label": "Forgot Password",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><span style=\"font-size:22px\">PASSWORD RESET</span></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "c7e9f665-2bc7-4885-9e57-ee41297aaa08",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\">To reset your password, we'll need your username.<br/> We'll send password reset instructions to the email address associated with your account.</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "740594ef-8f7d-4526-889b-95c5eae3878f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "checkEmailUrl": "./CheckPasswordResetEmail",
+ "submitButtonLabel": "Reset Password",
+ "usernameLabel": "Username"
+ },
+ "componentName": "salesforceIdentity:forgotPassword2",
+ "id": "660945ed-e9e9-4837-a7c5-b0eb43cce015",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><a href=\"./\">Cancel</a></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "0da32bb8-8779-47df-8a31-073e72e4d2c2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "64149aeb-d880-4aee-9d7c-60fe9bf31da7",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Forgot Password"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "2218d58a-55f3-442f-a853-d3ce487d6778",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a70b8473-0be4-491a-9641-682f8385b06d",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "forgot-password"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/groupDetail.json b/force-app/main/default/experiences/Partner21/views/groupDetail.json
new file mode 100644
index 0000000..cf32e0a
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/groupDetail.json
@@ -0,0 +1,62 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "1e79f9ca-bc4c-4e37-b6b7-6abfebba388a",
+ "label": "Group Detail",
+ "regions": [
+ {
+ "id": "2fe19c1a-2175-4b0b-8c88-c468e2be441a",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "engagementManagersOnly": false,
+ "engagementTabLabel": "Engagement",
+ "feedTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related"
+ },
+ "componentName": "forceCommunity:groupRecordHomeTabs",
+ "id": "3b3ec743-0058-4bb9-a3cf-29ebd0e7c5af",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "1291e169-c14a-4e48-85d8-d9f82171678a",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "1246c9d4-1754-4da8-9875-43e97b8c6685",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "f375aef4-adf5-4911-b401-899e30f537b9",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "88e04853-22cd-4f58-b569-afb6cae8306b",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-0F9"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/groupList.json b/force-app/main/default/experiences/Partner21/views/groupList.json
new file mode 100644
index 0000000..1c953a9
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/groupList.json
@@ -0,0 +1,47 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "11907c7a-7b32-438d-94d9-27f526ea69a6",
+ "label": "Group List",
+ "regions": [
+ {
+ "id": "d774836f-f3d8-4f08-999a-87b023da8d27",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <h1 style=\"text-align: center;\"> <b style=\"font-size: 20px; color: #1e2443;\">Group List</b> </h1> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "ba81def9-06cc-401b-803f-e37ee08843b8",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:groupObjectHome",
+ "id": "4063017f-3d86-4aa5-b10e-810e80a1bce0",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "18da3d47-b5e4-4aac-a7c9-4e2f5bd4a9bf",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "40f307e7-117a-445d-95b8-620204961526",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-0F9"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/home.json b/force-app/main/default/experiences/Partner21/views/home.json
new file mode 100644
index 0000000..9730b42
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/home.json
@@ -0,0 +1,154 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "4fa3fa38-4d0f-4247-9f1d-cccfa436763a",
+ "label": "Home",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<h1 style=\"text-align: center;\"><strong style=\"font-size: 28px; color: rgb(30, 36, 67);\"> </strong><strong style=\"font-size: 28px;\">娆㈣繋浣跨敤缁忛攢鍟嗘椿鍔ㄧ鐞嗙郴缁�!</strong></h1>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "288056b9-19a8-4fb0-bb2d-e9df4a1e8323",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c4aa6478-aeb4-401e-9856-a7c5ad49939a",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "a34ef4d7-956e-4ff6-b57f-449ab0c365bd",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "e9161519-4cfb-450d-8b6c-6fb901731928",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:dashboard"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Business Summary"
+ },
+ {
+ "UUID": "035ed89e-2b2c-4e99-8b59-aa494eb293b2",
+ "allowGuestUser": true,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "type": "Home"
+ },
+ "fqn": "forceCommunity:forceCommunityFeed"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "News & Updates"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "a34ef4d7-956e-4ff6-b57f-449ab0c365bd",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "height": "485",
+ "recordId": "01Z0l000000cnvqEAA"
+ },
+ "componentName": "forceCommunity:dashboard",
+ "id": "98e3f33b-6cf4-4f81-8b68-c22aeb01eebe",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e9161519-4cfb-450d-8b6c-6fb901731928",
+ "regionLabel": "Business Summary",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "canChangeSorting": true,
+ "defaultFilter": "",
+ "defaultSortOrderHomeFeed": "Relevance",
+ "defaultSortOrderTopicsFeed": "Relevance",
+ "feedDesign": "DEFAULT",
+ "hasFeedSearch": true,
+ "subjectId": "{!recordId}",
+ "type": "Home"
+ },
+ "componentName": "forceCommunity:forceCommunityFeed",
+ "id": "1e21094c-03b0-4931-a80b-7c51a83f38e6",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "035ed89e-2b2c-4e99-8b59-aa494eb293b2",
+ "regionLabel": "News & Updates",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0cb3aa2c-48ff-4713-adcd-dad0bd193235",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "b0ba4f16-e9b8-4f48-a2f5-b3d8d8c13b6c",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "560deca7-2f6e-47c8-986f-24a589bf37b7",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Home"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "cf12da6d-789e-4cbc-b87c-f9ae4a989108",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "dbdbdf01-b5fa-4f34-8a22-8afddbf3259e",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "home"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/login.json b/force-app/main/default/experiences/Partner21/views/login.json
new file mode 100644
index 0000000..fbccdfb
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/login.json
@@ -0,0 +1,84 @@
+{
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "6a024f98-3cde-4f9a-8648-4fd1e841d503",
+ "label": "Login",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:communityLogo2",
+ "id": "ce8477f0-e84e-4eb9-8b02-8ed6d0709a34",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "forgotPasswordLabel": "Forgot your password?",
+ "forgotPasswordUrl": "/ForgotPassword",
+ "loginButtonLabel": "Log in",
+ "passwordLabel": "Password",
+ "selfRegisterLabel": "Not a member?",
+ "selfRegisterUrl": "/SelfRegister",
+ "startUrl": "",
+ "usernameLabel": "Username"
+ },
+ "componentName": "salesforceIdentity:loginForm2",
+ "id": "d269f601-257c-4b88-8d58-256a92812a38",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "headerText": "",
+ "showHeader": false,
+ "useCommunityDomainSso": true
+ },
+ "componentName": "salesforceIdentity:socialLogin2",
+ "id": "cf4b2470-b283-4b7c-b875-2e70f19ce5ca",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "employeeLoginLinkLabel": "Are you an employee? Login here"
+ },
+ "componentName": "salesforceIdentity:employeeLoginLink2",
+ "id": "b9c2749e-a28a-491a-be9a-df56094300ac",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "054db53d-e77e-4e69-aee6-66bdde6ec710",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Login"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "da3bc35f-f5d2-4e0a-bcf0-a3f4be052490",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "55f912a8-0264-489a-bd74-539ef9871ee5",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "login-home"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/loginError.json b/force-app/main/default/experiences/Partner21/views/loginError.json
new file mode 100644
index 0000000..a9aa14e
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/loginError.json
@@ -0,0 +1,57 @@
+{
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "8da2d7f7-7500-4481-bad7-50d7a131e76e",
+ "label": "Login Error",
+ "regions": [
+ {
+ "id": "29d8bf7c-d422-4253-93dd-16ac79546c13",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\">Invalid Page</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "450c9df4-e9f4-48f7-a385-ac894a17f894",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a7281af4-4c09-48f9-b328-9533ce31b4cd",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "a56edf13-cfa2-48f5-99c0-521dd988f725",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Login Error"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "7ad0d3ca-be5c-4673-b43e-11f0fc64262c",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4ae424a0-6f66-42f3-a4f8-9cff47aaea03",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "login-error"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/mDFAndCoop.json b/force-app/main/default/experiences/Partner21/views/mDFAndCoop.json
new file mode 100644
index 0000000..26d8ade
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/mDFAndCoop.json
@@ -0,0 +1,198 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "9c5c1b27-82e3-433b-b987-a98a033bc129",
+ "label": "MDF and Coop",
+ "regions": [
+ {
+ "id": "22eab438-7ab1-4299-ac6c-fee72ede8c1c",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": " <p> <span style=\"font-size: 20px;\">Request and Manage your Market Developments Funds.</span> </p> "
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "9493ebd0-ea77-42b6-8f24-da125b9eef12",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "a9ddb8db-0684-4f81-ad1a-6662a32fa82d",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "e2e89f1f-8abe-4a31-8384-90e2a1705565",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "PartnerFundAllocation"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Fund Allocations"
+ },
+ {
+ "UUID": "0f085c4f-0556-4f6a-8981-3217c3482d3e",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "PartnerFundRequest"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "Fund Requests"
+ },
+ {
+ "UUID": "0a39422c-e5a2-45bb-8196-928371de4201",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {
+ "filterName": "Recent",
+ "scope": "PartnerFundClaim"
+ },
+ "fqn": "forceCommunity:objectHome"
+ }
+ ],
+ "tabKey": "tab3",
+ "tabName": "Fund Claims"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "a9ddb8db-0684-4f81-ad1a-6662a32fa82d",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "PartnerFundAllocation",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "21fd9df3-bf9a-49e7-87e1-98101d6ca8d9",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e2e89f1f-8abe-4a31-8384-90e2a1705565",
+ "regionLabel": "Fund Allocations",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "PartnerFundRequest",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "5f04b67e-f8de-4245-8e48-a047c0a8dec4",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0f085c4f-0556-4f6a-8981-3217c3482d3e",
+ "regionLabel": "Fund Requests",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "Recent",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "PartnerFundClaim",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "17db70a4-f069-4c5c-b08f-d67682a5b0f0",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0a39422c-e5a2-45bb-8196-928371de4201",
+ "regionLabel": "Fund Claims",
+ "regionName": "tab3",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a6998ef8-c9a9-4b1a-ae37-9ed3f36c020b",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "54f5aad8-1ca3-4c7b-9356-fdad28728846",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "mdf"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/messages.json b/force-app/main/default/experiences/Partner21/views/messages.json
new file mode 100644
index 0000000..94eb9ca
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/messages.json
@@ -0,0 +1,27 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "295d4564-bf29-48ed-b213-e39c211fcca0",
+ "label": "Messages",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceChatter:messages",
+ "id": "a9f9bdee-a7a4-43f6-8bf2-da860b5480ce",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "55d4a79e-8c2a-4733-91f2-23fdf1c26d5a",
+ "regionName": "content",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "messages"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/myAccount.json b/force-app/main/default/experiences/Partner21/views/myAccount.json
new file mode 100644
index 0000000..9ce510c
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/myAccount.json
@@ -0,0 +1,109 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "4f2502be-3471-4328-98e2-65da8b475fba",
+ "label": "My Account",
+ "regions": [
+ {
+ "id": "0fe567d7-b175-4553-afce-2d94a89ec8f4",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "cd2c0881-a4ee-4c92-9f52-0b8a22f662be",
+ "columns": [
+ {
+ "UUID": "2e7c4da1-56f3-4cc6-9c2e-f7240b790aba",
+ "columnKey": "col1",
+ "columnName": "column 1",
+ "columnWidth": "12",
+ "seedComponents": [
+ {
+ "attributes": {
+ "recordId": "{!CurrentUser.accountId}",
+ "sfdc:identifier": "forceCommunity_recordHeadline"
+ },
+ "fqn": "forceCommunity:recordHeadline"
+ },
+ {
+ "attributes": {
+ "recordId": "{!CurrentUser.accountId}",
+ "sfdc:identifier": "forceCommunity_recordHomeTabs"
+ },
+ "fqn": "forceCommunity:recordHomeTabs"
+ }
+ ]
+ }
+ ]
+ },
+ "sectionHeight": 32
+ },
+ "componentName": "forceCommunity:section",
+ "id": "cd2c0881-a4ee-4c92-9f52-0b8a22f662be",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!CurrentUser.accountId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "a910e746-8430-45b7-931b-2c4556ba0db6",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!CurrentUser.accountId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "d85c38c5-4616-4da6-add9-8a4132ac5487",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2e7c4da1-56f3-4cc6-9c2e-f7240b790aba",
+ "regionLabel": "column 1",
+ "regionName": "col1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a73bd5f9-9299-4e4b-baa2-91a26491da54",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "b6019a7e-b6e8-4f11-a85c-d4750475412a",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "my-account"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/questionDetail.json b/force-app/main/default/experiences/Partner21/views/questionDetail.json
new file mode 100644
index 0000000..5230674
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/questionDetail.json
@@ -0,0 +1,105 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "bf327277-7072-4df9-90f8-29eb8b39b81d",
+ "label": "Question Detail",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "bannerText": "",
+ "bannerTextWithKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineArticles\">articles</a> and <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "bannerTextWithoutKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "pageType": "discussion",
+ "showSubTopics": true,
+ "title": "Welcome!",
+ "uniqueNameOrId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:headline",
+ "id": "c8d9e6e5-a051-4f50-94c1-98333a43a31f",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c46c7932-f4de-4c91-b58b-0d438dba639a",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!feedItemId}"
+ },
+ "componentName": "forceCommunity:feedItemDetail",
+ "id": "4aac820e-b53d-400b-8a7b-8b5a1e37041b",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f473131c-c009-462d-a060-6fa815149ba4",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "numberOfItems": 5,
+ "showViewCounts": true,
+ "title": "Related Questions"
+ },
+ "componentName": "selfService:similarQuestions",
+ "id": "a31402bb-54bf-4a3b-83f3-23d8308fd42d",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "channel": "DefaultChannel",
+ "title": ""
+ },
+ "componentName": "forceCommunity:recommendations",
+ "id": "8df82e16-36ef-470d-ab80-73ab659b7c73",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ad034153-7b0c-43e0-8090-fff41d40ef45",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "6f1fd1de-3690-4bb6-a2b7-6a76383fd50d",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record.Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "2a9d983a-61ca-475c-ab47-749bf7748ed3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5cbd3199-4447-44d3-879d-f1fac50f2061",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "feeditem"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/quipDocsRelatedList.json b/force-app/main/default/experiences/Partner21/views/quipDocsRelatedList.json
new file mode 100644
index 0000000..568a0c2
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/quipDocsRelatedList.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "7bb87352-7c83-46dd-ad49-c8f579c0b0fc",
+ "label": "Quip Docs Related List",
+ "regions": [
+ {
+ "id": "55793fa4-7b5e-4eaa-a2ce-c428ef597558",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "parentRecordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:relatedQuipItemsView",
+ "id": "90a9799d-3277-41f1-9bc5-b7389629c819",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4a5e58cc-e61e-4cd2-92f8-66c460dc2f48",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "3f6284b0-a596-4a22-8885-e333c796f8af",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "extrelated-quip"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/recordDetail.json b/force-app/main/default/experiences/Partner21/views/recordDetail.json
new file mode 100644
index 0000000..cbd42c3
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/recordDetail.json
@@ -0,0 +1,76 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "07b95556-b1a0-4d51-9ad9-912c6af1d763",
+ "label": "Record Detail",
+ "regions": [
+ {
+ "id": "72339ad9-dfee-49fe-b534-519b18c7310d",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "2e77392d-9422-4485-9d55-ea22481d78a5",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "8bad7644-5723-4956-8cbe-8bd495a2ef45",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8f6e6e19-e3b0-46e4-b23b-372b0adeec99",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "5db2ad5a-27b4-41ef-ae44-aa582593ca10",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "f569e083-cf8e-44d6-b047-b790d05c6145",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8806f9a9-2338-4950-8de9-d786d2e22964",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/recordList.json b/force-app/main/default/experiences/Partner21/views/recordList.json
new file mode 100644
index 0000000..e301db8
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/recordList.json
@@ -0,0 +1,52 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "c0dfcf8e-1f28-474c-ba52-6824250808ec",
+ "label": "Record List",
+ "regions": [
+ {
+ "id": "2bcbaeca-5c24-4210-8443-88287387e5be",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "{!filterId}",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "{!objectName}",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "6a070319-37ad-44aa-808f-872c9d7cc87e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e1b2d184-2ddf-4ff8-8faa-2b54770bbb6a",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "8a05bc0a-f2c6-486c-90d2-9d08f1156c3c",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/register.json b/force-app/main/default/experiences/Partner21/views/register.json
new file mode 100644
index 0000000..ec52b66
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/register.json
@@ -0,0 +1,96 @@
+{
+ "appPageId": "09f21e7f-6d13-45df-8d2b-8ce500666282",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "43c8d59e-3839-4334-aedf-f3d9c6af1843",
+ "label": "Register",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:communityLogo2",
+ "id": "5840f93b-f456-4f9a-a418-5328d5922414",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\" class=\"inverseTextColor\">Join the community to receive personalized information and customer support.</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "4c34c064-7887-40fc-8a19-ec923ac6fd11",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "confirmPasswordLabel": "Confirm Password",
+ "emailLabel": "Email",
+ "extraFieldsFieldSet": "",
+ "firstnameLabel": "First Name",
+ "includePasswordField": false,
+ "lastnameLabel": "Last Name",
+ "passwordLabel": "Create Password",
+ "regConfirmUrl": "./CheckPasswordResetEmail",
+ "startUrl": "",
+ "submitButtonLabel": "Sign Up"
+ },
+ "componentName": "salesforceIdentity:selfRegister2",
+ "id": "5bf68b22-7355-4473-b13b-9f5b7f94a2f2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "headerText": "",
+ "showHeader": false,
+ "useCommunityDomainSso": true
+ },
+ "componentName": "salesforceIdentity:socialLogin2",
+ "id": "a19a57ce-fb79-4eb0-bf1e-cd86aa621868",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><a class=\"inverseTextColor\" href=\"./\">Already have an account?</a></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "bb085018-4cde-4194-8e9d-d2c068caadb0",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "b4515202-c99f-4306-8032-858053a2d6a9",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Register"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "6e3d7e82-b19d-46c5-8fca-15520def526a",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "63252ef9-373a-4f5c-a88e-c6bc6fd6ec54",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "self-register"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/relatedRecordList.json b/force-app/main/default/experiences/Partner21/views/relatedRecordList.json
new file mode 100644
index 0000000..fd10506
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/relatedRecordList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "525210ce-dc91-4637-8aad-dcc79ef5149c",
+ "label": "Related Record List",
+ "regions": [
+ {
+ "id": "5a53a775-b74c-4e17-bca1-b061b60e308b",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "9ad1b96d-f251-4106-8ceb-f1b9b9cb0dd7",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ef9a601d-1369-4e0c-a009-cfb6e154f9e8",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "7e4c936c-7f00-43bd-8322-1ad8d9be67d8",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/reportBuilder.json b/force-app/main/default/experiences/Partner21/views/reportBuilder.json
new file mode 100644
index 0000000..1e698b6
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/reportBuilder.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "24910809-77c3-4ea5-80c3-ea0db9afb5de",
+ "label": "Report Builder",
+ "regions": [
+ {
+ "id": "67b18538-f6bd-4e84-b005-708c3991ecd9",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:reportBuilder",
+ "id": "5a95a1f6-75fd-4a04-bae7-4c1019d493d3",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5a6f8fb5-51a6-480b-9b51-4dc4f646a411",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "57f4b3bd-db01-49f3-a62b-123d79d3584b",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "createreport"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/reportDetail.json b/force-app/main/default/experiences/Partner21/views/reportDetail.json
new file mode 100644
index 0000000..235a6f6
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/reportDetail.json
@@ -0,0 +1,57 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "621a5818-46f1-42c5-9717-fc999ba75df9",
+ "label": "Report Detail",
+ "regions": [
+ {
+ "id": "4048f525-5fc3-4dd9-a234-3853fe169b0c",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:reportPage",
+ "id": "67dbea3c-73b0-4382-943b-08248f6d0127",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "99090621-29d5-4fc2-afe6-57de0bb39023",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "9bd724e2-186d-4d7c-b9c8-e78c6fd7e452",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "04b2d6c8-0085-4a12-909a-ff3398dc58f1",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "44bd4200-450a-429e-b8d3-437a05904edd",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-00O"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/reportList.json b/force-app/main/default/experiences/Partner21/views/reportList.json
new file mode 100644
index 0000000..ef04107
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/reportList.json
@@ -0,0 +1,37 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "94db8a50-134d-4517-bddc-eb54dc151c59",
+ "label": "Report List",
+ "regions": [
+ {
+ "id": "c406784e-b601-4d8e-9fae-4fe0ac9e04d6",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:reportList",
+ "id": "4c16ed1f-3c77-4bcf-a219-c6a95becc119",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d8ef9cf3-9ba4-4a89-8b6b-b2b53986d859",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "26e60002-bbc5-4040-add7-189dd1bdf534",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-00O"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/resources.json b/force-app/main/default/experiences/Partner21/views/resources.json
new file mode 100644
index 0000000..7d5cbdb
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/resources.json
@@ -0,0 +1,75 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "fe6b6a28-688d-44ad-921f-8ad8124e9a5d",
+ "label": "Resources",
+ "regions": [
+ {
+ "id": "bf1b04ec-3a24-4aaa-ad19-9dd086392fd5",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "librariesHeaderLabel": "Libraries",
+ "showWorkspaceImage": true
+ },
+ "componentName": "forceCommunity:workspacesList",
+ "id": "4be79487-0c69-4824-8d63-f209b4836e56",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "7f053486-a341-4c1b-b235-305ed271d840",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "title": "Popular Now"
+ },
+ "componentName": "forceChatter:recommendationsBig",
+ "id": "7347ee86-1a7c-46d9-8b28-6ff45898a22e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "efea1d40-d248-4efc-8179-203496bc3d69",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "159d628c-4403-410f-9cdc-6508d3e2c6d5",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Resources"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "35d3f15e-df06-4cbb-bf3c-7fb747fe299e",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "78bb1d06-c3ad-4f3f-ba7e-2e2c4966bf8d",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "files"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/search.json b/force-app/main/default/experiences/Partner21/views/search.json
new file mode 100644
index 0000000..3fb5d0f
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/search.json
@@ -0,0 +1,59 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "858b90d6-5f26-4a9a-9080-746e17a9f4b5",
+ "label": "Search",
+ "regions": [
+ {
+ "id": "cc3fe408-8424-4fe4-b5ce-b62de9e02304",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "scopes": [
+ {
+ "isPublic": false,
+ "name": "Lead"
+ },
+ {
+ "isPublic": false,
+ "name": "Opportunity"
+ },
+ {
+ "isPublic": false,
+ "name": "Campaign"
+ },
+ {
+ "isPublic": false,
+ "name": "ContentDocument"
+ }
+ ],
+ "searchResultFiltering": true,
+ "searchTerm": "{!term}",
+ "showTopResults": true
+ },
+ "componentName": "forceCommunity:search",
+ "id": "1d5f2162-3e97-4eba-b903-48faf3a018a4",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e4a5dd5f-cc4b-43ed-899a-6eb3047bad5b",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "b8b7709d-2499-423f-8e63-bd9fb751eb9c",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "global-search"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/streamDetail.json b/force-app/main/default/experiences/Partner21/views/streamDetail.json
new file mode 100644
index 0000000..f57e5e2
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/streamDetail.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "ef1f7586-66a3-4110-80c5-073271e404e6",
+ "label": "Stream Detail",
+ "regions": [
+ {
+ "id": "f353ef03-36eb-46ec-8196-b129dddbb831",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}"
+ },
+ "componentName": "forceCommunity:streamDetail",
+ "id": "8ec65dea-cd4b-43b5-a8e6-c84413f63f90",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "14979ca8-0d1c-4131-895f-29e70212f0cd",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "1c29f9a5-9660-4fe9-9c8c-6e022d997da5",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-0Fq"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/streamList.json b/force-app/main/default/experiences/Partner21/views/streamList.json
new file mode 100644
index 0000000..4007aba
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/streamList.json
@@ -0,0 +1,27 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "ee631fe0-502b-4dfe-ac53-311079fadd89",
+ "label": "Stream List",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:streamList",
+ "id": "e21ff5bc-f92a-41c9-8bd9-aa545a23cfba",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "a70d6be4-9460-4e60-888f-2c51815b9757",
+ "regionName": "content",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-0Fq"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/topicCatalog.json b/force-app/main/default/experiences/Partner21/views/topicCatalog.json
new file mode 100644
index 0000000..ef05368
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/topicCatalog.json
@@ -0,0 +1,73 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "d006b952-023c-4964-88f1-151e2b013a67",
+ "label": "Topic Catalog",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "bannerText": "",
+ "bannerTextWithKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineArticles\">articles</a> and <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "bannerTextWithoutKnowledge": "Explore other <a href=\"javascript:void(0)\" class=\"headlineDiscussions\">discussions</a> on this topic.",
+ "pageType": "",
+ "showSubTopics": true,
+ "title": "Topics",
+ "uniqueNameOrId": ""
+ },
+ "componentName": "forceCommunity:headline",
+ "id": "694c1f11-7883-4699-94b0-17aae867fa13",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "05a42db9-02d2-43a4-80b8-45823466685e",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "forceCommunity:topicCatalog",
+ "id": "3a9ffb91-cabf-45ae-9e71-7cf76584fff9",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5fe00fbc-2281-469e-8c6e-2dd8468a1819",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "623b964f-9cd6-4513-982e-f6f196b3db38",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Topic Catalog"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "04697b2f-0118-4bcd-9940-9fd1bad9ef33",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9e7ee946-0fc4-4c52-9fbd-0a9d04271b65",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "topic-catalog"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/topicDetail.json b/force-app/main/default/experiences/Partner21/views/topicDetail.json
new file mode 100644
index 0000000..4b3ee67
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/topicDetail.json
@@ -0,0 +1,93 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsTwoCol84Layout",
+ "dataProviders": [],
+ "id": "38e59688-3353-4124-b571-862a162dff11",
+ "label": "Topic Detail",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "d6b687e5-f1a9-46f2-9bc3-78b95e261dfe",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c9480151-e5e7-4ded-a13c-f7c0204338ba",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "canChangeSorting": false,
+ "defaultFilter": "",
+ "defaultSortOrderHomeFeed": "Relevance",
+ "defaultSortOrderTopicsFeed": "Relevance",
+ "feedDesign": "DEFAULT",
+ "hasFeedSearch": false,
+ "subjectId": "{!recordId}",
+ "type": "Topics"
+ },
+ "componentName": "forceCommunity:forceCommunityFeed",
+ "id": "5dd762d8-9d22-40de-b4bb-191391220741",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "90ff1fce-9ccb-41ad-8757-1470c2db974f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordDetail",
+ "id": "b8b25258-493c-458b-8e9c-bee0c905fde2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "782dcfa9-0d4f-47d9-8e37-789bd58f1f0a",
+ "regionName": "sidebar",
+ "type": "region"
+ },
+ {
+ "id": "74af9e79-3377-4866-8c0a-9d7e6fe3ef45",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "{!Record.Description}",
+ "title": "{!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "3486895a-d73b-4102-93a7-6d207fd0a00e",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f26b2333-7b1a-48e6-a1a3-f3e34426f512",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "topic"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/userProfile.json b/force-app/main/default/experiences/Partner21/views/userProfile.json
new file mode 100644
index 0000000..887a6f6
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/userProfile.json
@@ -0,0 +1,121 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "4053070a-c5f6-483a-b96a-0ac64d32bfc6",
+ "label": "User Profile",
+ "regions": [
+ {
+ "id": "89b66032-d883-446c-8947-68f83bc9f296",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}",
+ "showFullPhotoAsCircle": true,
+ "showReputation": false
+ },
+ "componentName": "forceCommunity:userProfileHeader",
+ "id": "e2f52e36-f053-47bd-856f-54556073cb68",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "tabsetConfig": {
+ "UUID": "ed0c6390-a8bc-4ffc-84fd-aee41981c732",
+ "activeTab": "tab1",
+ "tabs": [
+ {
+ "UUID": "5bc0df6c-a312-4abc-b5b4-f2084b4acc27",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:userProfileDetail"
+ }
+ ],
+ "tabKey": "tab1",
+ "tabName": "Details"
+ },
+ {
+ "UUID": "196c0de0-152e-4c01-99cd-efb4e6ed0749",
+ "allowGuestUser": false,
+ "locked": false,
+ "seedComponents": [
+ {
+ "attributes": {},
+ "fqn": "forceCommunity:userRelatedList"
+ }
+ ],
+ "tabKey": "tab2",
+ "tabName": "Related"
+ }
+ ],
+ "useOverflowMenu": false
+ }
+ },
+ "componentName": "forceCommunity:tabset",
+ "id": "ed0c6390-a8bc-4ffc-84fd-aee41981c732",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "id": "{!recordId}"
+ },
+ "componentName": "forceCommunity:userProfileDetail",
+ "id": "87c193d2-2c1c-41f2-89fd-f2eb35986231",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5bc0df6c-a312-4abc-b5b4-f2084b4acc27",
+ "regionLabel": "Details",
+ "regionName": "tab1",
+ "renditionMap": {},
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "userId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:userRelatedList",
+ "id": "1532d085-5322-4ccd-854f-8580589070cc",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "196c0de0-152e-4c01-99cd-efb4e6ed0749",
+ "regionLabel": "Related",
+ "regionName": "tab2",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3dad4cf6-7966-4fb0-acb5-7185d8b94a4a",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "2c73ee2e-68df-473f-8174-e88c35f810a2",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-005"
+}
diff --git a/force-app/main/default/experiences/Partner21/views/userSettings.json b/force-app/main/default/experiences/Partner21/views/userSettings.json
new file mode 100644
index 0000000..3dcd1a3
--- /dev/null
+++ b/force-app/main/default/experiences/Partner21/views/userSettings.json
@@ -0,0 +1,60 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "3d201ab3-fa88-4304-85c5-c338df54401e",
+ "label": "User Settings",
+ "regions": [
+ {
+ "id": "474c881f-fede-4c99-b61e-1a5ba315b47b",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "accountSectionTitle": "Account",
+ "accountTabName": "Account Management",
+ "connectedSourcesTabName": "Connected Sources",
+ "deleteAccountButtonTitle": "Deactivate My Account",
+ "deleteAccountConfirmationPopupBody": "After you deactivate your account, you'll lose access to this site.",
+ "deleteAccountConfirmationPopupButtonTitle": "Got It",
+ "deleteAccountConfirmationPopupTitle": "Deactivate your account?",
+ "deleteAccountErrorMessage": "Something went wrong. Contact your site administrator.",
+ "deleteAccountSectionTitle": "Deactivate Account",
+ "emailNotificationsTitle": "Email Notifications",
+ "emailSectionDescText": "When email notifications are enabled, email me when someone:",
+ "hideAccountDeleteSection": true,
+ "hideChatterNotificationSettings": false,
+ "hideConnectedSources": false,
+ "hideEmailNotificationSettings": false,
+ "hideProfileVisibilitySettings": false,
+ "id": "{!recordId}",
+ "locationTitle": "Location",
+ "profileSectionDescText": "Customize who is able to see what on your profile page",
+ "profileSectionToolTipText": "Restricted: Visible to the employees of the company that created the site. Members: Visible to logged-in members. Public: Visible to anyone viewing pages that don't require login.",
+ "profileVisibilityTitle": "Profile Visibility",
+ "settingsPageTitle": "My Settings"
+ },
+ "componentName": "forceCommunity:userSettingsCustomizable",
+ "id": "ec99dcb0-b8de-4c45-afba-d9a5983c4eb7",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0f316a31-89b3-402f-b12f-1ea820e0bd5e",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "1e578b7a-0907-44c9-987e-bb20b1cfe639",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "usersettings"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..0be12e4
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/\344\273\252\350\241\250\346\235\277\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "b8dd7d14-b832-40b7-9081-a684d75e13c4",
+ "label": "浠〃鏉� 闁㈤�c儶銈广儓",
+ "regions": [
+ {
+ "id": "22c7d43f-130c-433a-b1a9-b0cfbd096aeb",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "235e0622-ec88-4486-b3af-753e42a0cd62",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6d67b486-8ef3-4f6c-8cb1-76d3d4193565",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "d8aa8f16-a812-4654-b561-de444b2ac2ef",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-01Z"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json" "b/force-app/main/default/experiences/Partner21/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
new file mode 100644
index 0000000..6efe452
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\350\251\263\347\264\260.json"
@@ -0,0 +1,76 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "85625454-b547-4267-8193-1220b85224c0",
+ "label": "瀛︿細銉诲煿璁� 瑭崇窗",
+ "regions": [
+ {
+ "id": "32f48fc5-7ab3-4ce7-8f65-b72ebb4c1833",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "5981859e-261c-4517-b8f2-80fe1c284f8e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "showLegacyActivityComposer": false,
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "1891936b-7484-488e-ae36-13746546ba83",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "66bc16a8-e319-4633-98fd-2d46385cda9f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "5d86bb65-a182-4969-bc62-d42893f17dd9",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "441ecc2a-3a80-49cb-aade-b682e1c63a30",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "0ae2ec43-789f-4a44-a7d6-55e0feaaa240",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail-701"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..89cfc00
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/\345\255\246\344\274\232\343\203\273\345\237\271\350\256\255\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "c151821c-4405-4da0-b2dd-279fbb65bd86",
+ "label": "瀛︿細銉诲煿璁� 闁㈤�c儶銈广儓",
+ "regions": [
+ {
+ "id": "50f2cdab-0eb2-468a-a755-20268bb8cbc0",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "64d8a457-2904-4580-b7bc-b1965f5e57f8",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5c76bcb6-6a4d-4eee-ba42-7a319c08cb58",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "9c4694bb-e92b-4170-b696-795e98e30342",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-701"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..d1d82a0
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/\345\260\217\347\273\204\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "2bfba25e-daf0-49ff-924f-f69f9d9fb327",
+ "label": "灏忕粍 闁㈤�c儶銈广儓",
+ "regions": [
+ {
+ "id": "663b38e0-6257-4c51-81c5-ea60cbcb6b31",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "407fbce1-4ac5-45c4-9fa3-24bd9017c409",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "35e19b13-28c4-4e12-8d53-ef16eef240ce",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "a607e833-1ba0-4d54-8a36-b513616ec2ee",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-0F9"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..b424976
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/\346\212\245\350\241\250\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "217b4959-2595-4925-825f-0e46a2edf850",
+ "label": "鎶ヨ〃 闁㈤�c儶銈广儓",
+ "regions": [
+ {
+ "id": "c39e0e53-c06e-4994-9957-8bd379958a19",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "c9d5ac4a-881a-4920-a857-82d8cad2b6ef",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "191a3f15-c073-4840-a880-ddf6ca1ed393",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "0143c5c7-a46f-4c14-b22b-6af47a71337b",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-00O"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..6a4eeff
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/\346\226\207\344\273\266\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "972321da-7487-4d80-afa0-7731e16694d9",
+ "label": "鏂囦欢 闁㈤�c儶銈广儓",
+ "regions": [
+ {
+ "id": "6d04762b-180f-43a0-a0e5-b5c604c9b12a",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "4bb4ca74-2db8-484b-b130-90a03bb932c0",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c83a0888-a274-49bd-a9ac-bb07ed81efa1",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "2fce666b-9706-4729-92d6-e26bd1996ff3",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-069"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..f37399c
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/\346\265\201\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,27 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "cc7589b2-7f8c-4682-9007-5aa6a8b4c110",
+ "label": "娴� 闁㈤�c儶銈广儓",
+ "regions": [
+ {
+ "id": "43bd7732-d8eb-4910-af27-0c0af447ba43",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "1c3ec764-ade8-4667-8b8c-c31f11ba38a9",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "ef6f6ccd-47c7-4928-8fae-555da29a8a58",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-0Fq"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..8228694
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/\347\224\250\346\210\267\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,27 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "33b1c4cb-6778-4461-9977-a79f65eb2665",
+ "label": "鐢ㄦ埛 銉偣銉�",
+ "regions": [
+ {
+ "id": "a32b648e-21b7-40e6-a4d0-aa08b457edfe",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "e91778d9-2f16-4fea-a2f7-4209768f614a",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "b74fafd1-f46b-457a-b321-451ba3898ef9",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list-005"
+}
diff --git "a/force-app/main/default/experiences/Partner21/views/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json" "b/force-app/main/default/experiences/Partner21/views/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
new file mode 100644
index 0000000..2433106
--- /dev/null
+++ "b/force-app/main/default/experiences/Partner21/views/\347\224\250\346\210\267\351\226\242\351\200\243\343\203\252\343\202\271\343\203\210.json"
@@ -0,0 +1,45 @@
+{
+ "appPageId": "95226447-4e8f-45b9-aac1-576d87068d01",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "e627e296-efd0-45d5-87ed-ea680a2015b0",
+ "label": "鐢ㄦ埛 闁㈤�c儶銈广儓",
+ "regions": [
+ {
+ "id": "fa996da6-5a88-40d6-8076-a000dd9fc6b2",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "c2975d5b-8e86-4cda-9e6a-69f34f37af9e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ea54ff4a-6956-46f8-8557-c168da453e35",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "8857ad6c-8b66-49ef-a449-14ef01882582",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist-005"
+}
diff --git a/force-app/main/default/experiences/Site3.site-meta.xml b/force-app/main/default/experiences/Site3.site-meta.xml
new file mode 100644
index 0000000..2984504
--- /dev/null
+++ b/force-app/main/default/experiences/Site3.site-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <label>鐢靛瓙绛炬敹绯荤粺</label>
+ <type>ChatterNetworkPicasso</type>
+</ExperienceBundle>
diff --git a/force-app/main/default/experiences/Site3/brandingSets/buildYourOwn.json b/force-app/main/default/experiences/Site3/brandingSets/buildYourOwn.json
new file mode 100644
index 0000000..e15fa21
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/brandingSets/buildYourOwn.json
@@ -0,0 +1,54 @@
+{
+ "definitionName": "starter:branding-starter",
+ "id": "9ba9ab62-f2a8-47e3-8267-adedbceaab7f",
+ "label": "Build Your Own",
+ "type": "brandingSet",
+ "values": {
+ "ActionColor": "#2574A9",
+ "BorderColor": "#D4D4D4",
+ "CardBackgroundColor": "rgba(255, 255, 255, 0)",
+ "CompanyLogo": "",
+ "DetailTextColor": "#696969",
+ "ErrorFontColor": "#ff9e9e",
+ "HeaderFonts": "Montserrat",
+ "LinkColor": "#2574A9",
+ "LoginBackgroundColor": "#F4F4F4",
+ "LoginBackgroundImage": "../../../../sfsites/picasso/core/external/salesforceIdentity/images/background.jpg?v=1",
+ "OverlayTextColor": "#FFFFFF",
+ "PrimaryFont": "Lato",
+ "TextColor": "#333",
+ "TextTransformStyle": "uppercase",
+ "_ActionColorDarker": "#1c577f",
+ "_ActionColorTrans": "rgba(37, 116, 169, 0.9)",
+ "_BackgroundColor1": "rgb(235, 235, 235)",
+ "_BackgroundColor2": "rgb(194, 194, 194)",
+ "_BackgroundColor3": "rgb(133, 133, 133)",
+ "_DxpPageBackgroundColor": "#FFFFFF",
+ "_HoverColor": "rgba(37, 116, 169, 0.05)",
+ "_LinkColorDarker": "#135F90",
+ "_NeutralColor": "#ecebea",
+ "_NeutralColor1": "rgb(217, 215, 213)",
+ "_NeutralColor2": "rgb(178, 174, 170)",
+ "_NeutralColor3": "rgb(118, 113, 107)",
+ "_NeutralForegroundColor": "#000",
+ "_NeutralForegroundColor1": "#000",
+ "_NeutralForegroundColor2": "#000",
+ "_NeutralForegroundColor3": "#fff",
+ "_OverlayTextColorShadow": "#000",
+ "_PrimaryAccentColor1": "rgb(30, 93, 136)",
+ "_PrimaryAccentColor2": "rgb(15, 47, 69)",
+ "_PrimaryAccentColor3": "rgb(0, 0, 0)",
+ "_PrimaryAccentForegroundColor1": "rgb(255, 255, 255)",
+ "_PrimaryAccentForegroundColor2": "rgb(255, 255, 255)",
+ "_PrimaryAccentForegroundColor3": "rgb(255, 255, 255)",
+ "_TextColor1": "rgb(31, 31, 31)",
+ "_TextColor2": "rgb(0, 0, 0)",
+ "_TextColor3": "rgb(0, 0, 0)",
+ "_brandNavigationBarBackgroundColor": "rgba(128,128,128,.75)",
+ "_brandNavigationItemBackgroundColorHover": "rgba(0,0,0,.2)",
+ "_brandNavigationItemDividerColor": "rgba(255, 255, 255, 0.2)",
+ "brandNavigationBackgroundColor": "rgb(128,128,128)",
+ "brandNavigationBarBackgroundColor": "rgba(128,128,128,.75)",
+ "brandNavigationColorText": "#FFFFFF"
+ }
+}
diff --git a/force-app/main/default/experiences/Site3/config/languages.json b/force-app/main/default/experiences/Site3/config/languages.json
new file mode 100644
index 0000000..dd01830
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/config/languages.json
@@ -0,0 +1,6 @@
+{
+ "defaultCode": "en_US",
+ "defaultLabel": "English (US)",
+ "id": "5d0232d2-9794-4c56-9bf0-642e72abe504",
+ "type": "languageContainer"
+}
diff --git a/force-app/main/default/experiences/Site3/config/loginAppPage.json b/force-app/main/default/experiences/Site3/config/loginAppPage.json
new file mode 100644
index 0000000..9aa7109
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/config/loginAppPage.json
@@ -0,0 +1,7 @@
+{
+ "cmsSettings": {},
+ "id": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "label": "login",
+ "templateName": "Login Template",
+ "type": "appPage"
+}
diff --git a/force-app/main/default/experiences/Site3/config/mainAppPage.json b/force-app/main/default/experiences/Site3/config/mainAppPage.json
new file mode 100644
index 0000000..eaa8a8f
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/config/mainAppPage.json
@@ -0,0 +1,10 @@
+{
+ "cmsSettings": {},
+ "currentThemeId": "64870c02-e4cf-4464-8930-7aed413f325b",
+ "headMarkup": null,
+ "id": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "isRelaxedCSPLevel": false,
+ "label": "main",
+ "templateName": "Starter Template",
+ "type": "appPage"
+}
diff --git "a/force-app/main/default/experiences/Site3/config/\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.json" "b/force-app/main/default/experiences/Site3/config/\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.json"
new file mode 100644
index 0000000..c6de668
--- /dev/null
+++ "b/force-app/main/default/experiences/Site3/config/\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.json"
@@ -0,0 +1,11 @@
+{
+ "forgotPasswordRouteId": "3ca12776-63d6-4edc-bc9a-dc6b0640e27a",
+ "isAvailableToGuests": true,
+ "isFilteredComponentsView": false,
+ "isProgressiveRenderingEnabled": false,
+ "loginAppPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "mainAppPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "preferredDomain": "none",
+ "selfRegistrationRouteId": "57c8022e-eb0c-43b6-97dc-a37a1d91b2ca",
+ "type": "site"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/checkPassword.json b/force-app/main/default/experiences/Site3/routes/checkPassword.json
new file mode 100644
index 0000000..abd3c5a
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/checkPassword.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "a0810e9f-b4d6-4a64-80aa-02d99f2c8234",
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "id": "babb4f4f-dc0c-4409-9525-eaded47bc05a",
+ "label": "Check Password",
+ "routeType": "check-password",
+ "type": "route",
+ "urlPrefix": "CheckPasswordResetEmail"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/createRecord.json b/force-app/main/default/experiences/Site3/routes/createRecord.json
new file mode 100644
index 0000000..dfe7d9a
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/createRecord.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "9cb0795b-6c6d-4948-9dcd-68a568028499",
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "id": "478d6a03-0784-4adc-ace3-eb9cd6b2915e",
+ "label": "Create Record",
+ "routeType": "createrecord",
+ "type": "route",
+ "urlPrefix": "createrecord"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/error.json b/force-app/main/default/experiences/Site3/routes/error.json
new file mode 100644
index 0000000..31a07c5
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/error.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "c792b011-93b7-4274-aa53-359303ca2567",
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "id": "c684094f-3175-42c3-9fab-eb858aa3e806",
+ "label": "Error",
+ "pageAccess": "UseParent",
+ "routeType": "error",
+ "type": "route",
+ "urlPrefix": "error"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/forgotPassword.json b/force-app/main/default/experiences/Site3/routes/forgotPassword.json
new file mode 100644
index 0000000..3135323
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/forgotPassword.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "cb26bb2a-86d2-4d95-813b-a1b4e00337e5",
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "id": "3ca12776-63d6-4edc-bc9a-dc6b0640e27a",
+ "label": "Forgot Password",
+ "routeType": "forgot-password",
+ "type": "route",
+ "urlPrefix": "ForgotPassword"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/home.json b/force-app/main/default/experiences/Site3/routes/home.json
new file mode 100644
index 0000000..835d623
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/home.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "e2e60370-e191-4f54-8b77-7da2fdc0c01f",
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "id": "b57a9b81-a622-4699-9467-83854f1b4d90",
+ "label": "Home",
+ "pageAccess": "Public",
+ "routeType": "home",
+ "type": "route",
+ "urlPrefix": ""
+}
diff --git a/force-app/main/default/experiences/Site3/routes/login.json b/force-app/main/default/experiences/Site3/routes/login.json
new file mode 100644
index 0000000..2e07dde
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/login.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "6d2b638e-a48b-49d3-a675-e36e30791e1c",
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "id": "c2fc667a-c580-447e-bd1e-717b8fe1a209",
+ "label": "Login",
+ "routeType": "login-home",
+ "type": "route",
+ "urlPrefix": ""
+}
diff --git a/force-app/main/default/experiences/Site3/routes/loginError.json b/force-app/main/default/experiences/Site3/routes/loginError.json
new file mode 100644
index 0000000..c8bfa18
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/loginError.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "acfc3c4f-6e34-4219-a88a-39af60aece24",
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "id": "c727420f-bf9b-4029-b55f-92bdb38610b5",
+ "label": "Login Error",
+ "routeType": "login-error",
+ "type": "route",
+ "urlPrefix": "error"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/recordDetail.json b/force-app/main/default/experiences/Site3/routes/recordDetail.json
new file mode 100644
index 0000000..6d39e1f
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/recordDetail.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "bb2f4e25-0c5a-46a4-adb6-431ecad42732",
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "id": "30ad0f59-ccc2-4e2a-94af-c6895d29948d",
+ "label": "Record Detail",
+ "routeType": "detail",
+ "type": "route",
+ "urlPrefix": "detail"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/recordList.json b/force-app/main/default/experiences/Site3/routes/recordList.json
new file mode 100644
index 0000000..71cd5ed
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/recordList.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "45ab1ac9-68f0-43e8-af03-88f2f479f2c3",
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "id": "6af539ff-d338-4c8b-9712-cbf354a750df",
+ "label": "Record List",
+ "pageAccess": "UseParent",
+ "routeType": "list",
+ "type": "route",
+ "urlPrefix": "recordlist"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/register.json b/force-app/main/default/experiences/Site3/routes/register.json
new file mode 100644
index 0000000..40c1575
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/register.json
@@ -0,0 +1,9 @@
+{
+ "activeViewId": "f7082e1e-e1e4-4b79-a271-59037e25c845",
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "id": "57c8022e-eb0c-43b6-97dc-a37a1d91b2ca",
+ "label": "Register",
+ "routeType": "self-register",
+ "type": "route",
+ "urlPrefix": "SelfRegister"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/relatedRecordList.json b/force-app/main/default/experiences/Site3/routes/relatedRecordList.json
new file mode 100644
index 0000000..3f45058
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/relatedRecordList.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "df2fbc80-2a44-4533-b646-40276661a5cf",
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "id": "b568f84d-743c-40dc-a171-62223c7c0acc",
+ "label": "Related Record List",
+ "pageAccess": "UseParent",
+ "routeType": "relatedlist",
+ "type": "route",
+ "urlPrefix": "relatedlist"
+}
diff --git a/force-app/main/default/experiences/Site3/routes/search.json b/force-app/main/default/experiences/Site3/routes/search.json
new file mode 100644
index 0000000..cbd919b
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/routes/search.json
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "1b73e50d-9811-4744-8c07-ffc097aa102a",
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "id": "05a1e535-f562-40c8-b5e5-e892d06167a8",
+ "label": "Search",
+ "pageAccess": "UseParent",
+ "routeType": "global-search",
+ "type": "route",
+ "urlPrefix": "global-search"
+}
diff --git "a/force-app/main/default/experiences/Site3/routes/\345\245\245\346\236\227\345\267\264\346\226\257\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.json" "b/force-app/main/default/experiences/Site3/routes/\345\245\245\346\236\227\345\267\264\346\226\257\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.json"
new file mode 100644
index 0000000..6a28d4a
--- /dev/null
+++ "b/force-app/main/default/experiences/Site3/routes/\345\245\245\346\236\227\345\267\264\346\226\257\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.json"
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "224c5f58-859e-49e8-9564-18d11e2ddf47",
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "id": "819d167a-e9e0-46e2-be56-8e5e20dc4a0e",
+ "label": "濂ユ灄宸存柉鐢靛瓙绛炬敹绯荤粺",
+ "pageAccess": "Public",
+ "routeType": "custom-esign-data-entry",
+ "type": "route",
+ "urlPrefix": "EsignDataEntry"
+}
diff --git "a/force-app/main/default/experiences/Site3/routes/\350\277\233\345\217\243\345\215\225\350\257\201\346\230\216\347\273\206.json" "b/force-app/main/default/experiences/Site3/routes/\350\277\233\345\217\243\345\215\225\350\257\201\346\230\216\347\273\206.json"
new file mode 100644
index 0000000..a17199d
--- /dev/null
+++ "b/force-app/main/default/experiences/Site3/routes/\350\277\233\345\217\243\345\215\225\350\257\201\346\230\216\347\273\206.json"
@@ -0,0 +1,10 @@
+{
+ "activeViewId": "793767ac-c71a-49a2-ba5a-591a85646551",
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "id": "62cd6cac-031d-4d5d-a256-7117468729df",
+ "label": "杩涘彛鍗曡瘉鏄庣粏",
+ "pageAccess": "UseParent",
+ "routeType": "custom-attachment-display",
+ "type": "route",
+ "urlPrefix": "AttachmentDisplay"
+}
diff --git a/force-app/main/default/experiences/Site3/themes/buildYourOwn.json b/force-app/main/default/experiences/Site3/themes/buildYourOwn.json
new file mode 100644
index 0000000..d5ec09d
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/themes/buildYourOwn.json
@@ -0,0 +1,149 @@
+{
+ "activeBrandingSetId": "9ba9ab62-f2a8-47e3-8267-adedbceaab7f",
+ "customCSS": "",
+ "developerName": "starter",
+ "id": "64870c02-e4cf-4464-8930-7aed413f325b",
+ "label": "Build Your Own",
+ "layouts": {
+ "Inner": "bf29ed2d-40ed-45cd-b4d1-c6ff6e1b20c6",
+ "Login": "a33c4bb6-054d-4319-a5bb-f27d28d0db18",
+ "ServiceNotAvailable": "1664c7f7-6090-4a0d-bfc2-3191064ecd96"
+ },
+ "type": "theme",
+ "views": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:loginBody2",
+ "id": "a33c4bb6-054d-4319-a5bb-f27d28d0db18",
+ "label": "Login",
+ "regions": [
+ {
+ "id": "c7939c0b-7063-4e10-8c4f-45f5e9a33b91",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "fd5ba3cd-84a7-4c49-bce0-730c85b9ce14",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "fdc32d28-41af-4381-a451-e0574e1e2263",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "type": "view"
+ },
+ {
+ "componentAttributes": {
+ "fixedPageWidth": 1440,
+ "isPageWidthFixed": true
+ },
+ "componentName": "siteforce:starterBody",
+ "id": "bf29ed2d-40ed-45cd-b4d1-c6ff6e1b20c6",
+ "label": "Default",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "maxAutoCompleteResults": 5,
+ "searchLabel": "Search...",
+ "searchObjects": [
+ {
+ "isPublic": true,
+ "name": "Account"
+ }
+ ]
+ },
+ "componentName": "forceCommunity:globalSearchInput",
+ "id": "6b6bd259-0936-4573-8301-b6c3c47991f5",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e1e03672-2dfc-493e-8a59-2cedaf4bdaed",
+ "regionName": "search",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "accountManagementLabel": "Account Management",
+ "communityBuilderLabel": "Experience Builder",
+ "communitySetupLabel": "Salesforce Setup",
+ "contactSupportLabel": "Contact Support",
+ "filterName": "MyCases",
+ "homeLabel": "Home",
+ "includeContactSupport": true,
+ "includeMessages": false,
+ "loginLabel": "Login",
+ "logoutLabel": "Logout",
+ "myAccountLabel": "My Account",
+ "showAccountManagement": true,
+ "showUserSettings": true,
+ "userSettingsLabel": "My Settings",
+ "viewProfileLabel": "My Profile"
+ },
+ "componentName": "selfService:userProfileMenu",
+ "id": "886ade64-9894-4fb5-9f0a-91f718f37a7c",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "b93ff3ad-6fb8-46b2-90fd-d85ca8c9b475",
+ "regionName": "profileMenu",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "NavigationMenuEditorRefresh": "",
+ "hideAppLauncher": true,
+ "hideHomeText": true
+ },
+ "componentName": "forceCommunity:globalNavigation",
+ "id": "74de3519-3e37-45f7-a9b0-686b6d576293",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "32f4c679-a1ec-4d0f-8227-f766aff2348b",
+ "regionName": "navBar",
+ "type": "region"
+ }
+ ],
+ "type": "view"
+ },
+ {
+ "componentAttributes": {
+ "fixedPageWidth": 1170,
+ "headerBgColor": "rgba(0, 0, 0, 0)",
+ "isHeaderPinned": false,
+ "isHeroUnderHeader": false,
+ "isPageWidthFixed": true,
+ "showHeader": true,
+ "showHero": true
+ },
+ "componentName": "siteforce:themeLayoutStarter",
+ "id": "1664c7f7-6090-4a0d-bfc2-3191064ecd96",
+ "label": "ServiceNotAvailable",
+ "regions": [
+ {
+ "id": "2bf842b8-e94c-4694-bf82-3f82bfb626fc",
+ "regionName": "themeHeader",
+ "type": "region"
+ },
+ {
+ "id": "e598c1cc-513c-4cff-9029-ace967593639",
+ "regionName": "themeFooter",
+ "type": "region"
+ }
+ ],
+ "type": "view"
+ }
+ ]
+}
diff --git a/force-app/main/default/experiences/Site3/views/checkPassword.json b/force-app/main/default/experiences/Site3/views/checkPassword.json
new file mode 100644
index 0000000..089b2e5
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/checkPassword.json
@@ -0,0 +1,67 @@
+{
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "a0810e9f-b4d6-4a64-80aa-02d99f2c8234",
+ "label": "Check Password",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><span style=\"font-size:22px\">NOW, CHECK YOUR EMAIL</span></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "79101fac-0f27-4968-b69b-af30771dcccf",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\">Check the email account associated with your user name for instructions on resetting your password. Remember to look in your spam folder, where automated messages sometimes filter. If you still can't log in, contact your administrator.</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "c19aadfa-f932-405c-9d25-5d6f43361035",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><a href=\"./\">Back to login</a></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "2a4826d1-54c0-4e91-8d77-23c4152e281d",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "aff6a477-e89c-4adf-865f-a6ed3bf3b795",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Check Password"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "51b9427e-2b7e-49f7-a4b1-ccf0eafa56a3",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "c4dd2d29-9f0d-412d-9a48-08d0464ba417",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "check-password"
+}
diff --git a/force-app/main/default/experiences/Site3/views/createRecord.json b/force-app/main/default/experiences/Site3/views/createRecord.json
new file mode 100644
index 0000000..5db9647
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/createRecord.json
@@ -0,0 +1,39 @@
+{
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "9cb0795b-6c6d-4948-9dcd-68a568028499",
+ "label": "Create Record",
+ "regions": [
+ {
+ "id": "d451ff76-e162-4234-bfff-bc56db891edd",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "actionApiName": "{!actionApiName}"
+ },
+ "componentName": "forceCommunity:createRecordForm",
+ "id": "b561a15a-51cf-485f-b7f6-3218203e6325",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "4f97e4bd-c420-46f2-80c4-4aefec37a12b",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "5a882757-dc4e-4c73-9191-6d0edb0dcb95",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "createrecord"
+}
diff --git a/force-app/main/default/experiences/Site3/views/error.json b/force-app/main/default/experiences/Site3/views/error.json
new file mode 100644
index 0000000..59c06d4
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/error.json
@@ -0,0 +1,57 @@
+{
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "c792b011-93b7-4274-aa53-359303ca2567",
+ "label": "Error",
+ "regions": [
+ {
+ "id": "1789e5dc-0771-4bbe-bacd-189f7ff243ab",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<p style=\"text-align: center;\">Invalid Page</p>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "cdc3e240-9222-48c5-a1d6-aa93804b982d",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "3410ec75-14f6-435d-b4e3-e8fb3844d9c1",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "c0398406-6a67-4006-abdf-c90203f0aa48",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Error"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "4683476f-e4bf-4709-a9b4-5a4fca5d1c9a",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f7aafc3f-c920-4c75-9d02-5d4140ca0048",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "error"
+}
diff --git a/force-app/main/default/experiences/Site3/views/forgotPassword.json b/force-app/main/default/experiences/Site3/views/forgotPassword.json
new file mode 100644
index 0000000..25cfdc3
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/forgotPassword.json
@@ -0,0 +1,79 @@
+{
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "cb26bb2a-86d2-4d95-813b-a1b4e00337e5",
+ "label": "Forgot Password",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><span style=\"font-size:22px\">PASSWORD RESET</span></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "25fd1614-b90d-4eb1-964f-67dea4fb6cea",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\">To reset your password, we'll need your username.<br/> We'll send password reset instructions to the email address associated with your account.</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "eec833d5-5d1f-4b8b-8c7e-3adf0247e716",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "checkEmailUrl": "./CheckPasswordResetEmail",
+ "submitButtonLabel": "Reset Password",
+ "usernameLabel": "Username"
+ },
+ "componentName": "salesforceIdentity:forgotPassword2",
+ "id": "4d5a81cc-11bf-44f7-84a1-193068441987",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><a href=\"./\">Cancel</a></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "9ca7bc62-3ac5-4dc6-a6bc-52501b674509",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "231c935f-3d29-4c7c-8e69-5cb4c7c2ba99",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Forgot Password"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "2ec7e376-133b-41d9-a0be-2b65d7fa4274",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "8a72b39f-ec8c-4f9a-9f34-10cd245d9e18",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "forgot-password"
+}
diff --git a/force-app/main/default/experiences/Site3/views/home.json b/force-app/main/default/experiences/Site3/views/home.json
new file mode 100644
index 0000000..393481f
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/home.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "e2e60370-e191-4f54-8b77-7da2fdc0c01f",
+ "label": "Home",
+ "regions": [
+ {
+ "id": "497754d6-c23e-4ff5-baab-fe8d842e18fd",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "id": "22e5790e-e557-47ce-be11-77ca9b9517bd",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "e0652978-bbe3-47ab-83f1-f659fcf2427a",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Home"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "b37194eb-0306-407c-9bba-88c9e30b2b42",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "bd9053b8-fc17-48bf-8ab2-f56e8071fb82",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "home"
+}
diff --git a/force-app/main/default/experiences/Site3/views/login.json b/force-app/main/default/experiences/Site3/views/login.json
new file mode 100644
index 0000000..e39d05f
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/login.json
@@ -0,0 +1,84 @@
+{
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "6d2b638e-a48b-49d3-a675-e36e30791e1c",
+ "label": "Login",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:communityLogo2",
+ "id": "6ee68cfc-86b4-4a2b-b8d3-0eae20c8c71e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "forgotPasswordLabel": "Forgot your password?",
+ "forgotPasswordUrl": "/ForgotPassword",
+ "loginButtonLabel": "Log in",
+ "passwordLabel": "Password",
+ "selfRegisterLabel": "Not a member?",
+ "selfRegisterUrl": "/SelfRegister",
+ "startUrl": "",
+ "usernameLabel": "Username"
+ },
+ "componentName": "salesforceIdentity:loginForm2",
+ "id": "e3131b45-1a93-41a0-9226-8042b9c3fda2",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "headerText": "",
+ "showHeader": false,
+ "useCommunityDomainSso": false
+ },
+ "componentName": "salesforceIdentity:socialLogin2",
+ "id": "11821772-7bd0-4462-871a-2f1d3643c6fe",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "employeeLoginLinkLabel": "Are you an employee? Login here"
+ },
+ "componentName": "salesforceIdentity:employeeLoginLink2",
+ "id": "04362051-cb7e-4dc6-8a26-bec13247eb84",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e58b0f5b-923e-4126-aa5c-610c548487ce",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Login"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "23ceab67-1956-4a59-918a-a65cd1da2c0d",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5fc9f8cd-81d0-4209-9177-e7267fad5d99",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "login-home"
+}
diff --git a/force-app/main/default/experiences/Site3/views/loginError.json b/force-app/main/default/experiences/Site3/views/loginError.json
new file mode 100644
index 0000000..3aa5dca
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/loginError.json
@@ -0,0 +1,57 @@
+{
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "acfc3c4f-6e34-4219-a88a-39af60aece24",
+ "label": "Login Error",
+ "regions": [
+ {
+ "id": "f0dbcd6d-92d7-48ee-bdfe-878dee8e9a77",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\">Invalid Page</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "178cb7f3-fed5-4bcb-8b17-8d42d49f03d9",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "ecdce3fb-0b9b-44ae-b7b0-fbf42f12e826",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "d7969d47-f741-49af-8879-5d2aa4a8b92b",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Login Error"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "7124e5aa-b506-4383-acf2-cd508614a65c",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "e86aa86c-d5f8-481b-becd-f641d6dddb07",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "login-error"
+}
diff --git a/force-app/main/default/experiences/Site3/views/recordDetail.json b/force-app/main/default/experiences/Site3/views/recordDetail.json
new file mode 100644
index 0000000..90ea936
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/recordDetail.json
@@ -0,0 +1,75 @@
+{
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "bb2f4e25-0c5a-46a4-adb6-431ecad42732",
+ "label": "Record Detail",
+ "regions": [
+ {
+ "id": "d7e0c80b-0785-4368-b355-8df9b74d7585",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "recordId": "{!recordId}"
+ },
+ "componentName": "forceCommunity:recordHeadline",
+ "id": "cc81febf-e90c-4506-a6ae-49118bcc9561",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "detailsTabLabel": "Details",
+ "discussionsTabLabel": "Feed",
+ "recordId": "{!recordId}",
+ "relatedTabLabel": "Related",
+ "tab1Type": "details",
+ "tab2Type": "related",
+ "tab3Type": "chatter",
+ "tab4Type": "none",
+ "timelineTabLabel": "Activity"
+ },
+ "componentName": "forceCommunity:recordHomeTabs",
+ "id": "49358887-7f6c-49d2-b870-bca6628902cc",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "431670c5-9b29-44ff-9abb-08da1f5bc596",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "ef26bfcc-676c-44ae-bba2-ef9d4e139000",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "{!Record._Object}: {!Record._Title}"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "e54f6f0f-9bb6-49c5-874b-e0cb6df5aac9",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "545512d3-d5b2-48c3-81d7-08d3a34ca75a",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "detail"
+}
diff --git a/force-app/main/default/experiences/Site3/views/recordList.json b/force-app/main/default/experiences/Site3/views/recordList.json
new file mode 100644
index 0000000..b708f1b
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/recordList.json
@@ -0,0 +1,52 @@
+{
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "45ab1ac9-68f0-43e8-af03-88f2f479f2c3",
+ "label": "Record List",
+ "regions": [
+ {
+ "id": "f55ac5c7-e89e-4a0c-b673-369053d0ccbb",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "enableInlineEdit": true,
+ "filterName": "{!filterId}",
+ "layout": "FULL",
+ "pageSize": 25,
+ "scope": "{!objectName}",
+ "showActionBar": true,
+ "showChartsPanel": true,
+ "showDisplay": "showall",
+ "showFilterPanel": true,
+ "showImageIcon": true,
+ "showManualRefreshButton": true,
+ "showObjectName": true,
+ "showPinnedList": true,
+ "showSearchBar": true
+ },
+ "componentName": "forceCommunity:objectHome",
+ "id": "5b78a56c-dcaf-4366-a3fc-eb5c2f685ebc",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "9657d9bf-f46a-400c-a19f-252c3878377f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "abde8654-b5ac-4f5b-83d1-52935c514cd0",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "list"
+}
diff --git a/force-app/main/default/experiences/Site3/views/register.json b/force-app/main/default/experiences/Site3/views/register.json
new file mode 100644
index 0000000..62b0ef1
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/register.json
@@ -0,0 +1,96 @@
+{
+ "appPageId": "2bcb651a-3bf1-4ba0-bf17-8f52e81c95c6",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "f7082e1e-e1e4-4b79-a271-59037e25c845",
+ "label": "Register",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "salesforceIdentity:communityLogo2",
+ "id": "e21ea511-10c6-4a67-82ef-ec485b7617bf",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\" class=\"inverseTextColor\">Join the community to receive personalized information and customer support.</div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "e111c87b-bc77-4bb5-99e3-93e3cb872acb",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "confirmPasswordLabel": "Confirm Password",
+ "emailLabel": "Email",
+ "extraFieldsFieldSet": "",
+ "firstnameLabel": "First Name",
+ "includePasswordField": false,
+ "lastnameLabel": "Last Name",
+ "passwordLabel": "Create Password",
+ "regConfirmUrl": "./CheckPasswordResetEmail",
+ "startUrl": "",
+ "submitButtonLabel": "Sign Up"
+ },
+ "componentName": "salesforceIdentity:selfRegister2",
+ "id": "1708fe03-f5d1-40aa-8a0a-6eadddb49426",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "headerText": "",
+ "showHeader": false,
+ "useCommunityDomainSso": false
+ },
+ "componentName": "salesforceIdentity:socialLogin2",
+ "id": "6f29eeb7-b358-4b9b-abfd-69c860e4f50e",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ },
+ {
+ "componentAttributes": {
+ "richTextValue": "<div style=\"text-align: center;\"><a class=\"inverseTextColor\" href=\"./\">Already have an account?</a></div>"
+ },
+ "componentName": "forceCommunity:richTextInline",
+ "id": "bf2597c2-b7f9-4dd9-830f-e350ee96b0d1",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6b062d85-f6af-410f-bc27-1a1da6da32b8",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "Register"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "4a889e5c-547a-48d9-bd3a-9e87166e7a82",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6e5174c2-5e4d-4e3e-a1a2-ec60126f3596",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Login",
+ "type": "view",
+ "viewType": "self-register"
+}
diff --git a/force-app/main/default/experiences/Site3/views/relatedRecordList.json b/force-app/main/default/experiences/Site3/views/relatedRecordList.json
new file mode 100644
index 0000000..6e7eafb
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/relatedRecordList.json
@@ -0,0 +1,45 @@
+{
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "df2fbc80-2a44-4533-b646-40276661a5cf",
+ "label": "Related Record List",
+ "regions": [
+ {
+ "id": "176c742a-9692-4939-927d-411b650ed76f",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customTitle": "",
+ "parentRecordId": "{!recordId}",
+ "relatedListName": "{!relationshipApiName}",
+ "showBreadCrumbs": true,
+ "showCustomTitle": false,
+ "showManualRefreshButton": true,
+ "showRowNumbers": true
+ },
+ "componentName": "forceCommunity:relatedList",
+ "id": "187579cb-db3f-4766-b5fa-33db1ecd8ef9",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "2672648c-0a4a-48c9-9ba6-af6a3630da20",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "08fd2e61-7c7e-41b8-9aff-4910b70422cd",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "relatedlist"
+}
diff --git a/force-app/main/default/experiences/Site3/views/search.json b/force-app/main/default/experiences/Site3/views/search.json
new file mode 100644
index 0000000..9207596
--- /dev/null
+++ b/force-app/main/default/experiences/Site3/views/search.json
@@ -0,0 +1,59 @@
+{
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "1b73e50d-9811-4744-8c07-ffc097aa102a",
+ "label": "Search",
+ "regions": [
+ {
+ "id": "5a6cc49b-d707-4df0-a634-7c716a793f2a",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "scopes": [
+ {
+ "isPublic": true,
+ "name": "FeedPost"
+ },
+ {
+ "isPublic": true,
+ "name": "KnowledgeArticleVersion"
+ },
+ {
+ "isPublic": false,
+ "name": "Case"
+ },
+ {
+ "isPublic": true,
+ "name": "CollaborationGroup"
+ }
+ ],
+ "searchResultFiltering": true,
+ "searchTerm": "{!term}",
+ "showTopResults": true
+ },
+ "componentName": "forceCommunity:search",
+ "id": "822bf1c5-6d8a-493f-aa12-4265f394c257",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "72128e90-ca44-4078-be1e-37490d727222",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "cdba3ee9-b011-4e7c-a760-0b9c5401d719",
+ "regionName": "footer",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "global-search"
+}
diff --git "a/force-app/main/default/experiences/Site3/views/\345\245\245\346\236\227\345\267\264\346\226\257\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.json" "b/force-app/main/default/experiences/Site3/views/\345\245\245\346\236\227\345\267\264\346\226\257\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.json"
new file mode 100644
index 0000000..ab830cd
--- /dev/null
+++ "b/force-app/main/default/experiences/Site3/views/\345\245\245\346\236\227\345\267\264\346\226\257\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.json"
@@ -0,0 +1,55 @@
+{
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "componentName": "siteforce:sldsOneColLayout",
+ "dataProviders": [],
+ "id": "224c5f58-859e-49e8-9564-18d11e2ddf47",
+ "label": "濂ユ灄宸存柉鐢靛瓙绛炬敹绯荤粺",
+ "regions": [
+ {
+ "id": "518d33a9-c0b3-4d07-bc99-314ad3b41419",
+ "regionName": "header",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:eSignHomePage",
+ "id": "ea68fcac-c35d-415e-86e8-040f4a6820d5",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "6ff94da4-7138-452e-a15c-ddfbb167b364",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "id": "c7a5b214-989d-437e-b11b-19c533e37cf3",
+ "regionName": "footer",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "濂ユ灄宸存柉鐢靛瓙绛炬敹绯荤粺"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "528b9108-2ebf-4ba1-8e2b-9ebec00fa61a",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "d2699d17-8cc3-4386-a7db-72e53dea52e4",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-esign-data-entry"
+}
diff --git "a/force-app/main/default/experiences/Site3/views/\350\277\233\345\217\243\345\215\225\350\257\201\346\230\216\347\273\206.json" "b/force-app/main/default/experiences/Site3/views/\350\277\233\345\217\243\345\215\225\350\257\201\346\230\216\347\273\206.json"
new file mode 100644
index 0000000..a950457
--- /dev/null
+++ "b/force-app/main/default/experiences/Site3/views/\350\277\233\345\217\243\345\215\225\350\257\201\346\230\216\347\273\206.json"
@@ -0,0 +1,81 @@
+{
+ "appPageId": "7f290f39-4245-4612-9453-2b0c9f9e3701",
+ "componentName": "siteforce:dynamicLayout",
+ "dataProviders": [],
+ "id": "793767ac-c71a-49a2-ba5a-591a85646551",
+ "label": "杩涘彛鍗曡瘉鏄庣粏",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "background": "background: rgba(0,0,0,0)",
+ "backgroundOverlay": "rgba(0,0,0,0.5)",
+ "contentAreaWidth": 100,
+ "sectionConfig": {
+ "UUID": "f248bb54-1de0-4045-a694-6878661820df",
+ "columns": [
+ {
+ "UUID": "73f32934-3d6d-4797-b1fd-7b87702e1e1e",
+ "columnKey": "1",
+ "columnName": "Column 1",
+ "columnWidth": "12",
+ "seedComponents": []
+ }
+ ]
+ },
+ "sectionHeight": 300
+ },
+ "componentName": "forceCommunity:section",
+ "id": "f248bb54-1de0-4045-a694-6878661820df",
+ "regions": [
+ {
+ "components": [
+ {
+ "componentAttributes": {},
+ "componentName": "c:AttachmentDisplay",
+ "id": "e1758a66-b8a1-45af-ae6e-03125b843456",
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "73f32934-3d6d-4797-b1fd-7b87702e1e1e",
+ "regionLabel": "Column 1",
+ "regionName": "1",
+ "renditionMap": {},
+ "type": "region"
+ }
+ ],
+ "renderPriority": "NEUTRAL",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "5ce20936-231e-48fd-8417-dba7d007a09f",
+ "regionName": "content",
+ "type": "region"
+ },
+ {
+ "components": [
+ {
+ "componentAttributes": {
+ "customHeadTags": "",
+ "description": "",
+ "title": "杩涘彛鍗曡瘉鏄庣粏"
+ },
+ "componentName": "forceCommunity:seoAssistant",
+ "id": "f149154f-4929-4eb1-b363-1c35f2c0a852",
+ "renditionMap": {},
+ "type": "component"
+ }
+ ],
+ "id": "f6d5daee-acfb-4753-8635-5d29ed2e46e9",
+ "regionName": "sfdcHiddenRegion",
+ "type": "region"
+ }
+ ],
+ "themeLayoutType": "Inner",
+ "type": "view",
+ "viewType": "custom-attachment-display"
+}
diff --git a/force-app/main/default/labels/CustomLabels.labels-meta.xml b/force-app/main/default/labels/CustomLabels.labels-meta.xml
index d4cd83a..341b64a 100644
--- a/force-app/main/default/labels/CustomLabels.labels-meta.xml
+++ b/force-app/main/default/labels/CustomLabels.labels-meta.xml
@@ -1,31 +1,6346 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" ?>
<CustomLabels xmlns="http://soap.sforce.com/2006/04/metadata">
<labels>
- <fullName>LexArrivegsDetailsPageHelpText</fullName>
- <language>zh_CN</language>
+ <fullName>AL_MobileApp_Title</fullName>
+ <language>en_US</language>
<protected>false</protected>
- <shortDescription>LexArrivegsDetailsPageHelpText</shortDescription>
- <value>褰撻�夋嫨娑堣�楀搧璁㈠崟鍏ュ簱鏃讹紝鏄剧ず鍚嶇О</value>
+ <shortDescription>AL_MobileApp_Title</shortDescription>
+ <value>Photo Uploader</value>
</labels>
<labels>
- <fullName>LexConInvoiceViewReport</fullName>
- <language>zh_CN</language>
+ <fullName>Accompanying_Report</fullName>
+ <language>ja</language>
<protected>false</protected>
- <shortDescription>鍙戠エ鏄剧ず鏄庣粏</shortDescription>
- <value>00O6D000000UPzaUAG</value>
+ <shortDescription>鍚岃鍫卞憡</shortDescription>
+ <value>鍚岃鍫卞憡</value>
</labels>
<labels>
- <fullName>View_Weekly_Report</fullName>
+ <fullName>AccountOwner_Tender</fullName>
<language>zh_CN</language>
<protected>false</protected>
- <shortDescription>鏌ョ湅鍛ㄦ姤娲诲姩</shortDescription>
- <value>00O6D000000UPzZUAW</value>
+ <shortDescription>鎴戠殑寰呭簲鏍囩殑鎷涙姇鏍囬」鐩�</shortDescription>
+ <value>/a4L?fcf=00B10000006SGV7</value>
</labels>
<labels>
- <fullName>invoiceStart</fullName>
+ <fullName>Account_Asset</fullName>
<language>zh_CN</language>
<protected>false</protected>
- <shortDescription>鍙戠エ瀵硅薄鍓�3浣嶆暟鍊�</shortDescription>
- <value>a2K</value>
+ <shortDescription>澶囧搧涓績</shortDescription>
+ <value>9999998</value>
+ </labels>
+ <labels>
+ <fullName>Account_Asset_Client</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧淇濇湁璁惧瀹㈡埛(寰呮敹璐�)</shortDescription>
+ <value>9999964</value>
+ </labels>
+ <labels>
+ <fullName>Account_Asset_Client_Done</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧(宸叉敹璐�)</shortDescription>
+ <value>9999963</value>
+ </labels>
+ <labels>
+ <fullName>Account_Asset_Department</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧淇濇湁璁惧鎴樼暐绉戝</shortDescription>
+ <value>7271439</value>
+ </labels>
+ <labels>
+ <fullName>Account_Asset_FJZ</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Account_Asset_FJZ</shortDescription>
+ <value>9999960</value>
+ </labels>
+ <labels>
+ <fullName>Account_Asset_Hospatal</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧淇濇湁璁惧鍖婚櫌</shortDescription>
+ <value>9999999</value>
+ </labels>
+ <labels>
+ <fullName>Account_Exc</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璋锋眹鐜�</shortDescription>
+ <value>6.8</value>
+ </labels>
+ <labels>
+ <fullName>Account_Rate</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璋风◣鐜�</shortDescription>
+ <value>1.13</value>
+ </labels>
+ <labels>
+ <fullName>Account_Type_Name</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瀹㈡埛绫诲瀷鍚�-璇环瑙﹀彂鍣ㄧ敤</shortDescription>
+ <value>AgencyContract</value>
+ </labels>
+ <labels>
+ <fullName>Account_Type_Name_Agency</fullName>
+ <categories>璨╁2搴�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瀹㈡埛绫诲瀷鍚�-璇环瑙﹀彂鍣ㄧ敤</shortDescription>
+ <value>Agency</value>
+ </labels>
+ <labels>
+ <fullName>Account_target_buffer_day</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>4鏈堜唤鍙互缂栬緫鐩爣瀹㈡埛澶╂暟</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>Accounting_Comment</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绲岀悊銈炽儭銉炽儓</shortDescription>
+ <value>绲岀悊銈炽儭銉炽儓</value>
+ </labels>
+ <labels>
+ <fullName>Accounting_Confirmation</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绲岀悊纰鸿獚</shortDescription>
+ <value>绲岀悊纰鸿獚</value>
+ </labels>
+ <labels>
+ <fullName>Activities</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>娲诲嫊鍐呭</shortDescription>
+ <value>娲诲嫊鍐呭</value>
+ </labels>
+ <labels>
+ <fullName>Activities_Schedule</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>娲诲嫊浜堝畾</shortDescription>
+ <value>娲诲嫊浜堝畾</value>
+ </labels>
+ <labels>
+ <fullName>Add_Information</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>杩藉姞鎯呭牨</shortDescription>
+ <value>杩藉姞鎯呭牨</value>
+ </labels>
+ <labels>
+ <fullName>Add_Line</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>琛岃拷鍔�</shortDescription>
+ <value>琛岃拷鍔�</value>
+ </labels>
+ <labels>
+ <fullName>Add_List</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>杩藉姞銉偣銉�</shortDescription>
+ <value>杩藉姞銉偣銉�</value>
+ </labels>
+ <labels>
+ <fullName>Add_Product</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬銈傘倞鍟嗗搧閬告姙鐢婚潰銇拷鍔犮儨銈裤兂</shortDescription>
+ <value>杩藉姞</value>
+ </labels>
+ <labels>
+ <fullName>AdjustAmount</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璋冩暣閲戦</shortDescription>
+ <value>璋冩暣閲戦</value>
+ </labels>
+ <labels>
+ <fullName>Agency</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璨╁2搴�</shortDescription>
+ <value>01210000000Qem1AAC</value>
+ </labels>
+ <labels>
+ <fullName>AgencyContact</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁忛攢鍟嗚仈绯讳汉</shortDescription>
+ <value>01210000000gT1XAAU</value>
+ </labels>
+ <labels>
+ <fullName>AgencyContract</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>濂戠磩</shortDescription>
+ <value>01210000000QjCN</value>
+ </labels>
+ <labels>
+ <fullName>AgencyPostForBsc</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍔炰簨澶勯椤垫潈闄恑d--椤甸潰鐢ㄨ亴浣�</shortDescription>
+ <value>缁熸嫭鎬荤洃;鎬荤洃;鍓�荤洃;閮ㄩ暱;鍓儴闀�;缁忕悊;鍓粡鐞�</value>
+ </labels>
+ <labels>
+ <fullName>AgencyPrice</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁忛攢鍟嗗崟浠�</shortDescription>
+ <value>缁忛攢鍟嗗崟浠�</value>
+ </labels>
+ <labels>
+ <fullName>AgencyProfileId</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍔炰簨澶勭洏鐐规潈闄恑d</shortDescription>
+ <value
+ >00e10000000xnpbAAA,00e10000000xnpRAAQ,00e10000000xyKBAAY,00e10000000a7NYAAY,00e10000000xyK6AAI</value>
+ </labels>
+ <labels>
+ <fullName>AgencyProfileId2</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍔炰簨澶勭洏鐐逛汉鏉冮檺id2</shortDescription>
+ <value>00e10000000xyK6AAI,00e10000000hkasAAA,00e10000000xnpHAAQ</value>
+ </labels>
+ <labels>
+ <fullName>AgencyProfileIdForBsc</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍔炰簨澶勯椤垫潈闄恑d--椤甸潰鐢�</shortDescription>
+ <value
+ >00e10000000xnp2AAA,00e10000000xzQ0AAI,00e10000000xnp7AAA,00e10000000xnpCAAQ,00e10000000xnpHAAQ,00e10000000hkasAAA,00e10000000xzQAAAY,00e10000000xnpMAAQ,00e10000000xnpRAAQ,00e10000000xyK6AAI,00e10000000xnpWAAQ,00e10000000xnpbAAA,00e10000000xyKBAAY</value>
+ </labels>
+ <labels>
+ <fullName>AgencySum_Total</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁忛攢鍟嗗皬璁�</shortDescription>
+ <value>缁忛攢鍟嗗皬璁�</value>
+ </labels>
+ <labels>
+ <fullName>AgencyVisit</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_缁忛攢鍟嗘嫓璁�</shortDescription>
+ <value>01210000000cWfr</value>
+ </labels>
+ <labels>
+ <fullName>Agency_Opportunity</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><娼滃湪瀹㈡埛>缁忛攢鍟嗚浠�</shortDescription>
+ <value>00N10000009HKSP</value>
+ </labels>
+ <labels>
+ <fullName>Agent1_and_Agent2_were_Deleted</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >绗竴璨╁2搴椼�佺浜岃博澹插簵銇墛闄ゃ仌銈屻仸銇勩伨銇欍伄銇с�佹寚瀹氬嚭鏉ャ伨銇涖倱銆�</shortDescription>
+ <value
+ >绗竴璨╁2搴椼�佺浜岃博澹插簵銇墛闄ゃ仌銈屻仸銇勩伨銇欍伄銇с�佹寚瀹氬嚭鏉ャ伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>Agent1_was_Deleted</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >绗竴璨╁2搴椼伅鍓婇櫎銇曘倢銇︺亜銇俱仚銇仹銆佹寚瀹氬嚭鏉ャ伨銇涖倱銆�</shortDescription>
+ <value>绗竴璨╁2搴椼伅鍓婇櫎銇曘倢銇︺亜銇俱仚銇仹銆佹寚瀹氬嚭鏉ャ伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>Agent2_was_Deleted</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >绗簩璨╁2搴椼伅鍓婇櫎銇曘倢銇︺亜銇俱仚銇仹銆佹寚瀹氬嚭鏉ャ伨銇涖倱銆�</shortDescription>
+ <value>绗簩璨╁2搴椼伅鍓婇櫎銇曘倢銇︺亜銇俱仚銇仹銆佹寚瀹氬嚭鏉ャ伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>AllConfirmationofAwardTask_Tender</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍏ㄩ儴涓爣缁撴灉纭浠诲姟</shortDescription>
+ <value>/a3V?fcf=00B10000006iHxF</value>
+ </labels>
+ <labels>
+ <fullName>AllLostTask_Tender</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍏ㄩ儴澶卞崟浠诲姟鎶ュ憡</shortDescription>
+ <value>/a3V?fcf=00B10000006iI9p</value>
+ </labels>
+ <labels>
+ <fullName>Amount</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閲戦</shortDescription>
+ <value>閲戦</value>
+ </labels>
+ <labels>
+ <fullName>AnalysisDocValidDay</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐜扮姸鍒嗘瀽鏂囨。鏈夋晥鏈�</shortDescription>
+ <value>7</value>
+ </labels>
+ <labels>
+ <fullName>AnalysisRequestValidH</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐜扮姸鍒嗘瀽浣滄垚璇锋眰鏈夋晥鏈�</shortDescription>
+ <value>1</value>
+ </labels>
+ <labels>
+ <fullName>And</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>And</shortDescription>
+ <value>骞�</value>
+ </labels>
+ <labels>
+ <fullName>Approval</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎵胯獚</shortDescription>
+ <value>鎵胯獚</value>
+ </labels>
+ <labels>
+ <fullName>Approved_Date</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎵胯獚鏃�</shortDescription>
+ <value>鎵胯獚鏃�</value>
+ </labels>
+ <labels>
+ <fullName>AssetChangeQuantityReasonError</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>璇峰~鍐欐暟閲忓彉鏇寸悊鐢�</shortDescription>
+ <value>璇峰~鍐欐暟閲忓彉鏇寸悊鐢�</value>
+ </labels>
+ <labels>
+ <fullName>AssetCountErrorMailAddress</fullName>
+ <categories>asset</categories>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>淇濇湁璁惧鏁伴噺寮傚父閭欢</shortDescription>
+ <value>sfdc_lvxueyan@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>AssetHistory_Columns</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇濇湁璁惧瀛楁鍘嗗彶</shortDescription>
+ <value
+ >AccountId,Hospital_Manage_Number__c,Status,Installation_Site__c,Name,Product2Id,Remark__c</value>
+ </labels>
+ <labels>
+ <fullName>AssetImageFolder</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>淇濇湁璁惧鍥綺鏂囦欢澶�</shortDescription>
+ <value>00l10000000esNR</value>
+ </labels>
+ <labels>
+ <fullName>AssetLegalAccount</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>淇濇湁璁惧鍏变韩瀹㈡埛</shortDescription>
+ <value
+ >澶囧搧鍏变韩_娴欐睙_鍗庝笢钀ヤ笟鏈儴,澶囧搧鍏变韩_榛戦緳姹焈涓滃寳钀ヤ笟鏈儴,澶囧搧鍏变韩_婀栧寳_鍗庡崡钀ヤ笟鏈儴,澶囧搧鍏变韩_璐靛窞_瑗垮崡钀ヤ笟鏈儴,澶囧搧鍏变韩_浜戝崡_瑗垮崡钀ヤ笟鏈儴,澶囧搧鍏变韩_閲嶅簡_瑗垮崡钀ヤ笟鏈儴,澶囧搧鍏变韩_瀹佸_瑗垮寳钀ヤ笟鏈儴,澶囧搧鍏变韩_娌冲崡_瑗垮寳钀ヤ笟鏈儴,澶囧搧鍏变韩_鏂扮枂_瑗垮寳钀ヤ笟鏈儴,澶囧搧鍏变韩_灞变笢_鍗庡寳钀ヤ笟鏈儴,澶囧搧鍏变韩_娌冲寳_鍗庡寳钀ヤ笟鏈儴,澶囧搧鍏变韩_澶╂触_鍗庡寳钀ヤ笟鏈儴,澶囧搧鍏变韩_瀹夊窘_鍗庝笢钀ヤ笟鏈儴,澶囧搧鍏变韩_绂忓缓_鍗庝笢钀ヤ笟鏈儴,澶囧搧鍏变韩_姹熻タ_鍗庝笢钀ヤ笟鏈儴,澶囧搧鍏变韩_姹熻嫃_鍗庝笢钀ヤ笟鏈儴,澶囧搧鍏变韩_鍥涘窛/瑗胯棌_瑗垮崡钀ヤ笟鏈儴,澶囧搧鍏变韩_娌堥槼_涓滃寳钀ヤ笟鏈儴,澶囧搧鍏变韩_骞夸笢_鍗庡崡钀ヤ笟鏈儴,澶囧搧鍏变韩_灞辫タ_瑗垮寳钀ヤ笟鏈儴,澶囧搧鍏变韩_婀栧崡_鍗庡崡钀ヤ笟鏈儴,澶囧搧鍏变韩_鍚夋灄_涓滃寳钀ヤ笟鏈儴,澶囧搧鍏变韩_澶ц繛_涓滃寳钀ヤ笟鏈儴,澶囧搧鍏变韩_涓婃捣_鍗庝笢钀ヤ笟鏈儴,澶囧搧鍏变韩_鐢樿們_瑗垮寳钀ヤ笟鏈儴,澶囧搧鍏变韩_鍖椾含_鍗庡寳钀ヤ笟鏈儴,澶囧搧鍏变韩_闈掓捣_瑗垮寳钀ヤ笟鏈儴,澶囧搧鍏变韩_鍐呰挋鍙鍗庡寳钀ヤ笟鏈儴,澶囧搧鍏变韩_闄曡タ_瑗垮寳钀ヤ笟鏈儴,澶囧搧鍏变韩_骞胯タ_鍗庡崡钀ヤ笟鏈儴,澶囧搧鍏变韩_娣卞湷_鍗庡崡钀ヤ笟鏈儴,澶囧搧鍏变韩_闈掑矝_鍗庡寳钀ヤ笟鏈儴</value>
+ </labels>
+ <labels>
+ <fullName>AssetMaintainManualBatchSize</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>AssetMaintainManualBatchSize</shortDescription>
+ <value>50</value>
+ </labels>
+ <labels>
+ <fullName>Asset_Maxcount</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐐规鎶ュ憡涔︽渶澶ф樉绀烘暟閲�</shortDescription>
+ <value>500</value>
+ </labels>
+ <labels>
+ <fullName>Asset_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑁藉搧鍚嶇О</shortDescription>
+ <value>瑁藉搧鍚嶇О</value>
+ </labels>
+ <labels>
+ <fullName>Asset_No</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑁藉搧鍨嬬暘</shortDescription>
+ <value>瑁藉搧鍨嬬暘</value>
+ </labels>
+ <labels>
+ <fullName>Asset_RecordType</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧璁板綍绫诲瀷</shortDescription>
+ <value>01210000000kOPRAA2</value>
+ </labels>
+ <labels>
+ <fullName>Assistant</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏀彺</shortDescription>
+ <value>鏀彺</value>
+ </labels>
+ <labels>
+ <fullName>Attribute</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>灞炴��</shortDescription>
+ <value>灞炴��</value>
+ </labels>
+ <labels>
+ <fullName>BCCCategory</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>BSS銈儐銈淬儶銉肩涓�闅庡堡</shortDescription>
+ <value>BSS銈儐銈淬儶銉肩涓�闅庡堡</value>
+ </labels>
+ <labels>
+ <fullName>Back</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎴汇仚</shortDescription>
+ <value>鎴汇仚</value>
+ </labels>
+ <labels>
+ <fullName>BackgroundColor</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>blue</shortDescription>
+ <value>#2E64FE</value>
+ </labels>
+ <labels>
+ <fullName>Basic_Information</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍩烘湰鎯呭牨</shortDescription>
+ <value>鍩烘湰鎯呭牨</value>
+ </labels>
+ <labels>
+ <fullName>Batch_Error_Send_To_CC</fullName>
+ <categories
+ >娌℃湁CC鐨勬椂鍊欏~鍐檔ull锛屾湁鐨勮瘽濉啓UserId锛屽鏁扮殑璇濊鐢ㄩ�楀彿(,)闅斿紑</categories>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Batch_Error_Send_To_CC</shortDescription>
+ <value>00510000000gHlO,00510000005sEEM,0051000000A5eGm</value>
+ </labels>
+ <labels>
+ <fullName>Batch_User_Id</fullName>
+ <categories>Batch鎵цUserId</categories>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Batch_User_Id</shortDescription>
+ <value>00510000000fSYI</value>
+ </labels>
+ <labels>
+ <fullName>BeijingEmail</fullName>
+ <categories>EmailText</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>BeijingEmail</shortDescription>
+ <value>ocm_asset@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>BiddingProjectRecordTypeID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎷涙爣椤圭洰璁板綍绫诲瀷ID</shortDescription>
+ <value>01210000000VLUI</value>
+ </labels>
+ <labels>
+ <fullName>Bie_Sheng_Ben_Cun_Bie_Yong_Tu_Label</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >琛ㄧず鍒渷銆佸埆鏈儴銆佸埆瀛樻斁鍦板拰鍒垎绫荤殑搴撳瓨</shortDescription>
+ <value>鍒渷銆佸埆鏈儴銆佸埆瀛樻斁鍦板拰鍒垎绫荤殑搴撳瓨</value>
+ </labels>
+ <labels>
+ <fullName>Business_Trip</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍑哄嫉</shortDescription>
+ <value>鍑哄嫉</value>
+ </labels>
+ <labels>
+ <fullName>ByPassTrigger</fullName>
+ <categories>System Configure 0051000000DZLePAAX</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ByPassTrigger</shortDescription>
+ <value>0051000000DZLePAAX</value>
+ </labels>
+ <labels>
+ <fullName>CN_MEBG_BusinessSupport</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>钀ヤ笟鏀彺璇鹃偖浠剁兢缁�</shortDescription>
+ <value>MEBG_BusinessSupport@olympus.partner.onmschina.cn</value>
+ </labels>
+ <labels>
+ <fullName>Calculate</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷堢畻锛�</shortDescription>
+ <value>瑷堢畻锛�</value>
+ </labels>
+ <labels>
+ <fullName>Campaign_Mail_CC_Label1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >TTC銆丯TC銆佹湇鍔″尰宸ュ浼氥�佹湇鍔℃姢鐞嗗浼氣啋鐜嬭寳鑺�</shortDescription>
+ <value>mingfang_wang@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>Campaign_Mail_CC_Label2</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁忛攢鍟嗘湇鍔″煿璁啋琚佷繆鐢�</shortDescription>
+ <value>junsheng_yuan@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>Cancel</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈儯銉炽偦銉�</shortDescription>
+ <value>銈儯銉炽偦銉�</value>
+ </labels>
+ <labels>
+ <fullName>ChangeAbandoned_InventoryHistory</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>寰呭簾寮冩暟(涓㈠け/鐩樹簭)淇敼灞ュ巻</shortDescription>
+ <value>寰呭簾寮冩暟(涓㈠け/鐩樹簭) {1} 鍙樻洿鐞嗙敱:{2}</value>
+ </labels>
+ <labels>
+ <fullName>ChangeQuantityHistory</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧鏁伴噺鍙樻洿灞ュ巻</shortDescription>
+ <value>澶囧搧鏁伴噺 {1} 鍙樻洿鐞嗙敱:{2}</value>
+ </labels>
+ <labels>
+ <fullName>Check</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銉併偋銉冦偗</shortDescription>
+ <value>銉併偋銉冦偗</value>
+ </labels>
+ <labels>
+ <fullName>Check_Your_Clipboard</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >銈儶銉冦儣銉溿兗銉夈伀銈炽償銉笺仐銇俱仐銇熴�俓nExcel銇布銈婁粯銇戙倝銈屻伨銇欍��</shortDescription>
+ <value
+ >銈儶銉冦儣銉溿兗銉夈伀銈炽償銉笺仐銇俱仐銇熴�俓nExcel銇布銈婁粯銇戙倝銈屻伨銇欍��</value>
+ </labels>
+ <labels>
+ <fullName>City_Status_Report</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>甯傛硜鍫卞憡</shortDescription>
+ <value>甯傛硜鍫卞憡</value>
+ </labels>
+ <labels>
+ <fullName>Claim_Input</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈儸銉笺儬鍏ュ姏</shortDescription>
+ <value>銈儸銉笺儬鍏ュ姏</value>
+ </labels>
+ <labels>
+ <fullName>Claims_Report</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈儸銉笺儬鍫卞憡</shortDescription>
+ <value>銈儸銉笺儬鍫卞憡</value>
+ </labels>
+ <labels>
+ <fullName>Classification_Visited</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鍏堝尯鍒�</shortDescription>
+ <value>瑷晱鍏堝尯鍒�</value>
+ </labels>
+ <labels>
+ <fullName>Clear</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>娑堝幓</shortDescription>
+ <value>娑堝幓</value>
+ </labels>
+ <labels>
+ <fullName>ClearConfirmationofAwardTypes</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>搴熸爣娴佹爣</shortDescription>
+ <value>3-1锛氬簾鏍囧叕鍛�,3-2锛氭祦鏍囧叕鍛�</value>
+ </labels>
+ <labels>
+ <fullName>Click_to_Close_Sidebar</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Click to Close Sidebar</shortDescription>
+ <value>鍗曞嚮鍏抽棴渚ф爮</value>
+ </labels>
+ <labels>
+ <fullName>Click_to_Open_Sidebar</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Click to Open Sidebar</shortDescription>
+ <value>鍗曞嚮鎵撳紑渚ф爮</value>
+ </labels>
+ <labels>
+ <fullName>Close</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>闁夈仒銈�</shortDescription>
+ <value>闁夈仒銈�</value>
+ </labels>
+ <labels>
+ <fullName>Comment</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈炽儭銉炽儓</shortDescription>
+ <value>銈炽儭銉炽儓</value>
+ </labels>
+ <labels>
+ <fullName>Comment_History</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Comment History</shortDescription>
+ <value>杩囧幓鐣欒█</value>
+ </labels>
+ <labels>
+ <fullName>Comments_Director</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閮ㄩ暦銈炽儭銉炽儓</shortDescription>
+ <value>閮ㄩ暦銈炽儭銉炽儓</value>
+ </labels>
+ <labels>
+ <fullName>Companion</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍚岃浜�</shortDescription>
+ <value>鍚岃浜�</value>
+ </labels>
+ <labels>
+ <fullName>Competitor</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绔跺悎浠栫ぞ</shortDescription>
+ <value>绔跺悎浠栫ぞ</value>
+ </labels>
+ <labels>
+ <fullName>Competitor_Information</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绔跺悎浠栫ぞ鎯呭牨</shortDescription>
+ <value>绔跺悎浠栫ぞ鎯呭牨</value>
+ </labels>
+ <labels>
+ <fullName>Confirm_SoakupHPDeptTeam</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>椤у銉併兗銉犮倰鐥呴櫌銇ㄨê鐧傜銇弽鏄�</shortDescription>
+ <value>椤у銉併兗銉犮倰鐥呴櫌銇ㄨê鐧傜銇弽鏄犮仐銇俱仚銇嬶紵</value>
+ </labels>
+ <labels>
+ <fullName>ConsumApplyRemind</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鑰楁潗鐢宠鏃ユ湡鎻愰啋</shortDescription>
+ <value
+ >1銆佸垱寤虹敵璇峰崟閿佸畾搴撳瓨鍚庯紝璇蜂簬2涓伐浣滄棩鍐呮彁浜ゅ鎵癸紝鍚﹀垯绯荤粺鑷姩閲婃斁搴撳瓨銆�
+2銆佽纭繚鎮ㄦ彁浜ょ殑鐢宠鍗曞湪"甯屾湜鍒拌揣鏃�-7涓伐浣滄棩鈥濆墠瀹屾垚瀹℃壒锛屽惁鍒欑敵璇峰崟鑷姩鍙栨秷銆�
+3銆佽鎻愪氦22涓伐浣滄棩浠ュ唴浣跨敤鐨勮�楁潗鐢宠鍗曘��</value>
+ </labels>
+ <labels>
+ <fullName>ConsumFixtureSetSelect_applyJs_Description</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鑰楁潗鐢宠鐢婚潰閫傜敤鎸夐挳璇存槑</shortDescription>
+ <value>鐐瑰嚮閫傜敤鎸夐挳浼氶噴鏀惧簱瀛�</value>
+ </labels>
+ <labels>
+ <fullName>Consum_Request_Help_Link</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鑰楁潗鐢宠甯姪Link</shortDescription>
+ <value
+ >https://ocsm--c.ap0.content.force.com/servlet/servlet.FileDownload?file=0151000000Ae1Ba</value>
+ </labels>
+ <labels>
+ <fullName>ConsumableInvoice_report</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娑堣�楀搧鍙戠エ鎶ヨ〃</shortDescription>
+ <value>00O100000058VzA</value>
+ </labels>
+ <labels>
+ <fullName>ConsumableOrderTrigger</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娑堣�楀搧璁㈠崟Trigger</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>ConsumableOut_report</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娑堣�楀搧鍑哄簱鍙戠エ</shortDescription>
+ <value>00O100000058VzB</value>
+ </labels>
+ <labels>
+ <fullName>Consumable_Contract</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁忛攢鍟嗗悎鍚�</shortDescription>
+ <value>01210000000QjCNAA0</value>
+ </labels>
+ <labels>
+ <fullName>Contact_Division_Label</fullName>
+ <categories>PIPL</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Contact Division Label</shortDescription>
+ <value>鑱屽姟</value>
+ </labels>
+ <labels>
+ <fullName>Contact_Phone_Label</fullName>
+ <categories>PIPL</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Contact Phone Label</shortDescription>
+ <value>鐢佃瘽</value>
+ </labels>
+ <labels>
+ <fullName>Contact_Price</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐥呴櫌銇绱勯噾椤�</shortDescription>
+ <value>鐥呴櫌銇绱勯噾椤�</value>
+ </labels>
+ <labels>
+ <fullName>Contract</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>濂戠害</shortDescription>
+ <value>01210000000QjCN</value>
+ </labels>
+ <labels>
+ <fullName>ContractAlert</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓娑堣垂鐜囬璀�</shortDescription>
+ <value>140</value>
+ </labels>
+ <labels>
+ <fullName>Contract_Breakdown</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>濂戠磩鍐呰ǔ</shortDescription>
+ <value>濂戠磩鍐呰ǔ</value>
+ </labels>
+ <labels>
+ <fullName>Contract_Detail_Buyer_Stamp</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銉愩偆銉ゃ兗鍒诲嵃</shortDescription>
+ <value>銉愩偆銉ゃ兗鍒诲嵃</value>
+ </labels>
+ <labels>
+ <fullName>Contract_Detail_Dealer_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>浠g悊搴楀悕</shortDescription>
+ <value>浠g悊搴楀悕</value>
+ </labels>
+ <labels>
+ <fullName>Contract_Detail_Print_Date</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍗板埛鏃�</shortDescription>
+ <value>鍗板埛鏃�</value>
+ </labels>
+ <labels>
+ <fullName>Contract_Detail_System_Code</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈枫偣銉嗐儬銈炽兗銉�</shortDescription>
+ <value>銈枫偣銉嗐儬銈炽兗銉�</value>
+ </labels>
+ <labels>
+ <fullName>Contract_Detail_Title</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>濂戠磩鍐呰ǔ</shortDescription>
+ <value>濂戠磩鍐呰ǔ</value>
+ </labels>
+ <labels>
+ <fullName>Copy_Detail</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣窗銈掋偗銉儍銉椼儨銉笺儔銇偝銉斻兗</shortDescription>
+ <value>鏄庣窗銈掋偗銉儍銉椼儨銉笺儔銇偝銉斻兗</value>
+ </labels>
+ <labels>
+ <fullName>Cost</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍘熶尽</shortDescription>
+ <value>鍘熶尽</value>
+ </labels>
+ <labels>
+ <fullName>Cost_coefficient</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>鎴愭湰绯绘暟</shortDescription>
+ <value>0.75</value>
+ </labels>
+ <labels>
+ <fullName>CreateRelationListSearchError</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍏遍�氭绱㈡姤閿�</shortDescription>
+ <value>妞滅储鍑︾悊涓嶆纭�佽涓庣郴缁熺鐞嗚�呴�g怠銆�</value>
+ </labels>
+ <labels>
+ <fullName>Created</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐧婚尣鑰�</shortDescription>
+ <value>鐧婚尣鑰�</value>
+ </labels>
+ <labels>
+ <fullName>Currency</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閫氳波</shortDescription>
+ <value>閫氳波</value>
+ </labels>
+ <labels>
+ <fullName>Current_fiscalyear</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>褰撳墠璐㈠勾</shortDescription>
+ <value>152P</value>
+ </labels>
+ <labels>
+ <fullName>Customer_Advisory</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瀹㈡埛鍜ㄨ瀵瑰簲</shortDescription>
+ <value>瀹㈡埛鍜ㄨ瀵瑰簲</value>
+ </labels>
+ <labels>
+ <fullName>DailyVisit</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_鏃ュ父鎷滆</shortDescription>
+ <value>01210000000cWfN</value>
+ </labels>
+ <labels>
+ <fullName>Daily_Btn_Cancel</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐢宠珛鍙栨秷</shortDescription>
+ <value>鐢宠珛鍙栨秷</value>
+ </labels>
+ <labels>
+ <fullName>Daily_Edit</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏃ュ牨銇法闆�</shortDescription>
+ <value>鏃ュ牨銇法闆�</value>
+ </labels>
+ <labels>
+ <fullName>Date</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏃ヤ粯</shortDescription>
+ <value>鏃ヤ粯</value>
+ </labels>
+ <labels>
+ <fullName>DateChangeReason</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏃ユ湡鎻愬墠/寤跺悗鍘熷洜</shortDescription>
+ <value
+ >{"鎻愬墠":[{"label":"鎻愬墠鎸傜綉鎷涙爣","value":"鎻愬墠鎸傜綉鎷涙爣"},{"label":"鍖婚櫌绱ф�ヨ喘涔�","value":"鍖婚櫌绱ф�ヨ喘涔�"},{"label":"棰勭畻澶栫揣鎬ラ噰璐�","value":"棰勭畻澶栫揣鎬ラ噰璐�"}],"寤跺悗":[{"label":"鍖婚櫌浜轰簨鍙樺姩","value":"鍖婚櫌浜轰簨鍙樺姩"},{"label":"鍖婚櫌棰勭畻寤舵湡","value":"鍖婚櫌棰勭畻寤舵湡"},{"label":"鏀跨瓥瑙傛湜","value":"鏀跨瓥瑙傛湜"},{"label":"鎷涙爣鍙樻洿鎴栧欢杩�","value":"鎷涙爣鍙樻洿鎴栧欢杩�"},{"label":"鐤儏褰卞搷鎺ㄨ繜","value":"鐤儏褰卞搷鎺ㄨ繜"},{"label":"瑁呬慨宸ユ湡寤舵湡","value":"瑁呬慨宸ユ湡寤舵湡"},{"label":"璁″垝鏈幏瀹℃壒","value":"璁″垝鏈幏瀹℃壒"},{"label":"閲囪喘鎰忓悜鎸傜綉鎺ㄨ繜","value":"閲囪喘鎰忓悜鎸傜綉鎺ㄨ繜"},{"label":"杩涘彛璁鸿瘉鎺ㄨ繜","value":"杩涘彛璁鸿瘉鎺ㄨ繜"}]}</value>
+ </labels>
+ <labels>
+ <fullName>DateNotReceivingNote</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>闈為泦涓鐞嗘棩鏈�</shortDescription>
+ <value>2021-07-01</value>
+ </labels>
+ <labels>
+ <fullName>Dealer_Returned_Label</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁忛攢鍟嗚繑鍝�</shortDescription>
+ <value>012100000006Jx4</value>
+ </labels>
+ <labels>
+ <fullName>Department</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閮ㄩ杸</shortDescription>
+ <value>閮ㄩ杸</value>
+ </labels>
+ <labels>
+ <fullName>Department_BF</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瑷虹檪绉� 鍛煎惛绉�</shortDescription>
+ <value>01210000000QfmRAAS</value>
+ </labels>
+ <labels>
+ <fullName>Department_Class_BF</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛 鍛煎惛绉�</shortDescription>
+ <value>01210000000QezZAAS</value>
+ </labels>
+ <labels>
+ <fullName>Department_Class_ENT</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛 鑰抽蓟鍠夌</shortDescription>
+ <value>01210000000QeztAAC</value>
+ </labels>
+ <labels>
+ <fullName>Department_Class_ET</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛ET</shortDescription>
+ <value>01210000000QemQAAS</value>
+ </labels>
+ <labels>
+ <fullName>Department_Class_GI</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛 娑堝寲绉�</shortDescription>
+ <value>01210000000QemLAAS</value>
+ </labels>
+ <labels>
+ <fullName>Department_Class_GS</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛 鏅绉�</shortDescription>
+ <value>01210000000QezeAAC</value>
+ </labels>
+ <labels>
+ <fullName>Department_Class_GYN</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛 濠︿汉绉�</shortDescription>
+ <value>01210000000QezoAAC</value>
+ </labels>
+ <labels>
+ <fullName>Department_Class_OTH</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛 銇濄伄浠�</shortDescription>
+ <value>01210000000QezyAAC</value>
+ </labels>
+ <labels>
+ <fullName>Department_Class_URO</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛 娉屽翱绉�</shortDescription>
+ <value>01210000000QezjAAC</value>
+ </labels>
+ <labels>
+ <fullName>Department_Class_Unification</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛锛堝叡閫氾級</shortDescription>
+ <value>01210000000QflsAAC</value>
+ </labels>
+ <labels>
+ <fullName>Department_ENT</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瑷虹檪绉� 鑰抽蓟鍠夌</shortDescription>
+ <value>01210000000Qfm2AAC</value>
+ </labels>
+ <labels>
+ <fullName>Department_GI</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瑷虹檪绉� 娑堝寲绉�</shortDescription>
+ <value>01210000000Qfm7AAC</value>
+ </labels>
+ <labels>
+ <fullName>Department_GS</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瑷虹檪绉� 鏅绉�</shortDescription>
+ <value>01210000000QfmHAAS</value>
+ </labels>
+ <labels>
+ <fullName>Department_GYN</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瑷虹檪绉� 濠︿汉绉�</shortDescription>
+ <value>01210000000QfmMAAS</value>
+ </labels>
+ <labels>
+ <fullName>Department_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷虹檪绉戝悕</shortDescription>
+ <value>瑷虹檪绉戝悕</value>
+ </labels>
+ <labels>
+ <fullName>Department_OTH</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瑷虹檪绉� 銇濄伄浠�</shortDescription>
+ <value>01210000000QfmbAAC</value>
+ </labels>
+ <labels>
+ <fullName>Department_Quote</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閮ㄩ杸</shortDescription>
+ <value>閮ㄩ杸</value>
+ </labels>
+ <labels>
+ <fullName>Department_URO</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瑷虹檪绉� 娉屽翱绉�</shortDescription>
+ <value>01210000000QfmCAAS</value>
+ </labels>
+ <labels>
+ <fullName>Department_common</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瑷虹檪绉戯紙鍏遍�氾級</shortDescription>
+ <value>01210000000QelwAAC</value>
+ </labels>
+ <labels>
+ <fullName>Description</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绲愭灉</shortDescription>
+ <value>绲愭灉</value>
+ </labels>
+ <labels>
+ <fullName>Detail_Price</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍗曚环</shortDescription>
+ <value>鍗曚环</value>
+ </labels>
+ <labels>
+ <fullName>Detail_Sum</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎶ヤ环閲戦</shortDescription>
+ <value>鎶ヤ环閲戦</value>
+ </labels>
+ <labels>
+ <fullName>Director_Confirmed</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閮ㄩ暦纰鸿獚</shortDescription>
+ <value>閮ㄩ暦纰鸿獚</value>
+ </labels>
+ <labels>
+ <fullName>Discount_Amount</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍊ゅ紩閲戦</shortDescription>
+ <value>鍊ゅ紩閲戦</value>
+ </labels>
+ <labels>
+ <fullName>Doctors_Information</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍖荤敓淇℃伅</shortDescription>
+ <value>鍖荤敓淇℃伅</value>
+ </labels>
+ <labels>
+ <fullName>DocumentFileSize_KB</fullName>
+ <categories>Document,File,Size</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏂囨。鏂囦欢鐨勬渶澶KB</shortDescription>
+ <value>10000</value>
+ </labels>
+ <labels>
+ <fullName>During_Creation</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>浣滄垚涓�</shortDescription>
+ <value>浣滄垚涓�</value>
+ </labels>
+ <labels>
+ <fullName>ESign_Error_Send_To_CC</fullName>
+ <categories
+ >娌℃湁CC鐨勬椂鍊欏~鍐檔ull锛屾湁鐨勮瘽濉啓UserId锛屽鏁扮殑璇濊鐢ㄩ�楀彿(,)闅斿紑</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ESign_Error_Send_To_CC</shortDescription>
+ <value>null</value>
+ </labels>
+ <labels>
+ <fullName>ET_Date_Calculate</fullName>
+ <categories>ET鎵ц鏃ユ湡鎵i櫎澶╂暟</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ET_Date_Calculate</shortDescription>
+ <value>7</value>
+ </labels>
+ <labels>
+ <fullName>Edit</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绶ㄩ泦</shortDescription>
+ <value>绶ㄩ泦</value>
+ </labels>
+ <labels>
+ <fullName>EmailAlert</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Email鎻愰啋鐢ㄦ埛鐨勯偖浠堕粯璁ゅ彧鏈夌簿鐞㈡妧鏈�</shortDescription>
+ <value>olympus@prec-tech.com,shuo_wang@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>EmailForRentalApproval_OGZ</fullName>
+ <categories>RC鍙婂伐鍘傛帴鏀跺鎵归�氳繃閭欢缁勭兢</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_澶囧搧鍑忎环鐢宠_鐩撮�丱GZ淇悊</shortDescription>
+ <value
+ >Baozhen_Lin@olympus.com.cn;Hedan_Li@olympus.com.cn;shaoqiu_cai@olympus.com.cn;Hua_Liu@olympus.com.cn;Zhanyang_Ou@olympus.com.cn;Zihan_Liu@olympus.com.cn;Jinli_Huang@olympus.com.cn;Yuandi_Qin@olympus.com.cn;Lixia_Lin@olympus.com.cn;Zhanhong1_Chen@olympus.com.cn;Huanfang_Cai@olympus.com.cn;Shufen_Cai@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>EmailForRentalApproval_RC_BJ</fullName>
+ <categories>RC鍙婂伐鍘傛帴鏀跺鎵归�氳繃閭欢缁勭兢</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_澶囧搧鍑忎环鐢宠_鍖椾含鍔炰簨澶�</shortDescription>
+ <value
+ >wenjing1_wang@olympus.com.cn;li_zhang@olympus.com.cn;xiuru_wang@olympus.com.cn;yanxin_wang@olympus.com.cn;ling_sheng@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>EmailForRentalApproval_RC_CD</fullName>
+ <categories>RC鍙婂伐鍘傛帴鏀跺鎵归�氳繃閭欢缁勭兢</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_澶囧搧鍑忎环鐢宠_鎴愰兘鍔炰簨澶�</shortDescription>
+ <value>yang_fan@olympus.com.cn;xianning_lai@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>EmailForRentalApproval_RC_GZ</fullName>
+ <categories>RC鍙婂伐鍘傛帴鏀跺鎵归�氳繃閭欢缁勭兢</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_澶囧搧鍑忎环鐢宠_骞夸笢鍔炰簨澶�</shortDescription>
+ <value
+ >yinghua_zhang@olympus.com.cn;jingyi_shao@olympus.com.cn;jingyi_huo@olympus.com.cn;ping1_wu@olympus.com.cn;chen_yu@olympus.com.cn;youhua_wang@olympus.com.cn;Zhanhong1_Chen@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>EmailForRentalApproval_RC_HZ</fullName>
+ <categories>RC鍙婂伐鍘傛帴鏀跺鎵归�氳繃閭欢缁勭兢</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_澶囧搧鍑忎环鐢宠_鏉窞鍔炰簨澶�</shortDescription>
+ <value>na_meng@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>EmailForRentalApproval_RC_SH</fullName>
+ <categories>RC鍙婂伐鍘傛帴鏀跺鎵归�氳繃閭欢缁勭兢</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_澶囧搧鍑忎环鐢宠_涓婃捣鍔炰簨澶�</shortDescription>
+ <value
+ >haifeng_liu@olympus.com.cn;jue_xu@olympus.com.cn;yan_zhang@olympus.com.cn;zongyu_liu@olympus.com.cn;minjie_ma@olympus.com.cn;huanhuan_shen@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>EmailForRentalApproval_RC_SY</fullName>
+ <categories>RC鍙婂伐鍘傛帴鏀跺鎵归�氳繃閭欢缁勭兢</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_澶囧搧鍑忎环鐢宠_娌堥槼鍔炰簨澶�</shortDescription>
+ <value>sen_zhang@olympus.com.cn;jie_zhang@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>EmailForRentalApproval_RC_XA</fullName>
+ <categories>RC鍙婂伐鍘傛帴鏀跺鎵归�氳繃閭欢缁勭兢</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_澶囧搧鍑忎环鐢宠_瑗垮畨鍔炰簨澶�</shortDescription>
+ <value
+ >chunyan_jia@olympus.com.cn;xiaoyun_liu@olympus.com.cn;mengxuan_liu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>EmailForRentalApproval_SORC</fullName>
+ <categories>RC鍙婂伐鍘傛帴鏀跺鎵归�氳繃閭欢缁勭兢</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_澶囧搧鍑忎环鐢宠_鐩撮�丼ORC淇悊</shortDescription>
+ <value
+ >judi_chen@olympus.com.cn;xiaochun_hu@olympus.com.cn;liyan_huang@olympus.com.cn;Xiang_Gu@olympus.com.cn;Hanzhong_Xu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>Employee_Number</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绀惧摗鐣彿</shortDescription>
+ <value>绀惧摗鐣彿</value>
+ </labels>
+ <labels>
+ <fullName>Environment_Url</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐜Url杩炴帴</shortDescription>
+ <value>https://ocsm.my.salesforce.com/</value>
+ </labels>
+ <labels>
+ <fullName>EquipmentRentalBlackList</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >澶囧搧榛戝悕鍗曞垎鏁帮紙鏆傛椂涓嶅仛check锛屾墍浠ュ啓鎴�999999999锛�</shortDescription>
+ <value>999999999</value>
+ </labels>
+ <labels>
+ <fullName>EquipmentRentalBlackListPoint</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐘鐐规暟 3鐐�</shortDescription>
+ <value>3</value>
+ </labels>
+ <labels>
+ <fullName>EquipmentRentalBlackListPoint_1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐘鐐规暟 1鐐�</shortDescription>
+ <value>1</value>
+ </labels>
+ <labels>
+ <fullName>EquipmentRentalBlackList_ChangeOwner_Threshold</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >澶囧搧榛戝悕鍗曞垎鏁�2锛堟殏鏃朵笉鍋歝heck锛屾墍浠ュ啓鎴�999999999锛�</shortDescription>
+ <value>999999999</value>
+ </labels>
+ <labels>
+ <fullName>EquipmentRentalPostponeOverDeadline</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧寤舵湡鐢宠瓒呰繃鏈熼檺</shortDescription>
+ <value>寤舵湡鐢宠蹇呴』鍦ㄥ�熷嚭缁撴潫鏃ョ殑5涓伐浣滄棩涔嬪墠鎻愬嚭</value>
+ </labels>
+ <labels>
+ <fullName>EquipmentRentalPrepare</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧鍊熷嚭鍑嗗澶╂暟(钀ヤ笟鏃�)</shortDescription>
+ <value>5</value>
+ </labels>
+ <labels>
+ <fullName>EquipmentRental_advance_days</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧鍙彁鍓嶉绾﹀ぉ鏁�</shortDescription>
+ <value>62</value>
+ </labels>
+ <labels>
+ <fullName>EquipmentSet_repair_reportID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧set-淇悊鎶ヨ〃ID</shortDescription>
+ <value>00O10000003qWdU</value>
+ </labels>
+ <labels>
+ <fullName>Error_ChatterPostToMyFollowers</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Error_ChatterPostToMyFollowers</shortDescription>
+ <value>Cannot post to My Followers</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message0</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈ㄣ儵銉笺倰淇銇椼仸銇忋仩銇曘亜銆�</shortDescription>
+ <value>銈ㄣ儵銉笺倰淇銇椼仸銇忋仩銇曘亜銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message1</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏃ヤ粯銇ㄥ悓銇樺�ゃ倰瑷畾銇椼仸銇忋仩銇曘亜銆�</shortDescription>
+ <value>鏃ヤ粯銇ㄥ悓銇樺�ゃ倰瑷畾銇椼仸銇忋仩銇曘亜銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message10</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍙傜収妯╅檺銇屻亗銈娿伨銇涖倱銆�</shortDescription>
+ <value>鍙傜収妯╅檺銇屻亗銈娿伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message11</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍝佺洰銉炪偣銈胯博澹插彲鍚︹柍銇с亗銈嬪搧鐩亴閬告姙銇曘倢銇︺亜銇俱仚銆�</shortDescription>
+ <value
+ >鍝佺洰銉炪偣銈胯博澹插彲鍚︹柍銇с亗銈嬪搧鐩亴閬告姙銇曘倢銇︺亜銇俱仚銆傚挤鍒� decide 銇椼伨銇欍亱锛�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message12</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍟嗚珖ID銇屽彇寰椼仹銇嶃伨銇涖倱銆�</shortDescription>
+ <value>鍟嗚珖ID銇屽彇寰椼仹銇嶃伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message13</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >SAP閫佷俊蹇呴爤闋呯洰銉併偋銉冦偗銈ㄣ儵銉笺仹銇欍�傦紙璨╁2銉兗銉堛�佽臣璨峰舰鎱嬨�佸绱勫垎椤炪�佽硣閲戝熀銈掔⒑瑾嶃仐銇︺亸銇犮仌銇勩�傦級</shortDescription>
+ <value
+ >SAP閫佷俊蹇呴爤闋呯洰銉併偋銉冦偗銈ㄣ儵銉笺仹銇欍�傦紙璨╁2銉兗銉堛�佽臣璨峰舰鎱嬨�佸绱勫垎椤炪�佽硣閲戝熀銈掔⒑瑾嶃仐銇︺亸銇犮仌銇勩�傦級</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message14</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鍫存墍銈掑叆鍔涖仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>瑷晱鍫存墍銈掑叆鍔涖仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message15</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鍫存墍銇屽瓨鍦ㄣ仐銇俱仜銈撱��</shortDescription>
+ <value>瑷晱鍫存墍銇屽瓨鍦ㄣ仐銇俱仜銈撱��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message16</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鍫存墍銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>瑷晱鍫存墍銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message17</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐩殑(瑷堢敾)銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>鐩殑(瑷堢敾)銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message18</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>娲诲嫊鍖哄垎銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>娲诲嫊鍖哄垎銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message19</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍫卞憡鑰呫倰瑷畾銇椼仸銇忋仩銇曘亜銆�</shortDescription>
+ <value>鍫卞憡鑰呫倰瑷畾銇椼仸銇忋仩銇曘亜銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message2</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >闁嬪鏃ユ檪銈堛倞寰屻伄鏃ユ檪銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>闁嬪鏃ユ檪銈堛倞寰屻伄鏃ユ檪銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message20</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏃ヤ粯銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>鏃ヤ粯銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message21</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍊ゃ倰瑷畾銇俱仧銇牨鍛婃浉銈掍綔鎴愩仐銇熷牬鍚堛伅澶夋洿銇с亶銇俱仜銈撱��</shortDescription>
+ <value>鍊ゃ倰瑷畾銇俱仧銇牨鍛婃浉銈掍綔鎴愩仐銇熷牬鍚堛伅澶夋洿銇с亶銇俱仜銈撱��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message22</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏃ヤ粯銈掑叆鍔涖仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>鏃ヤ粯銈掑叆鍔涖仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message23</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鏃ヤ粯銇痀YYY/MM/DD銇у叆鍔涖仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>鏃ヤ粯銇痀YYY/MM/DD銇у叆鍔涖仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message24</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍕ゅ嫏鏅傞枔銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>鍕ゅ嫏鏅傞枔銈掕ō瀹氥仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message25</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍕ゅ嫏鏅傞枔銇痀YYY/MM/DD HH:mm銇у叆鍔涖仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>鍕ゅ嫏鏅傞枔銇痀YYY/MM/DD HH:mm銇у叆鍔涖仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message26</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>妯╅檺銇屻亗銈娿伨銇涖倱銆�</shortDescription>
+ <value>妯╅檺銇屻亗銈娿伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message27</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>渚℃牸琛ㄣ亴鍙栧緱銇с亶銇俱仜銈撱��</shortDescription>
+ <value
+ >鏈夊姽銇尽鏍艰〃銇屽彇寰椼仹銇嶃伨銇涖倱銆傛槑绱板晢鍝併倰纰鸿獚銇椼仸銇忋仩銇曘亜銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message28</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈ㄣ儵銉�</shortDescription>
+ <value>銈ㄣ儵銉�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message29</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍝佺洰銉炪偣銈裤伄闋呯洰銆岃绌嶇櫥閷插彲鍚︺�嶃亴鈼嬨仹銇亜鍝佺洰銇屽瓨鍦ㄣ仐銇俱仚銆�</shortDescription>
+ <value
+ >鍝佺洰銉炪偣銈裤伄闋呯洰銆岃绌嶇櫥閷插彲鍚︺�嶃亴鈼嬨仹銇亜鍝佺洰銇屽瓨鍦ㄣ仐銇俱仚銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message3</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍊ゃ倰鍏ュ姏銇椼仸涓嬨仌銇勩��</shortDescription>
+ <value>鍊ゃ倰鍏ュ姏銇椼仸涓嬨仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message30</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍊ゃ倰鍏ュ姏銇椼仾銇勩仹銇忋仩銇曘亜銆�</shortDescription>
+ <value>鍊ゃ倰鍏ュ姏銇椼仾銇勩仹銇忋仩銇曘亜銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message31</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >Excel鍙栥倞杈笺伩銉囥兗銈裤伀涓嶆銇儑銉笺偪銇屽惈銇俱倢銇︺亜銇俱仚銆�</shortDescription>
+ <value>Excel鍙栥倞杈笺伩銉囥兗銈裤伀涓嶆銇儑銉笺偪銇屽惈銇俱倢銇︺亜銇俱仚銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message32</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >瑕嬬鏄庣窗銇伅30鏄庣窗銇俱仹鐧婚尣鍙兘銇с仚銆�</shortDescription>
+ <value>瑕嬬鏄庣窗銇伅30鏄庣窗銇俱仹鐧婚尣鍙兘銇с仚銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message33</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >瑕嬬鐣彿銇屾帯鐣仌銈屻仸銇勩伨銇涖倱銇仹鍗板埛銇с亶銇俱仜銈撱��</shortDescription>
+ <value>瑕嬬鐣彿銇屾帯鐣仌銈屻仸銇勩伨銇涖倱銇仹鍗板埛銇с亶銇俱仜銈撱��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message34</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>琛屻倰閬告姙銇椼仸銇忋仩銇曘亜銆�</shortDescription>
+ <value>琛屻倰閬告姙銇椼仸銇忋仩銇曘亜銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message35</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍏堥牠琛屻仹銇Up銇仹銇嶃伨銇涖倱銆�</shortDescription>
+ <value>鍏堥牠琛屻仹銇Up銇仹銇嶃伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message36</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏈�绲傝銇с伅琛孌own銇仹銇嶃伨銇涖倱銆�</shortDescription>
+ <value>鏈�绲傝銇с伅琛孌own銇仹銇嶃伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message37</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍝佺洰銉炪偣銈胯博澹插彲鍚γ椼仹銇傘倠鍝佺洰銇岄伕鎶炪仌銈屻仸銇勩伨銇欍��</shortDescription>
+ <value>鍝佺洰銉炪偣銈胯博澹插彲鍚γ椼仹銇傘倠鍝佺洰銇岄伕鎶炪仌銈屻仸銇勩伨銇欍��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message38</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷堢畻锛呫伄鍊ゃ亴澶с亶銇欍亷銇俱仚銆�</shortDescription>
+ <value>瑷堢畻锛呫伄鍊ゃ亴澶с亶銇欍亷銇俱仚銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message39</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>涓嶆銇棩浠樸仹銇欍��</shortDescription>
+ <value>涓嶆銇棩浠樸仹銇欍��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message4</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>涓婂徃浠ュ銇伕鎶炪仹銇嶃伨銇涖倱銆�</shortDescription>
+ <value>涓婂徃浠ュ銇伕鎶炪仹銇嶃伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message40</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈ㄣ儵銉�:</shortDescription>
+ <value>銈ㄣ儵銉�:</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message41</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞帹骞裤伅閬告姙銇с亶銇俱仜銈撱��</shortDescription>
+ <value>閿�鍞帹骞裤伅閬告姙銇с亶銇俱仜銈撱��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message42</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞湇鍔°伅閬告姙銇с亶銇俱仜銈撱��</shortDescription>
+ <value>閿�鍞湇鍔°伅閬告姙銇с亶銇俱仜銈撱��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message43</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍫卞憡鏇搞倰浣滄垚銇椼仧鍫村悎銇椿鍕曘倰鍓婇櫎銇с亶銇俱仜銈撱��</shortDescription>
+ <value>鍫卞憡鏇搞倰浣滄垚銇椼仧鍫村悎銇椿鍕曘倰鍓婇櫎銇с亶銇俱仜銈撱��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message44</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍫卞憡鏇搞倰浣滄垚銇椼仧鍫村悎銆佹椿鍕曘伅鍓婇櫎銇с亶銇亸銇倞銇俱仚銇屻倛銈嶃仐銇勩仹銇欍亱锛�</shortDescription>
+ <value
+ >鍫卞憡鏇搞倰浣滄垚銇椼仧鍫村悎銆佹椿鍕曘伅鍓婇櫎銇с亶銇亸銇倞銇俱仚銇屻倛銈嶃仐銇勩仹銇欍亱锛�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message45</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷畾娓堛伩銇с仚銆�</shortDescription>
+ <value>瑷畾娓堛伩銇с仚銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message46</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >銈炽儭銉炽儓銇�255鏂囧瓧浠ュ唴銇у叆鍔涖仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>銈炽儭銉炽儓銇�255鏂囧瓧浠ュ唴銇у叆鍔涖仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message47</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>涓嶈兘閫夋嫨娌℃湁缁翠慨鍚堝悓閲戦鐨勪骇鍝�</shortDescription>
+ <value>涓嶈兘閫夋嫨娌℃湁缁翠慨鍚堝悓閲戦鐨勪骇鍝�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message48</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎶ヤ环濮旀墭鍟嗗搧妫�鏌ユ彁绀轰俊鎭�</shortDescription>
+ <value>浜у搧宸茬粡鏇存柊涓烘渶鏂扮姸鎬侊紝璇峰啀娆$‘璁ゃ��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message49</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁块棶鍦烘墍涓嶅厑璁镐慨鏀�</shortDescription>
+ <value>濡傛灉鏀瑰彉鎷滆瀵硅薄锛岃鍙栨秷杩欐潯娲诲姩銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message5</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鍫存墍銇屽瓨鍦ㄣ仐銇俱仜銈撱��</shortDescription>
+ <value>瑷晱鍫存墍銇屽瓨鍦ㄣ仐銇俱仜銈撱��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message6</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鑰呫伅鐢婚潰銇嬨倝瑷畾銇椼仸銇忋仩銇曘亜銆�</shortDescription>
+ <value>瑷晱鑰呫伅鐢婚潰銇嬨倝瑷畾銇椼仸銇忋仩銇曘亜銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message7</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>寮曞悎銇屽瓨鍦ㄣ仐銇俱仜銈撱��</shortDescription>
+ <value>寮曞悎銇屽瓨鍦ㄣ仐銇俱仜銈撱��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message8</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈点兗銉撱偣濂戠磩銇屽瓨鍦ㄣ仐銇俱仜銈撱��</shortDescription>
+ <value>銈点兗銉撱偣濂戠磩銇屽瓨鍦ㄣ仐銇俱仜銈撱��</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message9</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >瑕嬬姹哄畾寰屻伄鏂拌瑕嬬浣滄垚銇仹銇嶃伨銇涖倱銆�</shortDescription>
+ <value>瑕嬬姹哄畾寰屻伄鏂拌瑕嬬浣滄垚銇仹銇嶃伨銇涖倱銆�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message_Cannot_Win</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Error_Message_Cannot_Win</shortDescription>
+ <value>鍐冲畾鐨勬姤浠疯窛绂绘渶杩戜竴娆″嵃鍒锋棩宸茬粡杩囦簡3涓湀锛屼笉鑳絎IN</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message_OppTeamMember01</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>寮曞悎銉併兗銉犲壇鎷呭綋閲嶈鐢�</shortDescription>
+ <value>鍓媴褰撱伅鏃€伀瑷畾銇曘倢銇︺亜銇俱仚</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message_OppTeamMember02</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>STMS鎷呭綋閲嶅鎸囧畾error</shortDescription>
+ <value>STMS鎷呭綋宸茬粡鎸囧畾杩囦簡锛屽彧鑳芥寚瀹氫竴浜�</value>
+ </labels>
+ <labels>
+ <fullName>Error_Message_X_Product</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Error_Message_X_Product</shortDescription>
+ <value>鍐冲畾鐨勬姤浠蜂腑鍖呭惈浜嗕笉鍙姤浠风殑浜у搧锛岃閲嶆柊纭浣犵殑鎶ヤ环</value>
+ </labels>
+ <labels>
+ <fullName>Evalutaion_Comment</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Evalutaion Comment</shortDescription>
+ <value>鐣欒█</value>
+ </labels>
+ <labels>
+ <fullName>Excel_Import</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>EXCEL銈ゃ兂銉濄兗銉堢敾闈�</shortDescription>
+ <value>EXCEL銈ゃ兂銉濄兗銉堢敾闈�</value>
+ </labels>
+ <labels>
+ <fullName>Extension_to_Beijing_common_approver</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>寤舵湡鍖椾含鍏遍�氬鎵逛汉</shortDescription>
+ <value>00510000004rbs0</value>
+ </labels>
+ <labels>
+ <fullName>Extension_to_Guangdong_approver</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>寤舵湡骞夸笢瀹℃壒浜�</shortDescription>
+ <value>00510000004rbu1</value>
+ </labels>
+ <labels>
+ <fullName>Extension_to_Shanghai_approver</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>寤舵湡涓婃捣瀹℃壒浜�</shortDescription>
+ <value>00510000004qUxZ</value>
+ </labels>
+ <labels>
+ <fullName>Extension_to_Shenyang_approver</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>寤舵湡娌堥槼瀹℃壒浜�</shortDescription>
+ <value>00510000005oWch</value>
+ </labels>
+ <labels>
+ <fullName>External_Environmental_Reporting_Market</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>甯傛硜澶栭儴鐠板鍫卞憡</shortDescription>
+ <value>甯傛硜澶栭儴鐠板鍫卞憡</value>
+ </labels>
+ <labels>
+ <fullName>FSEWaitFollowInquiryForm</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>FSE寰呰窡杩涚殑鍜ㄨ鍗�</shortDescription>
+ <value>/a41?fcf=00B10000006i7dj</value>
+ </labels>
+ <labels>
+ <fullName>Feedback</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銉曘偅銉笺儔銉愩儍銈�</shortDescription>
+ <value>銉曘偅銉笺儔銉愩儍銈�</value>
+ </labels>
+ <labels>
+ <fullName>Find_Imitations</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍙戠幇浠垮埗鍝�</shortDescription>
+ <value>鍙戠幇浠垮埗鍝�</value>
+ </labels>
+ <labels>
+ <fullName>First_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鑰呭悕(鍚�)</shortDescription>
+ <value>瑷晱鑰呭悕(鍚�)</value>
+ </labels>
+ <labels>
+ <fullName>Forecast_Amounts</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>锛迹锛2涓婁簣娓噾椤�</shortDescription>
+ <value>锛迹锛2涓婁簣娓噾椤�</value>
+ </labels>
+ <labels>
+ <fullName>Free_Input</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銉曘儶銉煎叆鍔�</shortDescription>
+ <value>銉曘儶銉煎叆鍔�</value>
+ </labels>
+ <labels>
+ <fullName>From_Manager</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銉炪儘銉笺偢銉c亱銈夈伄</shortDescription>
+ <value>銉炪儘銉笺偢銉c亱銈夈伄</value>
+ </labels>
+ <labels>
+ <fullName>Fund_Basis</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><缁忛攢鍟嗚浠�>璧勯噾鏉ユ簮</shortDescription>
+ <value>00N10000008rqHd</value>
+ </labels>
+ <labels>
+ <fullName>GIORSP_Tender</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴戠殑寰呯‘璁ょ殑鎷涙姇鏍囬」鐩�</shortDescription>
+ <value>/a4L?fcf=00B10000006SGUx</value>
+ </labels>
+ <labels>
+ <fullName>Get_Day_Report</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏃ュ牨鍙栧緱</shortDescription>
+ <value>鏃ュ牨鍙栧緱</value>
+ </labels>
+ <labels>
+ <fullName>Group_ServiceManagementID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏈嶅姟绠$悊璇惧強涓嬪睘ID</shortDescription>
+ <value>00G10000002i4Hq</value>
+ </labels>
+ <labels>
+ <fullName>GuangzhouEmail</fullName>
+ <categories>EmailText</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>GuangzhouEmail</shortDescription>
+ <value>ocm_assetgz@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>GuaranteeUSD</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶栬锤澶氬勾淇濅慨</shortDescription>
+ <value>2021-04-01</value>
+ </labels>
+ <labels>
+ <fullName>GuaranteeWin</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶氬勾淇濅慨-win</shortDescription>
+ <value>2019-10-01</value>
+ </labels>
+ <labels>
+ <fullName>HP</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐥呴櫌</shortDescription>
+ <value>01210000000QemGAAS</value>
+ </labels>
+ <labels>
+ <fullName>HP_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐥呴櫌鍚�</shortDescription>
+ <value>鐥呴櫌鍚�</value>
+ </labels>
+ <labels>
+ <fullName>Home_Back</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銉涖兗銉犮伀鎴汇倠</shortDescription>
+ <value>銉涖兗銉犮伀鎴汇倠</value>
+ </labels>
+ <labels>
+ <fullName>Hospital</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐥呴櫌</shortDescription>
+ <value>鐥呴櫌</value>
+ </labels>
+ <labels>
+ <fullName>Hospital_Information</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍖婚櫌淇℃伅</shortDescription>
+ <value>鍖婚櫌淇℃伅</value>
+ </labels>
+ <labels>
+ <fullName>Hospital_RecordType</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍖婚櫌璁板綍绫诲瀷</shortDescription>
+ <value>01210000000QemG</value>
+ </labels>
+ <labels>
+ <fullName>HrODSTOUser</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>hr淇℃伅琛ㄥ悓姝ョ敤鎴峰紑鍏�</shortDescription>
+ <value>true</value>
+ </labels>
+ <labels>
+ <fullName>ID_of_SelectAssetEstimate</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓鎶ヤ环鎶ヨ〃ID</shortDescription>
+ <value>/00O100000058Bzh?pv0=</value>
+ </labels>
+ <labels>
+ <fullName>IFTradeComplianceAlert</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璐告槗鍚堣澧炲姞鎻愮ず</shortDescription>
+ <value>鏈夐棶棰樿鑱旂郴娉曞姟閮ㄨ锤鏄撳悎瑙勭獥鍙f伣鏉庡銆�</value>
+ </labels>
+ <labels>
+ <fullName>IFTradeComplianceAlertBP</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧鎷︽埅鎻愰啋</shortDescription>
+ <value
+ >鍖婚櫌涓嶅湪鐧藉悕鍗曪紝涓嶅彲缁х画锛屾湁闂璇疯仈绯绘硶鍔¢儴璐告槗鍚堣绐楀彛鎭芥潕濞溿��</value>
+ </labels>
+ <labels>
+ <fullName>ImportText</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈ゃ兂銉濄兗銉堝唴瀹瑰叆鍔�</shortDescription>
+ <value>銈ゃ兂銉濄兗銉堝唴瀹瑰叆鍔�</value>
+ </labels>
+ <labels>
+ <fullName>Improvement_Development_Needs</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏀硅壇銉婚枊鐧鸿鏈�</shortDescription>
+ <value>鏀硅壇銉婚枊鐧鸿鏈�</value>
+ </labels>
+ <labels>
+ <fullName>Improvement_Development_Needs_RecordType</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏀硅壇/闁嬬櫤瑕佹湜</shortDescription>
+ <value>鏀硅壇/闁嬬櫤瑕佹湜</value>
+ </labels>
+ <labels>
+ <fullName>InfoOwner_Tender</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴戠殑寰呭叧鑱旇浠风殑鎷涙姇鏍囬」鐩�</shortDescription>
+ <value>/a4L?fcf=00B10000006SGSx</value>
+ </labels>
+ <labels>
+ <fullName>InfoOwner_Tender_2M4</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2M4寰呭叧鑱旈」鐩椤垫彁閱掕烦杞鍥�</shortDescription>
+ <value>/a4L?fcf=00B10000006SGbF</value>
+ </labels>
+ <labels>
+ <fullName>Input_Required_Field_Msg</fullName>
+ <categories>PIPL</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Input Required Field Msg</shortDescription>
+ <value>璇疯緭鍏ヤ互涓嬪繀濉瓧娈典俊鎭�:</value>
+ </labels>
+ <labels>
+ <fullName>Inquiry_Status_Mapping</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璇环鐘舵��2鏄犲皠鍏崇郴</shortDescription>
+ <value
+ >{"寮曞悎 : 00 鏈窡杩�":"1","寮曞悎 : 01 璺熻繘涓�":"2","寮曞悎 : 02 璐锋鎵瑰噯":"3","寮曞悎 : 03 宸茬敵璇烽绠�":"4","寮曞悎 : 04 棰勭畻宸叉壒鍑�":"5","寮曞悎 : 04 棰勭畻鏈壒鍑�":"5","寮曞悎 : 05 宸茬敵璇疯繘鍙h璇�":"6","寮曞悎 : 06 璁鸿瘉宸查�氳繃":"7","寮曞悎 : 06 璁鸿瘉鏈�氳繃":"7","寮曞悎 : 07 宸茬‘璁ゅ弬鏁�":"8","寮曞悎 : 08 宸叉巿鏉�":"9","寮曞悎 : 09 宸叉嫑鏍�":"10","寮曞悎 : 10 宸蹭腑鏍�":"11","寮曞悎 : 11 浠锋牸鐢宠涓�":"12","寮曞悎 : 12 宸茬绾�":"13","娉ㄦ畫 : 01 宸插綍鍏ヨ鍗�,鏈粯娆�":"13","娉ㄦ畫 : 02 搴撳瓨宸查鐣�,鏈粯娆�":"13","娉ㄦ畫 : 03 宸茶璐�,浠樿閲�":"13","娉ㄦ畫 : 04 宸茶璐�,浠樺叏娆�":"13","娉ㄦ畫 : 05 宸插垎閰�,寰呭彂璐�":"13","鍑鸿嵎 : 06 宸插彂璐�":"13","鍑鸿嵎 : 07 宸插畨瑁�":"13","瀹屼簡 : 08 宸茬粨鏉�":"13","鍓婇櫎 : 鍙栨秷":"0","鏁楁垿 : 澶卞崟":"0","寮曞悎 : -":"1","寮曞悎 :":"1","寮曞悎 : 00 杩樻病鏇存柊":"1","寮曞悎 : 01 杩樻病鎷滆":"1","寮曞悎 : 02 璺熻繘涓�":"2","寮曞悎 : 03 宸叉巿鏉�":"9","寮曞悎 : 04 宸蹭腑鏍�":"11","寮曞悎 : 05 浠锋牸鐢宠涓�":"12","寮曞悎 : 06 鐢ㄦ埛鏈绾�":"13","寮曞悎 : 07 鐢ㄦ埛宸茬绾�":"13","寮曞悎 : 08 宸茬绾�":"13","鍑鸿嵎 : -":"13","瀹屼簡 : -":"13","娉ㄦ畫 : -":"13","鍑鸿嵎 :":"13","瀹屼簡 :":"13","娉ㄦ畫 :":"13","瀹屼簡 : 08 宸茬绾�":"13","鍓婇櫎 : 17 鍙栨秷":"0","鏁楁垿 : 18 澶卞崟":"0"}</value>
+ </labels>
+ <labels>
+ <fullName>Inquiry_form_flag</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浜у搧鍜ㄨ鍗曞巻鍙叉暟鎹窡鏂癴lag</shortDescription>
+ <value>false</value>
+ </labels>
+ <labels>
+ <fullName>Inspection</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐐规</shortDescription>
+ <value>鐐规</value>
+ </labels>
+ <labels>
+ <fullName>InspectionReportRecordTypeId</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐐规鎶ュ憡涔﹁褰曠被鍨婭D</shortDescription>
+ <value>01210000000aLiiAAE</value>
+ </labels>
+ <labels>
+ <fullName>Inspection_AllAssets</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐐规銉撱儱銉糏D(銇濄伄浠�):鏈暘鐢�</shortDescription>
+ <value>/02i?fcf=00B10000002o8Q5</value>
+ </labels>
+ <labels>
+ <fullName>Inspection_ID_General</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐐规銉撱儱銉糏D(涓�鑸�):鏈暘鐢�</shortDescription>
+ <value>/02i?fcf=00B100000028CuZ</value>
+ </labels>
+ <labels>
+ <fullName>Inspection_ID_LTV</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐐规銉撱儱銉糏D(LTV):鏈暘鐢�</shortDescription>
+ <value>/02i?fcf=00B100000028CuK</value>
+ </labels>
+ <labels>
+ <fullName>Inspection_ID_SLTV</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐐规銉撱儱銉糏D(SLTV):鏈暘鐢�</shortDescription>
+ <value>/02i?fcf=00B100000028CuF</value>
+ </labels>
+ <labels>
+ <fullName>InspectupTask</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_鐐规</shortDescription>
+ <value>01210000000aLnE</value>
+ </labels>
+ <labels>
+ <fullName>Inventory_Result_Email</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>鐩樼偣缁撴灉閭欢鎶勯��</shortDescription>
+ <value
+ >ying_liu@olympus.com.cn,xuan_li@olympus.com.cn,haoran_chang@olympus.com.cn,sfdc_lvxueyan@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>Inventory_Result_Email_Copy</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Inventory_Result_Email_Copy</shortDescription>
+ <value>lijinhuan@prec-tech.com,liucheng@prec-tech.com</value>
+ </labels>
+ <labels>
+ <fullName>Inventory_Result_Email_To</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Inventory_Result_Email_To</shortDescription>
+ <value>sfdc_lvxueyan@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>Involved</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>闁㈤�c仚銈�</shortDescription>
+ <value>闁㈤�c仚銈�</value>
+ </labels>
+ <labels>
+ <fullName>Job_Category</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鑱风ó</shortDescription>
+ <value>鑱风ó</value>
+ </labels>
+ <labels>
+ <fullName>Job_Title</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鑱蜂綅</shortDescription>
+ <value>鑱蜂綅</value>
+ </labels>
+ <labels>
+ <fullName>Key_ProductLabel</fullName>
+ <categories>閲嶇偣浜у搧</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Key_ProductLabel</shortDescription>
+ <value
+ >01.CV-290,03.涓婃秷鍖栨斁澶у唴闀�,04.涓嬫秷鍖栨斁澶у唴闀�,07.GF-UCT260,09.BF-290闀滃瓙,14.OTV-S400 4K涓绘満,15.OTV-S300,28.ESG-400,29.USG-400,34.TB-0535,35.TB-0520,37.BF-UC290F鐩爣,45.CHF-V2,44.OES Elite URS,47.JF/TJF-260V,48.GIF-H290T,49.CF-HQ290L/I</value>
+ </labels>
+ <labels>
+ <fullName>Key_Product_Mapping</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴樼暐浜у搧鏄犲皠鍏崇郴</shortDescription>
+ <value
+ >{"01.CV-290":"1","03.涓婃秷鍖栨斁澶у唴闀�":"3","04.涓嬫秷鍖栨斁澶у唴闀�":"4","07.GF-UCT260":"7","09.BF-290闀滃瓙":"9","14.OTV-S400 4K涓绘満":"14","15.OTV-S300":"15","28.ESG-400":"28","29.USG-400":"29","34.TB-0535":"20","35.TB-0520":"21","37.BF-UC290F":"22","44.OES Elite URS":"23","45.CHF-V2":"24","47.JF/TJF-260V":"25","48.GIF-H290T":"26","49.CF-HQ290L/I":"27"}</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_AddQuestion</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Add Question</shortDescription>
+ <value>Add Question</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Anonymous</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Anonymous</shortDescription>
+ <value>Anonymous</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Answer_as</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Answer as</shortDescription>
+ <value>Answer as</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Cancel</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Cancel</shortDescription>
+ <value>Cancel</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Chatter</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Chatter</shortDescription>
+ <value>Chatter</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Chatter_Link</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Chatter Link</shortDescription>
+ <value>Chatter Link</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Community</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Community</shortDescription>
+ <value>Community</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_ContactWithCase</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Contact with Case</shortDescription>
+ <value>Contact with Case:</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_CurrentSurveys</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Current Surveys</shortDescription>
+ <value>Current Surveys</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_DelQuestion</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Delete Question</shortDescription>
+ <value>纭畾瑕佸垹闄よ繖涓棶棰樺悧锛�</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Delete</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Delete</shortDescription>
+ <value>Delete</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Delete_Confirm</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription
+ >Are you sure you want to delete this survey?</shortDescription>
+ <value>Are you sure you want to delete this survey?</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Edit</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Edit</shortDescription>
+ <value>Edit</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Email_Link_Anonymous</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Email Link, Anonymous</shortDescription>
+ <value>Email Link, Anonymous</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Email_Link_w_Contact_Case_Merge</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription
+ >Email Link w/ Contact & Case Merge</shortDescription>
+ <value>Email Link w/ Contact & Case Merge</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Email_Link_w_Contact_Merge</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Email Link w/ Contact Merge</shortDescription>
+ <value>Email Link w/ Contact Merge</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_EnterAllFields</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Enter all question fields</shortDescription>
+ <value>璇峰~濂芥墍鏈夌殑绌虹櫧</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_EnterRequiredFields</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Enter Required fields</shortDescription>
+ <value>璇峰洖绛旀墍鏈夊甫锛堝繀濉級鐨勯棶棰�</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_EnterSurveyName</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Enter Survey Name</shortDescription>
+ <value>Enter Survey Name</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_External_Please_Create_Site</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription
+ >For external facing surveys, please create a site first. You may still create i</shortDescription>
+ <value
+ >For external facing surveys, please create a site first. You may still create internal surveys without creating a site.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_FIXED</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>LABS_SF_FIXED</shortDescription>
+ <value>Fixed</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_For_community_assistance_with_Survey_Force</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription
+ >For community assistance with Survey Force</shortDescription>
+ <value>For community assistance with Survey Force</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Getting_Help</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Getting Help</shortDescription>
+ <value>Getting Help</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_HeaderAndThankYou</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Header and Thank You</shortDescription>
+ <value>Header, Thank You & CSS</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Installation_Guide</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Installation Guide</shortDescription>
+ <value>Installation Guide</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Internal</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Internal</shortDescription>
+ <value>Internal</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_JustContact</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Just Contact</shortDescription>
+ <value>Just Contact</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Learn_More</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Learn More</shortDescription>
+ <value>Learn More</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_MakeANewSurvey</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>Make A New Survey</shortDescription>
+ <value>Make A New Survey</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_MakeNewSurvey</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Make New Survey</shortDescription>
+ <value>Make New Survey</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Make_a_Sample_Survey</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Make a Sample Survey</shortDescription>
+ <value>Make a Sample Survey</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_MaxLabel</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍓婇櫎浜堝畾</shortDescription>
+ <value>Maximum</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_MinLabel</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍓婇櫎浜堝畾</shortDescription>
+ <value>Minimum</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Next_Steps</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Next Steps</shortDescription>
+ <value>Next Steps</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_PleaseEnterTheList</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Please enter the list</shortDescription>
+ <value
+ >Please enter the list of answers/responses in the field below. Each value should be separated by a new line.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Question</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Question</shortDescription>
+ <value>Question</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Required</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Required</shortDescription>
+ <value>required</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_RequiredDescribe</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Please enter the describe</shortDescription>
+ <value
+ >Please enter the lowest and highest describe for the question.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_RequiredQuestion</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Required Question</shortDescription>
+ <value>Required Question</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Resources</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Resources</shortDescription>
+ <value>Resources</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Results</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Results</shortDescription>
+ <value>Results</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_SELECTSITE</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>SELECT SITE</shortDescription>
+ <value>--SELECT SITE--</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_SELECTTYPE</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>--SELECT--</shortDescription>
+ <value>--SELECT--</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Salesforce_Answers</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Salesforce Answers</shortDescription>
+ <value>Salesforce Answers</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Save</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Save</shortDescription>
+ <value>Save</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_SaveOrder</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Save Order</shortDescription>
+ <value>Save Order</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_SelectQuestionType</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Select Question Type</shortDescription>
+ <value>Select Question Type</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_SelectSitetodisplaySurvey</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Select Site to display Survey</shortDescription>
+ <value>Select Site to display Survey</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Share</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Share</shortDescription>
+ <value>Share</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Share_My_Survey</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Share My Survey</shortDescription>
+ <value>Share My Survey</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Sharing_Options</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Sharing Options</shortDescription>
+ <value>Sharing Options</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_SubmitSurvey</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Submit Survey</shortDescription>
+ <value>Submit Survey</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_SurveyForceIsOpenSource</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>SurveyForceIsOpenSource</shortDescription>
+ <value
+ >Survey Force is Open Source software. We welcome your issue reports, ideas, documentation, code tweaks and all other participation.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_SurveyURLLink</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Survey URL Link</shortDescription>
+ <value>Survey URL Link</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Survey_Force_is_unsupported</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Survey Force is unsupported</shortDescription>
+ <value>Survey Force is unsupported.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Survey_Force_on_Github</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Survey Force on Github</shortDescription>
+ <value>Survey Force on Github</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Survey_Name_Is_Required</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Survey Name Is Required</shortDescription>
+ <value>Survey Name is Required</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Survey_Site_Is_Required</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Survey Site Is Required</shortDescription>
+ <value>Survey Site Is Required</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Survey_Submitted_Thank_you</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription
+ >Your survey has been submitted. Thank you for taking our survey.</shortDescription>
+ <value
+ >Your survey has been submitted. Thank you for taking our survey.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_To_submit_ideas_or_issues</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>To submit ideas or issues</shortDescription>
+ <value>To submit ideas or issues</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_User_Guide</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>User Guide</shortDescription>
+ <value>User Guide</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_View_Results_In_New_Window</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>View Results In New Window</shortDescription>
+ <value>View Results In New Window</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_View_Sample_Survey</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>View Sample Survey</shortDescription>
+ <value>View Sample Survey</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Welcome_to_Survey_Force</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Welcome to Survey Force</shortDescription>
+ <value>Welcome to Survey Force</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_WrongPhone</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Wrong Phone</shortDescription>
+ <value>璇疯緭鍏ユ纭殑鐢佃瘽鍙风爜</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_X1_Create_a_sample_survey</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription
+ >1. Create a sample survey by clicking the button below.</shortDescription>
+ <value>1. Create a sample survey by clicking the button below.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_X2_External_Setup_Site</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription
+ >2. Set up a site if you would like to have external-facing surveys.</shortDescription>
+ <value
+ >2. Set up a site if you would like to have external-facing surveys.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_X3_Start_creating_your_first_survey</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription
+ >3. Start creating your first survey.</shortDescription>
+ <value>3. Start creating your first survey.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_You_have_already_taken_this_survey</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>You have already taken this survey!</shortDescription>
+ <value>You have already taken this survey!</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_Your_next_few_steps_are_easy</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>Your next few steps are easy.</shortDescription>
+ <value>Your next few steps are easy.</value>
+ </labels>
+ <labels>
+ <fullName>LABS_SF_please_visit</fullName>
+ <language>en_US</language>
+ <protected>true</protected>
+ <shortDescription>please visit</shortDescription>
+ <value>please visit</value>
+ </labels>
+ <labels>
+ <fullName>Large_Repair_Rank</fullName>
+ <categories
+ >澶т腑淇悊_绛夌骇 (闇�瑕佸崐瑙抂,]鍒嗗壊锛屾渶鍚庝竴涓篃瑕佸姞[,])</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶т腑淇悊_绛夌骇</shortDescription>
+ <value>A,B,C,AW,BW,CW,E1,EW,M1,M2,M3,</value>
+ </labels>
+ <labels>
+ <fullName>LastBuyUrl</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>棰勭暀浜у搧Url</shortDescription>
+ <value>a4v</value>
+ </labels>
+ <labels>
+ <fullName>Last_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鑰呭悕(濮撳悕)</shortDescription>
+ <value>瑷晱鑰呭悕(濮撳悕)</value>
+ </labels>
+ <labels>
+ <fullName>LeaderID_Zhu</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瀹㈡埛鎵瑰噯璐熻矗浜篒D</shortDescription>
+ <value>00510000001rukvAAA</value>
+ </labels>
+ <labels>
+ <fullName>LeaderId_YD</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>LeaderId_Zhu鐨勬矡閫氬簲绛�</shortDescription>
+ <value>0051000000AJrqaAAD,0051000000CLfaV,0051000000E6hXhAAJ</value>
+ </labels>
+ <labels>
+ <fullName>LeaveStaffRole</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>LeaveStaffRole</shortDescription>
+ <value>00E10000001VDg2</value>
+ </labels>
+ <labels>
+ <fullName>ListPrice</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>ListPrice</shortDescription>
+ <value>涓绘姤浠蜂环鏍�</value>
+ </labels>
+ <labels>
+ <fullName>ListPrice_In</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>ListPrice锛堝唴璨匡級</shortDescription>
+ <value>ListPrice锛堝唴璨匡級</value>
+ </labels>
+ <labels>
+ <fullName>ListPrice_Out</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>ListPrice锛堝璨匡級</shortDescription>
+ <value>ListPrice锛堝璨匡級</value>
+ </labels>
+ <labels>
+ <fullName>ListShipLimit</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ListShipLimit</shortDescription>
+ <value>1500</value>
+ </labels>
+ <labels>
+ <fullName>Loading_Report_Chart</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Loading Report Chart</shortDescription>
+ <value>姝e湪鍔犺浇鎶ヨ〃鍥捐〃...</value>
+ </labels>
+ <labels>
+ <fullName>Log_IO_Flag</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娴嬭瘯Log杈撳嚭</shortDescription>
+ <value>Keep</value>
+ </labels>
+ <labels>
+ <fullName>Lost_Information</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>澶卞崟淇℃伅</shortDescription>
+ <value>澶卞崟淇℃伅</value>
+ </labels>
+ <labels>
+ <fullName>MC_All</fullName>
+ <categories>缁翠慨鍚堝悓,鏃ユ姤,璺熻繘</categories>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓瑙嗗浘_鏈暘鐢�</shortDescription>
+ <value>/a0H?fcf=00B10000003nQlf</value>
+ </labels>
+ <labels>
+ <fullName>MC_KeepPrice_Month</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>MC_KeepPrice_Month</shortDescription>
+ <value>3</value>
+ </labels>
+ <labels>
+ <fullName>MC_New_AddMonth</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>MC_New_AddMonth锛�6涓湀鍓嶏級</shortDescription>
+ <value>-6</value>
+ </labels>
+ <labels>
+ <fullName>Main_Visit_Location</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>涓汇仾瑷晱鍫存墍</shortDescription>
+ <value>涓汇仾瑷晱鍫存墍</value>
+ </labels>
+ <labels>
+ <fullName>MaintenanceTask</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_缁翠慨鍚堝悓浠诲姟</shortDescription>
+ <value>01210000000VLJeAAO</value>
+ </labels>
+ <labels>
+ <fullName>Maintenance_EquipmentInfo</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >缁存姢浜у搧涓绘暟鎹甠澶囧搧淇℃伅缁存姢閭欢閫楀彿鍒樻窇濞�,瀹嬪啺,寮犲仴</shortDescription>
+ <value
+ >'00510000001PXh9AAG','00510000000gLgXAAU','00510000000gLfoAAE'</value>
+ </labels>
+ <labels>
+ <fullName>Maintenance_GuranteePrice</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >缁存姢浜у搧涓绘暟鎹甠澶氬勾淇濅环鏍肩淮鎶ら偖浠堕�楀彿鍔犺棨闆呭+锛屾潕浣筹紝瀹嬪啺锛屽紶鏅ㄦ�★紝鏉庢緞浜紝鏉庝紵鑹�</shortDescription>
+ <value
+ >'00510000007cnWzAAI','00510000001OHfkAAG','00510000000gLgXAAU','00510000002ZJQTAA4','00510000000gW7MAAU','00510000007cXA9AAM'</value>
+ </labels>
+ <labels>
+ <fullName>Maintenance_ImportantProduct</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >缁存姢浜у搧涓绘暟鎹甠閲嶇偣浜у搧鍖哄垎缁存姢閭欢閫楀彿榛勬壙銆侀儹姣撴銆佹补鏅撴櫒</shortDescription>
+ <value
+ >'00510000000gWAOAA2','0051000000AJrqaAAD','0051000000AIvdMAAT'</value>
+ </labels>
+ <labels>
+ <fullName>Maintenance_RepairInfo01</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >缁存姢浜у搧涓绘暟鎹甠淇悊淇℃伅缁存姢01閭欢閫楀彿瀹嬪啺,楂樻枃鍚�,寮犲仴</shortDescription>
+ <value
+ >'0051000000Baw3aAAB','00510000000gLgXAAU','00510000000gLfoAAE'</value>
+ </labels>
+ <labels>
+ <fullName>Maintenance_RepairInfo02</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >缁存姢浜у搧涓绘暟鎹甠淇悊淇℃伅缁存姢02閭欢閫楀彿闄堟�濅匠,鏉ㄦ煶,閾冩湪 鍕�</shortDescription>
+ <value
+ >'0051000000CLtGtAAL','00510000001tsXJAAY','00510000005oYPaAAM'</value>
+ </labels>
+ <labels>
+ <fullName>Maintenance_base01</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >缁存姢浜у搧涓绘暟鎹甠鍩虹01閭欢閫楀彿娌规檽鏅紝閮瘬妤狅紝淇炴緶銆佽碍鑺炽�侀檲灏忓�┿�佷箶鐞︺�佺帇绾㈤湠</shortDescription>
+ <value
+ >'0051000000AIvdMAAT','0051000000AJrqaAAD','00510000001OTvQAAW','00510000000gyOJAAY','00510000004qadzAAA','00510000001OTwOAAW','00510000001OTvSAAW'</value>
+ </labels>
+ <labels>
+ <fullName>Maintenance_base02</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >缁存姢浜у搧涓绘暟鎹甠鍩虹02閭欢閫楀彿鍒嗛殧Id鍛ㄨ搲銆佹瘯鏄庨懌銆佸叧璐濆Ξ銆佸瘒闈欍�佹潕绱犺姵銆佽档闆洴銆佸畫鐪熴�佹椽鏁忓崕銆佹潕閿�</shortDescription>
+ <value
+ >'00510000000gaYyAAI','00510000003MkTbAAK','00510000001O6HoAAK','00510000000gKcjAAE','00510000005dthJAAQ','00510000008pVbWAAU','00510000000gKcAAAU','00510000000gW97AAE','00510000001tsVXAAY'</value>
+ </labels>
+ <labels>
+ <fullName>Maintenance_base03</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >缁存姢浜у搧涓绘暟鎹甠鍩虹01閭欢閫楀彿鏉庣粴銆佺帇娴峰銆佺鐜�</shortDescription>
+ <value
+ >'0051s0000015y2TAAQ','00510000000gWAQAA2','00510000001rukvAAA'</value>
+ </labels>
+ <labels>
+ <fullName>Meeting_Information</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>浼氳淇℃伅</shortDescription>
+ <value>浼氳淇℃伅</value>
+ </labels>
+ <labels>
+ <fullName>Message_001</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>渚℃牸銈广儐銉笺偪銈圭⒑瑾嶇敤</shortDescription>
+ <value
+ >鏄庣窗銇ㄣ優銈广偪銇х暟銇倠鍟嗗搧銇屻亗銈娿伨銇欍�傘優銈广偪鍊ゃ伀澶夋洿銇椼伨銇欍亱锛�</value>
+ </labels>
+ <labels>
+ <fullName>Message_002</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇濆瓨銈掑畬浜嗐仐銇俱仐銇熴��</shortDescription>
+ <value>淇濆瓨銈掑畬浜嗐仐銇俱仐銇熴��</value>
+ </labels>
+ <labels>
+ <fullName>Message_003</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >娲诲嫊銇墛闄ゃ倰琛屻亜銇俱仚銆傘倛銈嶃仐銇勩仹銇欍亱锛�</shortDescription>
+ <value>娲诲嫊銇墛闄ゃ倰琛屻亜銇俱仚銆傘倛銈嶃仐銇勩仹銇欍亱锛�</value>
+ </labels>
+ <labels>
+ <fullName>Message_004</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鈥�255鏂囧瓧銇俱仹鍙兘銇с仚銆�(鏀硅銇�1鏂囧瓧鍒�)</shortDescription>
+ <value>鈥�255鏂囧瓧銇俱仹鍙兘銇с仚銆�(鏀硅銇�1鏂囧瓧鍒�)</value>
+ </labels>
+ <labels>
+ <fullName>Message_005</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >纰鸿獚鍑︾悊銈掕銇勩伨銇欍�傘倛銈嶃仐銇勩仹銇欍亱锛�</shortDescription>
+ <value>纰鸿獚鍑︾悊銈掕銇勩伨銇欍�傘倛銈嶃仐銇勩仹銇欍亱锛�</value>
+ </labels>
+ <labels>
+ <fullName>Message_EventBefDel</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>琛屽嫊銇墛闄ゃ倰鎶戝埗銇欍倠銉堛儶銈兗鐢�</shortDescription>
+ <value>娲诲嫊銇墛闄ゃ仹銇嶃伨銇涖倱</value>
+ </labels>
+ <labels>
+ <fullName>MyConfirmationofAwardTask_Tender</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>涓爣缁撴灉纭浠诲姟</shortDescription>
+ <value>/a3V?fcf=00B10000006iHcR</value>
+ </labels>
+ <labels>
+ <fullName>MyDr</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>MyDr銇伩</shortDescription>
+ <value>MyDr銇伩</value>
+ </labels>
+ <labels>
+ <fullName>MyLostTask_Tender</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶卞崟浠诲姟鎶ュ憡</shortDescription>
+ <value>/a3V?fcf=00B10000006iHcW</value>
+ </labels>
+ <labels>
+ <fullName>NFM001_IsOn</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>NFM001 IsOn</shortDescription>
+ <value>1</value>
+ </labels>
+ <labels>
+ <fullName>New</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>New</shortDescription>
+ <value>鏂板缓</value>
+ </labels>
+ <labels>
+ <fullName>New_Daily</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏂拌鏃ュ牨</shortDescription>
+ <value>鏂拌鏃ュ牨</value>
+ </labels>
+ <labels>
+ <fullName>New_Inquiry</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏂板璇环</shortDescription>
+ <value>鏂板璇环</value>
+ </labels>
+ <labels>
+ <fullName>New_Registration</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏂拌鐧婚尣</shortDescription>
+ <value>鏂拌鐧婚尣</value>
+ </labels>
+ <labels>
+ <fullName>Next</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>娆°伄</shortDescription>
+ <value>娆°伄</value>
+ </labels>
+ <labels>
+ <fullName>No_Province_Selected</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>No Province Selected</shortDescription>
+ <value>娌℃湁閫夋嫨鐪併��</value>
+ </labels>
+ <labels>
+ <fullName>No_Text</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐒�</shortDescription>
+ <value>鐒�</value>
+ </labels>
+ <labels>
+ <fullName>No_User_Selected</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>No User Selected</shortDescription>
+ <value>娌℃湁閫夋嫨鐢ㄦ埛銆�</value>
+ </labels>
+ <labels>
+ <fullName>NotExist_Batch_User</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >銆孊atch銆嶃仺銇勩亞銉︺兗銈躲兗銇屽瓨鍦ㄣ仐銇俱仜銈�</shortDescription>
+ <value>銆孊atch銆嶃仺銇勩亞銉︺兗銈躲兗銇屽瓨鍦ㄣ仐銇俱仜銈�</value>
+ </labels>
+ <labels>
+ <fullName>NotExist_DeptClass</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐瑾插銇儏鍫便倰鍙栧緱銇с亶銇俱仜銈�</shortDescription>
+ <value>鎴︾暐瑾插銇儏鍫便倰鍙栧緱銇с亶銇俱仜銈�</value>
+ </labels>
+ <labels>
+ <fullName>OBA2_opportunity</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OBA2璇环绠$悊</shortDescription>
+ <value>00e10000000s2c6</value>
+ </labels>
+ <labels>
+ <fullName>OBA7_tender_opp</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OBA7鎷涙爣+璇环</shortDescription>
+ <value>00e10000000s3Jp</value>
+ </labels>
+ <labels>
+ <fullName>OBSAP_Group_Mail</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>obsap閭欢缁勫湴鍧�</shortDescription>
+ <value>CN-OBSAP-BidManagement@olympus.com</value>
+ </labels>
+ <labels>
+ <fullName>OBSAP_QuoteIrai_Mail_Detection</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎶ヤ环濮旀墭閭欢妫�娴�</shortDescription>
+ <value>invalid</value>
+ </labels>
+ <labels>
+ <fullName>OCM_Direct</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OCM鐩存帴璨╁2</shortDescription>
+ <value>OCM鐩存帴璨╁2</value>
+ </labels>
+ <labels>
+ <fullName>OCM_Management_Province_Mapping</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OCM_Management_Province_Mapping</shortDescription>
+ <value
+ >娴欐睙:鏉窞,婀栧寳:姝︽眽,榛戦緳姹�:鍝堝皵婊�,璐靛窞:璐甸槼,浜戝崡:鏄嗘槑,閲嶅簡:閲嶅簡,瀹佸:閾跺窛,娌冲崡:閮戝窞,鏂扮枂:涔岄瞾鏈ㄩ綈,灞变笢:娴庡崡,娌冲寳:鐭冲搴�,澶╂触:澶╂触,瀹夊窘:鍚堣偉,绂忓缓:绂忓窞,姹熻タ:鍗楁槍,姹熻嫃:鍗椾含,鍥涘窛/瑗胯棌:鎴愰兘,娌堥槼:娌堥槼,骞夸笢:骞垮窞,灞辫タ:澶師,婀栧崡:闀挎矙,鍚夋灄:闀挎槬,澶ц繛:澶ц繛,涓婃捣:涓婃捣,鐢樿們:鍏板窞,鍖椾含:鍖椾含,闈掓捣:瑗垮畞,鍐呰挋鍙�:鍛煎拰娴╃壒,闄曡タ:瑗垮畨,骞胯タ:鍗楀畞,娣卞湷:娣卞湷,闈掑矝:闈掑矝</value>
+ </labels>
+ <labels>
+ <fullName>OCM_NoTax</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OCM澹蹭笂浜堟脯閲戦锛堢◣鎶溿亶锛�</shortDescription>
+ <value>OCM澹蹭笂浜堟脯閲戦锛堢◣鎶溿亶锛�</value>
+ </labels>
+ <labels>
+ <fullName>ODS_Null_Update_Sign</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ODS绌烘洿鏂版爣绛�</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>OFSErrorDuplication</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OFSErrorDuplication</shortDescription>
+ <value>閲嶈鎿嶄綔锛�</value>
+ </labels>
+ <labels>
+ <fullName>OFSErrorFailure</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OFSErrorFailure</shortDescription>
+ <value>Failure</value>
+ </labels>
+ <labels>
+ <fullName>OFSErrorMessage</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OFSErrorMessage</shortDescription>
+ <value>Message</value>
+ </labels>
+ <labels>
+ <fullName>OFSErrorNotFound</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OFSErrorNotFound</shortDescription>
+ <value>No matching record was found</value>
+ </labels>
+ <labels>
+ <fullName>OFSErrorStatus</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OFSErrorStatus</shortDescription>
+ <value>status</value>
+ </labels>
+ <labels>
+ <fullName>OFSErrorSuccess</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OFSErrorSuccess</shortDescription>
+ <value>Success</value>
+ </labels>
+ <labels>
+ <fullName>OLYProduct</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>濂ユ灄宸存柉浜у搧</shortDescription>
+ <value>01210000000aMAF</value>
+ </labels>
+ <labels>
+ <fullName>OLY_delevery_order</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OLY_delevery_order</shortDescription>
+ <value>OLYMPUS鍙戣揣璁㈠崟</value>
+ </labels>
+ <labels>
+ <fullName>OPD</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_OPD</shortDescription>
+ <value>01210000000cWfX</value>
+ </labels>
+ <labels>
+ <fullName>OPDTPMailboxGroup</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OPD鎷嶇収閭缇ょ粍</shortDescription>
+ <value
+ >OCM_Asset@olympus.com.cn;OCM_AssetGZ@olympus.com.cn;OCM_AssetSH@olympus.com.cn;lihuijuan@prec-tech.com</value>
+ </labels>
+ <labels>
+ <fullName>OPD_Report</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OPD_Report</shortDescription>
+ <value>00O10000006RfCu</value>
+ </labels>
+ <labels>
+ <fullName>OPD_Report_Jump</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OPD_Report_Jump</shortDescription>
+ <value>00O10000006Ro0B</value>
+ </labels>
+ <labels>
+ <fullName>OPD_RunTime</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OPD浠诲姟杩愯鏃堕棿</shortDescription>
+ <value>15</value>
+ </labels>
+ <labels>
+ <fullName>OPD_Taiwan</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OPD/SIS</shortDescription>
+ <value>OPD/SIS</value>
+ </labels>
+ <labels>
+ <fullName>OPD_Taiwan_RecordType</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OPD銉昏窡鍙�</shortDescription>
+ <value>OPD銉昏窡鍙�</value>
+ </labels>
+ <labels>
+ <fullName>OSFBacth_Execute_Day</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >Opportunity_Shipments_ForecastBatch鎵ц鏃�</shortDescription>
+ <value>1</value>
+ </labels>
+ <labels>
+ <fullName>OSH</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OSH</shortDescription>
+ <value>00e10000000hl7wAAA,00e10000000xnoOAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion1</fullName>
+ <categories>4鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗竴涓湀姣旈噸</shortDescription>
+ <value>4.5</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion10</fullName>
+ <categories>1鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗崄涓湀姣旈噸</shortDescription>
+ <value>7.25</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion11</fullName>
+ <categories>2鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗崄涓�涓湀姣旈噸</shortDescription>
+ <value>4.06</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion12</fullName>
+ <categories>3鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗崄浜屼釜鏈堟瘮閲�</shortDescription>
+ <value>17.69</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion2</fullName>
+ <categories>5鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗簩涓湀姣旈噸</shortDescription>
+ <value>5.22</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion3</fullName>
+ <categories>6鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗笁涓湀姣旈噸</shortDescription>
+ <value>8.28</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion4</fullName>
+ <categories>7鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗洓涓湀姣旈噸</shortDescription>
+ <value>6.82</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion5</fullName>
+ <categories>8鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗簲涓湀姣旈噸</shortDescription>
+ <value>7.13</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion6</fullName>
+ <categories>9鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗叚涓湀姣旈噸</shortDescription>
+ <value>17.05</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion7</fullName>
+ <categories>10鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗竷涓湀姣旈噸</shortDescription>
+ <value>2.64</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion8</fullName>
+ <categories>11鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗叓涓湀姣旈噸</shortDescription>
+ <value>6.16</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveDividedProportion9</fullName>
+ <categories>12鏈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>骞村害绗節涓湀姣旈噸</shortDescription>
+ <value>13.2</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionBF</fullName>
+ <categories>鐩爣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣鐢婚潰姣旈噸BF</shortDescription>
+ <value>6.1,6.5,6.8,5.9,6.6,14.5,5.4,8.3,10.5,11,6.3,12.1</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionENG</fullName>
+ <categories>鐩爣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣鐢婚潰姣旈噸ENG(钀ヤ笟鏈儴)</shortDescription>
+ <value>5.4,7.8,8.5,8.9,8.6,11.5,5.6,8.6,8.3,9.6,5.7,11.5</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionENGENG</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣 鐩爣鐢婚潰姣旈噸ENG(鑳介噺鏈儴)</shortDescription>
+ <value>5.9,6.25,5,5.85,8,9,8,11,11.2,9.8,7,13</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionENT</fullName>
+ <categories>鐩爣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣鐢婚潰姣旈噸ENT</shortDescription>
+ <value>4.1,6,9.1,5.5,8.2,15.2,5.2,10.3,10.4,7.9,8.2,9.9</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionET</fullName>
+ <categories>鐩爣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣鐢婚潰姣旈噸ET</shortDescription>
+ <value>5.3,7.8,8.6,7.6,10.7,10.7,5.7,8,8.8,8.8,6.2,11.8</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionGI</fullName>
+ <categories>鐩爣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣鐢婚潰姣旈噸GI</shortDescription>
+ <value>6,6.5,7.6,6.6,7.8,14.8,6,10.8,11.7,8.2,4.7,9.3</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionGS</fullName>
+ <categories>鐩爣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣鐢婚潰姣旈噸GS</shortDescription>
+ <value>6.7,5.7,5.9,6.9,7.8,15.4,5.1,8.7,11.7,8.4,5.6,12.1</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionGYN</fullName>
+ <categories>鐩爣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣鐢婚潰姣旈噸GYN</shortDescription>
+ <value>6.8,5.6,6.6,5.4,7.8,14,5.8,10.4,12.1,9.6,5.1,10.8</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionOTH</fullName>
+ <categories>鐩爣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣鐢婚潰姣旈噸OTH</shortDescription>
+ <value>0,0,0,0,0,0,0,0,0,0,0,0</value>
+ </labels>
+ <labels>
+ <fullName>ObjectiveProportionURO</fullName>
+ <categories>鐩爣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐩爣鐢婚潰姣旈噸URO</shortDescription>
+ <value>6.8,5.6,6.6,5.4,7.8,14,5.8,10.4,12.1,9.6,5.1,10.8</value>
+ </labels>
+ <labels>
+ <fullName>OdsToUserEmployee_No</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>涓存椂缁欏嚑涓敤鎴峰悓姝ユ洿鏂�</shortDescription>
+ <value
+ >om003898,om003901,om003866,om003908,om003917,om003886,om003881,om003913,om003909,om003910,om003911,om003912,om003904,om003915,om003089,om002651,om002107,aa207798,aa086591,om003888,om003890,om003891,om003865,om003900,om003902,om003903,om003892,om900270,om003905,om003906</value>
+ </labels>
+ <labels>
+ <fullName>OlympusSystem_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OlympusSystem_ID</shortDescription>
+ <value>00510000000gmxH</value>
+ </labels>
+ <labels>
+ <fullName>Olympus_AccountID_Internal_staff</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Olympus绀惧唴 鍏朵粬 绀惧唴鐢ㄦ埛</shortDescription>
+ <value>0011000000eTSPC</value>
+ </labels>
+ <labels>
+ <fullName>Olympus_Dummy_Asset</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>绯荤粺绠$悊鐢� Dummy 淇濅綉璁惧</shortDescription>
+ <value>02i10000003F6Og</value>
+ </labels>
+ <labels>
+ <fullName>Olympus_Dummy_MC</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>绯荤粺绠$悊鐢� Dummy 缁翠慨鍚堝悓</shortDescription>
+ <value>a0H1000000JgvcA</value>
+ </labels>
+ <labels>
+ <fullName>Olympus_Dummy_Repair</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>绯荤粺绠$悊鐢� Dummy 淇悊</shortDescription>
+ <value>a0J1000000GjGef</value>
+ </labels>
+ <labels>
+ <fullName>OnCall_ID</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>OnCall_ID</shortDescription>
+ <value>/a0e?fcf=00B100000028ypZ</value>
+ </labels>
+ <labels>
+ <fullName>OppSpecialApply</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璇环娉ㄦ畫鐗规畩瀵瑰簲</shortDescription>
+ <value>a3W</value>
+ </labels>
+ <labels>
+ <fullName>OppWithoutConform</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璇环(鏈浆鎹�)</shortDescription>
+ <value>/a2Y?fcf=00B10000006hrU6</value>
+ </labels>
+ <labels>
+ <fullName>Opp_Button</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇濆瓨銇椼仸绲備簡</shortDescription>
+ <value>淇濆瓨銇椼仸绲備簡</value>
+ </labels>
+ <labels>
+ <fullName>Opp_Name</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><娼滃湪瀹㈡埛>璇环鍚嶇О</shortDescription>
+ <value>00N10000002EjE1</value>
+ </labels>
+ <labels>
+ <fullName>Oppor_sepKey</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Oppor_sepKey</shortDescription>
+ <value>a2c</value>
+ </labels>
+ <labels>
+ <fullName>Opportunity</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>寮曞悎</shortDescription>
+ <value>寮曞悎</value>
+ </labels>
+ <labels>
+ <fullName>OpportunityFollow</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_璇环璺熻繘</shortDescription>
+ <value>01210000000cWfw</value>
+ </labels>
+ <labels>
+ <fullName>Opportunity_Cancel_WIN_ByAPI</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎺ュ彛浼犲叆璇环鍙栨秷WIN鐞嗙敱</shortDescription>
+ <value>1.缁堟鍚堝悓</value>
+ </labels>
+ <labels>
+ <fullName>Opportunity_Columns</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Opportunity_Columns</shortDescription>
+ <value
+ >Hospital__c,AccountId,Sales_Root__c,Opportunity_Category__c,Purchase_Type__c,Promise_Class__c,Fund_Basis__c,SAP_Province__c,StageName</value>
+ </labels>
+ <labels>
+ <fullName>Opportunity_Creating</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏃ュ牨鐢婚潰銇仱銇嬨亞銉兗銉変綔鎴�</shortDescription>
+ <value>銉兗銉変綔鎴�</value>
+ </labels>
+ <labels>
+ <fullName>Opportunity_stage</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><缁忛攢鍟嗚浠�>璇环闃舵</shortDescription>
+ <value>00N10000006qOFb</value>
+ </labels>
+ <labels>
+ <fullName>PAE</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>PAE鍒ゅ畾璁板綍</shortDescription>
+ <value>PAE鍒ゅ畾缁撴灉</value>
+ </labels>
+ <labels>
+ <fullName>PIPL_Input_Account_Error_Msg</fullName>
+ <categories>PIPL</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>PIPL Input Account Error Msg</shortDescription>
+ <value>璇峰厛杈撳叆鎴樼暐绉戝鍒嗙被!</value>
+ </labels>
+ <labels>
+ <fullName>PIPL_Name_Label</fullName>
+ <categories>PIPL</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>PIPL Name Label</shortDescription>
+ <value>濮撳悕</value>
+ </labels>
+ <labels>
+ <fullName>PIPL_Search_Contact_Label</fullName>
+ <categories>PIPL</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>PIPL Search Contact Label</shortDescription>
+ <value>璇疯緭鍏ヨ仈绯讳汉濮撳悕...</value>
+ </labels>
+ <labels>
+ <fullName>Paid_A_Courtesy_Call</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绀艰妭鎬ф嫓璁�</shortDescription>
+ <value>绀艰妭鎬ф嫓璁�</value>
+ </labels>
+ <labels>
+ <fullName>Paste_IE</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>璨间粯锛圛E銇伩锛�</shortDescription>
+ <value>璨间粯</value>
+ </labels>
+ <labels>
+ <fullName>Payment_Block_Leader_DB</fullName>
+ <categories>鍒� 鑾硅幑</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓浠樻璁″垝_涓滃寳</shortDescription>
+ <value>00510000001O8cHAAS</value>
+ </labels>
+ <labels>
+ <fullName>Payment_Block_Leader_HB</fullName>
+ <categories>娲� 璐虹敺</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓浠樻璁″垝_鍗庡寳</shortDescription>
+ <value>00510000002ZZTcAAO</value>
+ </labels>
+ <labels>
+ <fullName>Payment_Block_Leader_HD</fullName>
+ <categories>闄� 鏄庤禑</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓浠樻璁″垝_鍗庝笢</shortDescription>
+ <value>00510000000gW96AAE</value>
+ </labels>
+ <labels>
+ <fullName>Payment_Block_Leader_HN</fullName>
+ <categories>鏈� 闈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓浠樻璁″垝_鍗庡崡</shortDescription>
+ <value>00510000006jiSoAAI</value>
+ </labels>
+ <labels>
+ <fullName>Payment_Block_Leader_HNVice</fullName>
+ <categories>涓� 钑婅姵</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓浠樻璁″垝_鍗庡崡鍓�</shortDescription>
+ <value>00510000001OOQTAA4</value>
+ </labels>
+ <labels>
+ <fullName>Payment_Block_Leader_SD</fullName>
+ <categories>鑻� 鐚緣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓浠樻璁″垝_灞变笢</shortDescription>
+ <value>00510000001O6I6AAK</value>
+ </labels>
+ <labels>
+ <fullName>Payment_Block_Leader_XB</fullName>
+ <categories>绁� 鐞洩</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓浠樻璁″垝_瑗垮寳</shortDescription>
+ <value>00510000002Y5QWAA0</value>
+ </labels>
+ <labels>
+ <fullName>Payment_Block_Leader_XN</fullName>
+ <categories>浣� 瀛︾惣</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁翠慨鍚堝悓浠樻璁″垝_瑗垮崡</shortDescription>
+ <value>00510000005V9QGAA0</value>
+ </labels>
+ <labels>
+ <fullName>Pending</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐢宠珛涓�</shortDescription>
+ <value>鐢宠珛涓�</value>
+ </labels>
+ <labels>
+ <fullName>Percent</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>锛�</shortDescription>
+ <value>锛�</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_Createdashboard_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆嗘柊寤轰华琛ㄦ澘鐨処D</shortDescription>
+ <value>0PS10000000OeAsGAK</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_ENDOPARTNER_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆咵NDOPARTNER浜嬩笟绠$悊閮ㄦ潈闄愮殑ID</shortDescription>
+ <value>0PS10000000BVPiGAO</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_EditCompetitorAsset_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆嗙珵浜変骇鍝佺紪杈戠殑ID</shortDescription>
+ <value>0PS10000000ncweGAA</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_Group_purchse_dept_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆嗛泦涓噰璐鐨処D</shortDescription>
+ <value>0PS10000000OQSYGA4</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_P002_Agent_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆哖002_缁忛攢鍟嗘椿鍔ㄧ殑ID</shortDescription>
+ <value>0PS100000007aJhGAI</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_P002_OCM_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆哖002_OCM娲诲姩鐨処D</shortDescription>
+ <value>0PS100000007aJgGAI</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_Plan_report_permission_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆嗚鍒掓姤琛�/浠〃鏉跨殑ID</shortDescription>
+ <value>0PS10000000OfVDGA0</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_ProductCost_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆嗘煡鐪嬩骇鍝佹垚鏈殑ID</shortDescription>
+ <value>0PS10000000ibdqGAA</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_Report_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆嗕笅杞芥潈闄�(鎶ヨ〃杩愯鍜屼笅杞�)鐨処D</shortDescription>
+ <value>0PS10000000O8KZGA0</value>
+ </labels>
+ <labels>
+ <fullName>PermissionSet_SI_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏉冮檺闆哠I涓撳憳鏉冮檺鐨処D</shortDescription>
+ <value>0PS100000007aD8GAI</value>
+ </labels>
+ <labels>
+ <fullName>PersonalId</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>涓汉Id(鍙よ姵鍒�->鏋楄姵)</shortDescription>
+ <value>0051000000Baq8Z,00510000001OOJx</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_RightSide</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal Evaluation RightSide</shortDescription>
+ <value>鍙嶉涓�瑙�</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_RightSide_Report1_1_Name</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >Personal_Evaluation_RightSide_Report1_1_Name</shortDescription>
+ <value>1.鍙嶉鎶ュ憡鍘嗗彶</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_RightSide_Report1_2_Name</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >Personal_Evaluation_RightSide_Report1_2_Name</shortDescription>
+ <value>2.绀惧唴鍩硅鍙傚姞鍘嗗彶</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_RightSide_Report1_3_Name</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >Personal_Evaluation_RightSide_Report1_3_Name</shortDescription>
+ <value>3.CIC璇㈤棶鍘嗗彶</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabBF</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabBF</shortDescription>
+ <value>06.鍛煎惛绉�</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabBasic</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabBasic</shortDescription>
+ <value>01.鍩虹绠$悊</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabENT</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabENT</shortDescription>
+ <value>10.鑰抽蓟鍠夌</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabGI</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabGI</shortDescription>
+ <value>05.娑堝寲绉�</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabGS</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabGS</shortDescription>
+ <value>07.鏅绉�</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabGYN</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabGYN</shortDescription>
+ <value>09.濡囩</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabHP</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabHP</shortDescription>
+ <value>03.鍖婚櫌鍒嗘瀽(閿�鍞�)</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabHP_FSE</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabHP_FSE</shortDescription>
+ <value>04.鍖婚櫌鍒嗘瀽(鏈嶅姟)</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabNameJ</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabNameJ</shortDescription>
+ <value>02.閿�鍞笟缁╁樊寮傚垎鏋�</value>
+ </labels>
+ <labels>
+ <fullName>Personal_Evaluation_TabURO</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Personal_Evaluation_TabURO</shortDescription>
+ <value>08.娉屽翱绉�</value>
+ </labels>
+ <labels>
+ <fullName>Planning</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷堢敾</shortDescription>
+ <value>瑷堢敾</value>
+ </labels>
+ <labels>
+ <fullName>Planning_DivisionAId</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Planning_DivisionAId</shortDescription>
+ <value>005100000068sM8</value>
+ </labels>
+ <labels>
+ <fullName>Please_Save_Quote</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬銈掍繚瀛樸仐銇︺亸銇犮仌銇勩��</shortDescription>
+ <value>瑕嬬銈掍繚瀛樸仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>Post</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍖诲斧鍖哄垎锛堝焦鑱凤級</shortDescription>
+ <value>鍖诲斧鍖哄垎锛堝焦鑱凤級</value>
+ </labels>
+ <labels>
+ <fullName>Post_to_Install</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瀹夎鏃ュ湪Post鏃ヤ箣鍚�6涓湀鐨勮瘽涓嶇畻鏂板搧</shortDescription>
+ <value>6</value>
+ </labels>
+ <labels>
+ <fullName>Present</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璧犻��</shortDescription>
+ <value>璧犻��</value>
+ </labels>
+ <labels>
+ <fullName>Price</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>渚℃牸</shortDescription>
+ <value>渚℃牸</value>
+ </labels>
+ <labels>
+ <fullName>Price_Text</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Price</shortDescription>
+ <value>Price</value>
+ </labels>
+ <labels>
+ <fullName>Price_Valid_Period</fullName>
+ <categories>瑕嬬銈傘倞</categories>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬銈傘倞閲戦鏈夊姽鏈熼枔</shortDescription>
+ <value>30</value>
+ </labels>
+ <labels>
+ <fullName>Print_Button</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍗板埛</shortDescription>
+ <value>鍗板埛</value>
+ </labels>
+ <labels>
+ <fullName>Print_Content</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍗板埛鍐呭</shortDescription>
+ <value>鍗板埛鍐呭</value>
+ </labels>
+ <labels>
+ <fullName>Print_HPName</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍗板埛鐥呴櫌鍚嶇О</shortDescription>
+ <value>鍗板埛鐥呴櫌鍚嶇О</value>
+ </labels>
+ <labels>
+ <fullName>Pro_RecordType</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>绔炲搧涓绘満ID</shortDescription>
+ <value>01210000000aMAE</value>
+ </labels>
+ <labels>
+ <fullName>ProductDescription</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑁藉搧瑾槑</shortDescription>
+ <value>瑁藉搧瑾槑</value>
+ </labels>
+ <labels>
+ <fullName>ProductImageFolder</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>浜у搧鍥剧墖鏂囦欢澶�</shortDescription>
+ <value>00l10000001WZap</value>
+ </labels>
+ <labels>
+ <fullName>ProductRecordTypeID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>绔炰簤瀵规墜浜у搧璁板綍绫诲瀷id</shortDescription>
+ <value>01210000000aMAE,01210000000aMAD</value>
+ </labels>
+ <labels>
+ <fullName>Product_Code</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍝佺洰銈炽兗銉�</shortDescription>
+ <value>鍝佺洰銈炽兗銉�</value>
+ </labels>
+ <labels>
+ <fullName>Product_Date</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐢熸垚浜у搧鏈堥攢閲忚捣濮嬫椂闂�</shortDescription>
+ <value>2020-11-01</value>
+ </labels>
+ <labels>
+ <fullName>Product_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍝佺洰鍚�</shortDescription>
+ <value>鍝佺洰鍚�</value>
+ </labels>
+ <labels>
+ <fullName>Product_Search</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑁藉搧妞滅储</shortDescription>
+ <value>瑁藉搧妞滅储</value>
+ </labels>
+ <labels>
+ <fullName>Product_Select_Limit</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍟嗗搧妫�绱㈢敾闈㈢殑LIMIT鍊�</shortDescription>
+ <value>501</value>
+ </labels>
+ <labels>
+ <fullName>Profile2B1UserId</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >璺ㄥ尯鍩熷垎閰嶉檰鍚夛紙鍏ㄥ浗锛夈�佺帇浼熸尝锛堜笂娴凤級銆侀偟濠э紙骞垮窞锛夈�佹潕绾㈣暰锛堝寳浜級</shortDescription>
+ <value>00510000006jKtH,00510000003Mkv6,005100000069tgu</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId2F2B_2F4</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2F2B_鏈嶅姟绠$悊涓�2F4_鎶�鏈帹杩涢儴绠�妗D</shortDescription>
+ <value>00e10000000NbCT,00e10000000xno9,00e10000000Y3o5</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId2S1HP</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S1_閿�鍞尰闄㈡媴褰撶畝妗d</shortDescription>
+ <value>00e10000000xnp2AAA</value>
+ </labels>
+ <labels>
+ <fullName>ProfileIdN_2S1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S1_閿�鍞尰闄㈡媴褰� 鐨勭畝妗D锛堥潪鍗曠偣锛�</shortDescription>
+ <value>00e10000000xzQ0</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_0AA_119</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>0AA_119_钀ヤ笟绠$悊閮ㄧ殑绠�妗D</shortDescription>
+ <value>00e10000000dE0KAAU</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_0AA_119_M</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>0AA_119_钀ヤ笟绠$悊閮╛缁忕悊鐨勭畝妗D</shortDescription>
+ <value>00e10000000s3ELAAY</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_103</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId 103</shortDescription>
+ <value>00e10000000xnpRAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2F9_OSH</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId_2F9_OSH</shortDescription>
+ <value>00e10000000ebigAAA</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2J1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2J1_缁忚惀缁熸嫭绠$悊鑰�(OT)_闈炲崟鐐�</shortDescription>
+ <value>00e10000000NbBz</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2J3</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2J3_鐗圭害搴楃獥鍙g殑绠�妗D</shortDescription>
+ <value>00e10000000Nab7AAC</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2M4</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2M4_甯傚満浜у搧鏈儴鎷呭綋(璇环)鐨勭畝妗D</shortDescription>
+ <value>00e10000000Nb7iAAC</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2M5</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2M5_甯傚満鏈儴绐楀彛</shortDescription>
+ <value>00e10000000xyVi</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S1_閿�鍞尰闄㈡媴褰� 鐨勭畝妗D</shortDescription>
+ <value>00e10000000xnp2AAA</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S10</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S10_FSE绠$悊鑰呯畝妗D</shortDescription>
+ <value>00e10000000s2gXAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S2</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S2_閿�鍞骇鍝佹媴褰撶殑绠�妗D</shortDescription>
+ <value>00e10000000xnp7AAA</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S2_Price</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S2_閿�鍞骇鍝佹媴褰�(鏌ョ湅浠锋牸) 鐨勭畝妗D</shortDescription>
+ <value>00e10000001220iAAA</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S3</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S3_閿�鍞競鍦�&FSE绠$悊鑰呯殑绠�妗D</shortDescription>
+ <value>00e10000000xnpCAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S4</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S4_閿�鍞鐞嗚�呯殑绠�妗D</shortDescription>
+ <value>00e10000000xnpHAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S4_Chief</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S4_閿�鍞鐞嗚��(缁熸嫭鎬荤洃)鐨勭畝妗D</shortDescription>
+ <value>00e10000000hkasAAA</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S5</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S5_閿�鍞瓼SE鎷呭綋鐨勭畝妗D</shortDescription>
+ <value>00e10000000xnpMAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S6</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId_2S6</shortDescription>
+ <value>00e10000000xnpRAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S6_ENG</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId_2S6_ENG</shortDescription>
+ <value>00e10000000xyK6</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S7</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S7_閿�鍞湰閮ㄥ悎鍚岀鐞嗙獥鍙�</shortDescription>
+ <value>00e10000000xnpW</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2S8</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S8_閿�鍞鏀垮姪鐞嗙殑绠�妗D</shortDescription>
+ <value>00e10000000xnpbAAA</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_2s6dashboard</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >2S6_閿�鍞湰閮ㄧ獥鍙�&钀ヤ笟鍔╃悊(璁″垝浠〃鏉�)</shortDescription>
+ <value>00e10000000xyK6AAI</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_EquCenAdmin</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId 2B3_澶囧搧涓績绠$悊鑰�</shortDescription>
+ <value>00e10000000xnodAAA,00e100000012CwKAAU</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_EquCenAdminPic</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId_2B3_澶囧搧涓績绠$悊鑰�(鐓х墖)</shortDescription>
+ <value>00e100000012CwKAAU</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_EquCenCheckAndDepot</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId 2B2_澶囧搧涓績妫�鏌�&浠撳簱</shortDescription>
+ <value>00e10000000xnoYAAQ,00e100000012CwPAAU</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_EquipmentCenter</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId 2B1_澶囧搧涓績绐楀彛</shortDescription>
+ <value>00e10000000xnoTAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_GPI_IF</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId GPI_IF</shortDescription>
+ <value>00e10000000dEQxAAM</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_IThelp</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>绯荤粺绠$悊鍛榑IT鏀彺</shortDescription>
+ <value>00e10000000xo1DAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_OBA1zbjd</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OBA1鎷涙爣绠�妗�</shortDescription>
+ <value>00e10000000s2fZAAQ</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_OCSM_QARA1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>118_CFDA锛堣川閲忔硶瑙勬湰閮級鎷呭綋 绠�妗D</shortDescription>
+ <value>00e10000000eFwF</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_OCSM_QARA2</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>118_CFDA锛堣川閲忔硶瑙勬湰閮級绐楀彛 绠�妗D</shortDescription>
+ <value>00e10000000dCrn</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_SystemAdmin</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId SystemAdmin</shortDescription>
+ <value>00e10000000Y3o5AAC</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_SystemAdmin2</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId_SystemAdmin2</shortDescription>
+ <value
+ >00e10000000xyK6,00e10000000xnpR,00e10000000s2c6,00e10000000s3Jp</value>
+ </labels>
+ <labels>
+ <fullName>ProfileId_SystemAdminGPI</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ProfileId_SystemAdminGPI</shortDescription>
+ <value>00e10000000dEQxAAM</value>
+ </labels>
+ <labels>
+ <fullName>Profile_Skip_OneToOneCheck</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Profile_璺宠繃寰呭簾寮冩椂涓�瀵逛竴link楠岃瘉</shortDescription>
+ <value>00e100000012CwK</value>
+ </labels>
+ <labels>
+ <fullName>Province</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Province</shortDescription>
+ <value>鐪�</value>
+ </labels>
+ <labels>
+ <fullName>ProvinceMapStr</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>ProvinceMapStr</shortDescription>
+ <value
+ >{"浣嶉潤":"1474149552@qq.com","鍛ㄥ崼涓�":"1474149552@qq.com","瀛欑嚂":"gu_19162804615@163.com","瀹囨枃宕囧彂":"gu_19162804615@163.com","骞胯タ":"gu_19162804615@163.com","婀栧崡":"gu_19162804615@163.com","婀栧寳":"gu_19162804615@163.com","娴峰崡":"gu_19162804615@163.com","娣卞湷":"gu_19162804615@163.com","骞夸笢":"gu_19162804615@163.com","瑗垮寳":"gu_19162804615@163.com","涓滃寳":"gu_19162804615@163.com","鍗庡寳":"gu_19162804615@163.com","瑗垮崡":"gu_19162804615@163.com","璧典紵":"gu_19162804615@163.com","閮�濈惁":"gu_19162804615@163.com"}</value>
+ </labels>
+ <labels>
+ <fullName>ProvinceOrder_for_Evaluation</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐪佷竴瑙堥『搴忥紙鎸夌渷浠〃鏉匡級</shortDescription>
+ <value
+ >鍖椾含甯�,娌冲寳鐪�,澶╂触甯�,鍐呰挋鍙�,灞变笢鐪�,闈掑矝甯�,榛戦緳姹熺渷,鍚夋灄鐪�,杈藉畞鐪�,澶ц繛甯�,闄曡タ鐪�,灞辫タ鐪�,娌冲崡鐪�,闈掓捣鐪�,瀹佸鑷不鍖�,鏂扮枂鑷不鍖�,鐢樿們鐪�,鍥涘窛鐪�,瑗胯棌鑷不鍖�,閲嶅簡甯�,璐靛窞鐪�,浜戝崡鐪�,涓婃捣甯�,姹熻嫃鐪�,姹熻タ鐪�,绂忓缓鐪�,娴欐睙鐪�,瀹夊窘鐪�,骞夸笢鐪�,娣卞湷甯�,娴峰崡鐪�,骞胯タ鑷不鍖�,婀栧寳鐪�,婀栧崡鐪�</value>
+ </labels>
+ <labels>
+ <fullName>Purchase_Reason</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><缁忛攢鍟嗚浠�>璐拱鐞嗙敱</shortDescription>
+ <value>00N10000008rqHf</value>
+ </labels>
+ <labels>
+ <fullName>Purchase_Type</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><缁忛攢鍟嗚浠�>璁㈣揣娴佺▼绫诲埆</shortDescription>
+ <value>00N10000008rqHg</value>
+ </labels>
+ <labels>
+ <fullName>Purpose</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐩殑</shortDescription>
+ <value>鐩殑</value>
+ </labels>
+ <labels>
+ <fullName>Quantity</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏁伴噺</shortDescription>
+ <value>鏁伴噺</value>
+ </labels>
+ <labels>
+ <fullName>QuoteDecision_Button</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬姹哄畾</shortDescription>
+ <value>瑕嬬姹哄畾</value>
+ </labels>
+ <labels>
+ <fullName>QuoteEntryMaxLine</fullName>
+ <categories>瑕佸~姝f暣鏁帮紝鎶ヤ环鐢婚潰锛屾姤浠蜂緷璧栫敾闈�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎶ヤ环鐢婚潰鏈�澶ц鏁�</shortDescription>
+ <value>150</value>
+ </labels>
+ <labels>
+ <fullName>QuoteEntryMaxLine2</fullName>
+ <categories>瑕佸~姝f暣鏁帮紝鎶ヤ环鐢婚潰</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎶ヤ环鐢婚潰鏈�澶ц鏁�(鍙姤浠风敤)</shortDescription>
+ <value>30</value>
+ </labels>
+ <labels>
+ <fullName>Quote_AddressName</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>渚涜揣鍟�</shortDescription>
+ <value>渚涜揣鍟�</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Adjustment</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬瑾挎暣閲戦</shortDescription>
+ <value>瑕嬬瑾挎暣閲戦</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Agency1Amount_Rate</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎶ヤ环缁忛攢鍟�1閲戦姣斾緥</shortDescription>
+ <value>{"6.鍗庡崡":0.4,"Default":0.5}</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Amount</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閲戦</shortDescription>
+ <value>閲戦</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Client_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>椤у鍚�</shortDescription>
+ <value>椤у鍚�</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Comment</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬琛ㄨ銈炽儭銉炽儓</shortDescription>
+ <value>瑕嬬琛ㄨ銈炽儭銉炽儓</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Currency</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閫氳波</shortDescription>
+ <value>閫氳波</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Department</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绉戝</shortDescription>
+ <value>绉戝</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Expiration_Date</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬鏈夊姽鏈熼檺</shortDescription>
+ <value>瑕嬬鏈夊姽鏈熼檺</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Expiration_Date_Print</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬鏈夊姽鏈熼檺</shortDescription>
+ <value>瑕嬬鏈夊姽鏈熼檺</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Expirationdate</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬鏈夊姽鏈熼檺鏃�</shortDescription>
+ <value>瑕嬬鏈夊姽鏈熼檺鏃�</value>
+ </labels>
+ <labels>
+ <fullName>Quote_HospitalAmount_Rate</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎶ヤ环鍖婚櫌鍚堝悓閲戦姣斾緥</shortDescription>
+ <value>{"6.鍗庡崡":0.65,"Default":0.8}</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Mobile_Phone</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎼哄腐</shortDescription>
+ <value>鎼哄腐</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Owner</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬鎷呭綋</shortDescription>
+ <value>瑕嬬鎷呭綋</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Owner_Signature</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬鎷呭綋缃插悕</shortDescription>
+ <value>瑕嬬鎷呭綋缃插悕</value>
+ </labels>
+ <labels>
+ <fullName>Quote_PackingListManual</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍖呰瑙勬牸</shortDescription>
+ <value>鍖呰瑙勬牸</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Print</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬鍗板埛</shortDescription>
+ <value>瑕嬬鍗板埛</value>
+ </labels>
+ <labels>
+ <fullName>Quote_ProduceCompany</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐢熶骇浼佷笟</shortDescription>
+ <value>鐢熶骇浼佷笟</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Product_Code</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍟嗗搧銈炽兗銉�</shortDescription>
+ <value>鍟嗗搧銈炽兗銉�</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Product_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍟嗗搧鍚�</shortDescription>
+ <value>鍟嗗搧鍚�</value>
+ </labels>
+ <labels>
+ <fullName>Quote_SFDA_Approbation_No</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娉ㄥ唽璇佸彿/澶囨鍑瘉缂栧彿</shortDescription>
+ <value>娉ㄥ唽璇佸彿/澶囨鍑瘉缂栧彿</value>
+ </labels>
+ <labels>
+ <fullName>Quote_SalesPackagingUnit</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍗曚綅</shortDescription>
+ <value>鍗曚綅</value>
+ </labels>
+ <labels>
+ <fullName>Quote_Title</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>寰¤绌嶆浉</shortDescription>
+ <value>寰¤绌嶆浉</value>
+ </labels>
+ <labels>
+ <fullName>Quote_TotalPrice</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎬婚噾棰�</shortDescription>
+ <value>鎬婚噾棰�</value>
+ </labels>
+ <labels>
+ <fullName>Quote_UnitPrice</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍗曚环</shortDescription>
+ <value>鍗曚环</value>
+ </labels>
+ <labels>
+ <fullName>Quoto_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬鍚嶇О</shortDescription>
+ <value>瑕嬬鍚嶇О</value>
+ </labels>
+ <labels>
+ <fullName>Quoto_No</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬鐣彿</shortDescription>
+ <value>瑕嬬鐣彿</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail1_Inventory</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏1_鐩樼偣</shortDescription>
+ <value>01210000000kUD5</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail1_Invoice</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏1_鍙戠エ</shortDescription>
+ <value>01210000000kUDA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail1_Order</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏1_璁㈠崟</shortDescription>
+ <value>01210000000kUCl</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail1_Sale</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏1_閿�鍞�</shortDescription>
+ <value>01210000000kUD0</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail1_Shipment</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏1_鍑哄簱</shortDescription>
+ <value>01210000000kUCv</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail2_Delivery</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏2_鍙戣揣</shortDescription>
+ <value>01210000000kUDK</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail2_Return</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏2_杩斿搧</shortDescription>
+ <value>01210000000kUDP</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail_Adjust</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏_鍦ㄥ簱璋冩暣</shortDescription>
+ <value>01210000000c9dwAAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail_Arrive</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏_鍒拌揣</shortDescription>
+ <value>01210000000c9dxAAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail_Delivery</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏_鍙戣揣</shortDescription>
+ <value>01210000000c9dyAAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail_Inventory</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏_鐩樼偣</shortDescription>
+ <value>01210000000c9dzAAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail_Invoice</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏_鍙戠エ</shortDescription>
+ <value>012100000006JxJAAU</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail_Order</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏_璁㈠崟</shortDescription>
+ <value>01210000000c9e0AAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail_Sale</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏_閿�鍞�</shortDescription>
+ <value>01210000000c9e1AAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrderDetail_Shipment</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄庣粏_鍑哄簱</shortDescription>
+ <value>01210000000c9e2AAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrder_Arrive</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁㈠崟 鍒拌揣</shortDescription>
+ <value>01210000000c9dqAAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrder_Delivery</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁㈠崟 鍙戣揣</shortDescription>
+ <value>01210000000c9drAAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrder_Inventory</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁㈠崟 鐩樼偣</shortDescription>
+ <value>01210000000c9dsAAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrder_Invoice</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁㈠崟 鍙戠エ</shortDescription>
+ <value>012100000006JxEAAU</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrder_Order</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁㈠崟 璁㈠崟</shortDescription>
+ <value>01210000000c9dtAAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrder_Outboundorder</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁㈠崟 鍑哄簱鍗�</shortDescription>
+ <value>012100000006Jx9AAE</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrder_Overdue</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁㈠崟_閿�瀛�</shortDescription>
+ <value>01210000000cWbV</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrder_Sale</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁㈠崟 閿�鍞�</shortDescription>
+ <value>01210000000c9duAAA</value>
+ </labels>
+ <labels>
+ <fullName>RT_ConOrder_Shipment</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璁㈠崟 鍑鸿揣</shortDescription>
+ <value>01210000000c9dvAAA</value>
+ </labels>
+ <labels>
+ <fullName>Random_PW_NG</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Random PW NG</shortDescription>
+ <value>闅忔満瀵嗙爜鐢熸垚澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛�</value>
+ </labels>
+ <labels>
+ <fullName>Random_PW_OK</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Random PW OK</shortDescription>
+ <value
+ >闅忔満瀵嗙爜鐢熸垚鎴愬姛锛岃鏌ユ敹閭欢锛屽苟鐢ㄩ偖浠朵腑闄勫甫鐨勫瘑鐮佹墦寮�Excel</value>
+ </labels>
+ <labels>
+ <fullName>Rate75_63</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Rate75_63</shortDescription>
+ <value>0.8076915</value>
+ </labels>
+ <labels>
+ <fullName>Rate75_65</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Rate75_65</shortDescription>
+ <value>0.8333325</value>
+ </labels>
+ <labels>
+ <fullName>Rate75_66</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Rate75_66</shortDescription>
+ <value>0.846153</value>
+ </labels>
+ <labels>
+ <fullName>Rate75_68</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Rate75_68</shortDescription>
+ <value>0.871794</value>
+ </labels>
+ <labels>
+ <fullName>Rate83_63</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Rate83_63</shortDescription>
+ <value>0.7590366</value>
+ </labels>
+ <labels>
+ <fullName>Rate83_65</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Rate83_65</shortDescription>
+ <value>0.783133</value>
+ </labels>
+ <labels>
+ <fullName>Rate83_66</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Rate83_66</shortDescription>
+ <value>0.7951812</value>
+ </labels>
+ <labels>
+ <fullName>Rate83_68</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Rate83_68</shortDescription>
+ <value>0.8192776</value>
+ </labels>
+ <labels>
+ <fullName>ReceivingNoteWaitingReceipt_Show_Count</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >ReceivingNoteWaitingReceipt_Show_Count</shortDescription>
+ <value>100,300:100</value>
+ </labels>
+ <labels>
+ <fullName>RecordType_8</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎴︾暐绉戝鍒嗛 涓嶆槑</shortDescription>
+ <value>01210000000Qf03</value>
+ </labels>
+ <labels>
+ <fullName>RecordType_CampaignService</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏈嶅姟鎶�甯堣褰旾D</shortDescription>
+ <value>01210000000gQrTAAU</value>
+ </labels>
+ <labels>
+ <fullName>Registration</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐧婚尣</shortDescription>
+ <value>鐧婚尣</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyToBuNei</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閮ㄥ唴--鍙ら儴闀裤�佹灄閮ㄩ暱</shortDescription>
+ <value
+ >fangli_gu@olympus.com.cn;fang_lin@olympus.com.cn;sfdc_lvxueyan@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_Dongbei</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙涓滃寳</shortDescription>
+ <value
+ >zhicheng_zhao@olympus.com.cn;zhi_li@olympus.com.cn;beini_guan@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_HXLY</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙娑堝寲.鍛煎惛棰嗗煙瑙e喅鏂规鏈儴</shortDescription>
+ <value>ji_lu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_HXNJ</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙娑堝寲.鍛煎惛鍐呴暅浜嬩笟鏈儴</shortDescription>
+ <value>ji_lu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_Huabei</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙鍗庡寳</shortDescription>
+ <value
+ >haixia_mu@olympus.com.cn;zhi_li@olympus.com.cn;jingping_zhao@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_Huadong</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙鍗庝笢</shortDescription>
+ <value
+ >zhen_song@olympus.com.cn;jianqing_yang@olympus.com.cn;mingnan_xu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_Huanan</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙鍗庡崡</shortDescription>
+ <value
+ >lan_yu@olympus.com.cn;ruifang_yan@olympus.com.cn;junjie_xia@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_MA</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙MA</shortDescription>
+ <value>ji_lu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_SOLUTION</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙SOLUTION</shortDescription>
+ <value>jiali_yin@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_Shichang</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙甯傚満浼佸垝鏈儴</shortDescription>
+ <value>ji_lu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_Waike</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙澶栫浜嬩笟鏈儴</shortDescription>
+ <value>haihong_li@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_Xibei</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙瑗垮寳</shortDescription>
+ <value
+ >daqing_yan@olympus.com.cn;yan_song@olympus.com.cn;yuanyuan1_zhang@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_Xinan</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙瑗垮崡</shortDescription>
+ <value>wenwen_zhao@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RentalApplyFaultReplyTo_Yiliao</fullName>
+ <categories>妫�娴嬪垎鏋愭姤鍛婇偖浠剁兢缁�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寤鸿鎶勯�佷汉銆佸鍝佹�荤獥鍙鍖荤枟鏈嶅姟鏈儴</shortDescription>
+ <value>ji_lu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>Rental_Apply_Status_Settlement</fullName>
+ <categories>澶囧搧鍊熷嚭鐢宠,鎬�</categories>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Rental_Apply_Status_Settlement</shortDescription>
+ <value>寮曞綋娓堛伩</value>
+ </labels>
+ <labels>
+ <fullName>Rental_Apply_id</fullName>
+ <categories>鍕垮姩</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍒嗛厤id</shortDescription>
+ <value>a0t1000000B0LFmAAN</value>
+ </labels>
+ <labels>
+ <fullName>RepairAgainAn_Sendmail</fullName>
+ <categories>鍐嶄慨鐞嗚繑鍝佸垎鏋�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍐嶄慨鐞嗗垎鏋愬洖绛斿唴瀹规洿鏂板彂閫侀偖浠�</shortDescription>
+ <value
+ >sunxia@prec-tech.com;liucheng@prec-tech.com;lijin@prec-tech.com</value>
+ </labels>
+ <labels>
+ <fullName>RepairETQ</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>淇悊鍙戦�丒TQ杩囧ぇ鍙戦�侀偖浠�</shortDescription>
+ <value
+ >haijie_yin@olympus.com.cn,mengxin_zhou@olympus.com.cn,mingmeng_jian@olympus.com.cn,ningdan_song@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RepairUpdateTo</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>淇悊閭欢To</shortDescription>
+ <value
+ >Yang_Guo@olympus.com.cn;Qiqing_Li@olympus.com.cn;Yucheng_Hu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>RepairUpdatecc</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>淇悊鏇存柊cc</shortDescription>
+ <value
+ >hui_zhao@olympus.com.cn;Jiao_Liu@olympus.com.cn;Renren_Zhao@olympus.com.cn;Wenzhe_Li@olympus.com.cn;xiaoben_huang@Olympus.com.cn;Xiaomeng1_Liu@olympus.com.cn;Xin_Tan@olympus.com.cn;Yi_Yang@olympus.com.cn;Zihua_Ye@olympus.com.cn;Mengxin_Zhou@olympus.com.cn;MingMeng_Jian@olympus.com.cn;NingDan_Song@olympus.com.cn;Xinjian_Lei@olympus.com.cn;Haijie_Yin@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>Repair_All</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇悊銉撱儱銉糏D(銇濄伄浠�):鏈暘鐢�</shortDescription>
+ <value>/a0J?fcf=00B100000028Rmd</value>
+ </labels>
+ <labels>
+ <fullName>Repair_ID_General</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇悊銉撱儱銉糏D(涓�鑸�):鏈暘鐢�</shortDescription>
+ <value>/a0J?fcf=00B100000028u9M</value>
+ </labels>
+ <labels>
+ <fullName>Repair_ID_LTV</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇悊銉撱儱銉糏D(LTV):鏈暘鐢�</shortDescription>
+ <value>/a0J?fcf=00B100000028u9H</value>
+ </labels>
+ <labels>
+ <fullName>Repair_ID_SLTV</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇悊銉撱儱銉糏D(SLTV):鏈暘鐢�</shortDescription>
+ <value>/a0J?fcf=00B100000028u9C</value>
+ </labels>
+ <labels>
+ <fullName>Repair_Recovery</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇悊鍥炲弾</shortDescription>
+ <value>淇悊鍥炲弾</value>
+ </labels>
+ <labels>
+ <fullName>Report_Accompanied</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍚岃鍫卞憡鏇�</shortDescription>
+ <value>鍚岃鍫卞憡鏇�</value>
+ </labels>
+ <labels>
+ <fullName>Report_Returned_No_Results</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Report Returned No Results</shortDescription>
+ <value>鎶ヨ〃鏈繑鍥炵粨鏋溿��</value>
+ </labels>
+ <labels>
+ <fullName>Reporter</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍫卞憡鑰�</shortDescription>
+ <value>鍫卞憡鑰�</value>
+ </labels>
+ <labels>
+ <fullName>Request</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><缁忛攢鍟嗚浠�>濮旀墭浜嬮」</shortDescription>
+ <value>00N10000008rqHi</value>
+ </labels>
+ <labels>
+ <fullName>Request_Detail</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><缁忛攢鍟嗚浠�>濮旀墭浜嬮」璇︾粏</shortDescription>
+ <value>00N10000008rqHh</value>
+ </labels>
+ <labels>
+ <fullName>Required_Information</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>蹇呴爤鎯呭牨</shortDescription>
+ <value>蹇呴爤鎯呭牨</value>
+ </labels>
+ <labels>
+ <fullName>Row_Down</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>琛孌OWN</shortDescription>
+ <value>琛孌OWN</value>
+ </labels>
+ <labels>
+ <fullName>Row_Total_Sum</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>浼樻儬鎴愪氦浠�</shortDescription>
+ <value>浼樻儬鎴愪氦浠�</value>
+ </labels>
+ <labels>
+ <fullName>Row_Up</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>琛孶P</shortDescription>
+ <value>琛孶P</value>
+ </labels>
+ <labels>
+ <fullName>SAPSend_Button</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>SAP閫佷俊</shortDescription>
+ <value>SAP閫佷俊</value>
+ </labels>
+ <labels>
+ <fullName>SFDA_Status</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>SFDA銈广儐銉笺偪銈�</shortDescription>
+ <value>SFDA銈广儐銉笺偪銈�</value>
+ </labels>
+ <labels>
+ <fullName>SI_2M3_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2M3_SI閮ㄩ棬鎷呭綋id鍊�</shortDescription>
+ <value>00e10000000NakPAAS</value>
+ </labels>
+ <labels>
+ <fullName>SI_Group_MailAdd</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI缁勯偖浠跺湴鍧�</shortDescription>
+ <value>si_yingye@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>SI_Opp_Sec_1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI璇环_鍗庡寳鎷呭綋</shortDescription>
+ <value>0051000000AJrmJ</value>
+ </labels>
+ <labels>
+ <fullName>SI_Opp_Sec_2</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI璇环_涓滃寳鎷呭綋</shortDescription>
+ <value>0051000000AJrmJ</value>
+ </labels>
+ <labels>
+ <fullName>SI_Opp_Sec_3</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI璇环_瑗垮寳鎷呭綋</shortDescription>
+ <value>00510000005V2cA</value>
+ </labels>
+ <labels>
+ <fullName>SI_Opp_Sec_4</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI璇环_瑗垮崡鎷呭綋</shortDescription>
+ <value>0051000000AJrmJ</value>
+ </labels>
+ <labels>
+ <fullName>SI_Opp_Sec_5</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI璇环_鍗庝笢鎷呭綋</shortDescription>
+ <value>00510000001QRls</value>
+ </labels>
+ <labels>
+ <fullName>SI_Opp_Sec_6</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI璇环_鍗庡崡鎷呭綋</shortDescription>
+ <value>00510000001OOQW</value>
+ </labels>
+ <labels>
+ <fullName>SI_Stock_HD</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI_澶囪揣瀹℃壒浜篲鍗庝笢</shortDescription>
+ <value>00510000004pMLo</value>
+ </labels>
+ <labels>
+ <fullName>SI_Stock_HDHN</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI_澶囪揣瀹℃壒浜篲涓滃寳瑗垮崡</shortDescription>
+ <value>0051000000AJrmJ</value>
+ </labels>
+ <labels>
+ <fullName>SI_Stock_XBXN</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI_澶囪揣瀹℃壒浜篲瑗垮寳</shortDescription>
+ <value>0051000000AJrmJ</value>
+ </labels>
+ <labels>
+ <fullName>SLA</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_SLA</shortDescription>
+ <value>01210000000VLZO</value>
+ </labels>
+ <labels>
+ <fullName>SSBacth_Execute_Day</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SSBacth鎵ц鏃�</shortDescription>
+ <value>1</value>
+ </labels>
+ <labels>
+ <fullName>SSOPD_Report</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SSOPD_Report</shortDescription>
+ <value>00O10000006RfD9</value>
+ </labels>
+ <labels>
+ <fullName>SalesDept</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SalesDept</shortDescription>
+ <value>閿�鍞湰閮�</value>
+ </labels>
+ <labels>
+ <fullName>SalesDept_Short</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SalesDept_Short</shortDescription>
+ <value>鏈儴</value>
+ </labels>
+ <labels>
+ <fullName>Sales_And_Service</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞湇鍔�</shortDescription>
+ <value>閿�鍞湇鍔�</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Div</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>璨╁2鍖哄垎</shortDescription>
+ <value>璨╁2鍖哄垎</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Market</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞競鍦�</shortDescription>
+ <value>閿�鍞競鍦�</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Method</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><缁忛攢鍟嗚浠�>鎷涙爣鏂瑰紡</shortDescription>
+ <value>00N10000008rqHj</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍚嶇О</shortDescription>
+ <value>鍚嶇О</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Name1</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绗竴璨╁2搴�</shortDescription>
+ <value>绗竴璨╁2搴�</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Name2</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>绗簩璨╁2搴�</shortDescription>
+ <value>绗簩璨╁2搴�</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Outlet</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>璨╁2搴�</shortDescription>
+ <value>璨╁2搴�</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Profit</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍒╃泭</shortDescription>
+ <value>鍒╃泭</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Promotion</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞帹骞�</shortDescription>
+ <value>閿�鍞帹骞�</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Root</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>璨╁2銉兗銉�</shortDescription>
+ <value>璨╁2銉兗銉�</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Window_DB</fullName>
+ <categories>璇环</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞儴绐楀彛涓滃寳-鍏宠礉濡�</shortDescription>
+ <value>00510000001O6Ho</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Window_HB</fullName>
+ <categories>璇环</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞儴绐楀彛鍗庡寳-鍛ㄨ搲</shortDescription>
+ <value>00510000000gaYy</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Window_HD</fullName>
+ <categories>璇环</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞儴绐楀彛鍗庝笢-瀹嬬湡</shortDescription>
+ <value>00510000000gKcA</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Window_HN</fullName>
+ <categories>璇环</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞儴绐楀彛鍗庡崡-鏉庨攼</shortDescription>
+ <value>00510000001tsVX</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Window_XB</fullName>
+ <categories>璇环</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞儴绐楀彛瑗垮寳-瀵囬潤</shortDescription>
+ <value>00510000000gKcj</value>
+ </labels>
+ <labels>
+ <fullName>Sales_Window_XN</fullName>
+ <categories>璇环</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閿�鍞儴绐楀彛瑗垮崡-浣欑弬</shortDescription>
+ <value>00510000000gW9c</value>
+ </labels>
+ <labels>
+ <fullName>SameAccessory_CannotSync</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍚屼竴闄勫睘鍝佷笉鑳藉悓鏃舵洿鏂�</shortDescription>
+ <value
+ >閰嶅閲屽凡缁忔湁琚彇娑堢殑闄勫睘鍝侊紝涓嶈兘杩藉姞闄勫睘鍝侊紝璇峰厛鍙栨秷鍚屼竴闄勫睘鍝佺殑鍕鹃��</value>
+ </labels>
+ <labels>
+ <fullName>Save</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇濆瓨</shortDescription>
+ <value>淇濆瓨</value>
+ </labels>
+ <labels>
+ <fullName>SaveAndNew</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>SaveAndNew</shortDescription>
+ <value>淇濆瓨骞舵柊寤�</value>
+ </labels>
+ <labels>
+ <fullName>SaveComment</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍙嶉淇濆瓨</shortDescription>
+ <value>鍙嶉淇濆瓨</value>
+ </labels>
+ <labels>
+ <fullName>Save_Back</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇濆瓨銇椼仸鎴汇倠</shortDescription>
+ <value>淇濆瓨銇椼仸鎴汇倠</value>
+ </labels>
+ <labels>
+ <fullName>Save_Button</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇濆瓨</shortDescription>
+ <value>淇濆瓨</value>
+ </labels>
+ <labels>
+ <fullName>Save_Completion</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇濆瓨銇屽畬浜嗐仐銇俱仐銇熴��</shortDescription>
+ <value>淇濆瓨銇屽畬浜嗐仐銇俱仐銇熴��</value>
+ </labels>
+ <labels>
+ <fullName>Search</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>妞滅储</shortDescription>
+ <value>妞滅储</value>
+ </labels>
+ <labels>
+ <fullName>Search_Condition</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>妞滅储鏉′欢</shortDescription>
+ <value>妞滅储鏉′欢</value>
+ </labels>
+ <labels>
+ <fullName>Search_Personnel</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎷呭綋鑰呮绱�</shortDescription>
+ <value>鎷呭綋鑰呮绱�</value>
+ </labels>
+ <labels>
+ <fullName>Search_Result</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>妞滅储绲愭灉</shortDescription>
+ <value>妞滅储绲愭灉</value>
+ </labels>
+ <labels>
+ <fullName>Select</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閫夋嫨</shortDescription>
+ <value>閫夋嫨</value>
+ </labels>
+ <labels>
+ <fullName>Select_User</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Select User</shortDescription>
+ <value>閫夋嫨鐢ㄦ埛</value>
+ </labels>
+ <labels>
+ <fullName>Selected</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>閬告姙</shortDescription>
+ <value>閬告姙</value>
+ </labels>
+ <labels>
+ <fullName>SendRepairAgainAn_OSH_GZ</fullName>
+ <categories>鍐嶄慨鐞嗚繑鍝佸垎鏋�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_鍐嶄慨鐞嗚繑鍝佸垎鏋愬彂璧穇OSH-GZ</shortDescription>
+ <value>liucheng@prec-tech.com;sunxia@prec-tech.com</value>
+ </labels>
+ <labels>
+ <fullName>SendRepairAgainAn_OSH_SH</fullName>
+ <categories>鍐嶄慨鐞嗚繑鍝佸垎鏋�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閫氱煡缁勭兢_鍐嶄慨鐞嗚繑鍝佸垎鏋愬彂璧穇OSH-SH</shortDescription>
+ <value>liucheng@prec-tech.com;sunxia@prec-tech.com</value>
+ </labels>
+ <labels>
+ <fullName>Send_Mail</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銉°兗銉�佷俊</shortDescription>
+ <value>銉°兗銉�佷俊</value>
+ </labels>
+ <labels>
+ <fullName>ServiceDesignDep_EC</fullName>
+ <categories>鐢ㄥ湪鏈嶅姟鎶�甯堝煿璁� 涓婄嚎娴嬭瘯鐜鏃惰寰楁敼涓洪儹绾㈠博</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏈嶅姟浼佸垝閮ㄧ獥鍙�(5.鍗庝笢)</shortDescription>
+ <value>0051000000CLXtjAAH</value>
+ </labels>
+ <labels>
+ <fullName>ServiceDesignDep_NC</fullName>
+ <categories>鐢ㄥ湪鏈嶅姟鎶�甯堝煿璁� 涓婄嚎娴嬭瘯鐜鏃惰寰楁敼涓洪儹绾㈠博</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏈嶅姟浼佸垝閮ㄧ獥鍙�(1.鍗庡寳)</shortDescription>
+ <value>0051000000CLXtjAAH</value>
+ </labels>
+ <labels>
+ <fullName>ServiceDesignDep_NE</fullName>
+ <categories>鐢ㄥ湪鏈嶅姟鎶�甯堝煿璁� 涓婄嚎娴嬭瘯鐜鏃惰寰楁敼涓洪儹绾㈠博</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏈嶅姟浼佸垝閮ㄧ獥鍙�(2.涓滃寳)</shortDescription>
+ <value>0051000000CLXtjAAH</value>
+ </labels>
+ <labels>
+ <fullName>ServiceDesignDep_NW</fullName>
+ <categories>鐢ㄥ湪鏈嶅姟鎶�甯堝煿璁� 涓婄嚎娴嬭瘯鐜鏃惰寰楁敼涓洪儹绾㈠博</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏈嶅姟浼佸垝閮ㄧ獥鍙�(3.瑗垮寳)</shortDescription>
+ <value>0051000000CLXtjAAH</value>
+ </labels>
+ <labels>
+ <fullName>ServiceDesignDep_SC</fullName>
+ <categories>鐢ㄥ湪鏈嶅姟鎶�甯堝煿璁� 涓婄嚎娴嬭瘯鐜鏃惰寰楁敼閮孩宀�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏈嶅姟浼佸垝閮ㄧ獥鍙�(6.鍗庡崡)</shortDescription>
+ <value>0051000000CLXtjAAH</value>
+ </labels>
+ <labels>
+ <fullName>ServiceDesignDep_SW</fullName>
+ <categories>鐢ㄥ湪鏈嶅姟鎶�甯堝煿璁� 涓婄嚎娴嬭瘯鐜鏃惰寰楁敼涓洪儹绾㈠博</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏈嶅姟浼佸垝閮ㄧ獥鍙�(4.瑗垮崡)</shortDescription>
+ <value>0051000000CLXtjAAH</value>
+ </labels>
+ <labels>
+ <fullName>ServiceMainTaskPageSize</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娑堣垂鐜囬璀︽瘡椤垫暟閲�</shortDescription>
+ <value>100</value>
+ </labels>
+ <labels>
+ <fullName>Service_Agreement</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈点兗銉撱偣濂戠磩</shortDescription>
+ <value>銈点兗銉撱偣濂戠磩</value>
+ </labels>
+ <labels>
+ <fullName>Set</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷畾</shortDescription>
+ <value>瑷畾</value>
+ </labels>
+ <labels>
+ <fullName>SetPersonalTargetBatch_Flag</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SetPersonalTargetBatch鐨勫紑鍏�---鍕垮姩</shortDescription>
+ <value>true</value>
+ </labels>
+ <labels>
+ <fullName>SetPersonalTarget_buffer_day</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>4鏈堜唤鍙互缂栬緫涓汉鐩爣澶╂暟</shortDescription>
+ <value>15</value>
+ </labels>
+ <labels>
+ <fullName>Set_Code</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈汇儍銉堛偝銉笺儔</shortDescription>
+ <value>銈汇儍銉堛偝銉笺儔</value>
+ </labels>
+ <labels>
+ <fullName>Set_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈汇儍銉堝搧鍚�</shortDescription>
+ <value>銈汇儍銉堝搧鍚�</value>
+ </labels>
+ <labels>
+ <fullName>Set_Product</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈汇儍銉堣=鍝併亱銈夌櫥閷�</shortDescription>
+ <value>銈汇儍銉堣=鍝併亱銈夌櫥閷�</value>
+ </labels>
+ <labels>
+ <fullName>Set_Search</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈汇儍銉堝搧妞滅储</shortDescription>
+ <value>銈汇儍銉堝搧妞滅储</value>
+ </labels>
+ <labels>
+ <fullName>ShanghaiEmai</fullName>
+ <categories>EmailText</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>ShanghaiEmai</shortDescription>
+ <value>ocm_assetsh@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>ShowLastYear_DefermentDay</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍘诲勾搴︽暟鎹紙缂撴湡鏃ワ級锛岃繖涓棩鍓嶇殑璇濓紝鏄剧ず鍘诲勾搴︽暟鎹�</shortDescription>
+ <value>10</value>
+ </labels>
+ <labels>
+ <fullName>SmarmClipNum</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>SMARM鐨凜lip涓婇檺</shortDescription>
+ <value>50</value>
+ </labels>
+ <labels>
+ <fullName>Soakup_NotExecute_Day</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SoakupHPDeptBatch 涓嶆墽琛屾棩</shortDescription>
+ <value>18</value>
+ </labels>
+ <labels>
+ <fullName>Solution_DB</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2.涓滃寳钀ヤ笟绐楀彛</shortDescription>
+ <value>0051000000BbWAi</value>
+ </labels>
+ <labels>
+ <fullName>Solution_HB</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>1.鍗庡寳钀ヤ笟绐楀彛</shortDescription>
+ <value>00510000001OOLj</value>
+ </labels>
+ <labels>
+ <fullName>Solution_HD</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>5.鍗庝笢钀ヤ笟绐楀彛</shortDescription>
+ <value>00510000000gW9G</value>
+ </labels>
+ <labels>
+ <fullName>Solution_HN</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>6.鍗庡崡钀ヤ笟绐楀彛</shortDescription>
+ <value>0051000000AJIrD</value>
+ </labels>
+ <labels>
+ <fullName>Solution_XB</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>3.瑗垮寳钀ヤ笟绐楀彛</shortDescription>
+ <value>0051000000EbXXZ</value>
+ </labels>
+ <labels>
+ <fullName>Solution_XN</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>4.瑗垮崡钀ヤ笟绐楀彛</shortDescription>
+ <value>00510000001OORm</value>
+ </labels>
+ <labels>
+ <fullName>Specifications</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>瑙勬牸</shortDescription>
+ <value>瑙勬牸</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_Alert</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍙栧紩闁嬪鐢婚潰锛堛偄銉┿兗銉堛儭銉冦偦銉笺偢锛�</shortDescription>
+ <value>瑷虹檪绉戝悕銈掗伕鎶炪仐銇︺亸銇犮仌銇勩��</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_Cancel</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍙栧紩闁嬪鐢婚潰锛堛偔銉c兂銈汇儷锛�</shortDescription>
+ <value>銈儯銉炽偦銉�</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_None</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍙栧紩闁嬪鐢婚潰锛堥伕鎶炪儶銈广儓鍒濇湡鍊わ級</shortDescription>
+ <value>--銇仐--</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_P_Campaign</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍙栧紩闁嬪鐢婚潰锛堛儜銉┿儭銉笺偪涓汇偔銉c兂銉氥兗銉炽伄ID锛�</shortDescription>
+ <value>opp17</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_P_Dept</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍙栧紩闁嬪鐢婚潰锛堛儜銉┿儭銉笺偪鎴︾暐绉戝鍒嗛銇甀D锛�</shortDescription>
+ <value>CF00N10000002CYB7</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_P_Hospital</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍙栧紩闁嬪鐢婚潰锛堛儜銉┿儭銉笺偪鐥呴櫌銇甀D锛�</shortDescription>
+ <value>CF00N10000002CYBC</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_P_Leadsource</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍙栧紩闁嬪鐢婚潰锛堛儜銉┿儭銉笺偪寮曞悎鎯呭牨鍏冦伄ID锛�</shortDescription>
+ <value>opp6</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_P_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍙栧紩闁嬪鐢婚潰锛堛儜銉┿儭銉笺偪鍚嶇О[瑷虹檪绉慮銇甀D锛�</shortDescription>
+ <value>accid</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_P_Society</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >鍙栧紩闁嬪鐢婚潰锛堛儜銉┿儭銉笺偪銇濄伄浠栧浼氥伄ID锛�</shortDescription>
+ <value>00N10000002CX31</value>
+ </labels>
+ <labels>
+ <fullName>StartTrading_Subtitle</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍙栧紩闁嬪鐢婚潰锛堛偟銉栥偪銈ゃ儓銉級</shortDescription>
+ <value>鍙栧紩銇枊濮�</value>
+ </labels>
+ <labels>
+ <fullName>StateChanges</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎰忓悜杞浠风姸鎬�</shortDescription>
+ <value>寮�濮嬭浠�</value>
+ </labels>
+ <labels>
+ <fullName>Statementlink</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Statementlink</shortDescription>
+ <value>甯︽暀鏄庣粏:00O10000006RKh1</value>
+ </labels>
+ <labels>
+ <fullName>Statu_Achievements_share</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娉ㄦ畫绌烘洿鏂颁娇鐢ㄦ爣绛�</shortDescription>
+ <value>true</value>
+ </labels>
+ <labels>
+ <fullName>Status</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈广儐銉笺偪銈�</shortDescription>
+ <value>銈广儐銉笺偪銈�</value>
+ </labels>
+ <labels>
+ <fullName>StatusProcessState</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浼氳鍐宠鐘舵�侊紙涓嶇鍚堢姸鎬侊級</shortDescription>
+ <value>鑽夌,椹冲洖,缁堟鐢宠,鍙栨秷,鍒犻櫎</value>
+ </labels>
+ <labels>
+ <fullName>Status_Update</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>渚℃牸銈广儐銉笺偪銈规儏鍫辨洿鏂�</shortDescription>
+ <value>渚℃牸銈广儐銉笺偪銈规儏鍫辨洿鏂�</value>
+ </labels>
+ <labels>
+ <fullName>Submit_Date</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎻愬嚭鏃�</shortDescription>
+ <value>鎻愬嚭鏃�</value>
+ </labels>
+ <labels>
+ <fullName>Sum_Total</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>灏忚▓</shortDescription>
+ <value>灏忚▓</value>
+ </labels>
+ <labels>
+ <fullName>System_Stop</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>System_Stop</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>Tab_Text</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鈥汇偪銉栨枃瀛楀尯鍒囥倞銇ㄣ仐銇︿笅銇曘亜</shortDescription>
+ <value>鈥汇偪銉栨枃瀛楀尯鍒囥倞銇ㄣ仐銇︿笅銇曘亜</value>
+ </labels>
+ <labels>
+ <fullName>TargetAccountVisit</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_鐩爣瀹㈡埛鎷滆</shortDescription>
+ <value>01210000000cWfm</value>
+ </labels>
+ <labels>
+ <fullName>Tax_Date</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>姹囩巼淇敼鏃ユ湡鏍囩</shortDescription>
+ <value>2018-05-01</value>
+ </labels>
+ <labels>
+ <fullName>Tax_Date_13</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>姹囩巼淇敼鏃ユ湡鏍囩13</shortDescription>
+ <value>2019-04-01</value>
+ </labels>
+ <labels>
+ <fullName>Tax_Foreign_Date</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>姹囩巼淇敼鏃ユ湡鏍囩(澶栬锤)</shortDescription>
+ <value>2022-04-01</value>
+ </labels>
+ <labels>
+ <fullName>TemporaryFileBoxNeedAttachment</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎻愭涔﹂渶瑕侀檮浠�</shortDescription>
+ <value>闇�瑕佹坊闄勬彁妗堜功鏂囦欢</value>
+ </labels>
+ <labels>
+ <fullName>TenderToOpp</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎷涙爣椤圭洰璧嬪�肩粰璇环寰楃┖鏇存柊</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>Tender_IsnotRelated_ModifyDisable</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎷涙爣椤圭洰-涓嶇浉鍏虫椂涓嶈兘鍐嶄慨鏀圭殑绠�妗�</shortDescription>
+ <value>00e10000000xnpRAAQ,00e10000000xyK6AAI</value>
+ </labels>
+ <labels>
+ <fullName>Tender_information</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription><娼滃湪瀹㈡埛>鎷涙爣椤圭洰</shortDescription>
+ <value>00N10000009HKS5</value>
+ </labels>
+ <labels>
+ <fullName>To_Manager</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銇椼仧銉炪儘銉笺偢銉�</shortDescription>
+ <value>銇椼仧銉炪儘銉笺偢銉�</value>
+ </labels>
+ <labels>
+ <fullName>Total</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>TOTAL</shortDescription>
+ <value>TOTAL</value>
+ </labels>
+ <labels>
+ <fullName>TotalLimit</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>2000</shortDescription>
+ <value>2000</value>
+ </labels>
+ <labels>
+ <fullName>Total_Discount_Amount</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>浼樻儬浠锋牸</shortDescription>
+ <value>浼樻儬浠锋牸</value>
+ </labels>
+ <labels>
+ <fullName>Total_Discount_Percent</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>浼樻儬鎶樻墸</shortDescription>
+ <value>浼樻儬鎶樻墸</value>
+ </labels>
+ <labels>
+ <fullName>Total_ListPrice</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>妯欐簴瀹氫尽鍚堣▓渚℃牸</shortDescription>
+ <value>妯欐簴瀹氫尽鍚堣▓渚℃牸</value>
+ </labels>
+ <labels>
+ <fullName>Total_Price</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑕嬬閲戦鍚堣▓</shortDescription>
+ <value>瑕嬬閲戦鍚堣▓</value>
+ </labels>
+ <labels>
+ <fullName>TradeComplianceStatusFlag</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄撳悎瑙勫紑鍏�-钀ヤ笟</shortDescription>
+ <value>false</value>
+ </labels>
+ <labels>
+ <fullName>TradeComplianceStatusFlagBP</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏄撳悎瑙勫紑鍏�-澶囧搧</shortDescription>
+ <value>false</value>
+ </labels>
+ <labels>
+ <fullName>TradeComplianceStatusFlagFW</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璐告槗鍚堣寮�鍏�-鏈嶅姟</shortDescription>
+ <value>false</value>
+ </labels>
+ <labels>
+ <fullName>TradeComplianceStatusSendEmailFW</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏈嶅姟-鍙戦�侀偖浠剁粰鏈嶅姟鍔╃悊</shortDescription>
+ <value
+ >yingying_liu@olympus.com.cn,henan_hong@olympus.com.cn,xueqiong_he@olympus.com.cn,siqi_guo@olympus.com.cn,jing_wen@olympus.com.cn,qixue_zhu@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>Training</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鑷ぞ銉堛儸銉笺儖銉炽偘鏂借ō</shortDescription>
+ <value>01210000000QgFiAAK</value>
+ </labels>
+ <labels>
+ <fullName>Treatment</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鎶�鏈不鐤�</shortDescription>
+ <value>鎶�鏈不鐤�</value>
+ </labels>
+ <labels>
+ <fullName>Unapproved</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>闈炴壙瑾�</shortDescription>
+ <value>闈炴壙瑾�</value>
+ </labels>
+ <labels>
+ <fullName>Under_Resp</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Sales/Field Resp</shortDescription>
+ <value>涓荤浠ヤ笅</value>
+ </labels>
+ <labels>
+ <fullName>Unit</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍗樹綅</shortDescription>
+ <value>鍗樹綅</value>
+ </labels>
+ <labels>
+ <fullName>UpdRegOnly</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>UpdRegOnly</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>UpdateRentalApplyEquipmentSetBatchLimit</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >UpdateRentalApplyEquipmentSetBatchLimit</shortDescription>
+ <value>200</value>
+ </labels>
+ <labels>
+ <fullName>UpdateServiceHistory</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍒濆鍖栨湇鍔℃妧甯堝巻鍙叉暟鎹紝鏇存柊鍚庣Щ闄�</shortDescription>
+ <value>true</value>
+ </labels>
+ <labels>
+ <fullName>Update_Inquiry</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏇存柊璇环</shortDescription>
+ <value>鏇存柊璇环</value>
+ </labels>
+ <labels>
+ <fullName>Url_Head_Custom</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Url閾炬帴瀛楃涓�-鑷畾涔�</shortDescription>
+ <value>https://ocsm--c.ap0.visual.force.com</value>
+ </labels>
+ <labels>
+ <fullName>Url_Head_Standard</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Url閾炬帴瀛楃涓�</shortDescription>
+ <value>https://ocsm.my.salesforce.com</value>
+ </labels>
+ <labels>
+ <fullName>User_OlympusSystem</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OlympusSystem</shortDescription>
+ <value>00510000000gT2R</value>
+ </labels>
+ <labels>
+ <fullName>VMContract</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_澶氬勾淇濅慨鍚堝悓</shortDescription>
+ <value>01210000000NP2wAAG</value>
+ </labels>
+ <labels>
+ <fullName>VM_ContractType</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>铏氭嫙缁翠慨鍚堝悓璁板綍绫诲瀷</shortDescription>
+ <value>01210000000gTYv</value>
+ </labels>
+ <labels>
+ <fullName>Valid_Status</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浜у搧閰嶅鏄惁鏈夋晥</shortDescription>
+ <value>浜у搧閰嶅鏄惁鏈夋晥</value>
+ </labels>
+ <labels>
+ <fullName>View_Inspections</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鐐规鍫卞憡鏇�</shortDescription>
+ <value>鐐规鍫卞憡鏇�</value>
+ </labels>
+ <labels>
+ <fullName>View_Repair_Recovery</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>淇悊鍥炲弾銉撱儱銉�</shortDescription>
+ <value>淇悊鍥炲弾銉撱儱銉�</value>
+ </labels>
+ <labels>
+ <fullName>Visit_Date</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱浜堝畾鏃�</shortDescription>
+ <value>瑷晱浜堝畾鏃�</value>
+ </labels>
+ <labels>
+ <fullName>Visit_Location</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鍫存墍</shortDescription>
+ <value>瑷晱鍫存墍</value>
+ </labels>
+ <labels>
+ <fullName>Visiting_Hours</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鏅傞枔</shortDescription>
+ <value>瑷晱鏅傞枔</value>
+ </labels>
+ <labels>
+ <fullName>Visitor</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鑰�</shortDescription>
+ <value>瑷晱鑰�</value>
+ </labels>
+ <labels>
+ <fullName>Visitor_Name</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>瑷晱鑰呭悕</shortDescription>
+ <value>瑷晱鑰呭悕</value>
+ </labels>
+ <labels>
+ <fullName>WIN_Profile</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>WIN_Profile</shortDescription>
+ <value>00e10000000Y3o5AAC</value>
+ </labels>
+ <labels>
+ <fullName>WaitFollowInquiryForm</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>寰呰窡杩涚殑鍜ㄨ鍗�</shortDescription>
+ <value>/a41?fcf=00B10000006i6VF</value>
+ </labels>
+ <labels>
+ <fullName>Working_Time</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍕ゅ嫏鏅傞枔</shortDescription>
+ <value>鍕ゅ嫏鏅傞枔</value>
+ </labels>
+ <labels>
+ <fullName>Yes_Text</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏈�</shortDescription>
+ <value>鏈�</value>
+ </labels>
+ <labels>
+ <fullName>YouCantDeleteEvent1</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈€偗銈汇偣妯┿亴銇傘倞銇俱仜銈�</shortDescription>
+ <value>銈€偗銈汇偣妯┿亴銇傘倞銇俱仜銈�</value>
+ </labels>
+ <labels>
+ <fullName>YouCantDeleteEvent1_New</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍓婇櫎銇с亶銇俱仜銈�</shortDescription>
+ <value>鍓婇櫎銇с亶銇俱仜銈�</value>
+ </labels>
+ <labels>
+ <fullName>YouCantDeleteEvent2</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >銈€偗銈汇偣妯┿亴銇亜銇熴倎瑕佹眰銈掑疅琛屻仹銇嶃伨銇涖倱銆傘儑銉笺偪銇墍鏈夎�呫伨銇熴伅銆併偡銈广儐銉犵鐞嗚�呫伀銇婂晱銇勫悎銈忋仜銇忋仩銇曘亜銆�</shortDescription>
+ <value
+ >銈€偗銈汇偣妯┿亴銇亜銇熴倎瑕佹眰銈掑疅琛屻仹銇嶃伨銇涖倱銆傘儑銉笺偪銇墍鏈夎�呫伨銇熴伅銆併偡銈广儐銉犵鐞嗚�呫伀銇婂晱銇勫悎銈忋仜銇忋仩銇曘亜銆�</value>
+ </labels>
+ <labels>
+ <fullName>YouCantDeleteEvent2_new</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription
+ >銈儸銉炽儉銉笺亱銈夊墛闄ゃ仹銇嶃伨銇涖倱銆傛棩鍫便仹鍓婇櫎銇椼仸銇忋仩銇曘亜銆�</shortDescription>
+ <value>銈儸銉炽儉銉笺亱銈夊墛闄ゃ仹銇嶃伨銇涖倱銆傛棩鍫便仹鍓婇櫎銇椼仸銇忋仩銇曘亜銆�</value>
+ </labels>
+ <labels>
+ <fullName>YouCantDeleteEvent3</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍓嶃伄銉氥兗銈搞伀鎴汇倠銇伅銆�</shortDescription>
+ <value>鍓嶃伄銉氥兗銈搞伀鎴汇倠銇伅銆�</value>
+ </labels>
+ <labels>
+ <fullName>YouCantDeleteEvent3_new</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>璇锋搷浣� 鍙栨秷 鍜� 寤舵湡</shortDescription>
+ <value>璇锋搷浣� 鍙栨秷 鍜� 寤舵湡</value>
+ </labels>
+ <labels>
+ <fullName>YouCantDeleteEvent4</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銇撱仭銈�</shortDescription>
+ <value>銇撱仭銈�</value>
+ </labels>
+ <labels>
+ <fullName>YouCantDeleteEvent5</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>銈掋偗銉儍銈仐銇俱仚銆�</shortDescription>
+ <value>銈掋偗銉儍銈仐銇俱仚銆�</value>
+ </labels>
+ <labels>
+ <fullName>batchEmailAlert</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >batchEmail鎻愰啋鐢ㄦ埛鐨勯偖浠堕粯璁ゅ彧鏈夌簿鐞㈡妧鏈�</shortDescription>
+ <value>'00510000005sEEM'</value>
+ </labels>
+ <labels>
+ <fullName>batchEmailAlertCC</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >batchEmail鎻愰啋鐢ㄦ埛鐨勯偖绠憋紝鐩墠鏄帇娴峰銆佺鐜层�佹补鏅撴櫒 锛� 浠ラ�楀彿闅斿紑杈撳叆ID銆�</shortDescription>
+ <value
+ >'00510000000gWAQ' , '00510000001rukv', '0051000000AIvdM'</value>
+ </labels>
+ <labels>
+ <fullName>batch_retry_max_cnt</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Batch鑷嫊鍙椾俊閫佷俊鏈�澶у洖鏁�</shortDescription>
+ <value>3</value>
+ </labels>
+ <labels>
+ <fullName>campaignFollow</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_瀛︽湳浼氳璺熻繘</shortDescription>
+ <value>01210000000cWfc</value>
+ </labels>
+ <labels>
+ <fullName>creatDate_After</fullName>
+ <categories>鏃ユ湡</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠ュ悗淇悊鏇存柊鍒涘缓鏃ユ湡鍦�02.19</shortDescription>
+ <value>20200219</value>
+ </labels>
+ <labels>
+ <fullName>dateJudge</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>dateJudge</shortDescription>
+ <value>2020-04-19</value>
+ </labels>
+ <labels>
+ <fullName>dateTo_Gurantee</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Maintenance鎴鏃ユ湡2</shortDescription>
+ <value>3999-12-31</value>
+ </labels>
+ <labels>
+ <fullName>dateTo_Service</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>Maintenance鎴鏃ユ湡1</shortDescription>
+ <value>3999-12-31</value>
+ </labels>
+ <labels>
+ <fullName>dealer</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁忛攢鍟�</shortDescription>
+ <value>01210000000Qem1</value>
+ </labels>
+ <labels>
+ <fullName>deleteLabel</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鍓婇櫎</shortDescription>
+ <value>鍓婇櫎</value>
+ </labels>
+ <labels>
+ <fullName>eSignAgencyNum</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鐢靛瓙绛炬敹ID鍙�</shortDescription>
+ <value>鐢靛瓙绛炬敹ID鍙�</value>
+ </labels>
+ <labels>
+ <fullName>fax</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>Fax</shortDescription>
+ <value>Fax</value>
+ </labels>
+ <labels>
+ <fullName>feedbackTaskId</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>宸插弽棣堜换鍔¤鍥�</shortDescription>
+ <value>/a3V?fcf=00B10000006i0Af</value>
+ </labels>
+ <labels>
+ <fullName>interfaceUserID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鎺ュ彛鐢ㄦ埛ID</shortDescription>
+ <value>00510000000gmxHAAQ</value>
+ </labels>
+ <labels>
+ <fullName>mpddetLimitsize</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>缁存姢浜у搧涓绘暟鎹槑缁嗙敾闈㈡瘡椤垫樉绀烘暟閲�</shortDescription>
+ <value>20</value>
+ </labels>
+ <labels>
+ <fullName>mpddetPageLimitsize</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >缁存姢浜у搧涓绘暟鎹槑缁嗙敾闈㈡坊鍔犱笉瓒呰繃鏁伴噺</shortDescription>
+ <value>200</value>
+ </labels>
+ <labels>
+ <fullName>notCreateRepairFromAssetButton</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >鐗瑰畾浜哄憳锛堝憳宸ョ紪鐮侊級涓嶄粠淇濇湁璁惧鍒涘缓淇悊1锛堟斁涓嶄笅鍓╀綑鍦�2锛�</shortDescription>
+ <value
+ >om003908,om003862,om003872,om003770,om003562,om003548,om003581,om003479,om003504,om003260,om003264,om003258,om003414,om003378,om003449,om003119,om003110,om003146,om003017,om003090,om003041,om002990,om003323,om003317,om003064,om003102,om003088,om003087,om003123,om003003,om003114,om002850,om002970,om002845,om002719,om002902,om002981,om002857,om002893,om002707,om002606,om002441,om002504,om002749,om002614,om002496,om002498,om002526,om002634,om002517,om002670,om002795,om002779,om002539,om001689,om002296,om002324,om002204,om002556,om002247,om002403,om002235,om002238,om002237,om002423,om002654,om002415,om001986,om002077,om002234,om002103,om001895,om001937,om002102,om001832,om001958,om001820,om002153,om002027,om002026,om002139,om001242,om001515,om001626,om001628,om001138,om001499,om001659,om001762,om001545,om001664,om001213,om001736,om001612,om001737,om001292,om001447,om001111,om000660,om001103,om000693,om001995,om000710,om001042,om001040,om000595,om000474,om000621,om001036,om000743</value>
+ </labels>
+ <labels>
+ <fullName>notCreateRepairFromAssetButton02</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >鐗瑰畾浜哄憳锛堝憳宸ョ紪鐮侊級涓嶄粠淇濇湁璁惧鍒涘缓淇悊1锛堟帴1锛�</shortDescription>
+ <value
+ >,om000491,om000477,om001048,om001102,om001264,om001818,om001672,om001848</value>
+ </labels>
+ <labels>
+ <fullName>obsap_Login_area</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>obsap鎶ヤ环濮旀墭鐧诲綍浜哄湴鍖�</shortDescription>
+ <value>5.鍗庝笢,6.鍗庡崡,1.鍗庡寳,3.瑗垮寳,4.瑗垮崡,2.涓滃寳</value>
+ </labels>
+ <labels>
+ <fullName>obsap_group_opp</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>OBSAP鎶ヤ环濮旀墭缁�</shortDescription>
+ <value>00G10000002qnIv</value>
+ </labels>
+ <labels>
+ <fullName>onlyupdate</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>绌烘洿鏂版搷浣�</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>opd_oldDate_update</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>opd鑰佹暟鎹洿鏂版爣璁�-prod鐢紙鍕垮姩锛�</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>orderdetLimitsize</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娑堣�楀搧鏄庣粏鐢婚潰姣忛〉鏄剧ず鏁伴噺</shortDescription>
+ <value>200</value>
+ </labels>
+ <labels>
+ <fullName>orderdetPageLimitsize</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娑堣�楀搧鏄庣粏鐢婚潰鏄剧ず鏁伴噺</shortDescription>
+ <value>500</value>
+ </labels>
+ <labels>
+ <fullName>phone</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>闆昏┍</shortDescription>
+ <value>闆昏┍</value>
+ </labels>
+ <labels>
+ <fullName>profileName_Notadminand2F1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>绠$悊鍛樺拰2F1浠ュ鏌ョ湅绠�妗�</shortDescription>
+ <value
+ >102_閿�鍞瓼SE(鍙锛屽彲浠ュ綍鍏ョ偣妫�+鏂板缓淇悊),102_閿�鍞瓼SE鍏兼妧鏈暀鑲茶,112_鏈嶅姟閮ㄦ媴褰�,114_鏈嶅姟閮ㄥ姪鐞�,115_CIC,116_CIC绐楀彛,2F1_鏈嶅姟绐楀彛,2F2_鏈嶅姟鎷呭綋+RC,2F5_CIC,2F6_CIC绐楀彛,2S5_閿�鍞瓼SE鎷呭綋,绯荤粺绠$悊鍛�,2S3_閿�鍞競鍦�&FSE绠$悊鑰�,2F4_鎶�鏈帹杩涢儴,2S10_FSE绠$悊鑰�</value>
+ </labels>
+ <labels>
+ <fullName>profileName_adminand2F1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>绠$悊鍛樺拰2F1绠�妗e悕绉�</shortDescription>
+ <value>绯荤粺绠$悊鍛�,2F1_鏈嶅姟绐楀彛</value>
+ </labels>
+ <labels>
+ <fullName>profile_2b2</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>澶囧搧涓績浠撳簱绠�妗�</shortDescription>
+ <value>00e10000000xnoYAAQ</value>
+ </labels>
+ <labels>
+ <fullName>report_oldDate_update</fullName>
+ <categories>鎶ュ憡涔︽洿鏂拌�佹暟鎹紙鍕垮姩锛�</categories>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>report_oldDate_update</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>s1_jpegQuality</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>s1_jpegQuality</shortDescription>
+ <value>3</value>
+ </labels>
+ <labels>
+ <fullName>s1_longSidePixel</fullName>
+ <language>en_US</language>
+ <protected>false</protected>
+ <shortDescription>s1_longSidePixel</shortDescription>
+ <value>3200</value>
+ </labels>
+ <labels>
+ <fullName>s6_ID</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>s6鐨勭畝妗D</shortDescription>
+ <value>00e10000000xyK6,00e10000000xnpR,00e10000000Y3o5</value>
+ </labels>
+ <labels>
+ <fullName>s9BPChuangkou</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2s9澶囧搧绐楀彛</shortDescription>
+ <value>00e10000000a7NYAAY</value>
+ </labels>
+ <labels>
+ <fullName>salesman2S1</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>2S1_閿�鍞尰闄㈡媴褰� 鐢ㄥ湪鏃ユ姤寮圭獥鐢�</shortDescription>
+ <value>00e10000000xnp2AAA</value>
+ </labels>
+ <labels>
+ <fullName>salesman2S1_Price</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription
+ >2S1_閿�鍞尰闄㈡媴褰�(鏌ョ湅浠锋牸) 鏃ユ姤椤甸潰鎻愰啋濉啓鎴樼暐绉戝鐥呬緥鏁扮敤銆�</shortDescription>
+ <value
+ >2S1_閿�鍞尰闄㈡媴褰�(鏌ョ湅浠锋牸) 鏃ユ姤椤甸潰鎻愰啋濉啓鎴樼暐绉戝鐥呬緥鏁扮敤銆�</value>
+ </labels>
+ <labels>
+ <fullName>si_stock_dbhb</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>SI_澶囪揣瀹℃壒浜篲鍗庡寳鍗庡崡</shortDescription>
+ <value>00510000006jjLU</value>
+ </labels>
+ <labels>
+ <fullName>tempLabelForInsertHistData</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>娌″暐鐢紝鐩存帴鍒犳帀</shortDescription>
+ <value>true</value>
+ </labels>
+ <labels>
+ <fullName>toMail</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>閭欢鎺ユ敹浜�</shortDescription>
+ <value>tianxiao_gong@olympus.com.cn</value>
+ </labels>
+ <labels>
+ <fullName>update_Statu_Achievements_Journal</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏇存柊娉ㄦ畫鍑虹撼琛ㄦ爣绛�</shortDescription>
+ <value>tr</value>
+ </labels>
+ <labels>
+ <fullName>update_if_Newest_HaveOpportunity</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鏇存柊涓婃湡鏄惁鏈夎浠凤紙鏈�鏂帮級瀛楁</shortDescription>
+ <value>0</value>
+ </labels>
+ <labels>
+ <fullName>valid</fullName>
+ <language>ja</language>
+ <protected>false</protected>
+ <shortDescription>鏈夊姽</shortDescription>
+ <value>鏈夊姽</value>
+ </labels>
+ <labels>
+ <fullName>visitHLevel</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>浠诲姟绫诲瀷_H灞傛嫓璁�</shortDescription>
+ <value>01210000000cWfS</value>
+ </labels>
+ <labels>
+ <fullName>xl0String</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>0绯诲垪</shortDescription>
+ <value>鍙拌溅;鐩戣鍣�</value>
+ </labels>
+ <labels>
+ <fullName>zhuliFollowInquiryForm</fullName>
+ <language>zh_CN</language>
+ <protected>false</protected>
+ <shortDescription>鍔╃悊寰呰窡杩涘挩璇㈠崟</shortDescription>
+ <value>/a41?fcf=00B10000006iFV4</value>
</labels>
</CustomLabels>
diff --git a/force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.html b/force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.html
new file mode 100644
index 0000000..c38ec0a
--- /dev/null
+++ b/force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.html
@@ -0,0 +1,10 @@
+<template>
+ <template if:false={isDisable}>
+ <lightning-formatted-url
+ value={accountUrl}
+ label={accountName}
+ target="_blank"
+ ></lightning-formatted-url>
+ </template>
+ <template if:true={isDisable}> {accountName} </template>
+</template>
diff --git a/force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.js b/force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.js
new file mode 100644
index 0000000..f7c9bad
--- /dev/null
+++ b/force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.js
@@ -0,0 +1,15 @@
+import { LightningElement, api } from 'lwc';
+
+export default class CustomAccountUrlComp extends LightningElement {
+ @api accountName;
+ @api accountUrl;
+ @api isDisable;
+
+ connectedCallback() {
+ console.log('zhj');
+ console.log('杩涘叆CustomAccountUrlComp');
+ console.log('accountName = ' + this.accountName);
+ console.log('accountUrl = ' + this.accountUrl);
+ console.log('isDisable = ' + this.isDisable);
+ }
+}
diff --git a/force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.js-meta.xml b/force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.js-meta.xml
new file mode 100644
index 0000000..a1a42a8
--- /dev/null
+++ b/force-app/main/default/lwc/customAccountUrlComp/customAccountUrlComp.js-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <isExposed>false</isExposed>
+</LightningComponentBundle>
diff --git a/force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.html b/force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.html
new file mode 100644
index 0000000..ab51f15
--- /dev/null
+++ b/force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.html
@@ -0,0 +1,7 @@
+<template>
+ <lightning-textarea
+ name="input1"
+ label="Enter some text"
+ variant="label-hidden"
+ ></lightning-textarea>
+</template>
diff --git a/force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.js b/force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.js
new file mode 100644
index 0000000..aecadff
--- /dev/null
+++ b/force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.js
@@ -0,0 +1,3 @@
+import { LightningElement } from 'lwc';
+
+export default class CustomDeleteReasonComp extends LightningElement {}
diff --git a/force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.js-meta.xml b/force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.js-meta.xml
new file mode 100644
index 0000000..a1a42a8
--- /dev/null
+++ b/force-app/main/default/lwc/customDeleteReasonComp/customDeleteReasonComp.js-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <isExposed>false</isExposed>
+</LightningComponentBundle>
diff --git a/force-app/main/default/lwc/customMydrComp/customMydrComp.html b/force-app/main/default/lwc/customMydrComp/customMydrComp.html
new file mode 100644
index 0000000..e57cc8b
--- /dev/null
+++ b/force-app/main/default/lwc/customMydrComp/customMydrComp.html
@@ -0,0 +1,10 @@
+<template>
+ <lightning-input
+ type="checkbox"
+ label="浠匨yDr"
+ checked={isCheckedMyDr}
+ onchange={dataChange}
+ variant="label-hidden"
+ data-field="MyDr"
+ ></lightning-input>
+</template>
diff --git a/force-app/main/default/lwc/customMydrComp/customMydrComp.js b/force-app/main/default/lwc/customMydrComp/customMydrComp.js
new file mode 100644
index 0000000..9e58427
--- /dev/null
+++ b/force-app/main/default/lwc/customMydrComp/customMydrComp.js
@@ -0,0 +1,16 @@
+import { LightningElement, track, api } from 'lwc';
+
+export default class CustomMydrComp extends LightningElement {
+ @api recordId;
+ @api isCheckedMyDr;
+
+ connectedCallback() {
+ console.log('this.recordId = ' + this.recordId);
+ console.log('this.isCheckedMyDr = ' + this.isCheckedMyDr);
+ }
+
+ dataChange(event) {
+ this.isCheckedMyDr = event.target.checked;
+ console.log('this.isCheckedMyDr = ' + this.isCheckedMyDr);
+ }
+}
diff --git a/force-app/main/default/lwc/customMydrComp/customMydrComp.js-meta.xml b/force-app/main/default/lwc/customMydrComp/customMydrComp.js-meta.xml
new file mode 100644
index 0000000..a1a42a8
--- /dev/null
+++ b/force-app/main/default/lwc/customMydrComp/customMydrComp.js-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <isExposed>false</isExposed>
+</LightningComponentBundle>
diff --git a/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.html b/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.html
index b3bbda8..ebf2ab4 100644
--- a/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.html
+++ b/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.html
@@ -1,8 +1,17 @@
<template>
- <lightning-input style="border:1px solid red" step="0" type="number" name="shipmentNumber" label="鍑鸿揣鏁伴噺"
- variant="label-hidden" onchange={dataChange} data-field="shipmentNumber" value={shipmentNumber}
- onblur={shipmentNumberBlur} min="0" class="inputFont"></lightning-input>
- <!-- <lightning-input style="border:1px solid red" name="shipmentNumber" label="鍑鸿揣鏁伴噺"
- variant="label-hidden" onchange={dataChange} data-field="shipmentNumber" value={shipmentNumber}
- onblur={shipmentNumberBlur}></lightning-input> -->
-</template>
\ No newline at end of file
+ <c-common-toast></c-common-toast>
+ <lightning-input
+ style="border: 1px solid red; border-radius: 5px"
+ step="any"
+ type="number"
+ name="shipmentNumber"
+ label="鍑鸿揣鏁伴噺"
+ variant="label-hidden"
+ onchange={dataChange}
+ data-field="shipmentNumber"
+ value={shipmentNumber}
+ onblur={shipmentNumberBlur}
+ min="0"
+ class="inputFont"
+ ></lightning-input>
+</template>
diff --git a/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js b/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js
index 4b9be8d..b5cad1a 100644
--- a/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js
+++ b/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js
@@ -1,24 +1,86 @@
-import { LightningElement,api,track } from 'lwc';
+import { LightningElement, api, track } from 'lwc';
export default class CustomShipmentNumberComp extends LightningElement {
@api recordId;
@api shipmentNumber;
+ @api isConinvoice;
+ @api esdInvoiceProNotCount;
- connectedCallback(){
+ connectedCallback() {
console.log('shipmentNumber = ' + this.shipmentNumber);
}
- shipmentNumberBlur(event){
- console.log('shipmentNumberBlur')
+ shipmentNumberBlur(event) {
+ debugger;
+ console.log('shipmentNumberBlur');
this.shipmentNumber = event.target.value;
-
- this.dispatchEvent(new CustomEvent('shipmentnumber', {
- composed: true,
- bubbles: true,
- cancelable: true,
- detail: {
- data: { shipmentnumber: this.shipmentNumber, recordId: this.recordId }
+ if (this.isConinvoice) {
+ if (this.hasDecimals(this.shipmentNumber)) {
+ this.showMyToast('閿欒', '璇疯緭鍏ユ暣鏁�', 'Error');
+ this.shipmentNumber = 0;
+ } else {
+ if (this.esdInvoiceProNotCount < this.shipmentNumber) {
+ this.showMyToast(
+ '閿欒',
+ '鍙戠エ鏁伴噺涓嶈兘瓒呰繃杩樻病鍙戠エ鏁伴噺锛�',
+ 'Error'
+ );
+ this.shipmentNumber = 0;
+ }
}
- }));
+ } else {
+ //鍚戜笅鍙栨暣
+ if (this.hasDecimals(this.shipmentNumber)) {
+ this.showMyToast('閿欒', '璇疯緭鍏ユ暣鏁�', 'Error');
+ this.shipmentNumber = Math.floor(this.shipmentNumber);
+ }
+ }
+ event.target.value = this.shipmentNumber;
+ this.dispatchEvent(
+ new CustomEvent('shipmentnumber', {
+ composed: true,
+ bubbles: true,
+ cancelable: true,
+ detail: {
+ data: {
+ shipmentnumber: this.shipmentNumber,
+ recordId: this.recordId
+ }
+ }
+ })
+ );
}
-}
\ No newline at end of file
+
+ hasDecimals(num) {
+ return !Number.isInteger(Number(num));
+ }
+
+ showMyToast(title, message, variant) {
+ this.isShowSpinner = false;
+ this.showLoadingSpinner = false;
+ this.showAttPop = false;
+ this.filesUploaded = [];
+ this.fileName = null;
+ console.log('show custom message');
+ var iconName = '';
+ var content = '';
+ if (variant.toLowerCase() == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
+ }
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
+ }
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
+ }
+}
diff --git a/force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.html b/force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.html
index 87b0a65..c582400 100644
--- a/force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.html
+++ b/force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.html
@@ -1,5 +1,16 @@
<template>
- <lightning-input style="border:1px solid red" step="0.01" type="number" name="shipmentUnitPrice"
- label="deliveryOrderNo" variant="label-hidden" data-field="shipmentUnitPrice" value={shippingUnitPrice}
- onblur={shipmentUnitPriceBlur} class="inputFont"></lightning-input>
-</template>
\ No newline at end of file
+ <lightning-input
+ style="border: 1px solid red; border-radius: 5px"
+ step="any"
+ type="number"
+ name="shipmentUnitPrice"
+ label="deliveryOrderNo"
+ variant="label-hidden"
+ data-field="shipmentUnitPrice"
+ value={shippingUnitPrice}
+ onblur={shipmentUnitPriceBlur}
+ min="0"
+ class="inputFont"
+ onchange={limitDecimals}
+ ></lightning-input>
+</template>
diff --git a/force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.js b/force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.js
index 6e1f1e7..6e05114 100644
--- a/force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.js
+++ b/force-app/main/default/lwc/customShippingUnitPriceComp/customShippingUnitPriceComp.js
@@ -1,24 +1,41 @@
-import { LightningElement,api,track } from 'lwc';
+import { LightningElement, api, track } from 'lwc';
export default class CustomShippingUnitPriceComp extends LightningElement {
@api recordId;
@api shippingUnitPrice;
- connectedCallback(){
+ connectedCallback() {
console.log('shippingUnitPrice = ' + this.shippingUnitPrice);
}
- shipmentUnitPriceBlur(event){
- console.log('shipmentUnitPriceBlur')
+ limitDecimals(event) {
+ const value = parseFloat(event.target.value); // 灏嗚緭鍏ュ�艰浆鎹负鏁板瓧绫诲瀷
+ const roundedValue = Math.round(value * 100) / 100; // 灏嗘暟瀛楀洓鑸嶄簲鍏ュ埌涓や綅灏忔暟
+ if (isNaN(value) || isNaN(roundedValue)) {
+ // 濡傛灉鏁板瓧鏃犳晥锛屽垯娓呯┖杈撳叆妗�
+ event.target.value = '';
+ } else if (roundedValue !== value) {
+ // 濡傛灉杈撳叆妗嗙殑鍊艰秴鍑轰簡涓や綅灏忔暟锛屽垯淇敼涓轰袱浣嶅皬鏁�
+ event.target.value = roundedValue.toFixed(2);
+ }
+ }
+
+ shipmentUnitPriceBlur(event) {
+ console.log('shipmentUnitPriceBlur');
this.shippingUnitPrice = event.target.value;
- this.dispatchEvent(new CustomEvent('shipmentunitprice', {
- composed: true,
- bubbles: true,
- cancelable: true,
- detail: {
- data: { shipmentunitprice: this.shippingUnitPrice, recordId: this.recordId }
- }
- }));
+ this.dispatchEvent(
+ new CustomEvent('shipmentunitprice', {
+ composed: true,
+ bubbles: true,
+ cancelable: true,
+ detail: {
+ data: {
+ shipmentunitprice: this.shippingUnitPrice,
+ recordId: this.recordId
+ }
+ }
+ })
+ );
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.css b/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.css
index 8e8eb4c..3145a0c 100644
--- a/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.css
+++ b/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.css
@@ -1,17 +1,19 @@
+@import 'c/lexCssUtility';
+
lightning-output-field {
pointer-events: none;
- --lwc-colorTextLabel:#696969;
+ --lwc-colorTextLabel: #696969;
--lwc-inputStaticFontSize: 16px;
--lwc-formLabelFontSize: 16px;
--lwc-brandTextLink: black;
- --lwc-spacingXxSmall:0px;
+ --lwc-spacingXxSmall: 0px;
}
/* lightning-output-field>a {
color: black;
} */
-body{
+body {
/* --lwc-fontFamily:sans-serif; */
font-family: sans-serif;
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.html b/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.html
index f0f4700..b5834bb 100644
--- a/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.html
+++ b/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.html
@@ -1,11 +1,27 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
<template if:true={showPage}>
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -14,91 +30,175 @@
</lightning-layout-item>
</lightning-layout>
</div>
- <div style="padding:10px;">
- <lightning-accordion allow-multiple-sections-open active-section-name={activeSections}>
- <lightning-record-view-form record-id={accountId} object-api-name="Account">
- <lightning-accordion-section label="缁忛攢鍟嗚缁嗕俊鎭�" name="A">
+ <div style="padding: 10px">
+ <lightning-accordion
+ allow-multiple-sections-open
+ active-section-name={activeSections}
+ >
+ <lightning-record-view-form
+ record-id={accountId}
+ object-api-name="Account"
+ >
+ <lightning-accordion-section
+ label="缁忛攢鍟嗚缁嗕俊鎭�"
+ name="A"
+ >
<lightning-layout multiple-rows="true">
<lightning-layout-item size="5">
- <lightning-output-field field-name="Management_Code__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Management_Code__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Name"></lightning-output-field>
+ <lightning-output-field
+ field-name="Name"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Ban_On_Use_Date__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Ban_On_Use_Date__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Ban_On_Use_Reason__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Ban_On_Use_Reason__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Dealer_discount__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Dealer_discount__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Sales_Shop_Class__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Sales_Shop_Class__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Deposit_Receipt_Finished__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Deposit_Receipt_Finished__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Deposit_Receipt_Completion_Day__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Deposit_Receipt_Completion_Day__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
</lightning-accordion-section>
- <lightning-accordion-section label="钀ヤ笟璁稿彲璇佷功鐘跺喌" name="B">
+ <lightning-accordion-section
+ label="钀ヤ笟璁稿彲璇佷功鐘跺喌"
+ name="B"
+ >
<lightning-layout multiple-rows="true">
<lightning-layout-item size="5">
- <lightning-output-field field-name="Business_Authorization_No__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Business_Authorization_No__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Business_Paper_Expiration_Date__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Business_Paper_Expiration_Date__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Tax_Practice_No__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Tax_Practice_No__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Tax_Practice_Expiration_Date__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Tax_Practice_Expiration_Date__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Medical_Equipment_Num__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Medical_Equipment_Num__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Medical_Equipment_Expiration_Date__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Medical_Equipment_Expiration_Date__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
</lightning-accordion-section>
<lightning-accordion-section label="鍦板潃淇℃伅" name="C">
<lightning-layout multiple-rows="true">
<lightning-layout-item size="5">
- <lightning-output-field field-name="Postal_Code__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Postal_Code__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Phone"></lightning-output-field>
+ <lightning-output-field
+ field-name="Phone"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Address_Together__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Address_Together__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
<lightning-layout-item size="5">
- <lightning-output-field field-name="Fax"></lightning-output-field>
+ <lightning-output-field
+ field-name="Fax"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
</lightning-accordion-section>
</lightning-record-view-form>
@@ -106,4 +206,4 @@
</div>
</div>
</template>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.css b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.css
index 32d24c8..7317b7e 100644
--- a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.css
+++ b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.css
@@ -1 +1 @@
-@import "c/lexCssUtility";
+@import 'c/lexCssUtility';
diff --git a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.html b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.html
index bb32158..fbf59ea 100644
--- a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.html
+++ b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.html
@@ -1,337 +1,417 @@
<template>
- <template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
- </template>
- <c-common-toast></c-common-toast>
- <template if:true={showPage}>
- <div
- style="
- border: 1px solid #d4d4d4;
- border-top: 3px solid #51606e;
- border-radius: 5px;
- "
- >
- <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
- <lightning-layout>
- <lightning-layout-item padding="around-small">
- <p style="font-size: 18px">
- <strong>鍏ュ簱/杩斿搧</strong>
- </p>
- </lightning-layout-item>
- </lightning-layout>
- <!-- <p style="font-size: 16px;"><strong>鍏ュ簱/杩斿搧</strong></p> -->
- </div>
- <div style="padding: 10px">
- <!-- 鎸夐挳 -->
- <template if:false={returnFLGbln}>
- <!-- <lightning-button style="margin: 5px;" label="鍒拌揣纭" onclick={arriveGoodsConfim} disabled={saveFLGbln}></lightning-button> -->
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- style="margin: 5px"
- label="鍒拌揣纭"
- onclick={arriveGoodsConfim}
- disabled={saveFLGbln}
- >
- 鍒拌揣纭
- </button>
- </template>
- <template if:true={returnFLGbln}>
- <!-- <lightning-button style="margin: 5px;" label="鐧诲綍杩斿搧" onclick={updateGoodsOfReturn}></lightning-button> -->
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- style="margin: 5px"
- label="鐧诲綍杩斿搧"
- onclick={updateGoodsOfReturn}
- >
- 鐧诲綍杩斿搧
- </button>
- </template>
- <p style="height: 10px"></p>
- <!-- 璁㈠崟淇℃伅 -->
- <template if:true={showOrderDetail}>
- <div
- style="
- border: 1px solid #d4d4d4;
- border-top: 3px solid #51606e;
- border-radius: 5px;
- margin-bottom: 7px;
- "
- >
- <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
- <lightning-layout>
- <lightning-layout-item padding="around-small">
- <p style="font-size: 18px">
- <strong>璁㈠崟淇℃伅</strong>
- </p>
- </lightning-layout-item>
- </lightning-layout>
- <!-- <p style="font-size: 16px;"><strong>璁㈠崟淇℃伅</strong></p> -->
+ <template if:true={showSpinner}>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
</div>
- <div style="padding: 10px">
- <table>
- <tbody>
- <tr>
- <td style="width: 10px"></td>
- <td style="width: 60px">
- <div style="color: #696969; font-size: 12px">
- 璁㈠崟鍚嶇О
- </div>
- </td>
- <td style="width: 200px">
- <lightning-formatted-text
- value={coc.Name}
- ></lightning-formatted-text>
- </td>
- <td style="width: 30px"></td>
- <td style="width: 60px">
- <div style="color: #696969; font-size: 12px">
- 璁㈠崟鎬绘暟
- </div>
- </td>
- <td style="width: 100px">
- <lightning-formatted-number
- value={coc.Total_num__c}
- ></lightning-formatted-number>
- </td>
- <td style="width: 30px"></td>
- <td style="width: 72px">
- <div style="color: #696969; font-size: 12px">
- 宸插埌璐ф暟閲�
- </div>
- </td>
- <td style="width: 100px">
- <lightning-formatted-number
- value={coc.OrderNumber_arrived__c}
- ></lightning-formatted-number>
- </td>
- <td style="width: 30px"></td>
- <td style="width: 84px">
- <div style="color: #696969; font-size: 12px">
- 杩樻病鍙戣揣鏁伴噺
- </div>
- </td>
- <td style="width: 100px">
- <lightning-formatted-number
- value={coc.OrderNumber_notarrive__c}
- ></lightning-formatted-number>
- </td>
- <td></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </template>
- <!-- BarCode褰曞叆 -->
- <div
- style="
- border: 1px solid #d4d4d4;
- border-top: 3px solid #51606e;
- border-radius: 5px;
- margin-bottom: 7px;
- "
- >
- <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
- <lightning-layout>
- <lightning-layout-item padding="around-small">
- <p style="font-size: 18px">
- <strong>BarCode褰曞叆</strong>
- </p>
- </lightning-layout-item>
- </lightning-layout>
- <!-- <p style="font-size: 16px;"><strong>BarCode褰曞叆</strong></p> -->
- </div>
- <div style="padding: 10px">
- <table>
- <tbody>
- <tr>
- <td style="width: 20px"></td>
- <td style="width: 60px; font-size: 16px">BarCode</td>
- <td style="width: 30px"></td>
- <td style="width: 600px">
- <lightning-textarea
- class="inputFont"
- name="BarCode"
- value={barcode}
- label=""
- variant="label-hidden"
- onchange={barcodeChange}
- ></lightning-textarea>
- </td>
- <td style="width: 30px"></td>
- <td style="width: 200px">
- <!-- <lightning-button label="鑾峰彇鏄庣粏" title="鑾峰彇鏄庣粏" onclick={barcodeEntrys} style="width: 300px;"></lightning-button> -->
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- label="鑾峰彇鏄庣粏"
- onclick={barcodeEntrys}
- >
- 鑾峰彇鏄庣粏
- </button>
- </td>
- <td></td>
- </tr>
- </tbody>
- </table>
- </div>
</div>
- <!-- 璀﹀憡鎻愰啋 -->
- <template if:true={hasWarning}>
- <div
+ </template>
+ <c-common-toast></c-common-toast>
+ <template if:true={showPage}>
+ <div
style="
- border: 1px solid #d4d4d4;
- border-radius: 5px;
- margin-bottom: 7px;
- "
- >
- <div
- style="
- border-bottom: 1px solid #d4d4d4;
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
border-radius: 5px;
- margin-bottom: 7px;
- color: #ff6a00;
- font-size: 17px;
- "
- >
- <lightning-icon icon-name="utility:warning"></lightning-icon>
- <strong> 璀﹀憡</strong>
- </div>
- <template for:each={warningMsgs} for:item="msg">
- <p
- key={msg}
- style="color: #ff6a00; padding-left: 7px; font-size: 14px"
- >
- 銉� {msg}
- </p>
- </template>
- </div>
- </template>
- <!-- 鎶ラ敊鎻愰啋 -->
- <template if:true={hasError}>
- <div
- style="
- border: 1px solid #d4d4d4;
- border-radius: 5px;
- margin-bottom: 7px;
"
- >
- <div
- style="
- border-bottom: 1px solid #d4d4d4;
- border-radius: 5px;
- margin-bottom: 7px;
- color: red;
- font-size: 17px;
- "
- >
- <lightning-icon icon-name="utility:error"></lightning-icon>
- <strong> 閿欒</strong>
- </div>
- <template for:each={errorMsgs} for:item="msg">
- <p
- key={msg}
- style="color: red; padding-left: 7px; font-size: 14px"
- >
- 銉� {msg}
- </p>
- </template>
- </div>
- </template>
- <!-- 鏈鍒拌揣浜у搧姹囨�� -->
- <template if:false={returnFLGbln}>
- <div
- style="
- border: 1px solid #d4d4d4;
- border-top: 3px solid #51606e;
- border-radius: 5px;
- margin-bottom: 7px;
- "
- >
+ >
<div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
- <lightning-layout>
- <lightning-layout-item padding="around-small">
- <p style="font-size: 18px">
- <strong>鏈鍒拌揣浜у搧姹囨��</strong>
- </p>
- </lightning-layout-item>
- </lightning-layout>
- <!-- <p style="font-size: 16px;"><strong>鏈鍒拌揣浜у搧姹囨��</strong></p> -->
+ <lightning-layout>
+ <lightning-layout-item padding="around-small">
+ <p style="font-size: 18px">
+ <strong>鍏ュ簱/杩斿搧</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ <!-- <p style="font-size: 16px;"><strong>鍏ュ簱/杩斿搧</strong></p> -->
</div>
<div style="padding: 10px">
- <lightning-datatable
- class="wrapped-header-datatable"
- hide-checkbox-column
- key-field="recordId"
- columns={currentArrProdCols}
- data={detailsSummary}
- ></lightning-datatable>
- </div>
- </div>
- </template>
- <!-- 鍒拌揣鏄庣粏 -->
- <template if:false={returnFLGbln}>
- <div
- style="
- border: 1px solid #d4d4d4;
- border-top: 3px solid #51606e;
- border-radius: 5px;
- margin-bottom: 7px;
- "
- >
- <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
- <lightning-layout>
- <lightning-layout-item padding="around-small">
- <p style="font-size: 18px">
- <strong>鍏ュ簱鍜屽埌璐ф槑缁�</strong>
- </p>
- </lightning-layout-item>
- </lightning-layout>
- </div>
- <div style="padding: 10px">
- <lightning-datatable
- class="wrapped-header-datatable"
- hide-checkbox-column
- key-field="recordId"
- columns={arrDetailCols}
- data={consumableorderdetailsRecordsview}
- ></lightning-datatable>
- </div>
- </div>
- </template>
- <!-- 杩斿搧鏄庣粏 -->
- <template if:true={returnFLGbln}>
- <div
- style="
- border: 1px solid #d4d4d4;
- border-top: 3px solid #51606e;
- border-radius: 5px;
- margin-bottom: 7px;
- "
- >
- <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
- <lightning-layout>
- <lightning-layout-item padding="around-small">
- <p style="font-size: 18px">
- <strong>鍏ュ簱鍜岃繑鍝佹槑缁�</strong>
- </p>
- </lightning-layout-item>
- </lightning-layout>
- </div>
- <div style="padding: 10px">
- <c-lex-custom-lightning-datatable
- class="wrapped-header-datatable"
- hide-checkbox-column
- key-field="recordId"
- data={showGoodsofReturnListView}
- columns={returnDetailCols}
- onchangereturncount={returnCountChange}
- onchangevalue={returnReasonChange}
- ></c-lex-custom-lightning-datatable>
- </div>
- </div>
- </template>
- <!-- 鍏ュ簱鏄庣粏 -->
- <!-- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
+ <!-- 鎸夐挳 -->
+ <template if:false={returnFLGbln}>
+ <!-- <lightning-button style="margin: 5px;" label="鍒拌揣纭" onclick={arriveGoodsConfim} disabled={saveFLGbln}></lightning-button> -->
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="鍒拌揣纭"
+ onclick={arriveGoodsConfim}
+ disabled={saveFLGbln}
+ >
+ 鍒拌揣纭
+ </button>
+ </template>
+ <template if:true={returnFLGbln}>
+ <!-- <lightning-button style="margin: 5px;" label="鐧诲綍杩斿搧" onclick={updateGoodsOfReturn}></lightning-button> -->
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="鐧诲綍杩斿搧"
+ onclick={updateGoodsOfReturn}
+ >
+ 鐧诲綍杩斿搧
+ </button>
+ </template>
+ <p style="height: 10px"></p>
+ <!-- 璁㈠崟淇℃伅 -->
+ <template if:true={showOrderDetail}>
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <lightning-layout>
+ <lightning-layout-item padding="around-small">
+ <p style="font-size: 18px">
+ <strong>璁㈠崟淇℃伅</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ <!-- <p style="font-size: 16px;"><strong>璁㈠崟淇℃伅</strong></p> -->
+ </div>
+ <div style="padding: 10px">
+ <table>
+ <tbody>
+ <tr>
+ <td style="width: 10px"></td>
+ <td style="width: 74px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 璁㈠崟鍚嶇О
+ </div>
+ </td>
+ <td style="width: 200px">
+ <lightning-formatted-text
+ style="font-size: 16px"
+ value={coc.Name}
+ ></lightning-formatted-text>
+ </td>
+ <td style="width: 30px"></td>
+ <td style="width: 74px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 璁㈠崟鎬绘暟
+ </div>
+ </td>
+ <td style="width: 100px">
+ <lightning-formatted-number
+ style="font-size: 16px"
+ value={coc.Total_num__c}
+ ></lightning-formatted-number>
+ </td>
+ <td style="width: 30px"></td>
+ <td style="width: 90px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 宸插埌璐ф暟閲�
+ </div>
+ </td>
+ <td style="width: 100px">
+ <lightning-formatted-number
+ style="font-size: 16px"
+ value={coc.OrderNumber_arrived__c}
+ ></lightning-formatted-number>
+ </td>
+ <td style="width: 30px"></td>
+ <td style="width: 106px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 杩樻病鍙戣揣鏁伴噺
+ </div>
+ </td>
+ <td style="width: 100px">
+ <lightning-formatted-number
+ style="font-size: 16px"
+ value={coc.OrderNumber_notarrive__c}
+ ></lightning-formatted-number>
+ </td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </template>
+ <!-- BarCode褰曞叆 -->
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
+ <lightning-layout>
+ <lightning-layout-item padding="around-small">
+ <p style="font-size: 18px">
+ <strong>BarCode褰曞叆</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ <!-- <p style="font-size: 16px;"><strong>BarCode褰曞叆</strong></p> -->
+ </div>
+ <div style="padding: 10px">
+ <table>
+ <tbody>
+ <tr>
+ <td style="width: 20px"></td>
+ <td style="width: 60px; font-size: 16px">
+ BarCode
+ </td>
+ <td style="width: 30px"></td>
+ <td style="width: 600px">
+ <lightning-textarea
+ class="inputFont"
+ name="BarCode"
+ value={barcode}
+ label=""
+ variant="label-hidden"
+ onchange={barcodeChange}
+ ></lightning-textarea>
+ </td>
+ <td style="width: 30px"></td>
+ <td style="width: 200px">
+ <!-- <lightning-button label="鑾峰彇鏄庣粏" title="鑾峰彇鏄庣粏" onclick={barcodeEntrys} style="width: 300px;"></lightning-button> -->
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="鑾峰彇鏄庣粏"
+ onclick={barcodeEntrys}
+ >
+ 鑾峰彇鏄庣粏
+ </button>
+ </td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <!-- 璀﹀憡鎻愰啋 -->
+ <template if:true={hasWarning}>
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ color: #ff6a00;
+ font-size: 17px;
+ "
+ >
+ <lightning-icon
+ icon-name="utility:warning"
+ ></lightning-icon>
+ <strong> 璀﹀憡</strong>
+ </div>
+ <template for:each={warningMsgs} for:item="msg">
+ <p
+ key={msg}
+ style="
+ color: #ff6a00;
+ padding-left: 7px;
+ font-size: 14px;
+ "
+ >
+ 銉� {msg}
+ </p>
+ </template>
+ </div>
+ </template>
+ <!-- 鎶ラ敊鎻愰啋 -->
+ <template if:true={hasError}>
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ color: red;
+ font-size: 17px;
+ "
+ >
+ <lightning-icon
+ icon-name="utility:error"
+ ></lightning-icon>
+ <strong> 閿欒</strong>
+ </div>
+ <template for:each={errorMsgs} for:item="msg">
+ <p
+ key={msg}
+ style="
+ color: red;
+ padding-left: 7px;
+ font-size: 14px;
+ "
+ >
+ 銉� {msg}
+ </p>
+ </template>
+ </div>
+ </template>
+ <!-- 鏈鍒拌揣浜у搧姹囨�� -->
+ <template if:false={returnFLGbln}>
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <lightning-layout>
+ <lightning-layout-item padding="around-small">
+ <p style="font-size: 18px">
+ <strong>鏈鍒拌揣浜у搧姹囨��</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ <!-- <p style="font-size: 16px;"><strong>鏈鍒拌揣浜у搧姹囨��</strong></p> -->
+ </div>
+ <div style="padding: 10px">
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ hide-checkbox-column
+ key-field="recordId"
+ columns={currentArrProdCols}
+ data={detailsSummary}
+ ></lightning-datatable>
+ </div>
+ </div>
+ </template>
+ <!-- 鍒拌揣鏄庣粏 -->
+ <template if:false={returnFLGbln}>
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <lightning-layout>
+ <lightning-layout-item padding="around-small">
+ <p style="font-size: 18px">
+ <strong>鍏ュ簱鍜屽埌璐ф槑缁�</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ </div>
+ <div style="padding: 10px">
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ hide-checkbox-column
+ key-field="recordId"
+ columns={arrDetailCols}
+ data={consumableorderdetailsRecordsview}
+ ></lightning-datatable>
+ </div>
+ </div>
+ </template>
+ <!-- 杩斿搧鏄庣粏 -->
+ <template if:true={returnFLGbln}>
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <lightning-layout>
+ <lightning-layout-item padding="around-small">
+ <p style="font-size: 18px">
+ <strong>鍏ュ簱鍜岃繑鍝佹槑缁�</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ </div>
+ <div style="padding: 10px">
+ <c-lex-custom-lightning-datatable
+ class="wrapped-header-datatable"
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ hide-checkbox-column
+ key-field="recordId"
+ data={showGoodsofReturnListView}
+ columns={returnDetailCols}
+ onchangereturncount={returnCountChange}
+ onchangevalue={returnReasonChange}
+ ></c-lex-custom-lightning-datatable>
+ </div>
+ </div>
+ </template>
+ <!-- 鍏ュ簱鏄庣粏 -->
+ <!-- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
<div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -345,36 +425,37 @@
<lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="recordId" columns={inDetailCols} data={consumableInventory}></lightning-datatable>
</div>
</div> -->
- <!-- 閿欒鏄庣粏 -->
- <div
- style="
- border: 1px solid #d4d4d4;
- border-top: 3px solid #51606e;
- border-radius: 5px;
- margin-bottom: 7px;
- "
- >
- <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
- <lightning-layout>
- <lightning-layout-item padding="around-small">
- <p style="font-size: 18px">
- <strong>閿欒鏄庣粏</strong>
- </p>
- </lightning-layout-item>
- </lightning-layout>
- <!-- <p style="font-size: 16px;"><strong>閿欒鏄庣粏</strong></p> -->
- </div>
- <div style="padding: 10px">
- <lightning-datatable
- class="wrapped-header-datatable"
- hide-checkbox-column
- key-field="recordId"
- columns={errorDetailCols}
- data={consumableorderdetailsRecordserror}
- ></lightning-datatable>
- </div>
+ <!-- 閿欒鏄庣粏 -->
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
+ <lightning-layout>
+ <lightning-layout-item padding="around-small">
+ <p style="font-size: 18px">
+ <strong>閿欒鏄庣粏</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ <!-- <p style="font-size: 16px;"><strong>閿欒鏄庣粏</strong></p> -->
+ </div>
+ <div style="padding: 10px">
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ style="word-wrap: break-word; word-break: break-all"
+ hide-checkbox-column
+ key-field="recordId"
+ columns={errorDetailCols}
+ data={consumableorderdetailsRecordserror}
+ ></lightning-datatable>
+ </div>
+ </div>
+ </div>
</div>
- </div>
- </div>
- </template>
+ </template>
</template>
diff --git a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js
index 47d4801..73304b7 100644
--- a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js
+++ b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js
@@ -1,773 +1,910 @@
-import { LightningElement, wire, track } from "lwc";
-import { CurrentPageReference } from "lightning/navigation";
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import { NavigationMixin } from "lightning/navigation";
-import init from "@salesforce/apex/LexArriveGoodsController.init";
-import searchProduct from "@salesforce/apex/LexArriveGoodsController.searchProduct";
-import arriveGoodsConfim from "@salesforce/apex/LexArriveGoodsController.arriveGoodsConfim";
-import updateGoodsOfReturn from "@salesforce/apex/LexArriveGoodsController.updateGoodsOfReturn";
+import { LightningElement, wire, track } from 'lwc';
+import { CurrentPageReference } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import init from '@salesforce/apex/LexArriveGoodsController.init';
+import searchProduct from '@salesforce/apex/LexArriveGoodsController.searchProduct';
+import arriveGoodsConfim from '@salesforce/apex/LexArriveGoodsController.arriveGoodsConfim';
+import updateGoodsOfReturn from '@salesforce/apex/LexArriveGoodsController.updateGoodsOfReturn';
//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
export default class LexArriveGoods extends NavigationMixin(LightningElement) {
- //椤甸潰鍙橀噺
- @track arrType;
- @track eSetId;
- @track returnFLGbln = false;
- @track saveFLGbln = false;
- @track barcode;
- @track arrController;
- stylesLoaded = false;
- @track showSpinner = true;
- @track showPage = false;
- //娑堣�楀搧璁㈠崟
- @track coc;
- @track cocId;
- //鏈鍒拌揣浜у搧姹囨��
- @track detailsSummary = [];
- //鍒拌揣鏄庣粏
- @track consumableorderdetailsRecords = [];
- @track consumableorderdetailsRecordsview = [];
- //杩斿搧鏄庣粏
- @track showGoodsofReturnList = [];
- @track showGoodsofReturnListView = [];
- //鍏ュ簱鏄庣粏
- @track consumableInventory = [];
- //閿欒鏄庣粏
- @track consumableorderdetailsRecordserror = [];
- //鎶ラ敊鎻愰啋
- @track errorMsgs = [];
- @track warningMsgs = [];
- //鏄惁涓�鐩存樉绀烘彁绀�
- @track isNoteStay = true;
+ //椤甸潰鍙橀噺
+ @track arrType;
+ @track eSetId;
+ @track returnFLGbln = false;
+ @track saveFLGbln = false;
+ @track barcode;
+ @track arrController;
+ stylesLoaded = false;
+ @track showSpinner = true;
+ @track showPage = false;
+ //娑堣�楀搧璁㈠崟
+ @track coc;
+ @track cocId;
+ //鏈鍒拌揣浜у搧姹囨��
+ @track detailsSummary = [];
+ //鍒拌揣鏄庣粏
+ @track consumableorderdetailsRecords = [];
+ @track consumableorderdetailsRecordsview = [];
+ //杩斿搧鏄庣粏
+ @track showGoodsofReturnList = [];
+ @track showGoodsofReturnListView = [];
+ //鍏ュ簱鏄庣粏
+ @track consumableInventory = [];
+ //閿欒鏄庣粏
+ @track consumableorderdetailsRecordserror = [];
+ //鎶ラ敊鎻愰啋
+ @track errorMsgs = [];
+ @track warningMsgs = [];
+ //鏄惁涓�鐩存樉绀烘彁绀�
+ @track isNoteStay = true;
- //鏄惁鏈夎鍛�
- get hasWarning() {
- if (this.warningMsgs == null || this.warningMsgs.length == 0) {
- return false;
+ //鏄惁鏈夎鍛�
+ get hasWarning() {
+ if (this.warningMsgs == null || this.warningMsgs.length == 0) {
+ return false;
+ }
+ if (this.warningMsgs.length > 0) {
+ return true;
+ }
}
- if (this.warningMsgs.length > 0) {
- return true;
- }
- }
- //鏄惁鏈夐敊璇�
- get hasError() {
- if (this.errorMsgs == null || this.errorMsgs.length == 0) {
- return false;
+ //鏄惁鏈夐敊璇�
+ get hasError() {
+ if (this.errorMsgs == null || this.errorMsgs.length == 0) {
+ return false;
+ }
+ if (this.errorMsgs.length > 0) {
+ return true;
+ }
}
- if (this.errorMsgs.length > 0) {
- return true;
- }
- }
- //鏈鍒拌揣浜у搧姹囨�籧ols
- @track currentArrProdCols = [
- {
- label: "浜у搧鍨嬪彿",
- fieldName: "assetModelNo",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 220
- },
- {
- label: "浜у搧鍚嶇О",
- fieldName: "prodName",
- hideDefaultActions: true,
- wrapText: true
- },
- {
- label: "鍒拌揣鏁伴噺",
- fieldName: "arrivedCount",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 220,
- cellAttributes: { alignment: "right" }
- },
- {
- label: "鍒拌揣閲戦",
- type: "number",
- typeAttributes: { minimumFractionDigits: 2 },
- fieldName: "arriveAmount",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 220,
- cellAttributes: { alignment: "right" }
- }
- ];
- //鍒拌揣鏄庣粏cols
- @track arrDetailCols = [
- {
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "prodName",
- hideDefaultActions: true,
- wrapText: true
- },
- {
- label: "瑙勬牸",
- fieldName: "productPackingListManual",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 120,
- cellAttributes: { alignment: "right" }
- },
- {
- label: "CFDA鐘舵��",
- fieldName: "status",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 120
- },
- {
- label: "娉ㄥ唽璇佺紪鐮佸彿",
- fieldName: "reportProductApprobation",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 180
- },
- {
- label: "娉ㄥ唽璇佹晥鏈�",
- fieldName: "ReportProductExpirationDate",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 100
- },
- {
- label: "BarCode",
- fieldName: "barCode",
- hideDefaultActions: true,
- wrap: true,
- initialWidth: 400
- }
- ];
- //杩斿搧鏄庣粏cols
- get returnDetailCols() {
- var cols = [];
- cols.push({
- label: "鍑哄簱鍗�",
- fieldName: "orderUrl",
- type: "url",
- typeAttributes: { label: { fieldName: "orderNo" }, target: "_blank" },
- hideDefaultActions: true,
- wrapText: true
- });
- // cols.push({label:'鍑哄簱鍗�' , fieldName:'orderNo', hideDefaultActions: true});
- cols.push({
- label: "鍑哄簱鏃�",
- fieldName: "prodOutDate",
- wrapText: true,
- hideDefaultActions: true,
- initialWidth: 110
- });
- cols.push({
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "prodName",
- wrapText: true,
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 190
- });
- cols.push({
- label: "鍑哄簱鐩殑",
- fieldName: "summonsForDirctionDet",
- wrapText: true,
- hideDefaultActions: true,
- initialWidth: 130
- });
- cols.push({
- label: "瀹㈡埛鍚�",
- fieldName: "hospitalName",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 130
- });
- cols.push({
- label: "缁忛攢鍟�",
- fieldName: "orderDealer",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 100
- });
- cols.push({
- label: "BarCode",
- fieldName: "barCode",
- hideDefaultActions: true,
- wrap: true,
- initialWidth: 230
- });
- cols.push({
- label: "浣跨敤鏈熼檺",
- fieldName: "sterilizationLimit",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 110
- });
- cols.push({
- label: "鍗曚綅",
- fieldName: "boxPiece",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 50
- });
- cols.push({
- label: "杩斿搧鏁伴噺",
- type: "customReturnGoodInput",
- typeAttributes: {
- inputValue: { fieldName: "returnCount" },
- boxPrice: { fieldName: "boxPiece" },
- recordId: { fieldName: "recordId" }
- },
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 100
- });
- cols.push({
- label: "杩斿搧鍘熷洜",
- type: "customTableInput",
- typeAttributes: {
- recordId: { fieldName: "recordId" },
- inputValue: { fieldName: "returnReason" },
- valueType: "Text"
- },
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 100
- });
- // cols.push({label:'杩斿搧鍘熷洜' , fieldName:'returnReason', hideDefaultActions: true});
- return cols;
- }
- //鍏ュ簱鏄庣粏cols
- get inDetailCols() {
- var cols = [];
- cols.push({
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "prodName",
- hideDefaultActions: true,
- wrapText: true
- });
- cols.push({
- label: "BarCode",
- fieldName: "barCodeNo",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 400
- });
- cols.push({
- label: "浣跨敤鏈熼檺",
- fieldName: "sterilizationlimitDate",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 100
- });
- cols.push({
- label: "serialNoorLotNo",
- fieldName: "serialNoorLotNo",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 140
- });
- cols.push({
- label: "tracingCode",
- fieldName: "tracingCodeNo",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 140
- });
- if (this.returnFLGbln) {
- cols.push({
- label: "杩斿搧鍘熷洜",
- fieldName: "ReturnReason",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 150
- });
- }
- return cols;
- }
- //閿欒鏄庣粏cols
- @track errorDetailCols = [
- // {label:'娑堣�楀搧璁㈠崟' , fieldName:'consumableOrderMinor', hideDefaultActions: true,wrapText:true},
- {
- label: "娑堣�楀搧璁㈠崟",
- fieldName: "consumableOrderUrl",
- type: "url",
- typeAttributes: {
- label: { fieldName: "consumableOrderMinorName" },
- target: "_blank"
- },
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 180
- },
- {
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "prodName",
- hideDefaultActions: true,
- wrapText: true
- },
- {
- label: "BarCode",
- fieldName: "barCode",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 400
- },
- {
- label: "鍗曚綅",
- fieldName: "boxPiece",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 60
- },
- {
- label: "鏁伴噺",
- fieldName: "intMark",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 100,
- cellAttributes: { alignment: "right" }
- },
- {
- label: "閿欒鍘熷洜",
- fieldName: "ErrorReason",
- hideDefaultActions: true,
- initialWidth: 280,
- wrapText: true
- }
- ];
-
- // 鑾峰彇鍙傛暟
- @wire(CurrentPageReference)
- getStateParameters(currentPageReference) {
- console.log("CurrentPageReference");
- if (currentPageReference) {
- this.arrType = currentPageReference.state?.ArrType;
- this.eSetId = currentPageReference.state?.ESetId;
- }
- }
-
- get showOrderDetail() {
- if (this.eSetId != "" && this.eSetId != null) {
- return true;
- } else {
- return false;
- }
- }
-
- renderedCallback() {
- if (!this.stylesLoaded) {
- Promise.all([loadStyle(this, WrappedHeaderTable)])
- .then(() => {
- console.log("Custom styles loaded");
- this.stylesLoaded = true;
- })
- .catch((error) => {
- console.error("Error loading custom styles");
+ //鏈鍒拌揣浜у搧姹囨�籧ols
+ @track currentArrProdCols = [
+ {
+ label: '浜у搧鍨嬪彿',
+ fieldName: 'assetModelNo',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 220
+ },
+ {
+ label: '浜у搧鍚嶇О',
+ fieldName: 'prodName',
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '鍒拌揣鏁伴噺',
+ fieldName: 'arrivedCount',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 220,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '鍒拌揣閲戦',
+ type: 'number',
+ typeAttributes: { minimumFractionDigits: 2 },
+ fieldName: 'arriveAmount',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 220,
+ cellAttributes: { alignment: 'right' }
+ }
+ ];
+ //鍒拌揣鏄庣粏cols
+ @track arrDetailCols = [
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'prodName',
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '瑙勬牸',
+ fieldName: 'productPackingListManual',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 55,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: 'CFDA鐘舵��',
+ fieldName: 'status',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 120
+ },
+ {
+ label: '娉ㄥ唽璇佺紪鐮佸彿',
+ fieldName: 'reportProductApprobation',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 190
+ },
+ {
+ label: '娉ㄥ唽璇佹晥鏈�',
+ fieldName: 'ReportProductExpirationDate',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 110
+ },
+ {
+ label: 'BarCode',
+ fieldName: 'barCode',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 400
+ }
+ ];
+ //杩斿搧鏄庣粏cols
+ get returnDetailCols() {
+ var cols = [];
+ cols.push({
+ label: '鍑哄簱鍗�',
+ fieldName: 'orderUrl',
+ type: 'url',
+ typeAttributes: {
+ label: { fieldName: 'orderNo' },
+ target: '_blank'
+ },
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 95
});
+ // cols.push({label:'鍑哄簱鍗�' , fieldName:'orderNo', hideDefaultActions: true});
+ cols.push({
+ label: '鍑哄簱鏃�',
+ fieldName: 'prodOutDate',
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 110
+ });
+ cols.push({
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'prodName',
+ wrapText: true,
+ hideDefaultActions: true,
+ wrapText: true
+ // initialWidth: 190
+ });
+ cols.push({
+ label: '鍑哄簱鐩殑',
+ fieldName: 'summonsForDirctionDet',
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 85
+ });
+ cols.push({
+ label: '瀹㈡埛鍚�',
+ fieldName: 'hospitalName',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 85
+ });
+ cols.push({
+ label: '缁忛攢鍟�',
+ fieldName: 'orderDealer',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 100
+ });
+ cols.push({
+ label: 'BarCode',
+ fieldName: 'barCode',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 230
+ });
+ cols.push({
+ label: '浣跨敤鏈熼檺',
+ fieldName: 'sterilizationLimit',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 110
+ });
+ cols.push({
+ label: '鍗曚綅',
+ fieldName: 'boxPiece',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 50
+ });
+ cols.push({
+ label: '杩斿搧鏁伴噺',
+ type: 'customReturnGoodInput',
+ typeAttributes: {
+ inputValue: { fieldName: 'returnCount' },
+ boxPrice: { fieldName: 'boxPiece' },
+ recordId: { fieldName: 'recordId' }
+ },
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 100
+ });
+ cols.push({
+ label: '杩斿搧鍘熷洜',
+ type: 'customTableInput',
+ typeAttributes: {
+ recordId: { fieldName: 'recordId' },
+ inputValue: { fieldName: 'returnReason' },
+ valueType: 'Text'
+ },
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 150
+ });
+ // cols.push({label:'杩斿搧鍘熷洜' , fieldName:'returnReason', hideDefaultActions: true});
+ return cols;
}
- }
-
- //鍒濆鍖�
- connectedCallback() {
- init({ arrType: this.arrType, eSetId: this.eSetId })
- .then((result) => {
- this.isNoteStay = result.isNoteStay;
- this.arrController = result.arrGoodCon;
- console.log("this.arrController:" + this.arrController);
- if (result.result == "Success") {
- this.saveFLGbln = result.saveFLGbln;
- this.returnFLGbln = result.returnFLGbln;
- this.coc = result.coc;
- this.cocId = result.coc.Id;
- this.warningMsgs = result.warningMsgList;
- this.errorMsgs = result.errorMsgList;
- this.showSpinner = false;
- this.showPage = true;
- } else {
- this.warningMsgs = result.warningMsgList;
- this.errorMsgs = result.errorMsgList;
- this.showSpinner = false;
- this.showPage = true;
- console.log("error:" + result.errorMsg);
- this.showMyToast("鍒濆鍖栭〉闈㈠け璐�", result.errorMsg, "error");
+ //鍏ュ簱鏄庣粏cols
+ get inDetailCols() {
+ var cols = [];
+ cols.push({
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'prodName',
+ hideDefaultActions: true,
+ wrapText: true
+ });
+ cols.push({
+ label: 'BarCode',
+ fieldName: 'barCodeNo',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 500
+ });
+ cols.push({
+ label: '浣跨敤鏈熼檺',
+ fieldName: 'sterilizationlimitDate',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 100
+ });
+ cols.push({
+ label: 'serialNoorLotNo',
+ fieldName: 'serialNoorLotNo',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 140
+ });
+ cols.push({
+ label: 'tracingCode',
+ fieldName: 'tracingCodeNo',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 140
+ });
+ if (this.returnFLGbln) {
+ cols.push({
+ label: '杩斿搧鍘熷洜',
+ fieldName: 'ReturnReason',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 150
+ });
}
- })
- .catch((error) => {
- this.showSpinner = false;
- this.showPage = true;
- console.log("error:" + JSON.stringify(error));
- this.showMyToast("鍒濆鍖栭〉闈㈠け璐�", JSON.stringify(error), "error");
- });
- }
-
- //barcode change
- barcodeChange(event) {
- this.barcode = event.detail.value;
- }
-
- //鏍规嵁barcode鎼滅储
- barcodeEntrys() {
- this.showSpinner = true;
- searchProduct({
- barcode: this.barcode,
- arrControllerStr: this.arrController
- })
- .then((result) => {
- this.arrController = result.arrGoodCon;
- if (result.result == "Success") {
- this.saveFLGbln = result.saveFLGbln;
- this.returnFLGbln = result.returnFLGbln;
- this.coc = result.coc;
- this.warningMsgs = result.warningMsgList;
- this.errorMsgs = result.errorMsgList;
- this.consumableInventory = result.consumableInventory;
- this.detailsSummary = result.detailsSummary;
- for (var i in this.detailsSummary) {
- if (this.detailsSummary[i].Prod != null) {
- this.detailsSummary[i]["recordId"] =
- this.detailsSummary[i].Prod.Id;
- this.detailsSummary[i]["assetModelNo"] =
- this.detailsSummary[i].Prod.Asset_Model_No__c;
- this.detailsSummary[i]["prodName"] =
- this.detailsSummary[i].Prod.Name__c;
- }
- }
- console.log(
- "this.detailsSummary:" + JSON.stringify(this.detailsSummary)
- );
- this.consumableorderdetailsRecords =
- result.consumableorderdetailsRecords;
- var consumableorderdetailsRecordsview = [];
- for (var i in this.consumableorderdetailsRecords) {
- consumableorderdetailsRecordsview.push(
- this.consumableorderdetailsRecords[i]
- );
- }
- for (var i in this.consumableInventory) {
- consumableorderdetailsRecordsview.push(this.consumableInventory[i]);
- }
- this.consumableorderdetailsRecordsview =
- consumableorderdetailsRecordsview;
- for (var i in this.consumableorderdetailsRecordsview) {
- if (this.consumableorderdetailsRecordsview[i].Prod != null) {
- this.consumableorderdetailsRecordsview[i]["recordId"] =
- this.consumableorderdetailsRecordsview[i].Prod.Id;
- this.consumableorderdetailsRecordsview[i]["prodName"] =
- this.consumableorderdetailsRecordsview[i].Prod.Name__c;
- }
- if (this.consumableorderdetailsRecordsview[i].esd != null) {
- this.consumableorderdetailsRecordsview[i][
- "productPackingListManual"
- ] =
- this.consumableorderdetailsRecordsview[
- i
- ].esd.ProductPacking_list_manual__c;
- this.consumableorderdetailsRecordsview[i]["status"] =
- this.consumableorderdetailsRecordsview[i].esd.CFDA_Status__c;
- this.consumableorderdetailsRecordsview[i][
- "reportProductApprobation"
- ] =
- this.consumableorderdetailsRecordsview[
- i
- ].esd.Report_Product_Approbation__c;
- this.consumableorderdetailsRecordsview[i]["barCode"] =
- this.consumableorderdetailsRecordsview[i].esd.Bar_Code__c;
- }
- }
- console.log("len1:" + this.consumableorderdetailsRecords.length);
- console.log("len2:" + this.consumableorderdetailsRecordsview.length);
- console.log(
- "this.consumableorderdetailsRecordsview:" +
- JSON.stringify(this.consumableorderdetailsRecordsview)
- );
- this.showGoodsofReturnList = result.showGoodsofReturnList;
- var showGoodsofReturnListView = [];
- for (var i in this.showGoodsofReturnList) {
- showGoodsofReturnListView.push(this.showGoodsofReturnList[i]);
- }
- for (var i in this.consumableInventory) {
- showGoodsofReturnListView.push(this.consumableInventory[i]);
- }
- this.showGoodsofReturnListView = showGoodsofReturnListView;
- for (var i in this.showGoodsofReturnListView) {
- if (this.showGoodsofReturnListView[i].Prod != null) {
- this.showGoodsofReturnListView[i]["prodName"] =
- this.showGoodsofReturnListView[i].Prod.Name__c;
- }
- if (this.showGoodsofReturnListView[i].esd != null) {
- if (
- this.showGoodsofReturnListView[i].esd
- .Consumable_Shipment_order__c != "" &&
- this.showGoodsofReturnListView[i].esd
- .Consumable_Shipment_order__c != null
- ) {
- this.showGoodsofReturnListView[i]["recordId"] =
- this.showGoodsofReturnListView[
- i
- ].esd.Consumable_Shipment_order__c;
- this.showGoodsofReturnListView[i]["orderUrl"] =
- "/lexsummonscreat?ESetid=" +
- this.showGoodsofReturnListView[i].esd
- .Consumable_Shipment_order__c;
- this.showGoodsofReturnListView[i]["orderNo"] =
- this.showGoodsofReturnListView[
- i
- ].esd.Consumable_Shipment_order__r.Name;
- } else if (
- this.showGoodsofReturnListView[i].esd
- .Consumable_Sale_order__c != "" &&
- this.showGoodsofReturnListView[i].esd
- .Consumable_Sale_order__c != null
- ) {
- this.showGoodsofReturnListView[i]["recordId"] =
- this.showGoodsofReturnListView[
- i
- ].esd.Consumable_Sale_order__c;
- this.showGoodsofReturnListView[i]["orderUrl"] =
- "/lexsummonscreat?ESetid=" +
- this.showGoodsofReturnListView[i].esd
- .Consumable_Sale_order__c;
- this.showGoodsofReturnListView[i]["orderNo"] =
- this.showGoodsofReturnListView[
- i
- ].esd.Consumable_Sale_order__r.Name;
- }
- this.showGoodsofReturnListView[i]["prodOutDate"] =
- this.showGoodsofReturnListView[i].esd.Product_OutDate__c;
- this.showGoodsofReturnListView[i]["summonsForDirctionDet"] =
- this.showGoodsofReturnListView[i].esd.SummonsForDirction_det__c;
- this.showGoodsofReturnListView[i]["hospitalName"] =
- this.showGoodsofReturnListView[i].esd.HospItal_Name__c;
- this.showGoodsofReturnListView[i]["orderDealer"] =
- this.showGoodsofReturnListView[i].esd.Order_Dealer_Info__c;
- this.showGoodsofReturnListView[i]["barCode"] =
- this.showGoodsofReturnListView[i].esd.Bar_Code__c;
- this.showGoodsofReturnListView[i]["sterilizationLimit"] =
- this.showGoodsofReturnListView[i].esd.Sterilization_limit__c;
- this.showGoodsofReturnListView[i]["boxPiece"] =
- this.showGoodsofReturnListView[i].esd.Box_Piece__c;
- this.showGoodsofReturnListView[i]["returnCount"] =
- this.showGoodsofReturnListView[i].esd.Rrturn_count__c;
- console.log(
- "returnCount:" +
- this.showGoodsofReturnListView[i].esd.Rrturn_count__c
- );
- this.showGoodsofReturnListView[i]["returnReason"] =
- this.showGoodsofReturnListView[i].esd.Return_reason__c;
- }
- }
- console.log("len1:" + this.showGoodsofReturnList.length);
- console.log("len2:" + this.showGoodsofReturnListView.length);
- console.log(
- "this.showGoodsofReturnListView:" +
- JSON.stringify(this.showGoodsofReturnListView)
- );
- // this.consumableInventory = result.consumableInventory;
- // for(var i in this.consumableInventory){
- // if(this.consumableInventory[i].Prod != null){
- // this.consumableInventory[i]['recordId'] = this.consumableInventory[i].Prod.Id;
- // this.consumableInventory[i]['prodName'] = this.consumableInventory[i].Prod.Name__c;
- // }
- // }
- console.log(
- "this.consumableInventory:" +
- JSON.stringify(this.consumableInventory)
- );
- this.consumableorderdetailsRecordserror =
- result.consumableorderdetailsRecordserror;
- for (var i in this.consumableorderdetailsRecordserror) {
- if (this.consumableorderdetailsRecordserror[i].Prod != null) {
- this.consumableorderdetailsRecordserror[i]["recordId"] =
- this.consumableorderdetailsRecordserror[i].Prod.Id;
- this.consumableorderdetailsRecordserror[i]["prodName"] =
- this.consumableorderdetailsRecordserror[i].Prod.Name__c;
- }
- if (this.consumableorderdetailsRecordserror[i].esd != null) {
- this.consumableorderdetailsRecordserror[i][
- "consumableOrderMinor"
- ] =
- this.consumableorderdetailsRecordserror[
- i
- ].esd.Consumable_order_minor__c;
- if (
- this.consumableorderdetailsRecordserror[i].esd
- .Consumable_order_minor__c != null
- ) {
- this.consumableorderdetailsRecordserror[i][
- "consumableOrderMinorName"
- ] =
- this.consumableorderdetailsRecordserror[
- i
- ].esd.Consumable_order_minor__r.Name;
- this.consumableorderdetailsRecordserror[i][
- "consumableOrderUrl"
- ] =
- "/s/detail/" +
- this.consumableorderdetailsRecordserror[i].esd
- .Consumable_order_minor__c;
- }
- this.consumableorderdetailsRecordserror[i]["barCode"] =
- this.consumableorderdetailsRecordserror[i].esd.Bar_Code__c;
- this.consumableorderdetailsRecordserror[i]["boxPiece"] =
- this.consumableorderdetailsRecordserror[i].esd.Box_Piece__c;
- }
- }
- console.log(
- "this.consumableorderdetailsRecordserror:" +
- JSON.stringify(this.consumableorderdetailsRecordserror)
- );
- this.showSpinner = false;
- this.showMyToast("鑾峰彇鎴愬姛", "", "success");
- } else {
- this.showSpinner = false;
- this.warningMsgs = result.warningMsgList;
- this.errorMsgs = result.errorMsgList;
- console.log("error:" + result.errorMsg);
- this.showMyToast("鑾峰彇澶辫触", result.errorMsg, "error");
- }
- })
- .catch((error) => {
- this.showSpinner = false;
- console.log("error:" + error);
- this.showMyToast("鑾峰彇澶辫触", error, "error");
- });
- }
-
- //杩斿搧鏁伴噺change
- returnCountChange(event) {
- var value = event.detail.data.value;
- var boxPrice = event.detail.data.boxPrice;
- var recordId = event.detail.data.recordId;
- console.log("杩斿搧鏁伴噺:" + value + boxPrice + "---" + recordId);
- for (var i in this.showGoodsofReturnList) {
- if (this.showGoodsofReturnList[i]["recordId"] == recordId) {
- if (this.showGoodsofReturnList[i].canEdit) {
- this.showGoodsofReturnList[i].esd.Rrturn_count__c = 1;
- this.showGoodsofReturnList[i]["returnCount"] =
- this.showGoodsofReturnList[i].esd.Rrturn_count__c;
- } else {
- this.showGoodsofReturnList[i].esd.Rrturn_count__c = value;
- this.showGoodsofReturnList[i]["returnCount"] =
- this.showGoodsofReturnList[i].esd.Rrturn_count__c;
- }
- }
+ return cols;
}
- }
-
- //杩斿搧鍘熷洜change
- returnReasonChange(event) {
- var recordId = event.detail.data.recordId;
- var value = event.detail.data.value;
- console.log("杩斿搧鍘熷洜:" + value + "---" + recordId);
- for (var i in this.showGoodsofReturnList) {
- if (this.showGoodsofReturnList[i]["recordId"] == recordId) {
- this.showGoodsofReturnList[i].esd.Return_reason__c = value;
- this.showGoodsofReturnList[i]["returnReason"] =
- this.showGoodsofReturnList[i].esd.Return_reason__c;
- }
- }
- }
-
- // 鍒拌揣纭
- arriveGoodsConfim() {
- this.showSpinner = true;
- arriveGoodsConfim({ arrControllerStr: this.arrController })
- .then((result) => {
- this.arrController = result.arrGoodCon;
- if (result.result == "Success") {
- this.showSpinner = false;
- this.warningMsgs = result.warningMsgList;
- this.errorMsgs = result.errorMsgList;
- var url = result.url;
- const config = {
- type: "standard__webPage",
- attributes: {
- url: url
- }
- };
- this[NavigationMixin.Navigate](config);
- } else {
- this.showSpinner = false;
- this.warningMsgs = result.warningMsgList;
- this.errorMsgs = result.errorMsgList;
- console.log("error1:" + result.errorMsg);
- this.showMyToast("鍒拌揣纭澶辫触", result.errorMsg, "error");
+ //閿欒鏄庣粏cols
+ @track errorDetailCols = [
+ // {label:'娑堣�楀搧璁㈠崟' , fieldName:'consumableOrderMinor', hideDefaultActions: true,wrapText:true},
+ {
+ label: '娑堣�楀搧璁㈠崟',
+ fieldName: 'consumableOrderUrl',
+ type: 'url',
+ typeAttributes: {
+ label: { fieldName: 'consumableOrderMinorName' },
+ target: '_blank'
+ },
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 180
+ },
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'prodName',
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: 'BarCode',
+ fieldName: 'barCode',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 400
+ },
+ {
+ label: '鍗曚綅',
+ fieldName: 'boxPiece',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 60
+ },
+ {
+ label: '鏁伴噺',
+ fieldName: 'intMark',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 100,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '閿欒鍘熷洜',
+ fieldName: 'ErrorReason',
+ hideDefaultActions: true,
+ initialWidth: 280,
+ wrapText: true
}
- })
- .catch((error) => {
- this.showSpinner = false;
- console.log("error2:" + error);
- this.showMyToast("鍒拌揣纭澶辫触", error, "error");
- });
- }
+ ];
- // 鐧诲綍杩斿搧
- updateGoodsOfReturn() {
- this.showSpinner = true;
- updateGoodsOfReturn({
- arrControllerStr: this.arrController,
- showGoodsofReturnListStr: JSON.stringify(this.showGoodsofReturnList)
- })
- .then((result) => {
- this.showSpinner = false;
- this.arrController = result.arrGoodCon;
- if (result.result == "Success") {
- this.warningMsgs = result.warningMsgList;
- this.errorMsgs = result.errorMsgList;
- var url = result.url;
- const config = {
- type: "standard__webPage",
- attributes: {
- url: url
- }
- };
- this[NavigationMixin.Navigate](config);
- } else {
- this.showSpinner = false;
- this.warningMsgs = result.warningMsgList;
- this.errorMsgs = result.errorMsgList;
- console.log("error1:" + result.errorMsg);
- this.showMyToast("鐧诲綍杩斿搧澶辫触", result.errorMsg, "error");
+ // 鑾峰彇鍙傛暟
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ console.log('CurrentPageReference');
+ if (currentPageReference) {
+ this.arrType = currentPageReference.state?.ArrType;
+ this.eSetId = currentPageReference.state?.ESetId;
}
- })
- .catch((error) => {
- this.showSpinner = false;
- console.log("error2:" + JSON.stringify(error));
- this.showMyToast("鐧诲綍杩斿搧澶辫触", error, "error");
- });
- }
+ }
- showMyToast(title, message, variant) {
- console.log("show custom message");
- var iconName = "";
- var content = "";
- if (variant == "success") {
- iconName = "utility:check";
- } else {
- iconName = "utility:error";
+ get showOrderDetail() {
+ if (this.eSetId != '' && this.eSetId != null) {
+ return true;
+ } else {
+ return false;
+ }
}
- if (message != "") {
- content =
- "<h2><strong>" + title + "<strong/></h2><h5>" + message + "</h5>";
- } else {
- content = "<h2><strong>" + title + "<strong/></h2>";
+
+ renderedCallback() {
+ if (!this.stylesLoaded) {
+ Promise.all([loadStyle(this, WrappedHeaderTable)])
+ .then(() => {
+ console.log('Custom styles loaded');
+ this.stylesLoaded = true;
+ })
+ .catch((error) => {
+ console.error('Error loading custom styles');
+ });
+ }
}
- this.template
- .querySelector("c-common-toast")
- .showToast(variant, content, iconName, 10000);
- // var mode;
- // if(this.isNoteStay){
- // mode ='sticky';
- // }else{
- // mode = 'dismissable';
- // }
- // const evt = new ShowToastEvent({
- // title: title,
- // message: message,
- // variant: variant,
- // mode: mode
- // });
- // this.dispatchEvent(evt);
- }
+
+ //鍒濆鍖�
+ connectedCallback() {
+ init({ arrType: this.arrType, eSetId: this.eSetId })
+ .then((result) => {
+ this.isNoteStay = result.isNoteStay;
+ this.arrController = result.arrGoodCon;
+ console.log('this.arrController:' + this.arrController);
+ if (result.result == 'Success') {
+ this.saveFLGbln = result.saveFLGbln;
+ this.returnFLGbln = result.returnFLGbln;
+ this.coc = result.coc;
+ this.cocId = result.coc.Id;
+ this.warningMsgs = result.warningMsgList;
+ this.errorMsgs = result.errorMsgList;
+ this.showSpinner = false;
+ this.showPage = true;
+ } else {
+ this.warningMsgs = result.warningMsgList;
+ this.errorMsgs = result.errorMsgList;
+ this.showSpinner = false;
+ this.showPage = true;
+ console.log('error:' + result.errorMsg);
+ this.showMyToast(
+ '鍒濆鍖栭〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ })
+ .catch((error) => {
+ this.showSpinner = false;
+ this.showPage = true;
+ console.log('error:' + JSON.stringify(error));
+ this.showMyToast(
+ '鍒濆鍖栭〉闈㈠け璐�',
+ JSON.stringify(error),
+ 'error'
+ );
+ });
+ }
+
+ //barcode change
+ barcodeChange(event) {
+ this.barcode = event.detail.value;
+ }
+
+ //鏍规嵁barcode鎼滅储
+ barcodeEntrys() {
+ this.showSpinner = true;
+ searchProduct({
+ barcode: this.barcode,
+ arrControllerStr: this.arrController
+ })
+ .then((result) => {
+ this.arrController = result.arrGoodCon;
+ if (result.result == 'Success') {
+ this.saveFLGbln = result.saveFLGbln;
+ this.returnFLGbln = result.returnFLGbln;
+ this.coc = result.coc;
+ this.warningMsgs = result.warningMsgList;
+ this.errorMsgs = result.errorMsgList;
+ this.consumableInventory = result.consumableInventory;
+ this.detailsSummary = result.detailsSummary;
+ for (var i in this.detailsSummary) {
+ if (this.detailsSummary[i].Prod != null) {
+ this.detailsSummary[i]['recordId'] =
+ this.detailsSummary[i].Prod.Id;
+ this.detailsSummary[i]['assetModelNo'] =
+ this.detailsSummary[i].Prod.Asset_Model_No__c;
+ this.detailsSummary[i]['prodName'] =
+ this.detailsSummary[i].Prod.Name__c;
+ }
+ }
+ console.log(
+ 'this.detailsSummary:' +
+ JSON.stringify(this.detailsSummary)
+ );
+ this.consumableorderdetailsRecords =
+ result.consumableorderdetailsRecords;
+ var consumableorderdetailsRecordsview = [];
+ for (var i in this.consumableorderdetailsRecords) {
+ this.consumableorderdetailsRecords[i]['dataType'] =
+ 'DataileRecords';
+ consumableorderdetailsRecordsview.push(
+ this.consumableorderdetailsRecords[i]
+ );
+ }
+ for (var i in this.consumableInventory) {
+ this.consumableInventory[i]['dataType'] = 'Inventory';
+ consumableorderdetailsRecordsview.push(
+ this.consumableInventory[i]
+ );
+ }
+ this.consumableorderdetailsRecordsview =
+ consumableorderdetailsRecordsview;
+ for (var i in this.consumableorderdetailsRecordsview) {
+ if (
+ this.consumableorderdetailsRecordsview[i].Prod !=
+ null
+ ) {
+ this.consumableorderdetailsRecordsview[i][
+ 'recordId'
+ ] =
+ this.consumableorderdetailsRecordsview[
+ i
+ ].Prod.Id;
+ this.consumableorderdetailsRecordsview[i][
+ 'prodName'
+ ] =
+ this.consumableorderdetailsRecordsview[
+ i
+ ].Prod.Name__c;
+ }
+ if (
+ this.consumableorderdetailsRecordsview[i][
+ 'dataType'
+ ] == 'Inventory'
+ ) {
+ this.consumableorderdetailsRecordsview[i][
+ 'barCode'
+ ] =
+ this.consumableorderdetailsRecordsview[
+ i
+ ].barCodeNo;
+ } else if (
+ this.consumableorderdetailsRecordsview[i].esd !=
+ null
+ ) {
+ this.consumableorderdetailsRecordsview[i][
+ 'barCode'
+ ] =
+ this.consumableorderdetailsRecordsview[
+ i
+ ].esd.Bar_Code__c;
+ }
+ if (
+ this.consumableorderdetailsRecordsview[i].esd !=
+ null
+ ) {
+ this.consumableorderdetailsRecordsview[i][
+ 'productPackingListManual'
+ ] =
+ this.consumableorderdetailsRecordsview[
+ i
+ ].esd.ProductPacking_list_manual__c;
+ this.consumableorderdetailsRecordsview[i][
+ 'status'
+ ] =
+ this.consumableorderdetailsRecordsview[
+ i
+ ].esd.CFDA_Status__c;
+ this.consumableorderdetailsRecordsview[i][
+ 'reportProductApprobation'
+ ] =
+ this.consumableorderdetailsRecordsview[
+ i
+ ].esd.Report_Product_Approbation__c;
+ }
+ }
+ console.log(
+ 'len1:' + this.consumableorderdetailsRecords.length
+ );
+ console.log(
+ 'len2:' + this.consumableorderdetailsRecordsview.length
+ );
+ console.log(
+ 'this.consumableorderdetailsRecordsview:' +
+ JSON.stringify(
+ this.consumableorderdetailsRecordsview
+ )
+ );
+ this.showGoodsofReturnList = result.showGoodsofReturnList;
+ var showGoodsofReturnListView = [];
+ for (var i in this.showGoodsofReturnList) {
+ this.showGoodsofReturnList[i]['dataType'] =
+ 'GoodsoOfReturn';
+ showGoodsofReturnListView.push(
+ this.showGoodsofReturnList[i]
+ );
+ }
+ for (var i in this.consumableInventory) {
+ this.consumableInventory[i]['dataType'] = 'Inventory';
+ showGoodsofReturnListView.push(
+ this.consumableInventory[i]
+ );
+ }
+ this.showGoodsofReturnListView = showGoodsofReturnListView;
+ for (var i in this.showGoodsofReturnListView) {
+ if (this.showGoodsofReturnListView[i].Prod != null) {
+ this.showGoodsofReturnListView[i]['prodName'] =
+ this.showGoodsofReturnListView[i].Prod.Name__c;
+ }
+ if (
+ this.showGoodsofReturnListView[i]['dataType'] ==
+ 'Inventory'
+ ) {
+ this.showGoodsofReturnListView[i]['barCode'] =
+ this.showGoodsofReturnListView[i].barCodeNo;
+ } else if (
+ this.showGoodsofReturnListView[i].esd != null
+ ) {
+ this.showGoodsofReturnListView[i]['barCode'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Bar_Code__c;
+ }
+ if (this.showGoodsofReturnListView[i].esd != null) {
+ if (
+ this.showGoodsofReturnListView[i].esd
+ .Consumable_Shipment_order__c != '' &&
+ this.showGoodsofReturnListView[i].esd
+ .Consumable_Shipment_order__c != null
+ ) {
+ this.showGoodsofReturnListView[i]['recordId'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Consumable_Shipment_order__c;
+ this.showGoodsofReturnListView[i]['orderUrl'] =
+ '/lexsummonscreat?ESetid=' +
+ this.showGoodsofReturnListView[i].esd
+ .Consumable_Shipment_order__c;
+ this.showGoodsofReturnListView[i]['orderNo'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Consumable_Shipment_order__r.Name;
+ } else if (
+ this.showGoodsofReturnListView[i].esd
+ .Consumable_Sale_order__c != '' &&
+ this.showGoodsofReturnListView[i].esd
+ .Consumable_Sale_order__c != null
+ ) {
+ this.showGoodsofReturnListView[i]['recordId'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Consumable_Sale_order__c;
+ this.showGoodsofReturnListView[i]['orderUrl'] =
+ '/lexsummonscreat?ESetid=' +
+ this.showGoodsofReturnListView[i].esd
+ .Consumable_Sale_order__c;
+ this.showGoodsofReturnListView[i]['orderNo'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Consumable_Sale_order__r.Name;
+ }
+ this.showGoodsofReturnListView[i]['prodOutDate'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Product_OutDate__c;
+ this.showGoodsofReturnListView[i][
+ 'summonsForDirctionDet'
+ ] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.SummonsForDirction_det__c;
+ this.showGoodsofReturnListView[i]['hospitalName'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.HospItal_Name__c;
+ this.showGoodsofReturnListView[i]['orderDealer'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Order_Dealer_Info__c;
+ this.showGoodsofReturnListView[i][
+ 'sterilizationLimit'
+ ] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Sterilization_limit__c;
+ this.showGoodsofReturnListView[i]['boxPiece'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Box_Piece__c;
+ this.showGoodsofReturnListView[i]['returnCount'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Rrturn_count__c;
+ console.log(
+ 'returnCount:' +
+ this.showGoodsofReturnListView[i].esd
+ .Rrturn_count__c
+ );
+ this.showGoodsofReturnListView[i]['returnReason'] =
+ this.showGoodsofReturnListView[
+ i
+ ].esd.Return_reason__c;
+ }
+ }
+ console.log('len1:' + this.showGoodsofReturnList.length);
+ console.log(
+ 'len2:' + this.showGoodsofReturnListView.length
+ );
+ console.log(
+ 'this.showGoodsofReturnListView:' +
+ JSON.stringify(this.showGoodsofReturnListView)
+ );
+ // this.consumableInventory = result.consumableInventory;
+ // for(var i in this.consumableInventory){
+ // if(this.consumableInventory[i].Prod != null){
+ // this.consumableInventory[i]['recordId'] = this.consumableInventory[i].Prod.Id;
+ // this.consumableInventory[i]['prodName'] = this.consumableInventory[i].Prod.Name__c;
+ // }
+ // }
+ console.log(
+ 'this.consumableInventory:' +
+ JSON.stringify(this.consumableInventory)
+ );
+ this.consumableorderdetailsRecordserror =
+ result.consumableorderdetailsRecordserror;
+ for (var i in this.consumableorderdetailsRecordserror) {
+ if (
+ this.consumableorderdetailsRecordserror[i].Prod !=
+ null
+ ) {
+ this.consumableorderdetailsRecordserror[i][
+ 'recordId'
+ ] =
+ this.consumableorderdetailsRecordserror[
+ i
+ ].Prod.Id;
+ this.consumableorderdetailsRecordserror[i][
+ 'prodName'
+ ] =
+ this.consumableorderdetailsRecordserror[
+ i
+ ].Prod.Name__c;
+ }
+ if (
+ this.consumableorderdetailsRecordserror[i].esd !=
+ null
+ ) {
+ this.consumableorderdetailsRecordserror[i][
+ 'consumableOrderMinor'
+ ] =
+ this.consumableorderdetailsRecordserror[
+ i
+ ].esd.Consumable_order_minor__c;
+ if (
+ this.consumableorderdetailsRecordserror[i].esd
+ .Consumable_order_minor__c != null
+ ) {
+ this.consumableorderdetailsRecordserror[i][
+ 'consumableOrderMinorName'
+ ] =
+ this.consumableorderdetailsRecordserror[
+ i
+ ].esd.Consumable_order_minor__r.Name;
+ this.consumableorderdetailsRecordserror[i][
+ 'consumableOrderUrl'
+ ] =
+ '/s/detail/' +
+ this.consumableorderdetailsRecordserror[i]
+ .esd.Consumable_order_minor__c;
+ }
+ this.consumableorderdetailsRecordserror[i][
+ 'barCode'
+ ] =
+ this.consumableorderdetailsRecordserror[
+ i
+ ].esd.Bar_Code__c;
+ this.consumableorderdetailsRecordserror[i][
+ 'boxPiece'
+ ] =
+ this.consumableorderdetailsRecordserror[
+ i
+ ].esd.Box_Piece__c;
+ }
+ }
+ console.log(
+ 'this.consumableorderdetailsRecordserror:' +
+ JSON.stringify(
+ this.consumableorderdetailsRecordserror
+ )
+ );
+ this.showSpinner = false;
+ if (this.errorMsgs.length < 1) {
+ this.showMyToast('鑾峰彇鎴愬姛', '', 'success');
+ }
+ } else {
+ this.showSpinner = false;
+ this.warningMsgs = result.warningMsgList;
+ this.errorMsgs = result.errorMsgList;
+ console.log('error:' + result.errorMsg);
+ this.showMyToast('鑾峰彇澶辫触', result.errorMsg, 'error');
+ }
+ })
+ .catch((error) => {
+ this.showSpinner = false;
+ console.log('error:' + error);
+ this.showMyToast('鑾峰彇澶辫触', error, 'error');
+ });
+ }
+
+ //杩斿搧鏁伴噺change
+ returnCountChange(event) {
+ var value = event.detail.data.value;
+ var boxPrice = event.detail.data.boxPrice;
+ var recordId = event.detail.data.recordId;
+ console.log('杩斿搧鏁伴噺:' + value + boxPrice + '---' + recordId);
+ for (var i in this.showGoodsofReturnList) {
+ if (this.showGoodsofReturnList[i]['recordId'] == recordId) {
+ if (this.showGoodsofReturnList[i].canEdit) {
+ this.showGoodsofReturnList[i].esd.Rrturn_count__c = 1;
+ this.showGoodsofReturnList[i]['returnCount'] =
+ this.showGoodsofReturnList[i].esd.Rrturn_count__c;
+ } else {
+ this.showGoodsofReturnList[i].esd.Rrturn_count__c = value;
+ this.showGoodsofReturnList[i]['returnCount'] =
+ this.showGoodsofReturnList[i].esd.Rrturn_count__c;
+ }
+ }
+ }
+ }
+
+ //杩斿搧鍘熷洜change
+ returnReasonChange(event) {
+ var recordId = event.detail.data.recordId;
+ var value = event.detail.data.value;
+ console.log('杩斿搧鍘熷洜:' + value + '---' + recordId);
+ for (var i in this.showGoodsofReturnList) {
+ if (this.showGoodsofReturnList[i]['recordId'] == recordId) {
+ this.showGoodsofReturnList[i].esd.Return_reason__c = value;
+ this.showGoodsofReturnList[i]['returnReason'] =
+ this.showGoodsofReturnList[i].esd.Return_reason__c;
+ }
+ }
+ }
+
+ // 鍒拌揣纭
+ arriveGoodsConfim() {
+ this.showSpinner = true;
+ arriveGoodsConfim({ arrControllerStr: this.arrController })
+ .then((result) => {
+ this.arrController = result.arrGoodCon;
+ if (result.result == 'Success') {
+ this.showSpinner = false;
+ this.warningMsgs = result.warningMsgList;
+ this.errorMsgs = result.errorMsgList;
+ var url = result.url;
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url: url
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ } else {
+ this.showSpinner = false;
+ this.warningMsgs = result.warningMsgList;
+ this.errorMsgs = result.errorMsgList;
+ console.log('error1:' + result.errorMsg);
+ this.showMyToast('鍒拌揣纭澶辫触', result.errorMsg, 'error');
+ }
+ })
+ .catch((error) => {
+ this.showSpinner = false;
+ console.log('error2:' + error);
+ this.showMyToast('鍒拌揣纭澶辫触', error, 'error');
+ });
+ }
+
+ // 鐧诲綍杩斿搧
+ updateGoodsOfReturn() {
+ this.showSpinner = true;
+ updateGoodsOfReturn({
+ arrControllerStr: this.arrController,
+ showGoodsofReturnListStr: JSON.stringify(this.showGoodsofReturnList)
+ })
+ .then((result) => {
+ this.showSpinner = false;
+ this.arrController = result.arrGoodCon;
+ if (result.result == 'Success') {
+ this.warningMsgs = result.warningMsgList;
+ this.errorMsgs = result.errorMsgList;
+ var url = result.url;
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url: url
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ } else {
+ console.log('error1:' + result.errorMsg);
+ this.showSpinner = false;
+ this.warningMsgs = result.warningMsgList;
+ this.errorMsgs = result.errorMsgList;
+ if (result.errorMsg.includes('鏃犳硶淇濆瓨姝よ褰�')) {
+ result.errorMsg = '鏃犳硶淇濆瓨璁板綍';
+ }
+ this.showMyToast('鐧诲綍杩斿搧澶辫触', result.errorMsg, 'error');
+ }
+ })
+ .catch((error) => {
+ this.showSpinner = false;
+ console.log('error2:' + JSON.stringify(error));
+ this.showMyToast('鐧诲綍杩斿搧澶辫触', error, 'error');
+ });
+ }
+
+ showMyToast(title, message, variant) {
+ console.log('show custom message');
+ var iconName = '';
+ var content = '';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
+ }
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
+ }
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
+ // var mode;
+ // if(this.isNoteStay){
+ // mode ='sticky';
+ // }else{
+ // mode = 'dismissable';
+ // }
+ // const evt = new ShowToastEvent({
+ // title: title,
+ // message: message,
+ // variant: variant,
+ // mode: mode
+ // });
+ // this.dispatchEvent(evt);
+ }
}
diff --git a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html
index 5dc2f11..d8c0cbc 100644
--- a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html
+++ b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html
@@ -1,20 +1,57 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
<template if:true={showPage}>
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;">
- <div style="padding:10px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ "
+ >
+ <div style="padding: 10px">
<!-- 鎸夐挳 -->
<!-- <lightning-button style="margin: 5px;" label="鍏ュ簱" onclick={orderArrive}></lightning-button>
<lightning-button style="margin: 5px;" label="杩斿搧" onclick={orderReturn}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;margin-right: 150px;" label="鍏ュ簱" onclick={orderArrive}>鍏ュ簱</button>
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="杩斿搧" onclick={orderReturn}>杩斿搧</button>
- <p style="height: 10px;"></p>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px; margin-right: 150px"
+ label="鍏ュ簱"
+ onclick={orderArrive}
+ >
+ 鍏ュ簱
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="杩斿搧"
+ onclick={orderReturn}
+ >
+ 杩斿搧
+ </button>
+ <p style="height: 10px"></p>
<!-- 妫�绱㈡潯浠� -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -24,30 +61,77 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>妫�绱㈡潯浠�</strong></p> -->
</div>
- <div style="padding:10px;">
+ <div style="padding: 10px">
<table>
<tbody>
<tr>
- <td style="width: 10px;"></td>
- <td style="width: 120px;">
- <div style="color:#696969;font-size:16px;text-align: left;">娑堣�楀搧璁㈠崟鍚嶇О</div>
+ <td style="width: 10px"></td>
+ <td style="width: 120px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ text-align: left;
+ "
+ >
+ 娑堣�楀搧璁㈠崟鍚嶇О
+ </div>
</td>
<td>
- <lightning-input class="inputFont" type="text" variant="label-hidden" label="娑堣�楀搧璁㈠崟鍚嶇О" value={category1} onchange={category1Change}></lightning-input>
+ <lightning-input
+ class="inputFont"
+ type="text"
+ variant="label-hidden"
+ label="娑堣�楀搧璁㈠崟鍚嶇О"
+ value={category1}
+ onchange={category1Change}
+ ></lightning-input>
</td>
- <td style="width: 30px;"></td>
- <td style="width: 108px;">
- <div style="color:#696969;font-size:16px;text-align: left;">鏈�鏂板彂璐ф棩鏈�</div>
+ <td style="width: 30px"></td>
+ <td style="width: 108px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ text-align: left;
+ "
+ >
+ 鏈�鏂板彂璐ф棩鏈�
+ </div>
</td>
<td>
- <lightning-input class="inputFont" type="date" variant="label-hidden" label="鏈�鏂板彂璐ф棩鏈�" value={cate2} onchange={cate2Change}></lightning-input>
+ <lightning-input
+ class="inputFont"
+ type="date"
+ variant="label-hidden"
+ label="鏈�鏂板彂璐ф棩鏈�"
+ value={cate2}
+ onchange={cate2Change}
+ ></lightning-input>
</td>
- <td style="width: 30px;"></td>
+ <td style="width: 30px"></td>
<td>
<!-- <lightning-button style="margin-left: 10px;margin-right: 5px;" label="鎼滅储" onclick={search}></lightning-button>
<lightning-button style="margin-left: 5px;margin-right: 5px;" label="娓呯┖" onclick={clear}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="height:32px;margin-right: 30px;" label="鎼滅储" onclick={search}>鎼滅储</button>
- <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="height:32px;" label="娓呯┖" onclick={clear}>娓呯┖</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="
+ height: 32px;
+ margin-right: 30px;
+ "
+ label="鎼滅储"
+ onclick={search}
+ >
+ 鎼滅储
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ style="height: 32px"
+ label="娓呯┖"
+ onclick={clear}
+ >
+ 娓呯┖
+ </button>
</td>
</tr>
</tbody>
@@ -55,8 +139,15 @@
</div>
</div>
<!-- 璁㈠崟鏄庣粏 -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -66,9 +157,16 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>璁㈠崟鏄庣粏</strong></p> -->
</div>
- <div style="padding:10px;">
+ <div style="padding: 10px">
<!-- <lightning-datatable hide-checkbox-column key-field="id" columns={colms} data={raesList}></lightning-datatable> -->
- <c-lex-custom-lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="Id" data={raesList} columns={colms} onclicklink={clickLick}></c-lex-custom-lightning-datatable>
+ <c-lex-custom-lightning-datatable
+ class="wrapped-header-datatable"
+ hide-checkbox-column
+ key-field="Id"
+ data={raesList}
+ columns={colms}
+ onclicklink={clickLick}
+ ></c-lex-custom-lightning-datatable>
</div>
</div>
</div>
@@ -76,27 +174,68 @@
</template>
<!-- 璁㈠崟鍚勭鏁伴噺淇℃伅寮圭獥 -->
<template if:true={showPop}>
- <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small" style="border: 1px solid #D4D4D4;">
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-01"
+ aria-modal="true"
+ aria-describedby="modal-content-id-1"
+ class="slds-modal slds-fade-in-open slds-modal_small"
+ style="border: 1px solid #d4d4d4"
+ >
<div class="slds-modal__container">
- <header class="slds-modal__header" style="background-color: #F3F3F3;">
- <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closePop}>
- <lightning-icon icon-name="utility:close"
+ <header
+ class="slds-modal__header"
+ style="background-color: #f3f3f3"
+ >
+ <button
+ style=""
+ class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+ title="Close"
+ onclick={closePop}
+ >
+ <lightning-icon
+ icon-name="utility:close"
alternative-text="close"
variant="inverse"
- size="small" ></lightning-icon>
+ size="small"
+ ></lightning-icon>
<span class="slds-assistive-text">Close</span>
</button>
- <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">{popTitle}</h2>
+ <h2
+ id="modal-heading-01"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
+ {popTitle}
+ </h2>
</header>
- <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" style="border: 1px solid #F3F3F3;">
- <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodModel" columns={colms2} data={recordList}></lightning-datatable>
+ <div
+ class="slds-modal__content slds-p-around_medium"
+ id="modal-content-id-1"
+ style="border: 1px solid #f3f3f3"
+ >
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ hide-checkbox-column
+ key-field="prodModel"
+ columns={colms2}
+ data={recordList}
+ ></lightning-datatable>
</div>
<footer class="slds-modal__footer">
<!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}>鍏抽棴</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ style="margin-left: 10px"
+ variant="neutral"
+ label="鍏抽棴"
+ onclick={closePop}
+ >
+ 鍏抽棴
+ </button>
</footer>
</div>
</section>
<div class="slds-backdrop slds-backdrop_open"></div>
</template>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js
index 5208da6..f7572d2 100644
--- a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js
+++ b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js
@@ -1,4 +1,4 @@
-import { LightningElement,wire,api,track } from 'lwc';
+import { LightningElement, wire, api, track } from 'lwc';
import { CurrentPageReference } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { NavigationMixin } from 'lightning/navigation';
@@ -13,11 +13,13 @@
import initNotArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDetAll';
import initMoreThan7 from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7';
import initMoreThan7All from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7All';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
-export default class LexArriveGoodsMain extends NavigationMixin(LightningElement) {
+export default class LexArriveGoodsMain extends NavigationMixin(
+ LightningElement
+) {
//椤甸潰鍩虹鍙橀噺
@track agencyProType;
@track category1;
@@ -48,62 +50,107 @@
// {label:'寰呯郴缁熸搷浣滃叆搴撴暟閲�',fieldName:'Delivery_detail_count__c'},
// {label:'杩樻病鍙戣揣鏁伴噺',fieldName:'OrderNumber_notarrive__c'},
// {label:'鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�',fieldName:'More_than_seven_days__c'},
- {label:'娑堣�楀搧璁㈠崟鍚嶇О',
- type: "customOutputGood",
+ {
+ label: '娑堣�楀搧璁㈠崟鍚嶇О',
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "Name" },
+ outputValue: { fieldName: 'Name' },
type: 'Title',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true,initialWidth:200},
- {label:'SAP鍚堝悓鍙�',fieldName:'ContractNo__c',hideDefaultActions: true},
- {label:'璁㈠崟鎬绘暟',
- type: "customOutputGood",
+ hideDefaultActions: true,
+ // initialWidth: 200,
+ wrapText: true
+ },
+ {
+ label: 'SAP鍚堝悓鍙�',
+ fieldName: 'ContractNo__c',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 180
+ },
+ {
+ label: '璁㈠崟鎬绘暟',
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "Total_num__c" },
+ outputValue: { fieldName: 'Total_num__c' },
type: 'TotalNum',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 100},
- {label:'宸插埌璐ф暟閲�',
- type: "customOutputGood",
+ hideDefaultActions: true,
+ initialWidth: 100,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '宸插埌璐ф暟閲�',
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "OrderNumber_arrived__c" },
+ outputValue: { fieldName: 'OrderNumber_arrived__c' },
type: 'ArrDet',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 110},
- {label:'寰呯郴缁熸搷浣滃叆搴撴暟閲�',
- type: "customOutputGood",
+ hideDefaultActions: true,
+ initialWidth: 100,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '寰呯郴缁熸搷浣滃叆搴撴暟閲�',
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "Delivery_detail_count__c" },
+ outputValue: { fieldName: 'Delivery_detail_count__c' },
type: 'DeliveryDet',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 180},
- {label:'杩樻病鍙戣揣鏁伴噺',
- type: "customOutputGood",
+ hideDefaultActions: true,
+ initialWidth: 150,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '杩樻病鍙戣揣鏁伴噺',
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "OrderNumber_notarrive__c" },
+ outputValue: { fieldName: 'OrderNumber_notarrive__c' },
type: 'NotArrDet',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 120},
- {label:'鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�',
- type: "customOutputGood",
+ hideDefaultActions: true,
+ initialWidth: 120,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�',
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "More_than_seven_days__c" },
+ outputValue: { fieldName: 'More_than_seven_days__c' },
type: 'MoreThan7',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 180},
- {label:'鏈�鏂板彂璐ф棩鏈�',fieldName:'Shipment_date__c',hideDefaultActions: true, initialWidth: 140},
- {label:'棣栨鍙戣揣鏃ユ湡',fieldName:'First_Delivery__c',hideDefaultActions: true, initialWidth: 140}
+ hideDefaultActions: true,
+ initialWidth: 150,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '鏈�鏂板彂璐ф棩鏈�',
+ fieldName: 'Shipment_date__c',
+ hideDefaultActions: true,
+ initialWidth: 105
+ },
+ {
+ label: '棣栨鍙戣揣鏃ユ湡',
+ fieldName: 'First_Delivery__c',
+ hideDefaultActions: true,
+ initialWidth: 105
+ }
];
@track colms2 = [
- {label:'浜у搧鍨嬪彿',fieldName:'prodModel',hideDefaultActions: true},
- {label:'鏁伴噺',fieldName:'recordCount',hideDefaultActions: true,initialWidth: 100}
+ { label: '浜у搧鍨嬪彿', fieldName: 'prodModel', hideDefaultActions: true },
+ {
+ label: '鏁伴噺',
+ fieldName: 'recordCount',
+ hideDefaultActions: true,
+ initialWidth: 100
+ }
];
//鑾峰彇鍙傛暟
@@ -115,270 +162,329 @@
// }
// }
- renderedCallback(){
+ renderedCallback() {
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
-
+
//鍒濆鍖�
- connectedCallback(){
- init()
- .then(result=>{
- this.isNoteStay = result.isNoteStay;
- if(result.result == 'Success'){
- this.agencyProType = result.agencyProType;
- this.accountId = result.accountId;
- this.title = result.title;
- this.userWorkLocation = result.userWorkLocation;
- this.totalNum = result.totalNum;
- this.orderNumberArrived = result.orderNumberArrived;
- this.deliveryDetailCount = result.deliveryDetailCount;
- this.orderNumberNotarrive = result.orderNumberNotarrive;
- this.moreThanSevenDays = result.moreThanSevenDays;
- this.raesList = result.raesList;
- this.raesList.push({Id:'1',Name:'璁㈠崟鏄庣粏姹囨��',Total_num__c:this.totalNum,OrderNumber_arrived__c:this.orderNumberArrived,Delivery_detail_count__c:this.deliveryDetailCount,OrderNumber_notarrive__c:this.orderNumberNotarrive,More_than_seven_days__c:this.moreThanSevenDays});
- this.showSpinner = false;
- this.showPage = true;
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鍒濆鍖栭〉闈㈠け璐�',result.errorMsg,'error');
- }
- })
+ connectedCallback() {
+ init().then((result) => {
+ this.isNoteStay = result.isNoteStay;
+ if (result.result == 'Success') {
+ this.agencyProType = result.agencyProType;
+ this.accountId = result.accountId;
+ this.title = result.title;
+ this.userWorkLocation = result.userWorkLocation;
+ this.totalNum = result.totalNum;
+ this.orderNumberArrived = result.orderNumberArrived;
+ this.deliveryDetailCount = result.deliveryDetailCount;
+ this.orderNumberNotarrive = result.orderNumberNotarrive;
+ this.moreThanSevenDays = result.moreThanSevenDays;
+ this.raesList = result.raesList;
+ this.raesList.push({
+ Id: '1',
+ Name: '璁㈠崟鏄庣粏姹囨��',
+ Total_num__c: this.totalNum,
+ OrderNumber_arrived__c: this.orderNumberArrived,
+ Delivery_detail_count__c: this.deliveryDetailCount,
+ OrderNumber_notarrive__c: this.orderNumberNotarrive,
+ More_than_seven_days__c: this.moreThanSevenDays
+ });
+ this.showSpinner = false;
+ this.showPage = true;
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', result.errorMsg, 'error');
+ }
+ });
}
//鐐瑰嚮閾炬帴
- clickLick(event){
+ clickLick(event) {
var outputValue = event.detail.data.value;
var outputType = event.detail.data.type;
var recordId = event.detail.data.recordId;
- console.log("click:"+outputValue+"---"+outputType+"---"+recordId);
- if(outputType == 'Title'){
+ console.log(
+ 'click:' + outputValue + '---' + outputType + '---' + recordId
+ );
+ if (outputType == 'Title') {
const config = {
type: 'standard__webPage',
attributes: {
- url: '/lexarrivegoods?ESetId='+recordId
+ url: '/lexarrivegoods?ESetId=' + recordId
}
};
this[NavigationMixin.Navigate](config);
- }else if(outputType == 'TotalNum'){
+ } else if (outputType == 'TotalNum') {
this.popTitle = '鎵�鏈変骇鍝佷竴瑙�';
- initTotalNum({ordId:recordId, type:'all'})
- .then(result=>{
- if(result.result == 'Success'){
+ initTotalNum({ ordId: recordId, type: 'all' }).then((result) => {
+ if (result.result == 'Success') {
// this.recordList = result.recordList;
var dataStr = JSON.stringify(result.recordList);
this.recordList = JSON.parse(dataStr);
- console.log('data:'+JSON.stringify(this.recordList));
+ console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
- }else{
- this.showMyToast('鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error');
+ } else {
+ this.showMyToast(
+ '鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
}
- })
- }else if(outputType == 'ArrDet'){
- if(recordId == '1'){
+ });
+ } else if (outputType == 'ArrDet') {
+ if (recordId == '1') {
this.popTitle = '鎵�鏈夊凡鍒拌揣浜у搧涓�瑙�';
- initArrDetAll({type:'all'})
- .then(result=>{
- if(result.result == 'Success'){
+ initArrDetAll({ type: 'all' }).then((result) => {
+ if (result.result == 'Success') {
// this.recordList = result.recordList;
var dataStr = JSON.stringify(result.recordList);
this.recordList = JSON.parse(dataStr);
- console.log('data:'+JSON.stringify(this.recordList));
+ console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
- }else{
- this.showMyToast('鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',result.errorMsg,'error');
+ } else {
+ this.showMyToast(
+ '鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
}
- })
- }else{
+ });
+ } else {
this.popTitle = '宸插埌璐т骇鍝佷竴瑙�';
- initArrDet({orderId:recordId})
- .then(result=>{
- if(result.result == 'Success'){
+ initArrDet({ orderId: recordId }).then((result) => {
+ if (result.result == 'Success') {
this.recordList = result.recordList;
- console.log('data:'+JSON.stringify(this.recordList));
+ console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
- }else{
- this.showMyToast('鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error');
+ } else {
+ this.showMyToast(
+ '鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
}
- })
+ });
}
- }else if(outputType == 'DeliveryDet'){
- if(recordId == '1'){
+ } else if (outputType == 'DeliveryDet') {
+ if (recordId == '1') {
this.popTitle = '鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙�';
- initDeliveryDetAll({type:'all'})
- .then(result=>{
- if(result.result == 'Success'){
+ initDeliveryDetAll({ type: 'all' }).then((result) => {
+ if (result.result == 'Success') {
this.recordList = result.recordList;
- console.log('data:'+JSON.stringify(this.recordList));
+ console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
- }else{
- this.showMyToast('鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',result.errorMsg,'error');
+ } else {
+ this.showMyToast(
+ '鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
}
- })
- }else{
+ });
+ } else {
this.popTitle = '鏈埌璐т骇鍝佷竴瑙�';
- initDeliveryDet({orderId:recordId})
- .then(result=>{
- if(result.result == 'Success'){
+ initDeliveryDet({ orderId: recordId }).then((result) => {
+ if (result.result == 'Success') {
this.recordList = result.recordList;
- console.log('data:'+JSON.stringify(this.recordList));
+ console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
- }else{
- this.showMyToast('鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error');
+ } else {
+ this.showMyToast(
+ '鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
}
- })
+ });
}
- }else if(outputType == 'NotArrDet'){
- if(recordId == '1'){
+ } else if (outputType == 'NotArrDet') {
+ if (recordId == '1') {
this.popTitle = '鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙�';
- initNotArrDetAll({type:'all'})
- .then(result=>{
- if(result.result == 'Success'){
+ initNotArrDetAll({ type: 'all' }).then((result) => {
+ if (result.result == 'Success') {
this.recordList = result.recordList;
- console.log('data:'+JSON.stringify(this.recordList));
+ console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
- }else{
- this.showMyToast('鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error');
+ } else {
+ this.showMyToast(
+ '鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
}
- })
- }else{
+ });
+ } else {
this.popTitle = '杩樻病鍙戣揣鏁伴噺';
- initNotArrDet({orderId:recordId})
- .then(result=>{
- if(result.result == 'Success'){
+ initNotArrDet({ orderId: recordId }).then((result) => {
+ if (result.result == 'Success') {
this.recordList = result.recordList;
- console.log('data:'+JSON.stringify(this.recordList));
+ console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
- }else{
- this.showMyToast('鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触',result.errorMsg,'error');
+ } else {
+ this.showMyToast(
+ '鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触',
+ result.errorMsg,
+ 'error'
+ );
}
- })
+ });
}
-
- }else if(outputType == 'MoreThan7'){
- if(recordId == '1'){
+ } else if (outputType == 'MoreThan7') {
+ if (recordId == '1') {
this.popTitle = '鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟';
- initMoreThan7All({type:'all'})
- .then(result=>{
- if(result.result == 'Success'){
+ initMoreThan7All({ type: 'all' }).then((result) => {
+ if (result.result == 'Success') {
this.recordList = result.recordList;
- console.log('data:'+JSON.stringify(this.recordList));
+ console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
- }else{
- this.showMyToast('鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触',result.errorMsg,'error');
+ } else {
+ this.showMyToast(
+ '鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触',
+ result.errorMsg,
+ 'error'
+ );
}
- })
- }else{
+ });
+ } else {
this.popTitle = '鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�';
- initMoreThan7({orderId:recordId})
- .then(result=>{
- if(result.result == 'Success'){
+ initMoreThan7({ orderId: recordId }).then((result) => {
+ if (result.result == 'Success') {
this.recordList = result.recordList;
- console.log('data:'+JSON.stringify(this.recordList));
+ console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
- }else{
- this.showMyToast('鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�',result.errorMsg,'error');
+ } else {
+ this.showMyToast(
+ '鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
}
- })
+ });
}
}
}
//鍏抽棴寮圭獥
- closePop(){
+ closePop() {
this.showPop = false;
}
//娑堣�楀搧璁㈠崟鍚嶇О鍙樻洿
- category1Change(event){
+ category1Change(event) {
this.category1 = event.detail.value;
}
-
+
//鏈�鏂板彂璐ф棩鏈熷彉鏇�
- cate2Change(event){
+ cate2Change(event) {
this.cate2 = event.detail.value;
}
-
+
//妫�绱�
- search(){
+ search() {
this.showSpinner = true;
searchConsumableorderdetails({
- category1Str:this.category1,
- cate2Str:this.cate2,
- accountidStr:this.accountId,
- userWorkLocationStr:this.userWorkLocation,
- agencyProTypeStr:this.agencyProType})
- .then(result=>{
+ category1Str: this.category1,
+ cate2Str: this.cate2,
+ accountidStr: this.accountId,
+ userWorkLocationStr: this.userWorkLocation,
+ agencyProTypeStr: this.agencyProType
+ }).then((result) => {
this.showSpinner = false;
- if(result.result == 'Success'){
+ if (result.result == 'Success') {
this.raesList = result.raesList;
- this.raesList.push({Id:'1',Name:'璁㈠崟鏄庣粏姹囨��',Total_num__c:this.totalNum,OrderNumber_arrived__c:this.orderNumberArrived,Delivery_detail_count__c:this.deliveryDetailCount,OrderNumber_notarrive__c:this.orderNumberNotarrive,More_than_seven_days__c:this.moreThanSevenDays});
- if(this.raesList.length > 1){
+ this.raesList.push({
+ Id: '1',
+ Name: '璁㈠崟鏄庣粏姹囨��',
+ Total_num__c: this.totalNum,
+ OrderNumber_arrived__c: this.orderNumberArrived,
+ Delivery_detail_count__c: this.deliveryDetailCount,
+ OrderNumber_notarrive__c: this.orderNumberNotarrive,
+ More_than_seven_days__c: this.moreThanSevenDays
+ });
+ if (this.raesList.length > 1) {
var count = this.raesList.length - 1;
- this.showMyToast('鎼滅储鎴愬姛','鍏辨悳绱㈠埌'+count+'鏉℃暟鎹�','success');
- }else{
- this.showMyToast('鏈悳绱㈠埌鏁版嵁','','error');
+ this.showMyToast(
+ '鎼滅储鎴愬姛',
+ '鍏辨悳绱㈠埌' + count + '鏉℃暟鎹�',
+ 'success'
+ );
+ } else {
+ this.showMyToast('鏈悳绱㈠埌鏁版嵁', '', 'error');
}
- }else{
- this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error');
+ } else {
+ this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
}
- })
+ });
}
-
+
//娓呯┖鎼滅储妗�
- clear(){
+ clear() {
this.showSpinner = true;
this.category1 = '';
this.cate2 = null;
searchConsumableorderdetails({
- category1Str:this.category1,
- cate2Str:this.cate2,
- accountidStr:this.accountId,
- userWorkLocationStr:this.userWorkLocation,
- agencyProTypeStr:this.agencyProType})
- .then(result=>{
+ category1Str: this.category1,
+ cate2Str: this.cate2,
+ accountidStr: this.accountId,
+ userWorkLocationStr: this.userWorkLocation,
+ agencyProTypeStr: this.agencyProType
+ }).then((result) => {
this.showSpinner = false;
- if(result.result == 'Success'){
+ if (result.result == 'Success') {
this.raesList = result.raesList;
- this.raesList.push({Id:'1',Name:'璁㈠崟鏄庣粏姹囨��',Total_num__c:this.totalNum,OrderNumber_arrived__c:this.orderNumberArrived,Delivery_detail_count__c:this.deliveryDetailCount,OrderNumber_notarrive__c:this.orderNumberNotarrive,More_than_seven_days__c:this.moreThanSevenDays});
- if(this.raesList.length > 1){
+ this.raesList.push({
+ Id: '1',
+ Name: '璁㈠崟鏄庣粏姹囨��',
+ Total_num__c: this.totalNum,
+ OrderNumber_arrived__c: this.orderNumberArrived,
+ Delivery_detail_count__c: this.deliveryDetailCount,
+ OrderNumber_notarrive__c: this.orderNumberNotarrive,
+ More_than_seven_days__c: this.moreThanSevenDays
+ });
+ if (this.raesList.length > 1) {
var count = this.raesList.length - 1;
- this.showMyToast('鎼滅储鎴愬姛','鍏辨悳绱㈠埌'+count+'鏉℃暟鎹�','success');
- }else{
- this.showMyToast('鏈悳绱㈠埌鏁版嵁','','error');
+ this.showMyToast(
+ '鎼滅储鎴愬姛',
+ '鍏辨悳绱㈠埌' + count + '鏉℃暟鎹�',
+ 'success'
+ );
+ } else {
+ this.showMyToast('鏈悳绱㈠埌鏁版嵁', '', 'error');
}
- }else{
- this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error');
+ } else {
+ this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
}
- })
+ });
}
//鍏ュ簱
- orderArrive(){
+ orderArrive() {
const config = {
type: 'standard__webPage',
attributes: {
- url: '/lexarrivegoods?ArrType=Arr'
+ url: '/lexarrivegoods?ArrType=Arr'
}
};
this[NavigationMixin.Navigate](config);
}
-
+
//杩斿搧
- orderReturn(){
+ orderReturn() {
const config = {
type: 'standard__webPage',
attributes: {
- url: '/lexarrivegoods?ArrType=ReG'
+ url: '/lexarrivegoods?ArrType=ReG'
}
};
this[NavigationMixin.Navigate](config);
@@ -388,18 +494,24 @@
console.log('show custom message');
var iconName = '';
var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
}
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').
- showToast(variant,content,iconName,10000);
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
// var mode;
// if(this.isNoteStay){
// mode ='sticky';
@@ -413,5 +525,5 @@
// mode: mode
// });
// this.dispatchEvent(evt);
- }
-}
\ No newline at end of file
+ }
+}
diff --git a/force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.html b/force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.html
index 55e52c6..df18831 100644
--- a/force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.html
+++ b/force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.html
@@ -1,11 +1,27 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
<template if:true={showPage}>
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -15,14 +31,29 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>鍒拌揣</strong></p> -->
</div>
- <div style="padding:10px;">
+ <div style="padding: 10px">
<!-- 鎸夐挳 -->
<!-- <lightning-button style="margin: 5px;" label="鍑哄簱" onclick={proSale} disabled={arrivetoorder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="鍑哄簱" onclick={proSale} disabled={arrivetoorder}>鍑哄簱</button>
- <p style="height: 10px;"></p>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="鍑哄簱"
+ onclick={proSale}
+ disabled={arrivetoorder}
+ >
+ 鍑哄簱
+ </button>
+ <p style="height: 10px"></p>
<!-- 鍒拌揣璁㈠崟淇℃伅 -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -32,34 +63,77 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>鍒拌揣璁㈠崟淇℃伅</strong></p> -->
</div>
- <div style="padding:10px;">
+ <div style="padding: 10px">
<table>
<tbody>
<tr>
- <td style="width:10px;"></td>
- <td style="width:140px;">
- <div style="color:#696969;font-size:16px;">鍒拌揣璁㈠崟鍚嶇О</div>
+ <td style="width: 10px"></td>
+ <td style="width: 140px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 鍒拌揣璁㈠崟鍚嶇О
+ </div>
</td>
- <td style="width:200px;">
- <lightning-formatted-text style="font-size: 16px;" value={coc.Name}></lightning-formatted-text>
+ <td style="width: 200px">
+ <lightning-formatted-text
+ style="font-size: 16px"
+ value={coc.Name}
+ ></lightning-formatted-text>
</td>
- <td style="width:30px;"></td>
- <td style="width:140px;">
- <div style="color:#696969;font-size:16px;">鏈鍏ュ簱浜у搧閲戦</div>
+ <td style="width: 30px"></td>
+ <td style="width: 140px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 鏈鍏ュ簱浜у搧閲戦
+ </div>
</td>
- <td style="width:100px;">
- <lightning-formatted-number style="font-size: 16px;" value={coc.Arrive_total_amount__c} minimum-fraction-digits="2"></lightning-formatted-number>
+ <td style="width: 100px">
+ <lightning-formatted-number
+ style="font-size: 16px"
+ value={coc.Arrive_total_amount__c}
+ minimum-fraction-digits="2"
+ ></lightning-formatted-number>
</td>
<td></td>
</tr>
- <tr style="height: 20px;"></tr>
+ <tr style="height: 20px"></tr>
<tr>
- <td style="width:10px;"></td>
- <td style="width:120px;">
- <div style="color:#696969;font-size:16px;">娑堣�楀搧璁㈠崟鍚嶇О<lightning-helptext style="--lwc-spacingXxSmall:0px;" content={label.helpText}></lightning-helptext></div>
+ <td style="width: 10px"></td>
+ <td style="width: 120px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 娑堣�楀搧璁㈠崟鍚嶇О<lightning-helptext
+ style="
+ --lwc-spacingXxSmall: 0px;
+ "
+ content={label.helpText}
+ ></lightning-helptext>
+ </div>
</td>
- <td style="width:200px;">
- <lightning-formatted-text style="font-size: 16px;" value={coc.arriveOrder}></lightning-formatted-text>
+ <td style="width: 200px">
+ <a
+ style="
+ text-decoration: underline;
+ color: black;
+ "
+ onclick={clickOrder}
+ ><lightning-formatted-text
+ style="font-size: 16px"
+ value={coc.arriveOrder}
+ ></lightning-formatted-text
+ ></a>
<!-- <lightning-formatted-text value={coc.Arrive_Order__r.Name}></lightning-formatted-text> -->
</td>
<td></td>
@@ -69,8 +143,15 @@
</div>
</div>
<!-- 鍦ㄥ簱鍟嗗搧搴撳瓨涓�瑙� -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -80,11 +161,18 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>鍦ㄥ簱鍟嗗搧搴撳瓨涓�瑙�</strong></p> -->
</div>
- <div style="padding:10px;">
- <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="recordId" columns={colms} data={consumableorderdetailsRecords}></lightning-datatable>
+ <div style="padding: 10px">
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ style="word-wrap: break-word; word-break: break-all"
+ hide-checkbox-column
+ key-field="recordId"
+ columns={colms}
+ data={consumableorderdetailsRecords}
+ ></lightning-datatable>
</div>
</div>
</div>
</div>
</template>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.js b/force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.js
index c3e3de9..a641949 100644
--- a/force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.js
+++ b/force-app/main/default/lwc/lexArriveGsDetails/lexArriveGsDetails.js
@@ -1,16 +1,17 @@
-import { LightningElement,wire,track } from 'lwc';
+import { LightningElement, wire, track } from 'lwc';
import { CurrentPageReference } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { NavigationMixin } from 'lightning/navigation';
import init from '@salesforce/apex/LexArriveGsDetailsController.init';
import proSale from '@salesforce/apex/LexArriveGsDetailsController.proSale';
import helpText from '@salesforce/label/c.LexArrivegsDetailsPageHelpText';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
-export default class LexArriveGsDetails extends NavigationMixin(LightningElement) {
-
+export default class LexArriveGsDetails extends NavigationMixin(
+ LightningElement
+) {
@track eSetId;
@track showSpinner = true;
@track showPage = false;
@@ -24,16 +25,67 @@
//鏄惁涓�鐩存樉绀烘彁绀�
@track isNoteStay = true;
@track colms = [
- {label:'娑堣�楀搧鍚嶇О' , fieldName:'prodName', hideDefaultActions: true,wrapText:true},
- {label:'瑙勬牸' , fieldName:'packing_list', hideDefaultActions: true,wrapText:true,initialWidth:50,cellAttributes: { alignment: "right" }},
- {label:'CFDA鐘舵��' , fieldName:'statusCFDA', hideDefaultActions: true,wrapText:true,initialWidth:100},
- {label:'娉ㄥ唽璇佺紪鐮佸彿' , fieldName:'approbation_No', hideDefaultActions: true,wrapText:true,initialWidth:125},
- {label:'娉ㄥ唽璇佹晥鏈�' , fieldName:'expiration_DateStr', hideDefaultActions: true,wrapText:true,initialWidth:115},
- {label:'浣跨敤鏈熼檺' , fieldName:'Sterilization_limitStr', hideDefaultActions: true,wrapText:true,initialWidth:115},
- {label:'BarCode' , fieldName:'barCode', hideDefaultActions: true,initialWidth:250},
- {label:'閲囪喘鍗曚环' ,type:'number',fieldName:'intraTradeList', hideDefaultActions: true,wrapText:true,initialWidth:120,typeAttributes:{minimumFractionDigits: 2},cellAttributes: { alignment: "right" }}
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'prodName',
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '瑙勬牸',
+ fieldName: 'packing_list',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 50,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: 'CFDA鐘舵��',
+ fieldName: 'statusCFDA',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 100
+ },
+ {
+ label: '娉ㄥ唽璇佺紪鐮佸彿',
+ fieldName: 'approbation_No',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 125
+ },
+ {
+ label: '娉ㄥ唽璇佹晥鏈�',
+ fieldName: 'expiration_DateStr',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 115
+ },
+ {
+ label: '浣跨敤鏈熼檺',
+ fieldName: 'Sterilization_limitStr',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 115
+ },
+ {
+ label: 'BarCode',
+ fieldName: 'barCode',
+ hideDefaultActions: true,
+ initialWidth: 250,
+ wrapText: true
+ },
+ {
+ label: '閲囪喘鍗曚环',
+ type: 'number',
+ fieldName: 'intraTradeList',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 120,
+ typeAttributes: { minimumFractionDigits: 2 },
+ cellAttributes: { alignment: 'right' }
+ }
];
- label = {helpText};
+ label = { helpText };
// 鑾峰彇鍙傛暟
@wire(CurrentPageReference)
@@ -41,116 +93,173 @@
if (currentPageReference) {
this.eSetId = currentPageReference.state?.EsetId;
}
- console.log('CurrentPageReference:'+this.eSetId);
+ console.log('CurrentPageReference:' + this.eSetId);
}
- renderedCallback(){
+ renderedCallback() {
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
//鍒濆鍖�
- connectedCallback(){
- init({eSetIdStr : this.eSetId})
- .then(result=>{
- this.showPage = true;
- this.isNoteStay = result.isNoteStay;
- if(result.result == 'Success'){
- this.coc = result.coc;
- if(this.coc.Arrive_Order__c != null && this.coc.Arrive_Order__c != ''){
- this.coc['arriveOrder'] = this.coc.Arrive_Order__r.Name;
- }
- console.log('this.coc:'+JSON.stringify(this.coc));
- this.accountid = result.accountid;
- this.orderallcount = result.orderallcount;
- this.arrivetoorder = result.arrivetoorder;
- this.consumableorderdetailsCount = result.consumableorderdetailsCount;
- this.consumableorderdetailsRecords = result.consumableorderdetailsRecords;
- for(var i in this.consumableorderdetailsRecords){
- if(this.consumableorderdetailsRecords[i].esd != null){
- this.consumableorderdetailsRecords[i]['recordId'] = this.consumableorderdetailsRecords[i].esd.Id;
- if(this.consumableorderdetailsRecords[i].esd.Consumable_Product__c != null && this.consumableorderdetailsRecords[i].esd.Consumable_Product__c != ''){
- this.consumableorderdetailsRecords[i]['prodName'] = this.consumableorderdetailsRecords[i].esd.Consumable_Product__r.Name__c;
+ connectedCallback() {
+ init({ eSetIdStr: this.eSetId })
+ .then((result) => {
+ this.showPage = true;
+ this.isNoteStay = result.isNoteStay;
+ if (result.result == 'Success') {
+ this.coc = result.coc;
+ if (
+ this.coc.Arrive_Order__c != null &&
+ this.coc.Arrive_Order__c != ''
+ ) {
+ this.coc['arriveOrder'] = this.coc.Arrive_Order__r.Name;
+ }
+ console.log('this.coc:' + JSON.stringify(this.coc));
+ this.accountid = result.accountid;
+ this.orderallcount = result.orderallcount;
+ this.arrivetoorder = result.arrivetoorder;
+ this.consumableorderdetailsCount =
+ result.consumableorderdetailsCount;
+ this.consumableorderdetailsRecords =
+ result.consumableorderdetailsRecords;
+ for (var i in this.consumableorderdetailsRecords) {
+ if (this.consumableorderdetailsRecords[i].esd != null) {
+ this.consumableorderdetailsRecords[i]['recordId'] =
+ this.consumableorderdetailsRecords[i].esd.Id;
+ if (
+ this.consumableorderdetailsRecords[i].esd
+ .Consumable_Product__c != null &&
+ this.consumableorderdetailsRecords[i].esd
+ .Consumable_Product__c != ''
+ ) {
+ this.consumableorderdetailsRecords[i][
+ 'prodName'
+ ] =
+ this.consumableorderdetailsRecords[
+ i
+ ].esd.Consumable_Product__r.Name__c;
+ }
+ // this.consumableorderdetailsRecords[i]['prodName'] = this.consumableorderdetailsRecords[i].prodName;
+ this.consumableorderdetailsRecords[i]['barCode'] =
+ this.consumableorderdetailsRecords[
+ i
+ ].esd.Bar_Code__c;
+ this.consumableorderdetailsRecords[i][
+ 'intraTradeList'
+ ] =
+ this.consumableorderdetailsRecords[
+ i
+ ].esd.Intra_Trade_List_RMB__c;
+ console.log(
+ 'Intra_Trade_List_RMB__c:' +
+ this.consumableorderdetailsRecords[i].esd
+ .Intra_Trade_List_RMB__c
+ );
}
- // this.consumableorderdetailsRecords[i]['prodName'] = this.consumableorderdetailsRecords[i].prodName;
- this.consumableorderdetailsRecords[i]['barCode'] = this.consumableorderdetailsRecords[i].esd.Bar_Code__c;
- this.consumableorderdetailsRecords[i]['intraTradeList'] = this.consumableorderdetailsRecords[i].esd.Intra_Trade_List_RMB__c;
- console.log("Intra_Trade_List_RMB__c:"+this.consumableorderdetailsRecords[i].esd.Intra_Trade_List_RMB__c);
+ if (
+ this.consumableorderdetailsRecords[i].Prod != null
+ ) {
+ this.consumableorderdetailsRecords[i][
+ 'statusCFDA'
+ ] =
+ this.consumableorderdetailsRecords[
+ i
+ ].Prod.SFDA_Status__c;
+ }
}
- if(this.consumableorderdetailsRecords[i].Prod != null){
- this.consumableorderdetailsRecords[i]['statusCFDA'] = this.consumableorderdetailsRecords[i].Prod.SFDA_Status__c;
- }
+ this.showSpinner = false;
+ } else {
+ this.showSpinner = false;
+ console.log('error:' + result.errorMsg);
+ this.showMyToast('鍒濆鍖栧け璐�', result.errorMsg, 'error');
}
+ })
+ .catch((error) => {
this.showSpinner = false;
- }else {
- this.showSpinner = false;
- console.log("error:"+result.errorMsg);
- this.showMyToast('鍒濆鍖栧け璐�',result.errorMsg,'error');
- }
- })
- .catch(error=>{
- this.showSpinner = false;
- this.showPage = true;
- console.log("error:"+error);
- this.showMyToast('鍒濆鍖栧け璐�',error,'error');
- })
+ this.showPage = true;
+ console.log('error:' + error);
+ this.showMyToast('鍒濆鍖栧け璐�', error, 'error');
+ });
}
- proSale(){
+ proSale() {
this.showSpinner = true;
proSale({
- cocStr : JSON.stringify(this.coc),
- orderallcountParm : this.orderallcount,
- consumableorderdetailsCountParm : this.consumableorderdetailsCount
+ cocStr: JSON.stringify(this.coc),
+ orderallcountParm: this.orderallcount,
+ consumableorderdetailsCountParm: this.consumableorderdetailsCount,
+ eSetIdStr: this.eSetId
})
- .then(result=>{
- if(result.result == 'Success'){
- var url = result.url;
- const config = {
- type: 'standard__webPage',
- attributes: {
- url: url
- }
- };
- this[NavigationMixin.Navigate](config);
- }else {
+ .then((result) => {
+ if (result.result == 'Success') {
+ var url = result.url;
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url: url
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ } else {
+ this.showSpinner = false;
+ console.log('error:' + result.errorMsg);
+ this.showMyToast('鍑哄簱澶辫触', result.errorMsg, 'error');
+ }
+ })
+ .catch((error) => {
+ this.showPage = true;
this.showSpinner = false;
- console.log("error:"+error);
- this.showMyToast('鍑哄簱澶辫触',result.errorMsg,'error');
- }
- })
- .catch(error=>{
- this.showPage = true;
- this.showSpinner = false;
- console.log("error:"+error);
- this.showMyToast('鍑哄簱澶辫触',error,'error');
- })
+ console.log('error:' + error);
+ this.showMyToast('鍑哄簱澶辫触', error, 'error');
+ });
+ }
+
+ clickOrder() {
+ if (
+ this.coc.Arrive_Order__c != null &&
+ this.coc.Arrive_Order__c != ''
+ ) {
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url: '/detail/' + this.coc.Arrive_Order__c
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ }
}
showMyToast(title, message, variant) {
console.log('show custom message');
var iconName = '';
var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
}
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').
- showToast(variant,content,iconName,10000);
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
// var mode;
// if(this.isNoteStay){
// mode ='sticky';
@@ -164,5 +273,5 @@
// mode: mode
// });
// this.dispatchEvent(evt);
- }
-}
\ No newline at end of file
+ }
+}
diff --git a/force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.html b/force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.html
index 3b10fa5..c9db21e 100644
--- a/force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.html
+++ b/force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.html
@@ -1,11 +1,26 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;">
-
- <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div style="border: 1px solid #d4d4d4; border-radius: 5px">
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<div>
<!-- <p style="font-size: 18px;"><strong>鍙栨秷鎷嗙洅</strong></p> -->
<lightning-layout>
@@ -17,15 +32,51 @@
</lightning-layout>
</div>
</div>
- <div style="padding:10px;">
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
- <!-- <lightning-button variant="brand" class='lexstyle' style="margin-left:10px;" label="鍙栨秷鎷嗙洅纭" title="鍙栨秷鎷嗙洅纭" onclick={saveConfirm}></lightning-button></td> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin-left:10px;margin-top:12px;margin-bottom:12px;" label="鍙栨秷鎷嗙洅纭" onclick={saveConfirm}>鍙栨秷鎷嗙洅纭</button>
+ <div style="padding: 10px">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <!-- <lightning-button variant="brand" class='lexstyle' style="margin-left:10px;" label="鍙栨秷鎷嗙洅纭" title="鍙栨秷鎷嗙洅纭" onclick={saveConfirm}></lightning-button></td> -->
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="
+ margin-left: 10px;
+ margin-top: 12px;
+ margin-bottom: 12px;
+ "
+ label="鍙栨秷鎷嗙洅纭"
+ onclick={saveConfirm}
+ >
+ 鍙栨秷鎷嗙洅纭
+ </button>
+ </div>
</div>
- </div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:5px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ margin-top: 5px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 16px">
@@ -34,46 +85,71 @@
</lightning-layout-item>
</lightning-layout>
</div>
-
+
<!-- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> -->
- <table>
- <colgroup>
- <col width="160px" />
- <col width="100px" />
- <col width="10px" />
- <col width="70px" />
- <col width="100px" />
- <col width="10px" />
- <col width="90px" />
- <col width="100px" />
- <col width="10px" />
- <col width="85px" />
- <col width="100px" />
- <col width="10px" />
- <col width="70px" />
- <col width="100px" />
- </colgroup>
- <tbody>
- <tr>
- <td></td>
- <td align="right" class="searchName">BarCode</td>
- <td style="width:600px"><lightning-textarea class="inputFont" name="BarCode" label=""
- onchange={handleChange}></lightning-textarea></td>
- <td align="right"></td>
- <td></td>
- <td style="width: 200px;">
- <button style="margin-top:14px;" class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="鑾峰彇鏄庣粏" onclick={getDetails}>鑾峰彇鏄庣粏</button>
- <!-- <lightning-button variant="brand" class='lexstyle' label="鑾峰彇鏄庣粏" title="鑾峰彇鏄庣粏" onclick={getDetails}
- ></lightning-button> -->
- </td>
- </tr>
- </tbody>
- </table>
+ <table>
+ <colgroup>
+ <col width="160px" />
+ <col width="100px" />
+ <col width="10px" />
+ <col width="70px" />
+ <col width="100px" />
+ <col width="10px" />
+ <col width="90px" />
+ <col width="100px" />
+ <col width="10px" />
+ <col width="85px" />
+ <col width="100px" />
+ <col width="10px" />
+ <col width="70px" />
+ <col width="100px" />
+ </colgroup>
+ <tbody>
+ <tr>
+ <td></td>
+ <td align="right" class="searchName">BarCode</td>
+ <td style="width: 600px">
+ <lightning-textarea
+ class="inputFont"
+ name="BarCode"
+ label=""
+ onchange={handleChange}
+ ></lightning-textarea>
+ </td>
+ <td align="right"></td>
+ <td></td>
+ <td style="width: 200px">
+ <button
+ style="margin-top: 14px"
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="鑾峰彇鏄庣粏"
+ onclick={getDetails}
+ >
+ 鑾峰彇鏄庣粏
+ </button>
+ <!-- <lightning-button variant="brand" class='lexstyle' label="鑾峰彇鏄庣粏" title="鑾峰彇鏄庣粏" onclick={getDetails}
+ ></lightning-button> -->
+ </td>
+ </tr>
+ </tbody>
+ </table>
<!-- </div> -->
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -82,26 +158,46 @@
</lightning-layout-item>
</lightning-layout>
</div>
- <div style="padding:10px;">
-
+ <div style="padding: 10px">
<!-- <div style="height: 300px;"> -->
- <!-- <template if:true={showTable}> -->
- <c-lex-custom-lightning-datatable key-field="prodid" data={data} columns={columns}
- onrowselection={getSelectedRows} hide-checkbox-column="true"
- selected-rows={selectedRows} class="wrapped-header-datatable">
- </c-lex-custom-lightning-datatable>
- <!-- </template> -->
+ <!-- <template if:true={showTable}> -->
+ <c-lex-custom-lightning-datatable
+ key-field="prodid"
+ data={data}
+ columns={columns}
+ onrowselection={getSelectedRows}
+ hide-checkbox-column="true"
+ selected-rows={selectedRows}
+ class="wrapped-header-datatable"
+ style="word-wrap: break-word; word-break: break-all"
+ >
+ </c-lex-custom-lightning-datatable>
+ <!-- </template> -->
<!-- </div> -->
-
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:10px">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ margin-top: 10px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<table>
<tr>
<td>
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
<strong>閿欒鏄庣粏</strong>
</p>
@@ -111,21 +207,21 @@
</tr>
</table>
</div>
-
- <div style="padding:10px;">
- <lightning-datatable
- key-field="id" data={errorDetail} columns={column}
- onrowselection={getSelectedRows} hide-checkbox-column="true"
- selected-rows={selectedRows} class="wrapped-header-datatable">
- </lightning-datatable>
-
+ <div style="padding: 10px">
+ <lightning-datatable
+ key-field="id"
+ data={errorDetail}
+ columns={column}
+ onrowselection={getSelectedRows}
+ hide-checkbox-column="true"
+ selected-rows={selectedRows}
+ class="wrapped-header-datatable"
+ style="word-wrap: break-word; word-break: break-all"
+ >
+ </lightning-datatable>
+ </div>
</div>
</div>
- </div>
-
-
-
</div>
-
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.js b/force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.js
index 52d3451..c39556a 100644
--- a/force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.js
+++ b/force-app/main/default/lwc/lexCancelRemoveBox/lexCancelRemoveBox.js
@@ -1,77 +1,76 @@
import { LightningElement, wire, api, track } from 'lwc';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-import oninit from "@salesforce/apex/LexCancelRemoveBoxController.init";
-import searchDeatail from "@salesforce/apex/LexCancelRemoveBoxController.searchConsumableorderdetails"
+import oninit from '@salesforce/apex/LexCancelRemoveBoxController.init';
+import searchDeatail from '@salesforce/apex/LexCancelRemoveBoxController.searchConsumableorderdetails';
import saveConfirm from '@salesforce/apex/LexCancelRemoveBoxController.cancelRemoveBoxConfirm';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
const columns = [
{
- label: '娑堣�楀搧鍚嶇О',
- fieldName: 'Name__c',
- hideDefaultActions: true,
- wrapText:true
- // initialWidth: 350,
-
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ hideDefaultActions: true,
+ wrapText: true
+ // initialWidth: 350,
},
{
- label: '瑙勬牸',
- fieldName: 'ProductPacking_list_manual__c',
- hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
- initialWidth: 50,
-
+ label: '瑙勬牸',
+ fieldName: 'ProductPacking_list_manual__c',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'right' },
+ initialWidth: 50
},
{
- label: 'CFDA鐘舵��',
- fieldName: 'CFDA_Status__c',
- hideDefaultActions: true,
- initialWidth: 200,
-
+ label: 'CFDA鐘舵��',
+ fieldName: 'CFDA_Status__c',
+ hideDefaultActions: true,
+ initialWidth: 100,
+ wrapText: true
},
{
- label: '娉ㄥ唽璇佺紪鐮佸彿',
- fieldName: 'Report_Product_Approbation__c',
- hideDefaultActions: true,
- initialWidth: 200,
+ label: '娉ㄥ唽璇佺紪鐮佸彿',
+ fieldName: 'Report_Product_Approbation__c',
+ hideDefaultActions: true,
+ initialWidth: 200,
+ wrapText: true
},
{
- label: '娉ㄥ唽璇佹晥鏈�',
- fieldName: 'Report_Product_Expiration__c',
- hideDefaultActions: true,
- // initialWidth: 250,
+ label: '娉ㄥ唽璇佹晥鏈�',
+ fieldName: 'Report_Product_Expiration__c',
+ hideDefaultActions: true,
+ initialWidth: 110,
+ wrapText: true
},
{
- label: 'BarCode',
- fieldName: 'Bar_Code__c',
- hideDefaultActions: true,
- initialWidth: 400,
+ label: 'BarCode',
+ fieldName: 'Bar_Code__c',
+ hideDefaultActions: true,
+ wrapText: true
}
- ];
-
- const column = [
+];
+
+const column = [
{
- label: '娑堣�楀搧鍚嶇О',
- fieldName: 'Name__c',
- hideDefaultActions: true,
-
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ hideDefaultActions: true,
+ wrapText: true
},
{
- label: 'BarCode',
- fieldName: 'Bar_Code__c',
- hideDefaultActions: true,
-
- }
- ,
+ label: 'BarCode',
+ fieldName: 'Bar_Code__c',
+ wrapText: true,
+ hideDefaultActions: true
+ // initialWidth:600
+ },
{
- label: '閿欒鍘熷洜',
- fieldName: 'ErrorReason',
- hideDefaultActions: true,
+ label: '閿欒鍘熷洜',
+ fieldName: 'ErrorReason',
+ hideDefaultActions: true
}
- ];
-
+];
export default class LexCancelRemoveBox extends LightningElement {
columns = columns;
@@ -79,164 +78,175 @@
@track selectedRows = [];
@track data = [];
@track errorDetail = [];
-
+
// 鏄剧ず
- @track showTable = false
+ @track showTable = false;
@track showSpinner = false;
//鏁版嵁鏋勬垚
- @track accountName
- @track userWorkLocation
- @track agencyProType
- @track barcode = ''
- @track saveFLGbln = false
+ @track accountName;
+ @track userWorkLocation;
+ @track agencyProType;
+ @track barcode = '';
+ @track saveFLGbln = false;
@track dataSize = 0;
renderedCallback() {
- if (!this.stylesLoaded) {
- Promise.all([loadStyle(this, WrappedHeaderTable)])
- .then(() => {
- console.log("Custom styles loaded");
- this.stylesLoaded = true;
- })
- .catch((error) => {
- console.error("Error loading custom styles");
- });
- }
- }
-
-
-
+ if (!this.stylesLoaded) {
+ Promise.all([loadStyle(this, WrappedHeaderTable)])
+ .then(() => {
+ console.log('Custom styles loaded');
+ this.stylesLoaded = true;
+ })
+ .catch((error) => {
+ console.error('Error loading custom styles');
+ });
+ }
+ }
connectedCallback() {
- console.log('鍒濆鍖�');
- // this.showTable = false;
- oninit().then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log('result =' + JSON.stringify(result));
- if (result.status = 'Success') {
- console.log('result');
- this.agencyProType = result.entity.agencyProType;
- this.userWorkLocation = result.entity.userWorkLocation;
- this.accountName = result.entity.accountName;
- // this.data = JSON.parse(result.entity.codPageRecords);
- // this.showTable = true;
- } else {
- this.showMyToast('鍒濆鍖栧け璐�',result.msg,'error');
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error));
- });
+ console.log('鍒濆鍖�');
+ // this.showTable = false;
+ oninit()
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result =' + JSON.stringify(result));
+ if ((result.status = 'Success')) {
+ console.log('result');
+ this.agencyProType = result.entity.agencyProType;
+ this.userWorkLocation = result.entity.userWorkLocation;
+ this.accountName = result.entity.accountName;
+ // this.data = JSON.parse(result.entity.codPageRecords);
+ // this.showTable = true;
+ } else {
+ this.showMyToast('鍒濆鍖栧け璐�', result.msg, 'error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
}
//褰曞叆
- getDetails() {
- this.showSpinner = true;
- searchDeatail({
- accountName: this.accountName,
- userWorkLocation: this.userWorkLocation,
- agencyProType: this.agencyProType,
- barcode: this.barcode
- }).then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log('result =' + JSON.stringify(result));
- if (result.status == 'Success') {
- console.log('鎴愬姛');
- this.data = JSON.parse(result.entity.ConsumableorderdetailsRecordsdummy);
- this.errorDetail = JSON.parse(result.entity.ConsumableorderdetailsRecordserror);
- this.dataSize = result.entity.dataSize;
- for (let i in this.data) {
- this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
- this.data[i]['ProductPacking_list_manual__c'] = this.data[i].esd.ProductPacking_list_manual__c;
- this.data[i]['CFDA_Status__c'] = this.data[i].esd.CFDA_Status__c;
- this.data[i]['Report_Product_Approbation__c'] = this.data[i].esd.Report_Product_Approbation__c;
- this.data[i]['Report_Product_Expiration__c'] = this.data[i].esd.Report_Product_Expiration__c;
- this.data[i]['Bar_Code__c'] = this.data[i].esd.Bar_Code__c;
- }
- // this.showTable = true;
- for (let i in this.errorDetail) {
- this.errorDetail[i]['Name__c'] = this.errorDetail[i].Prod.Name__c;
- this.errorDetail[i]['Bar_Code__c'] = this.errorDetail[i].esd.Bar_Code__c;
- this.errorDetail[i]['ErrorReason'] = this.errorDetail[i].ErrorReason;
- }
- // this.showTables = true;
- this.showSpinner = false;
- } else{
- this.showMyToast('鑾峰彇澶辫触',result.msg,'error');
- this.showSpinner = false;
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error));
- });
+ getDetails() {
+ this.showSpinner = true;
+ searchDeatail({
+ accountName: this.accountName,
+ userWorkLocation: this.userWorkLocation,
+ agencyProType: this.agencyProType,
+ barcode: this.barcode
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result =' + JSON.stringify(result));
+ if (result.status == 'Success') {
+ console.log('鎴愬姛');
+ this.data = JSON.parse(
+ result.entity.ConsumableorderdetailsRecordsdummy
+ );
+ this.errorDetail = JSON.parse(
+ result.entity.ConsumableorderdetailsRecordserror
+ );
+ this.dataSize = result.entity.dataSize;
+ for (let i in this.data) {
+ this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
+ this.data[i]['ProductPacking_list_manual__c'] =
+ this.data[i].esd.ProductPacking_list_manual__c;
+ this.data[i]['CFDA_Status__c'] =
+ this.data[i].esd.CFDA_Status__c;
+ this.data[i]['Report_Product_Approbation__c'] =
+ this.data[i].esd.Report_Product_Approbation__c;
+ this.data[i]['Report_Product_Expiration__c'] =
+ this.data[i].esd.Report_Product_Expiration__c;
+ this.data[i]['Bar_Code__c'] =
+ this.data[i].esd.Bar_Code__c;
+ }
+ // this.showTable = true;
+ for (let i in this.errorDetail) {
+ this.errorDetail[i]['Name__c'] =
+ this.errorDetail[i].Prod.Name__c;
+ this.errorDetail[i]['Bar_Code__c'] =
+ this.errorDetail[i].esd.Bar_Code__c;
+ this.errorDetail[i]['ErrorReason'] =
+ this.errorDetail[i].ErrorReason;
+ }
+ // this.showTables = true;
+ this.showSpinner = false;
+ } else {
+ this.showMyToast('鑾峰彇澶辫触', result.msg, 'error');
+ this.showSpinner = false;
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
+ }
+ //鑾峰彇褰撳墠杈撳叆鍊�
+ handleChange(event) {
+ let value = event.detail.value;
+ console.log('value' + value);
+ this.barcode = value;
+ console.log('this.barcode' + this.barcode);
+ }
- }
- //鑾峰彇褰撳墠杈撳叆鍊�
- handleChange(event) {
- let value = event.detail.value;
- console.log('value' + value);
- this.barcode = value;
- console.log('this.barcode' + this.barcode);
- }
-
-
- saveConfirm() {
- let msg = "纭鍙栨秷鎷嗙洅鍚�";
- if (this.dataSize>0) {
- if (confirm(msg) == true) {
+ saveConfirm() {
+ let msg = '纭鍙栨秷鎷嗙洅鍚�';
+ if (this.dataSize > 0) {
+ if (confirm(msg) == true) {
+ this.CancelRemoveBox();
+ }
+ } else {
this.CancelRemoveBox();
}
- } else {
- this.CancelRemoveBox();
}
- }
- CancelRemoveBox(){
- this.showSpinner = true;
- saveConfirm({
- saveConsumableorderdetailsRecordsdummy: JSON.stringify(this.data),
- accountName: this.accountName,
- userWorkLocation: this.userWorkLocation,
- agencyProType: this.agencyProType
- }).then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log('result淇濆瓨 = ' + JSON.stringify(result));
- if (result.status == 'Success') {
- this.saveFLGbln = result.entity.saveFLGbln;
- // this.showSpinner = false;
- if(this.saveFLGbln){
- this.showMyToast(result.msg,'','success');
- this.showSpinner = false;
-
-
- }
- } else {
- this.showMyToast('鍙栨秷鎷嗙洅澶辫触',result.msg,'error');
- this.showSpinner = false;
- }
- })
- .catch((error) => {
- console.log('error = ' + JSON.stringify(error));
- });
-
- }
- showMyToast(title, message, variant) {
- console.log('show custom message');
- var iconName = '';
- var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
+ CancelRemoveBox() {
+ this.showSpinner = true;
+ saveConfirm({
+ saveConsumableorderdetailsRecordsdummy: JSON.stringify(this.data),
+ accountName: this.accountName,
+ userWorkLocation: this.userWorkLocation,
+ agencyProType: this.agencyProType
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result淇濆瓨 = ' + JSON.stringify(result));
+ if (result.status == 'Success') {
+ this.saveFLGbln = result.entity.saveFLGbln;
+ // this.showSpinner = false;
+ if (this.saveFLGbln) {
+ this.showMyToast(result.msg, '', 'success');
+ this.showSpinner = false;
+ }
+ } else {
+ this.showMyToast('鍙栨秷鎷嗙洅澶辫触', result.msg, 'error');
+ this.showSpinner = false;
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
}
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
+ showMyToast(title, message, variant) {
+ console.log('show custom message');
+ var iconName = '';
+ var content = '';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
+ }
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
+ }
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
}
- this.template.querySelector('c-common-toast').showToast(variant,content,iconName,10000);
- }
-
-
-
-
-
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.css b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.css
index 6742585..117f53d 100644
--- a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.css
+++ b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.css
@@ -1,13 +1,13 @@
@import 'c/lexCssUtility';
.outerBorderCss {
- border: 1px solid #D4D4D4;
+ border: 1px solid #d4d4d4;
border-radius: 5px;
border-top: 3px solid #565959;
}
.borderCss {
- border: 1px solid #D4D4D4;
+ border: 1px solid #d4d4d4;
border-radius: 5px;
margin-bottom: 7px;
border-top: 3px solid #565959;
@@ -15,7 +15,7 @@
.headerDorderCss {
border-top: 1px solid #565959;
- border-bottom: 1px solid #D4D4D4;
+ border-bottom: 1px solid #d4d4d4;
padding: 3px;
}
@@ -40,6 +40,11 @@
--lwc-inputStaticFontSize: 16px;
--lwc-formLabelFontSize: 16px;
}
-.fontWeight{
- font-size:16px;
-}
\ No newline at end of file
+.fontWeight {
+ font-size: 16px;
+}
+
+.fileUpload {
+ font-size: 16px;
+ --lwc-formLabelFontSize: 16px;
+}
diff --git a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html
index dd1a7c4..60c6cad 100644
--- a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html
+++ b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html
@@ -3,62 +3,152 @@
<template>
<c-common-toast></c-common-toast>
<template if:true={isShowSpinner}>
- <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ 聽 聽 聽 聽 聽 聽 聽 聽 <span class="slds-assistive-text">Loading</span> 聽 聽
+ 聽 聽 聽 聽 聽 聽
+ <div class="slds-spinner__dot-a"></div>
+ 聽 聽 聽 聽 聽 聽 聽 聽
+ <div class="slds-spinner__dot-b"></div>
+ 聽 聽 聽 聽
+ </div>
</template>
-
<template if:false={isDetailsShow}>
<template if:false={isConInvoiceList}>
<!-- 鎼滅储瀹㈡埛鍚� -->
<template if:true={isModalOpen}>
- <!-- Modal/Popup Box LWC starts here -->
- <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true"
- aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open">
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-01"
+ aria-modal="true"
+ aria-describedby="modal-content-id-1"
+ class="slds-modal slds-fade-in-open slds-modal_medium"
+ style="border: 1px solid #d4d4d4"
+ >
<div class="slds-modal__container">
- <!-- Modal/Popup Box LWC header here -->
- <header class="slds-modal__header">
- <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
- title="Close" onclick={closeModal}>
- <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse"
- size="small"></lightning-icon>
+ <header
+ class="slds-modal__header"
+ style="background-color: #f3f3f3"
+ >
+ <button
+ style=""
+ class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+ title="Close"
+ onclick={closeModal}
+ >
+ <lightning-icon
+ icon-name="utility:close"
+ alternative-text="close"
+ variant="inverse"
+ size="small"
+ ></lightning-icon>
<span class="slds-assistive-text">Close</span>
</button>
- <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">
+ <h2
+ id="modal-heading-01"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
缁忛攢鍟嗗尰闄㈡绱�
</h2>
</header>
- <!-- Modal/Popup Box LWC body starts here -->
- <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
- <lightning-layout>
- <lightning-layout-item flexibility="auto" padding="around-small">
- <lightning-input type="text" label="鍖婚櫌鍚嶇О" onchange={dataChange}
- data-field="searchHospitalName" value={searchHospitalName}
- variant="label-inline" class="inputFont"></lightning-input>
- </lightning-layout-item>
- <lightning-layout-item flexibility="auto" padding="around-small"
- style="padding-top: 16px;">
- <!-- <lightning-button label="妫�绱�" onclick={searchHospital}></lightning-button> -->
- <button class="slds-button slds-button_neutral" onclick={searchHospital}
- title="searchHospital" style="font-size: 16px;">
- 妫�绱�
- </button>
- </lightning-layout-item>
- </lightning-layout>
-
- <div class="tableColumn">
- <lightning-layout class="datatable" style="height: 250px;">
- <lightning-datatable class="datatabel slds-border_top wrapped-header-datatable"
- key-field="id" data={hospitalList} columns={hospitalColumns}
- hide-checkbox-column="true" onrowaction={searchHandleRowAction}>
+ <div
+ class="slds-modal__content slds-p-around_medium"
+ id="modal-content-id-1"
+ style="border: 1px solid #f3f3f3"
+ >
+ <table style="width: 100%">
+ <tbody>
+ <tr>
+ <td style="width: 74px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ text-align: left;
+ "
+ >
+ 鍖婚櫌鍚嶇О
+ </div>
+ </td>
+ <td style="width: 60%">
+ <lightning-input
+ class="inputFont"
+ label="鍖婚櫌鍚嶇О"
+ variant="label-hidden"
+ placeholder="璇疯緭鍏ュ尰闄㈠悕绉�"
+ value={searchHospitalName}
+ data-field="searchHospitalName"
+ onchange={dataChange}
+ ></lightning-input>
+ </td>
+ <td style="width: 10px"></td>
+ <td>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="height: 32px"
+ label="鎼滅储"
+ onclick={searchHospital}
+ >
+ 鎼滅储
+ </button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <p style="height: 20px"></p>
+ <!-- <p>宸查�夋嫨鍖婚櫌锛歿chooseHospital}</p> -->
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <lightning-layout>
+ <lightning-layout-item
+ padding="around-small"
+ >
+ <p style="font-size: 18px">
+ <strong>鎼滅储缁撴灉</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ <!-- <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p> -->
+ </div>
+ <div class="myTable" style="padding: 10px">
+ <!-- <lightning-datatable class="wrapped-header-datatable" key-field="id"
+ hide-checkbox-column="true" data={hospitalList} columns={hosCols}
+ onrowaction={chooseHos}></lightning-datatable> -->
+ <lightning-datatable
+ class="datatabel slds-border_top wrapped-header-datatable"
+ key-field="id"
+ data={hospitalList}
+ columns={hospitalColumns}
+ hide-checkbox-column="true"
+ onrowaction={searchHandleRowAction}
+ >
</lightning-datatable>
- </lightning-layout>
+ </div>
</div>
</div>
- <!-- Modal/Popup Box LWC footer starts here -->
<footer class="slds-modal__footer">
- <button class="slds-button slds-button_neutral" onclick={closeModal} title="Cancel"
- style="font-size: 16px;">
- 鍏抽棴
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ label="鍙栨秷"
+ onclick={closeModal}
+ >
+ 鍙栨秷
</button>
</footer>
</div>
@@ -66,136 +156,221 @@
<div class="slds-backdrop slds-backdrop_open"></div>
</template>
<div class="outerBorderCss">
- <div style="padding:5px;">
-
+ <div style="padding: 5px">
<div class="borderCss">
- <div style="padding:10px;">
+ <div style="padding: 10px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
<template if:false={EditAble}>
- <lightning-layout>
- <lightning-layout-item size="12">
- <div class="slds-m-top_small slds-m-bottom_medium">
- <!-- <lightning-layout-item size="3">
- <lightning-input label="" name="涓婁紶闄勪欢" onchange={handleFilesChange}
- type="file" accept={acceptedType}
- disabled={isDisabledReopen}></lightning-input>
- </lightning-layout-item>
- <lightning-layout-item size="3">
- <span class="slds-form-element__label" data-form-label></span>
- </br>
- <lightning-button label="淇濆瓨闄勪欢" style="margin-top: 20px"
- onclick={saveAttachmentJs}
- disabled={isDisabledReopen}></lightning-button>
- </lightning-layout-item> -->
- <lightning-layout multiple-rows="true">
- <lightning-layout-item size="12">
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={SetEditAbleJs} disabled={isDisabledEdit}
- style="width: 150px;">缂栬緫</button>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
- onclick={approvalJs} disabled={isDisabledEdit}
- style="width: 150px;">鎻愪氦</button>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
- onclick={openReportJs} disabled={isOpenReportDisabled}
- style="width: 150px;">鏄剧ず鏄庣粏</button>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
- onclick={reopenJs} disabled={isDisabledReopen}
- style="width: 150px;">浣滃簾閲嶅紑</button>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
- onclick={deleteButtonJs} disabled={isDisabledDelete}
- style="width: 150px;">鍒犻櫎</button>
+ <lightning-layout multiple-rows="true">
+ <lightning-layout-item
+ size="2"
+ ></lightning-layout-item>
+ <lightning-layout-item size="10">
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ onclick={SetEditAbleJs}
+ disabled={isDisabledEdit}
+ style="width: 150px"
+ >
+ 缂栬緫
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+ onclick={approvalJs}
+ disabled={isDisabledEdit}
+ style="width: 150px"
+ >
+ 鎻愪氦
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+ onclick={openReportJs}
+ disabled={isOpenReportDisabled}
+ style="width: 150px"
+ >
+ 鏄剧ず鏄庣粏
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+ onclick={reopenJs}
+ disabled={isDisabledReopen}
+ style="width: 150px"
+ >
+ 浣滃簾閲嶅紑
+ </button>
+ </lightning-layout-item>
+ </lightning-layout>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
- disabled={isDisabledReopen} onclick={uploadOrder}
- style="width: 150px;">涓婁紶闄勪欢</button>
+ <lightning-layout
+ multiple-rows="true"
+ style="margin-top: 20px"
+ >
+ <lightning-layout-item
+ size="2"
+ ></lightning-layout-item>
+ <lightning-layout-item size="10">
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ onclick={deleteButtonJs}
+ disabled={isDisabledDelete}
+ style="width: 150px"
+ >
+ 鍒犻櫎
+ </button>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
- onclick={saveAttachmentJs} disabled={isDisabledReopen}
- style="width: 150px;">淇濆瓨闄勪欢</button>
- </lightning-layout-item>
- <!-- <lightning-layout-item size="2">
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- disabled={isDisabledReopen}
- onclick={uploadOrder} style="width: 150px;">涓婁紶闄勪欢</button>
- </lightning-layout-item>
- <lightning-layout-item size="2">
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={saveAttachmentJs}
- disabled={isDisabledReopen} style="margin-left: -50px;width: 150px;">淇濆瓨闄勪欢</button>
- </lightning-layout-item> -->
- </lightning-layout>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+ disabled={isDisabledReopen}
+ onclick={uploadOrder}
+ style="width: 150px"
+ >
+ 涓婁紶闄勪欢
+ </button>
- </div>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+ onclick={saveAttachmentJs}
+ disabled={isDisabledReopen}
+ style="width: 150px"
+ >
+ 淇濆瓨闄勪欢
+ </button>
</lightning-layout-item>
</lightning-layout>
</template>
<!-- 涓婁紶闄勪欢寮圭獥 -->
<template if:true={showAttPop}>
- <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-02"
- aria-modal="true" aria-describedby="modal-content-id-2"
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-02"
+ aria-modal="true"
+ aria-describedby="modal-content-id-2"
class="slds-modal slds-fade-in-open slds-modal_small"
- style="border: 1px solid #D4D4D4;">
+ style="border: 1px solid #d4d4d4"
+ >
<template if:true={showPopSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <lightning-spinner
+ size="medium"
+ variant="brand"
+ ></lightning-spinner>
</template>
<div class="slds-modal__container">
- <header class="slds-modal__header" style="background-color: #F3F3F3;">
- <button style=""
+ <header
+ class="slds-modal__header"
+ style="
+ background-color: #f3f3f3;
+ "
+ >
+ <button
+ style=""
class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
- title="Close" onclick={closePop}>
- <lightning-icon icon-name="utility:close" alternative-text="close"
- variant="inverse" size="small"></lightning-icon>
- <span class="slds-assistive-text">Close</span>
+ title="Close"
+ onclick={closePop}
+ >
+ <lightning-icon
+ icon-name="utility:close"
+ alternative-text="close"
+ variant="inverse"
+ size="small"
+ ></lightning-icon>
+ <span
+ class="slds-assistive-text"
+ >Close</span
+ >
</button>
- <h2 id="modal-heading-02"
- class="slds-text-heading_medium slds-hyphenate">涓婁紶闄勪欢</h2>
+ <h2
+ id="modal-heading-02"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
+ 涓婁紶闄勪欢
+ </h2>
</header>
- <div class="slds-modal__content slds-p-around_medium searchName"
- id="modal-content-id-2" style="border: 1px solid #F3F3F3;">
- <div class="slds-m-top_medium slds-m-bottom_x-large">
- <div class="slds-p-around_medium lgc-bg">
- <lightning-input type="file" label="闄勪欢涓婁紶"
+ <div
+ class="slds-modal__content slds-p-around_medium searchName"
+ id="modal-content-id-2"
+ style="
+ border: 1px solid #f3f3f3;
+ "
+ >
+ <div
+ class="slds-m-top_medium slds-m-bottom_x-large"
+ >
+ <div
+ class="slds-p-around_medium lgc-bg"
+ >
+ <lightning-input
+ class="fileUpload"
+ type="file"
+ label="闄勪欢涓婁紶"
accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf"
- onchange={attChange}></lightning-input>
+ onchange={attChange}
+ ></lightning-input>
</div>
- <p class="fontWeight">宸查�夋嫨鏂囦欢锛歿fileName}
+ <p class="fontWeight">
+ 宸查�夋嫨鏂囦欢锛歿fileName}
- <template if:true={attDelBtn}>
- <a onclick={removeAtt}>绉婚櫎</a>
+ <template
+ if:true={attDelBtn}
+ >
+ <a
+ onclick={removeAtt}
+ >绉婚櫎</a
+ >
</template>
</p>
</div>
</div>
<footer class="slds-modal__footer">
- <lightning-button style="margin-left: 10px;" variant="neutral"
+ <!-- <lightning-button style="margin-left: 10px;" variant="neutral"
label="鍙栨秷" onclick={closePop}></lightning-button>
<lightning-button style="margin-left: 10px;" variant="neutral"
- label="涓婁紶" onclick={handleFilesChange}></lightning-button>
+ label="涓婁紶" onclick={handleFilesChange}></lightning-button> -->
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ style="margin-left: 10px"
+ label="鍙栨秷"
+ onclick={closePop}
+ >
+ 鍙栨秷
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="margin-left: 10px"
+ label="涓婁紶"
+ onclick={handleFilesChange}
+ >
+ 涓婁紶
+ </button>
</footer>
</div>
</section>
- <div class="slds-backdrop slds-backdrop_open"></div>
+ <div
+ class="slds-backdrop slds-backdrop_open"
+ ></div>
</template>
<template if:true={EditAble}>
<lightning-layout>
- <lightning-layout-item size="1" padding="around-small"></lightning-layout-item>
- <lightning-layout-item size="2" padding="around-small"></lightning-layout-item>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ size="1"
+ padding="around-small"
+ ></lightning-layout-item>
+ <lightning-layout-item
+ size="2"
+ padding="around-small"
+ ></lightning-layout-item>
+ <lightning-layout-item
+ padding="around-small"
+ >
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={SaveJs}>纭畾</button>
+ onclick={SaveJs}
+ >
+ 纭畾
+ </button>
</lightning-layout-item>
</lightning-layout>
</template>
@@ -232,7 +407,6 @@
</template>
</lightning-layout> -->
-
</div>
</div>
</div>
@@ -247,133 +421,249 @@
</lightning-layout-item>
</lightning-layout>
</div>
- <div style="padding:7px;">
+ <div style="padding: 7px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
<!--鍙戠エ淇℃伅 鏄剧ず鐢� -->
<template if:false={isEditInvoice}>
- <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
- onload={handleLoad2}>
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={cocId}
+ onload={handleLoad2}
+ >
<!-- 鍙戠エ鍙� 鐘舵�� -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-output-field field-name="Name"></lightning-output-field>
- </lightning-layout-item>
-
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="Invoice_status__c"></lightning-output-field>
+ field-name="Name"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-output-field
+ field-name="Invoice_status__c"
+ ></lightning-output-field>
+ </lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 鍙戠エ鏃ユ湡 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="Invoice_Date__c"></lightning-output-field>
+ field-name="Invoice_Date__c"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
<!-- 浜岀骇缁忛攢鍟� -->
- <template if:true={isShowSecondaryDistributor}>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <template
+ if:true={isShowSecondaryDistributor}
+ >
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout multiple-rows="true">
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout
+ multiple-rows="true"
+ >
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="Order_Dealer_Info__c"></lightning-output-field>
+ field-name="Order_Dealer_Info__c"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
</template>
<!-- 瀹㈡埛鍚� -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-output-field field-name="ShipmentAccount__c"
- class="hideHelpText"></lightning-output-field>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-output-field
+ field-name="ShipmentAccount__c"
+ class="hideHelpText"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
<!-- 绉戝 鍙戠エ绁ㄩ潰閲戦 -->
- <lightning-layout multiple-rows="true" style="height:35.5px">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout
+ multiple-rows="true"
+ style="height: 35.5px"
+ >
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="Order_ForCustomerText__c"></lightning-output-field>
+ field-name="Order_ForCustomerText__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item size="4" class="readOnly">
- <lightning-input label="鍙戠エ绁ㄩ潰閲戦(鍏�)" value={sumPrice} read-only
- variant="label-inline"></lightning-input>
+ <lightning-layout-item
+ size="5"
+ class="readOnly"
+ style="padding-left: 100px"
+ >
+ <lightning-input
+ label="鍙戠エ绁ㄩ潰閲戦(鍏�)"
+ value={sumPrice}
+ read-only
+ variant="label-inline"
+ ></lightning-input>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 澶囨敞 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="Invoice_Note__c"></lightning-output-field>
+ field-name="Invoice_Note__c"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
<!-- 鍙戠エ闄勪欢 鏄庣粏闄勪欢 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="Invoice_attachment__c"></lightning-output-field>
+ field-name="Invoice_attachment__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
<lightning-output-field
- field-name="Invoicedet_attachment__c"></lightning-output-field>
+ field-name="Invoicedet_attachment__c"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 闄勪欢棰勮 -->
<lightning-layout multiple-rows="true">
<lightning-layout-item size="1">
</lightning-layout-item>
- <lightning-layout-item size="11">
- <lightning-card class="attListTitle" variant="Narrow" title="闄勪欢鍒楄〃"
- icon-name="utility:attach">
-
- <lightning-layout slot="footer" multiple-rows="true">
- <template for:each={fileData} for:item="item" for:index="index">
- <lightning-layout-item padding="around-none" size="2"
+ <lightning-layout-item size="10">
+ <lightning-card
+ class="attListTitle"
+ variant="Narrow"
+ title="闄勪欢鍒楄〃"
+ icon-name="utility:attach"
+ >
+ <lightning-layout
+ slot="footer"
+ multiple-rows="true"
+ >
+ <template
+ for:each={fileData}
+ for:item="item"
+ for:index="index"
+ >
+ <lightning-layout-item
+ padding="around-none"
+ size="2"
key={item.recordId}
- style="text-align: left;padding:5px">
- <lightning-icon title={item.Title}
- style="margin-left: 20px;" icon-name="doctype:gform"
+ style="
+ text-align: left;
+ padding: 5px;
+ "
+ >
+ <lightning-icon
+ title={item.Title}
+ style="
+ margin-left: 20px;
+ "
+ icon-name="doctype:gform"
alternative-text={item.Title}
- size="large"></lightning-icon><br />
- <span title={item.Title}>
- {item.fileName}
- </span>
+ size="large"
+ ></lightning-icon
+ ><br />
+ <div
+ title={item.Title}
+ style="
+ width: 100px;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ "
+ >
+ {item.Title}
+ </div>
<p>
<!-- <a data-fileid ={item.documentId} onclick={previweAtt}> -->
- <a href={item.attUrl} target="_blank">
- 棰勮
- </a> 路
- <a href={item.downloadUrl}>
- 涓嬭浇
- </a> 路
- <a data-fileid={item.recordId} onclick={deleteAtt}>
+ <a
+ href={item.attUrl}
+ target="_blank"
+ >
+ 棰勮 </a
+ > 路
+ <a
+ href={item.downloadUrl}
+ >
+ 涓嬭浇 </a
+ > 路
+ <a
+ data-fileid={item.Id}
+ onclick={deleteAtt}
+ >
鍒犻櫎
</a>
</p>
@@ -388,95 +678,177 @@
</template>
<!--鍙戠エ淇℃伅 缂栬緫鐢� -->
<template if:true={isEditInvoice}>
- <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
- onload={handleLoad2}>
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={cocId}
+ onload={handleLoad2}
+ >
<!-- 鍙戠エ鍙� 鐘舵�� -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-input label="鍙戠エ鍙�" value={OrderCode} data-field="OrderCode"
- onchange={dataChange} variant="label-inline" required
- class="inputFont"></lightning-input>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-input
+ label="鍙戠エ鍙�"
+ value={OrderCode}
+ data-field="OrderCode"
+ onchange={dataChange}
+ variant="label-inline"
+ required
+ class="inputFont"
+ ></lightning-input>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
<lightning-output-field
- field-name="Invoice_status__c"></lightning-output-field>
+ field-name="Invoice_status__c"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 鍙戠エ鏃ユ湡 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-input type="date" label="鍙戠エ鏃ユ湡" variant="label-inline"
- value={InvoiceDate} onchange={invoiceDateChange} required
- class="inputFont"></lightning-input>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-input
+ type="date"
+ label="鍙戠エ鏃ユ湡"
+ variant="label-inline"
+ value={InvoiceDate}
+ onchange={invoiceDateChange}
+ required
+ class="inputFont"
+ ></lightning-input>
</lightning-layout-item>
</lightning-layout>
<!-- 瀹㈡埛鍚� 浜岀骇缁忛攢鍟� -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<div
- class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
- <lightning-icon size="x-small"
+ class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"
+ >
+ <lightning-icon
+ size="x-small"
class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default hideHelpText"
- icon-name="utility:search"></lightning-icon>
- <lightning-input type="text" name="HospitalName" label="瀹㈡埛鍚�"
- value={HospitalName} variant="label-inline"
- onclick={searchHospitalNameModal} data-field="HospitalName"
- onchange={clearAgencyI} class="inputFont"></lightning-input>
+ icon-name="utility:search"
+ ></lightning-icon>
+ <lightning-input
+ type="text"
+ name="HospitalName"
+ label="瀹㈡埛鍚�"
+ value={HospitalName}
+ variant="label-inline"
+ onclick={searchHospitalNameModal}
+ data-field="HospitalName"
+ onchange={clearAgencyI}
+ class="inputFont"
+ ></lightning-input>
</div>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-combobox data-field="secondaryDistributor"
- name="secondaryDistributor" label="浜岀骇缁忛攢鍟�"
- value={secondaryDistributor} placeholder="璇烽�夋嫨..."
- options={provinceOptsMap} variant="label-inline"
- onchange={dataChange} class="inputFont"></lightning-combobox>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-combobox
+ data-field="secondaryDistributor"
+ name="secondaryDistributor"
+ label="浜岀骇缁忛攢鍟�"
+ value={secondaryDistributor}
+ placeholder="璇烽�夋嫨..."
+ options={provinceOptsMap}
+ variant="label-inline"
+ onchange={dataChange}
+ class="inputFont"
+ ></lightning-combobox>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 绉戝 缁忛攢鍟�(褰曞叆) -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-input-field onchange={dataChange}
- data-field="ForCustomerText" value={ForCustomerText}
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-input-field
+ onchange={dataChange}
+ data-field="ForCustomerText"
+ value={ForCustomerText}
field-name="Order_ForCustomerText__c"
- class="inputFont"></lightning-input-field>
+ class="inputFont"
+ ></lightning-input-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
<lightning-output-field
- field-name="Order_ForDealerText__c"></lightning-output-field>
+ field-name="Order_ForDealerText__c"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 澶囨敞 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-input-field onchange={dataChange} data-field="InvoiceNote"
- value={InvoiceNote} field-name="Invoice_Note__c"
- class="inputFont"></lightning-input-field>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-input-field
+ onchange={dataChange}
+ data-field="InvoiceNote"
+ value={InvoiceNote}
+ field-name="Invoice_Note__c"
+ class="inputFont"
+ ></lightning-input-field>
</lightning-layout-item>
</lightning-layout>
-
</lightning-record-edit-form>
</template>
</div>
@@ -485,24 +857,31 @@
<!-- 鍑哄簱鍗曚竴瑙� -->
<div class="borderCss">
<div class="headerDorderCss">
-
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
<strong>鍑哄簱鍗曚竴瑙�</strong>
</p>
</lightning-layout-item>
- <lightning-layout-item size="2" padding="around-small">
+ <lightning-layout-item
+ size="2"
+ padding="around-small"
+ >
</lightning-layout-item>
<template if:false={hideCheckbox}>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<!-- <lightning-button label=" 妫�绱� "
onclick={InvoiceorderSearchJs}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
- onclick={InvoiceorderSearchJs}>妫�绱�</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ onclick={InvoiceorderSearchJs}
+ >
+ 妫�绱�
+ </button>
</lightning-layout-item>
</template>
-
</lightning-layout>
</div>
@@ -525,13 +904,25 @@
<div style="padding: 7px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
- <lightning-datatable key-field="Id" data={outboundData} columns={outboundColumns}
- hide-checkbox-column={hideCheckbox} onrowselection={getSelectedRows}
- selected-rows={selectedRows} class="wrapped-header-datatable" data-field="outbound">
+ <lightning-datatable
+ key-field="Id"
+ data={outboundData}
+ columns={outboundColumns}
+ hide-checkbox-column={hideCheckbox}
+ onrowselection={getSelectedRows}
+ selected-rows={selectedRows}
+ class="wrapped-header-datatable"
+ data-field="outbound"
+ >
</lightning-datatable>
- <lightning-datatable key-field="id" data={outboundDataSumPrice}
- columns={outboundColumns} hide-checkbox-column hide-table-header
- class="wrapped-header-datatable">
+ <lightning-datatable
+ key-field="id"
+ data={outboundDataSumPrice}
+ columns={outboundColumns}
+ hide-checkbox-column
+ hide-table-header
+ class="wrapped-header-datatable"
+ >
</lightning-datatable>
</div>
</div>
@@ -541,7 +932,9 @@
<div class="borderCss">
<div class="headerDorderCss">
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
<strong>鍙戠エ鏄庣粏</strong>
</p>
@@ -551,9 +944,13 @@
<div style="padding: 7px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
- <lightning-datatable key-field="id" data={invoiceOrderdetail1Recoeds}
- columns={invoiceDetailsColumns} hide-checkbox-column
- class="wrapped-header-datatable">
+ <lightning-datatable
+ key-field="id"
+ data={invoiceOrderdetail1Recoeds}
+ columns={invoiceDetailsColumns}
+ hide-checkbox-column
+ class="wrapped-header-datatable"
+ >
</lightning-datatable>
</div>
</div>
@@ -610,21 +1007,25 @@
<template if:true={isConInvoiceList}>
<div class="outerBorderCss">
- <div style="padding:5px;">
+ <div style="padding: 5px">
<!-- 鏂板缓鍙戠エ -->
<div class="borderCss">
- <div style="padding:15px;">
+ <div style="padding: 15px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
<!-- <lightning-button label="鏂板缓鍙戠エ" onclick={newInvoiceJs}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={newInvoiceJs}>鏂板缓鍙戠エ</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ onclick={newInvoiceJs}
+ >
+ 鏂板缓鍙戠エ
+ </button>
</div>
</div>
</div>
<!-- 妫�绱㈡潯浠� -->
- <div class="borderCss" style="margin-top: 5px;">
+ <div class="borderCss" style="margin-top: 5px">
<div class="headerDorderCss">
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -637,77 +1038,150 @@
<div style="padding: 15px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
-
<lightning-layout multiple-rows>
<lightning-layout-item flexibility="auto">
<div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label ">鍑哄簱鏃� 浠�</div>
- <lightning-input type="date" variant="label-hidden" label="鍑哄簱鏃� 浠�"
- onchange={dataChange} data-field="deliveryFromDate"
- value={deliveryFromDate} class="inputFont"></lightning-input>
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ >
+ 鍑哄簱鏃� 浠�
+ </div>
+ <lightning-input
+ type="date"
+ variant="label-hidden"
+ label="鍑哄簱鏃� 浠�"
+ onchange={dataChange}
+ data-field="deliveryFromDate"
+ value={deliveryFromDate}
+ class="inputFont"
+ style="max-width: 150px"
+ ></lightning-input>
</div>
- </br>
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label ">    鍒�
+ <!-- </br> -->
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ >
+     鍒�
</div>
- <lightning-input type="date" variant="label-hidden" label="鍒�"
- onchange={dataChange} data-field="deliveryToDate"
- value={deliveryToDate} class="inputFont"></lightning-input>
+ <lightning-input
+ type="date"
+ variant="label-hidden"
+ label="鍒�"
+ onchange={dataChange}
+ data-field="deliveryToDate"
+ value={deliveryToDate}
+ class="inputFont"
+ style="max-width: 150px"
+ ></lightning-input>
</div>
</div>
</lightning-layout-item>
<lightning-layout-item flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label ">鍙戠エ鍙�</div>
- <lightning-input variant="label-hidden" label="鍙戠エ鍙�" onchange={dataChange}
- data-field="category1" value={category1}
- class="inputFont"></lightning-input>
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ >
+ 鍙戠エ鍙�
+ </div>
+ <lightning-input
+ variant="label-hidden"
+ label="鍙戠エ鍙�"
+ onchange={dataChange}
+ data-field="category1"
+ value={category1}
+ class="inputFont"
+ style="max-width: 150px"
+ ></lightning-input>
</div>
</lightning-layout-item>
<lightning-layout-item flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label ">瀹㈡埛鍚�</div>
- <lightning-input variant="label-hidden" label="瀹㈡埛鍚�" onchange={dataChange}
- data-field="category2" value={category2}
- class="inputFont"></lightning-input>
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ >
+ 瀹㈡埛鍚�
+ </div>
+ <lightning-input
+ variant="label-hidden"
+ label="瀹㈡埛鍚�"
+ onchange={dataChange}
+ data-field="category2"
+ value={category2}
+ class="inputFont"
+ style="max-width: 150px"
+ ></lightning-input>
</div>
</lightning-layout-item>
<lightning-layout-item flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label ">鐘舵��</div>
- <lightning-combobox data-field="invoiceStatus" name="invoiceStatus"
- label="鐘舵��" value={invoiceStatusValue} placeholder="璇烽�夋嫨..."
- options={Options} variant="label-hidden" onchange={dataChange}
- style="min-width: 100px;" class="inputFont"></lightning-combobox>
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ >
+ 鐘舵��
+ </div>
+ <lightning-combobox
+ data-field="invoiceStatus"
+ name="invoiceStatus"
+ label="鐘舵��"
+ value={invoiceStatusValue}
+ placeholder="璇烽�夋嫨..."
+ options={Options}
+ variant="label-hidden"
+ onchange={dataChange}
+ style="
+ min-width: 100px;
+ max-width: 200px;
+ "
+ class="inputFont"
+ ></lightning-combobox>
</div>
</lightning-layout-item>
<lightning-layout-item flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <!-- <lightning-button label="妫�绱�"
- onclick={invoiceCodeSearchJs}></lightning-button> -->
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
<button
class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
- onclick={invoiceCodeSearchJs}>妫�绱�</button>
+ onclick={invoiceCodeSearchJs}
+ style="max-width: 110px"
+ >
+ 妫�绱�
+ </button>
</div>
</lightning-layout-item>
<lightning-layout-item flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <!-- <lightning-button label="娓呯┖" onclick={ClearJs}></lightning-button> -->
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
<button
class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
- onclick={ClearJs}>娓呯┖</button>
+ onclick={ClearJs}
+ style="max-width: 110px"
+ >
+ 娓呯┖
+ </button>
</div>
</lightning-layout-item>
</lightning-layout>
-
</div>
</div>
</div>
<!-- 鍙戠エ涓�瑙� -->
- <div class="borderCss" style="margin-top: 5px;">
+ <div class="borderCss" style="margin-top: 5px">
<div class="headerDorderCss">
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -720,8 +1194,13 @@
<div style="padding: 7px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
- <lightning-datatable key-field="id" data={invoiceData} columns={invoiceColumns}
- hide-checkbox-column="true" class="wrapped-header-datatable">
+ <lightning-datatable
+ key-field="id"
+ data={invoiceData}
+ columns={invoiceColumns}
+ hide-checkbox-column="true"
+ class="wrapped-header-datatable"
+ >
</lightning-datatable>
</div>
</div>
@@ -733,21 +1212,25 @@
<template if:true={isDetailsShow}>
<div class="outerBorderCss">
- <div style="padding:5px;">
+ <div style="padding: 5px">
<!-- 纭畾 -->
<div class="borderCss">
- <div style="padding:10px;">
+ <div style="padding: 10px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
<!-- <lightning-button label="纭畾" onclick={detailsSaveJs}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={detailsSaveJs}>纭畾</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ onclick={detailsSaveJs}
+ >
+ 纭畾
+ </button>
</div>
</div>
</div>
<!-- 鍙戠エ淇℃伅 -->
- <div class="borderCss" style="margin-top: 5px;">
+ <div class="borderCss" style="margin-top: 5px">
<div class="headerDorderCss">
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -760,26 +1243,43 @@
<div style="padding: 7px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
- <lightning-record-edit-form object-api-name="Consumable_order__c"
- record-id={detailsInvoiceId} onload={handleLoad2}>
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={detailsInvoiceId}
+ onload={handleLoad2}
+ >
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="2"></lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-output-field field-name="Name"></lightning-output-field>
- </lightning-layout-item>
- </lightning-layout>
- <lightning-layout multiple-rows="true">
- <lightning-layout-item size="2"></lightning-layout-item>
- <lightning-layout-item size="4" class="hehe-layoutItem">
- <lightning-output-field field-name="ShipmentAccount__c"
- class="hideHelpText"></lightning-output-field>
- </lightning-layout-item>
- </lightning-layout>
- <lightning-layout multiple-rows="true">
- <lightning-layout-item size="2"></lightning-layout-item>
- <lightning-layout-item size="4">
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
+ <lightning-layout-item size="5">
<lightning-output-field
- field-name="Order_ForCustomerText__c"></lightning-output-field>
+ field-name="Name"
+ ></lightning-output-field>
+ </lightning-layout-item>
+ </lightning-layout>
+ <lightning-layout multiple-rows="true">
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
+ <lightning-layout-item
+ size="5"
+ class="hehe-layoutItem"
+ >
+ <lightning-output-field
+ field-name="ShipmentAccount__c"
+ class="hideHelpText"
+ ></lightning-output-field>
+ </lightning-layout-item>
+ </lightning-layout>
+ <lightning-layout multiple-rows="true">
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
+ <lightning-layout-item size="5">
+ <lightning-output-field
+ field-name="Order_ForCustomerText__c"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
</lightning-record-edit-form>
@@ -788,7 +1288,7 @@
</div>
<!-- 鍑哄簱鍗� -->
- <div class="borderCss" style="margin-top: 5px;">
+ <div class="borderCss" style="margin-top: 5px">
<div class="headerDorderCss">
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -801,17 +1301,28 @@
<div style="padding: 7px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
- <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={detailsCocId}>
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={detailsCocId}
+ >
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="2"></lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-output-field field-name="Name"></lightning-output-field>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
+ <lightning-layout-item size="5">
+ <lightning-output-field
+ field-name="Name"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="2"></lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-output-field field-name="Outbound_Date__c"></lightning-output-field>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
+ <lightning-layout-item size="5">
+ <lightning-output-field
+ field-name="Outbound_Date__c"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
</lightning-record-edit-form>
@@ -820,7 +1331,7 @@
</div>
<!-- 鍑哄簱鍗曟槑缁� -->
- <div class="borderCss" style="margin-top: 5px;">
+ <div class="borderCss" style="margin-top: 5px">
<div class="headerDorderCss">
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -836,14 +1347,29 @@
<!-- <lightning-datatable class="datatabel slds-border_top" key-field="id"
data={detaisData} columns={detailsColumns}>
</lightning-datatable> -->
- <c-lex-custom-lightning-datatable key-field="Id" data={detailsData} columns={detailsColumns}
- onunitchange={handleUnitChange} onshipmentnumber={handleShipmentNumber}
- onrowselection={detailsGetSelectedRows} selected-rows={detailsSelectedRows}
- style="word-wrap:break-word; word-break:break-all; " class="wrapped-header-datatable">
+ <c-lex-custom-lightning-datatable
+ key-field="Id"
+ data={detailsData}
+ columns={detailsColumns}
+ onunitchange={handleUnitChange}
+ onshipmentnumber={handleShipmentNumber}
+ onrowselection={detailsGetSelectedRows}
+ selected-rows={detailsSelectedRows}
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ class="wrapped-header-datatable"
+ >
</c-lex-custom-lightning-datatable>
- <lightning-datatable class="datatabel slds-border_top wrapped-header-datatable"
- key-field="id" data={invoiceAllpriceData} columns={detailsColumns} hide-checkbox-column
- hide-table-header>
+ <lightning-datatable
+ class="datatabel slds-border_top wrapped-header-datatable"
+ key-field="id"
+ data={invoiceAllpriceData}
+ columns={detailsColumns}
+ hide-checkbox-column
+ hide-table-header
+ >
</lightning-datatable>
</div>
</div>
@@ -851,5 +1377,4 @@
</div>
</div>
</template>
-
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js
index 0c4122c..7a4f259 100644
--- a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js
+++ b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js
@@ -1,285 +1,293 @@
import { LightningElement, api, track, wire } from 'lwc';
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import init from "@salesforce/apex/LexConInvoiceViewController.init";
-import save from "@salesforce/apex/LexConInvoiceViewController.save";
-import saveFile from "@salesforce/apex/LexConInvoiceViewController.saveFile";
-import saveAttachment from "@salesforce/apex/LexConInvoiceViewController.saveAttachment";
-import InvoiceorderSearch from "@salesforce/apex/LexConInvoiceViewController.InvoiceorderSearch";
-import deleteButton from "@salesforce/apex/LexConInvoiceViewController.deleteButton";
-import approval from "@salesforce/apex/LexConInvoiceViewController.approval";
-import conInvoiceListInit from "@salesforce/apex/LexConInvoiceList.init";
-import invoiceCodeSearch from "@salesforce/apex/LexConInvoiceList.invoiceCodeSearch";
-import hospitalInit from "@salesforce/apex/lexSearchAgencyHospitalController.init";
-import serContact from "@salesforce/apex/lexSearchAgencyHospitalController.serContact";
-import detailsInit from "@salesforce/apex/LexConInvoicedetailsController.init";
-import detailsSave from "@salesforce/apex/LexConInvoicedetailsController.save";
-import deleteAtt from '@salesforce/apex/LexConsumableController.deleteAtt';
-import { NavigationMixin } from "lightning/navigation";
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init from '@salesforce/apex/LexConInvoiceViewController.init';
+import save from '@salesforce/apex/LexConInvoiceViewController.save';
+import saveFile from '@salesforce/apex/LexConInvoiceViewController.saveFile';
+import saveAttachment from '@salesforce/apex/LexConInvoiceViewController.saveAttachment';
+import InvoiceorderSearch from '@salesforce/apex/LexConInvoiceViewController.InvoiceorderSearch';
+import deleteButton from '@salesforce/apex/LexConInvoiceViewController.deleteButton';
+import approval from '@salesforce/apex/LexConInvoiceViewController.approval';
+import conInvoiceListInit from '@salesforce/apex/LexConInvoiceList.init';
+import invoiceCodeSearch from '@salesforce/apex/LexConInvoiceList.invoiceCodeSearch';
+import hospitalInit from '@salesforce/apex/lexSearchAgencyHospitalController.init';
+import serContact from '@salesforce/apex/lexSearchAgencyHospitalController.serContact';
+import detailsInit from '@salesforce/apex/LexConInvoicedetailsController.init';
+import detailsSave from '@salesforce/apex/LexConInvoicedetailsController.save';
+import deleteAtt from '@salesforce/apex/LexSummonsCreatController.deleteAtt';
+import { NavigationMixin } from 'lightning/navigation';
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
import LexConInvoiceViewReport from '@salesforce/label/c.LexConInvoiceViewReport';
const hospitalColumns = [
{
- label: "鍖婚櫌鍚嶇О",
- fieldName: "Name",
- initialWidth: 400,
- hideDefaultActions: true,
- wrapText: true,
- },
- {
- label: "鐪佷唤",
- fieldName: "stateMasterName",
- hideDefaultActions: true,
- },
- {
- label: "閫夋嫨",
- fieldName: "Id1",
- type: "button",
+ label: '',
+ fieldName: 'Id1',
+ type: 'button',
+ initialWidth: 90,
hideDefaultActions: true,
typeAttributes: {
- label: "閫夋嫨",
- name: "Id2",
- size: 1,
- },
+ label: '閫夋嫨',
+ name: 'Id2',
+ size: 1
+ }
},
+ {
+ label: '鍖婚櫌鍚嶇О',
+ fieldName: 'Name',
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '鐪佷唤',
+ fieldName: 'stateMasterName',
+ hideDefaultActions: true
+ }
];
const invoiceDetailsColumns = [
{
- label: "鍑哄簱鏃ユ湡",
- fieldName: "esdetProductOutDate",
+ label: '鍑哄簱鏃ユ湡',
+ fieldName: 'esdetProductOutDate',
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "鍑哄簱鍗曠紪鐮�",
- fieldName: "esdetInvoicedet1ODlinkName",
+ label: '鍑哄簱鍗曠紪鐮�',
+ fieldName: 'esdetInvoicedet1ODlinkName',
wrapText: true,
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "浜у搧鍨嬪彿",
- fieldName: "esdetAssetModelNo",
+ label: '浜у搧鍨嬪彿',
+ fieldName: 'esdetAssetModelNo',
hideDefaultActions: true,
wrapText: true,
- initialWidth: 400,
+ initialWidth: 400
},
{
- label: "鍗曚綅",
- fieldName: "esdetInvoiceUnit",
+ label: '鍗曚綅',
+ fieldName: 'esdetInvoiceUnit',
hideDefaultActions: true,
wrapText: true,
- initialWidth: 50,
+ initialWidth: 50
},
{
- label: "鍙戠エ鍗曚环",
- fieldName: "esdetInvoiceUnitprice",
+ label: '鍙戠エ鍗曚环',
+ fieldName: 'esdetInvoiceUnitprice',
hideDefaultActions: true,
wrapText: true,
- type: "number",
+ type: 'number',
typeAttributes: {
- minimumFractionDigits: 2,
- },
+ minimumFractionDigits: 2
+ }
},
{
- label: "鍙戠エ鏁伴噺",
- fieldName: "esdetInvoicedCount",
+ label: '鍙戠エ鏁伴噺',
+ fieldName: 'esdetInvoicedCount',
cellAttributes: { alignment: 'right' },
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
- fieldName: "esdetInvoicedProCostRMB",
+ label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
+ fieldName: 'esdetInvoicedProCostRMB',
hideDefaultActions: true,
wrapText: true,
cellAttributes: { alignment: 'right' },
- type: "number",
+ initialWidth: 145,
+ type: 'number',
typeAttributes: {
- minimumFractionDigits: 2,
- },
- },
+ minimumFractionDigits: 2
+ }
+ }
];
const invoiceColumns = [
{
- label: "鍙戠エ鏃ユ湡",
- fieldName: "Invoice_Date__c",
+ label: '鍙戠エ鏃ユ湡',
+ fieldName: 'Invoice_Date__c',
hideDefaultActions: true,
initialWidth: 150
},
{
- label: "鍙戠エ鍙�",
+ label: '鍙戠エ鍙�',
type: 'url',
- fieldName: "NameUrl",
+ fieldName: 'NameUrl',
typeAttributes: {
- label: { fieldName: "Name" },
+ label: { fieldName: 'Name' }
},
- hideDefaultActions: true,
+ hideDefaultActions: true
},
{
- label: "瀹㈡埛鍚�",
- fieldName: "ShipmentAccount__c",
+ label: '瀹㈡埛鍚�',
+ fieldName: 'ShipmentAccount__c',
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "鍙戠エ鐘舵��",
- fieldName: "Invoice_status__c",
+ label: '鍙戠エ鐘舵��',
+ fieldName: 'Invoice_status__c',
hideDefaultActions: true,
initialWidth: 100
},
{
- label: "鍙戠エ璐﹂潰閲戦(鍏�)",
- fieldName: "Invoice_total_amount__c",
+ label: '鍙戠エ璐﹂潰閲戦(鍏�)',
+ fieldName: 'Invoice_total_amount__c',
hideDefaultActions: true,
- type: "number",
+ type: 'number',
typeAttributes: {
- minimumFractionDigits: 2,
+ minimumFractionDigits: 2
},
initialWidth: 180
},
{
- label: "鍙戠エ闄勪欢",
- fieldName: "Invoice_attachment__c",
+ label: '鍙戠エ闄勪欢',
+ fieldName: 'Invoice_attachment__c',
type: 'boolean',
hideDefaultActions: true,
initialWidth: 120
},
{
- label: "鍙戠エ鏄庣粏闄勪欢",
- fieldName: "Invoicedet_attachment__c",
+ label: '鍙戠エ鏄庣粏闄勪欢',
+ fieldName: 'Invoicedet_attachment__c',
type: 'boolean',
hideDefaultActions: true,
initialWidth: 120
- },
+ }
];
const detailsColumns = [
{
- label: "浜у搧鍨嬪彿",
- fieldName: "esdAssetModelNo",
+ label: '浜у搧鍨嬪彿',
+ fieldName: 'esdAssetModelNo',
hideDefaultActions: true,
- wrapText: true,
+ initialWidth: 150,
+ wrapText: true
},
{
- label: "瑙勬牸",
- fieldName: "packingListManual",
+ label: '瑙勬牸',
+ fieldName: 'packingListManual',
hideDefaultActions: true,
- initialWidth: 30
+ initialWidth: 50
},
{
- label: "鍑鸿揣鍗曚环(鍏�)",
- fieldName: "esdDeliveryListRMB",
+ label: '鍑鸿揣鍗曚环(鍏�)',
+ fieldName: 'esdDeliveryListRMB',
hideDefaultActions: true,
- type: "number",
+ initialWidth: 100,
+ type: 'number',
typeAttributes: {
- minimumFractionDigits: 2,
- },
+ minimumFractionDigits: 2
+ }
},
{
- label: "鍑鸿揣鏁伴噺",
- fieldName: "esdShipmentCount",
- hideDefaultActions: true,
+ label: '鍑鸿揣鏁伴噺',
+ fieldName: 'esdShipmentCount',
+ hideDefaultActions: true
},
{
- label: "杩斿搧鏁伴噺",
- fieldName: "esdRrturnProCount",
- hideDefaultActions: true,
+ label: '杩斿搧鏁伴噺',
+ fieldName: 'esdRrturnProCount',
+ hideDefaultActions: true
},
{
- label: "鍑哄簱鍗曚綅",
- fieldName: "esdBoxPiece",
- hideDefaultActions: true,
+ label: '鍑哄簱鍗曚綅',
+ fieldName: 'esdBoxPiece',
+ hideDefaultActions: true
},
{
- label: "宸插彂绁ㄦ暟閲�",
- fieldName: "esdInvoicedProcount",
+ label: '宸插彂绁ㄦ暟閲�',
+ fieldName: 'esdInvoicedProcount',
hideDefaultActions: true,
- type: "number",
+ type: 'number',
typeAttributes: {
- minimumFractionDigits: 2,
- },
+ minimumFractionDigits: 2
+ }
},
{
- label: "杩樻病鍙戠エ鏁伴噺",
- fieldName: "esdInvoiceProNotCount",
+ label: '杩樻病鍙戠エ鏁伴噺',
+ fieldName: 'esdInvoiceProNotCount',
hideDefaultActions: true,
- type: "number",
+ initialWidth: 100,
+ type: 'number',
typeAttributes: {
- minimumFractionDigits: 2,
- },
+ minimumFractionDigits: 2
+ }
},
{
- label: "寮�绁ㄥ崟浣�",
+ label: '寮�绁ㄥ崟浣�',
hideDefaultActions: true,
- type: "customUnit",
+ type: 'customUnit',
typeAttributes: {
- unitValue: { fieldName: "unitValue" },
- unitOptions: { fieldName: "unitOptions" },
- recordId: { fieldName: "recordId" },
- isDisabled: { fieldName: "isDisabled" },
- },
+ unitValue: { fieldName: 'unitValue' },
+ unitOptions: { fieldName: 'unitOptions' },
+ recordId: { fieldName: 'recordId' },
+ isDisabled: { fieldName: 'isDisabled' }
+ }
},
{
- label: "鍙戠エ鍗曚环",
- fieldName: "esdInvoiceUnitprice",
+ label: '鍙戠エ鍗曚环',
+ fieldName: 'esdInvoiceUnitprice',
hideDefaultActions: true,
- type: "number",
+ type: 'number',
typeAttributes: {
- minimumFractionDigits: 2,
+ minimumFractionDigits: 2
},
initialWidth: 130
},
{
- label: "鍙戠エ鏁伴噺",
+ label: '鍙戠エ鏁伴噺',
//fieldName: "invoiceCount",
hideDefaultActions: true,
- type: "customShipment",
+ type: 'customShipment',
cellAttributes: { alignment: 'right' },
typeAttributes: {
- recordId: { fieldName: "recordId" },
- shipmentNumber: { fieldName: "shipmentNumber" },
- },
+ recordId: { fieldName: 'recordId' },
+ shipmentNumber: { fieldName: 'shipmentNumber' },
+ isConinvoice: { fieldName: 'isConinvoice' },
+ esdInvoiceProNotCount: { fieldName: 'esdInvoiceProNotCount' }
+ }
},
{
- label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
+ label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
cellAttributes: { alignment: 'right' },
- fieldName: "invoiceAllprice",
+ fieldName: 'invoiceAllprice',
hideDefaultActions: true,
- type: "number",
+ type: 'number',
+ initialWidth: 150,
typeAttributes: {
- minimumFractionDigits: 2,
- },
- },
-]
+ minimumFractionDigits: 2
+ }
+ }
+];
const customLabel = {
LexConInvoiceViewReport
-}
-export default class LexConInvoiceView extends NavigationMixin(LightningElement) {
-
- @track label=customLabel;
+};
+export default class LexConInvoiceView extends NavigationMixin(
+ LightningElement
+) {
+ @track label = customLabel;
invoiceColumns = invoiceColumns;
detailsColumns = detailsColumns;
@track outboundColumns = [
{
- label: "鍑哄簱鏃ユ湡",
- fieldName: "esdOutboundDate",
+ label: '鍑哄簱鏃ユ湡',
+ fieldName: 'esdOutboundDate',
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "鍑哄簱鍗曠紪鐮�",
- fieldName: "esdNameUrl",
+ label: '鍑哄簱鍗曠紪鐮�',
+ fieldName: 'esdNameUrl',
type: 'url',
typeAttributes: {
- label: { fieldName: "esdName" },
- target: "_blank",
+ label: { fieldName: 'esdName' },
+ target: '_blank'
},
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
}
- ]
+ ];
@track outboundData = [];
@track outboundDataSumPrice = [];
@track invoiceData = [];
@@ -296,7 +304,7 @@
@track coc = {};
@track EditAble = false;
@track isChange = false;
- @track sumPrice = 0.00;
+ @track sumPrice = 0.0;
@track OrderCode = '';
@track ExistOutbound = false;
@track reopen = '';
@@ -308,7 +316,7 @@
@track detailsInvoiceId = '';
@track detailsCocId = '';
@track detailsData = [];
- @track invoiceAllprice = 0.00;
+ @track invoiceAllprice = 0.0;
//鐘舵��
@track invoiceStatusValue = '';
@track invoiceStatusOptions = [];
@@ -332,9 +340,9 @@
@track secondaryDistributor = '';
//瀹㈡埛鍚�
@track isModalOpen = false;
- @track HospitalName = "";
- @track HospitalInfo = "";
- @track searchHospitalName = "";
+ @track HospitalName = '';
+ @track HospitalInfo = '';
+ @track searchHospitalName = '';
@track isDisabledHospitalName = false;
@track agencyProType = '';
@track accountid = '';
@@ -369,47 +377,51 @@
//鏂囦欢涓婁紶
@track showLoadingSpinner = false;
- @track UploadFile = "Upload File";
- @track fileName = "";
+ @track showPopSpinner = false;
+ @track UploadFile = 'Upload File';
+ @track fileName = '';
@track fileData = [];
@track fileColumns = [
{
- label: "鏍囬",
- fieldName: "url",
- type: "url",
- typeAttributes: { label: { fieldName: "Title" }, target: "_blank" },
- hideDefaultActions: true,
+ label: '鏍囬',
+ fieldName: 'url',
+ type: 'url',
+ typeAttributes: { label: { fieldName: 'Title' }, target: '_blank' },
+ hideDefaultActions: true
},
{
- label: "鍒涘缓浜�",
- type: "url",
- fieldName: "CreatedByNameUrl",
- typeAttributes: { label: { fieldName: "CreatedByName" }, target: "_blank" },
- hideDefaultActions: true,
+ label: '鍒涘缓浜�',
+ type: 'url',
+ fieldName: 'CreatedByNameUrl',
+ typeAttributes: {
+ label: { fieldName: 'CreatedByName' },
+ target: '_blank'
+ },
+ hideDefaultActions: true
},
{
- label: "涓婁紶鏃ユ湡",
+ label: '涓婁紶鏃ユ湡',
type: 'date',
typeAttributes: {
- year: "numeric",
- month: "long",
- day: "2-digit",
- hour: "2-digit",
- minute: "2-digit"
+ year: 'numeric',
+ month: 'long',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit'
},
- fieldName: "CreatedDate",
- hideDefaultActions: true,
+ fieldName: 'CreatedDate',
+ hideDefaultActions: true
},
{
- label: "闄勪欢绫诲瀷",
- type: "customAttachmentType",
+ label: '闄勪欢绫诲瀷',
+ type: 'customAttachmentType',
typeAttributes: {
- typeValue: { fieldName: "typeValue" },
- typeOptions: { fieldName: "typeOptions" },
- recordId: { fieldName: "recordId" },
- isDisabledAttachment: { fieldName: "isDisabledAttachment" },
+ typeValue: { fieldName: 'typeValue' },
+ typeOptions: { fieldName: 'typeOptions' },
+ recordId: { fieldName: 'recordId' },
+ isDisabledAttachment: { fieldName: 'isDisabledAttachment' }
},
- hideDefaultActions: true,
+ hideDefaultActions: true
},
{
label: '',
@@ -422,7 +434,7 @@
},
initialWidth: 50,
hideDefaultActions: true
- },
+ }
];
filesUploaded = [];
fileContents;
@@ -435,19 +447,19 @@
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
//鑾峰彇閾炬帴鍙傛暟
getQueryString(name) {
- console.log("getQueryString name " + name);
- let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+ console.log('getQueryString name ' + name);
+ let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]);
@@ -461,120 +473,178 @@
init() {
this.isShowSpinner = true;
- this.deliveryId = this.getQueryString("deliveryId");
- this.deliveryId = this.deliveryId == null ? "" : this.deliveryId;
- this.invoiceId = this.getQueryString("invoiceId");
- this.invoiceId = this.invoiceId == null ? "" : this.invoiceId;
- this.orderId = this.getQueryString("orderId");
- this.orderId = this.orderId == null ? "" : this.orderId;
- this.statusEdit = this.getQueryString("KeyWords");
- this.statusEdit = this.statusEdit == null ? "" : this.statusEdit;
- this.reopen = this.getQueryString("reopen");
- this.reopen = this.reopen == null ? "" : this.reopen;
- this.isNew = this.getQueryString("isNew");
- this.isNew = this.isNew == null ? "" : this.isNew;
- console.log('this.deliveryId = ' + this.deliveryId + ' this.invoiceId = ' + this.invoiceId + ' this.statusEdit = ' + this.statusEdit);
+ this.deliveryId = this.getQueryString('deliveryId');
+ this.deliveryId = this.deliveryId == null ? '' : this.deliveryId;
+ this.invoiceId = this.getQueryString('invoiceId');
+ this.invoiceId = this.invoiceId == null ? '' : this.invoiceId;
+ this.orderId = this.getQueryString('orderId');
+ this.orderId = this.orderId == null ? '' : this.orderId;
+ this.statusEdit = this.getQueryString('KeyWords');
+ this.statusEdit = this.statusEdit == null ? '' : this.statusEdit;
+ this.reopen = this.getQueryString('reopen');
+ this.reopen = this.reopen == null ? '' : this.reopen;
+ this.isNew = this.getQueryString('isNew');
+ this.isNew = this.isNew == null ? '' : this.isNew;
+ console.log(
+ 'this.deliveryId = ' +
+ this.deliveryId +
+ ' this.invoiceId = ' +
+ this.invoiceId +
+ ' this.statusEdit = ' +
+ this.statusEdit
+ );
if (this.invoiceId != '' && this.orderId != '') {
//杩涘叆coninvoiceDetails
detailsInit({
orderIdLwc: this.orderId,
invoiceIdLwc: this.invoiceId
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- if (r.status == "Success") {
- this.detailsInvoiceId = r.entity.invoicecode.Id;
- this.detailsCocId = r.entity.coc.Id;
- this.detailsData = r.entity.consumableorderdetails1Records;
- for (var i in this.detailsData) {
- this.detailsData[i]['Id'] = this.detailsData[i].esd.Id;
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.detailsInvoiceId = r.entity.invoicecode.Id;
+ this.detailsCocId = r.entity.coc.Id;
+ this.detailsData =
+ r.entity.consumableorderdetails1Records;
+ for (var i in this.detailsData) {
+ this.detailsData[i]['Id'] =
+ this.detailsData[i].esd.Id;
- this.detailsData[i]['esdAssetModelNo'] = this.detailsData[i].esd.Asset_Model_No__c;
- this.detailsData[i]['packingListManual'] = this.detailsData[i].Packing_list_manual;
- this.detailsData[i]['esdDeliveryListRMB'] = this.detailsData[i].esd.Delivery_List_RMB__c;
- this.detailsData[i]['esdShipmentCount'] = this.detailsData[i].esd.Shipment_Count__c;
- this.detailsData[i]['esdRrturnProCount'] = this.detailsData[i].esd.RrturnPro_count__c;
- this.detailsData[i]['esdBoxPiece'] = this.detailsData[i].esd.Box_Piece__c;
+ this.detailsData[i]['esdAssetModelNo'] =
+ this.detailsData[i].esd.Asset_Model_No__c;
+ this.detailsData[i]['packingListManual'] =
+ this.detailsData[i].Packing_list_manual;
+ this.detailsData[i]['esdDeliveryListRMB'] =
+ this.detailsData[i].esd.Delivery_List_RMB__c;
+ this.detailsData[i]['esdShipmentCount'] =
+ this.detailsData[i].esd.Shipment_Count__c;
+ this.detailsData[i]['esdRrturnProCount'] =
+ this.detailsData[i].esd.RrturnPro_count__c;
+ this.detailsData[i]['esdBoxPiece'] =
+ this.detailsData[i].esd.Box_Piece__c;
- this.detailsData[i]['esdInvoicedProcount'] = this.detailsData[i].esd.Invoiced_Procount__c;
- this.detailsData[i]['esdInvoiceProNotCount'] = this.detailsData[i].esd.InvoiceProNot_count__c;
- //寮�绁ㄥ崟浣�
- //this.detailsData[i].esd.Box_Piece__c
- //this.detailsData[i]['unitValue'] = this.detailsData[i].esd.Invoice_Unit__c;
- this.detailsData[i]['unitValue'] = this.detailsData[i].esd.Box_Piece__c;
- console.log('unitValue = ' + this.detailsData[i]['unitValue']);
- this.detailsData[i]['recordId'] = this.detailsData[i].esd.Id;
- //disabled="{!IF(records.esd.Box_Piece__c =='涓�' || (records.esd.Box_Piece__c =='鐩�' && records.Packing_list_manual ==1),true,false)}"
- //this.detailsData[i]['isDisabled'] = (this.detailsData[i].esd.Box_Piece__c == '涓�' || (this.detailsData[i].esd.Box_Piece__c =='鐩�' && this.detailsData[i].Packing_list_manual ==1)) ? true:false;
- this.detailsData[i]['isDisabled'] = true;
- let unitOptions = [];
- for (var key in this.detailsData[i].Invoice_UnitOptsMap) {
- let unitOption = {};
- unitOption["label"] = this.detailsData[i].Invoice_UnitOptsMap[key];
- unitOption["value"] = key;
- unitOptions.push(unitOption);
+ this.detailsData[i]['esdInvoicedProcount'] =
+ this.detailsData[i].esd.Invoiced_Procount__c;
+ this.detailsData[i]['esdInvoiceProNotCount'] =
+ this.detailsData[i].esd.InvoiceProNot_count__c;
+ //寮�绁ㄥ崟浣�
+ //this.detailsData[i].esd.Box_Piece__c
+ //this.detailsData[i]['unitValue'] = this.detailsData[i].esd.Invoice_Unit__c;
+ this.detailsData[i]['unitValue'] =
+ this.detailsData[i].esd.Box_Piece__c;
+ console.log(
+ 'unitValue = ' +
+ this.detailsData[i]['unitValue']
+ );
+ this.detailsData[i]['recordId'] =
+ this.detailsData[i].esd.Id;
+ //disabled="{!IF(records.esd.Box_Piece__c =='涓�' || (records.esd.Box_Piece__c =='鐩�' && records.Packing_list_manual ==1),true,false)}"
+ //this.detailsData[i]['isDisabled'] = (this.detailsData[i].esd.Box_Piece__c == '涓�' || (this.detailsData[i].esd.Box_Piece__c =='鐩�' && this.detailsData[i].Packing_list_manual ==1)) ? true:false;
+ this.detailsData[i]['isDisabled'] = true;
+ let unitOptions = [];
+ for (var key in this.detailsData[i]
+ .Invoice_UnitOptsMap) {
+ let unitOption = {};
+ unitOption['label'] =
+ this.detailsData[i].Invoice_UnitOptsMap[
+ key
+ ];
+ unitOption['value'] = key;
+ unitOptions.push(unitOption);
+ }
+ this.detailsData[i]['unitOptions'] = unitOptions;
+ this.detailsData[i]['esdInvoiceUnitprice'] =
+ this.detailsData[i].esd.Invoice_Unitprice__c;
+ //鍙戠エ鏁伴噺
+ this.detailsData[i]['shipmentNumber'] =
+ this.detailsData[i].invoiceCount;
+ this.detailsData[i]['isConinvoice'] = true;
+ this.detailsData[i]['invoiceAllprice'] =
+ this.detailsData[i].invoiceAllprice;
+
+ if (this.detailsData[i].check) {
+ this.detailsSelectedRows.push(
+ this.detailsData[i]['Id']
+ );
+ this.invoiceAllprice +=
+ this.detailsData[i]['invoiceAllprice'];
+ }
}
- this.detailsData[i]["unitOptions"] = unitOptions;
- this.detailsData[i]['esdInvoiceUnitprice'] = this.detailsData[i].esd.Invoice_Unitprice__c;
- //鍙戠エ鏁伴噺
- this.detailsData[i]['shipmentNumber'] = this.detailsData[i].invoiceCount;
- this.detailsData[i]['invoiceAllprice'] = this.detailsData[i].invoiceAllprice;
- if (this.detailsData[i].check) {
- this.detailsSelectedRows.push(this.detailsData[i]['Id']);
- this.invoiceAllprice += this.detailsData[i]['invoiceAllprice'];
- }
+ console.log(
+ 'this.detailsData = ' +
+ JSON.stringify(this.detailsData)
+ );
+
+ let lastInvoiceAllprice = {
+ invoiceAllprice: this.invoiceAllprice
+ };
+ this.invoiceAllpriceData.push(lastInvoiceAllprice);
+ console.log(
+ 'this.invoiceAllpriceData = ' +
+ JSON.stringify(this.invoiceAllpriceData)
+ );
+
+ this.isShowSpinner = false;
+ this.isDetailsShow = true;
+ } else {
+ this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
}
-
- console.log('this.detailsData = ' + JSON.stringify(this.detailsData));
-
- let lastInvoiceAllprice = {
- invoiceAllprice: this.invoiceAllprice
- }
- this.invoiceAllpriceData.push(lastInvoiceAllprice);
- console.log('this.invoiceAllpriceData = ' + JSON.stringify(this.invoiceAllpriceData))
-
+ })
+ .catch((error) => {
this.isShowSpinner = false;
- this.isDetailsShow = true;
- } else {
- this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
- }
- }).catch((error) => {
- this.isShowSpinner = false;
- console.log("error = " + JSON.stringify(error));
- });
- } else if (this.deliveryId == '' && this.invoiceId == '' && this.isNew == '') {
+ console.log('error = ' + JSON.stringify(error));
+ });
+ } else if (
+ this.deliveryId == '' &&
+ this.invoiceId == '' &&
+ this.isNew == ''
+ ) {
console.log('conInvoiceListInit');
- conInvoiceListInit().then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("conInvoiceListInit r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.ConInvoiceListAccountId = r.entity.accountid;
- this.ConInvoiceListUserWorkLocation = r.entity.userWorkLocation;
+ conInvoiceListInit()
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('conInvoiceListInit r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.ConInvoiceListAccountId = r.entity.accountid;
+ this.ConInvoiceListUserWorkLocation =
+ r.entity.userWorkLocation;
- this.ConInvoiceListAgencyProType = r.entity.agencyProType;
- if (this.ConInvoiceListAgencyProType != 'ET')
+ this.ConInvoiceListAgencyProType =
+ r.entity.agencyProType;
+ //if (this.ConInvoiceListAgencyProType != 'ET')
this.isOpenReportDisabled = false;
- this.invoiceData = r.entity.raesList;
- for (var i in this.invoiceData) {
- this.invoiceData[i]['NameUrl'] = '/lexconinvoiceview?invoiceId=' + this.invoiceData[i].Id;
+ this.invoiceData = r.entity.raesList;
+ for (var i in this.invoiceData) {
+ this.invoiceData[i]['NameUrl'] =
+ '/lexconinvoiceview?invoiceId=' +
+ this.invoiceData[i].Id;
+ }
+ console.log(
+ 'this.invoiceData = ' +
+ JSON.stringify(this.invoiceData)
+ );
+ for (var key in r.entity.statusMap) {
+ let object = {};
+ object['label'] = key;
+ object['value'] = r.entity.statusMap[key];
+ this.invoiceStatusOptions.push(object);
+ }
+ this.invoiceStatusOptions = [
+ ...this.invoiceStatusOptions
+ ];
+ console.log(
+ 'this.invoiceStatusOptions = ' +
+ JSON.stringify(this.invoiceStatusOptions)
+ );
+ this.isShowSpinner = false;
+ } else {
+ this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
}
- console.log("this.invoiceData = " + JSON.stringify(this.invoiceData));
- for (var key in r.entity.statusMap) {
- let object = {};
- object["label"] = key;
- object["value"] = r.entity.statusMap[key];
- this.invoiceStatusOptions.push(object);
- }
- this.invoiceStatusOptions = [...this.invoiceStatusOptions];
- console.log("this.invoiceStatusOptions = " + JSON.stringify(this.invoiceStatusOptions));
- this.isShowSpinner = false;
- } else {
- this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- });
-
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
} else {
console.log('init');
this.isConInvoiceList = false;
@@ -582,225 +652,345 @@
invoiceId: this.invoiceId,
statusEdit: this.statusEdit,
deliveryId: this.deliveryId
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.coc = r.entity.coc;
- this.cocId = this.coc.Id;
- this.EditAble = r.entity.EditAble;
- this.isChange = r.entity.isChange;
- this.ExistOutbound = r.entity.ExistOutbound;
- this.outboundData = r.entity.invoiceOrderRecoeds;
- console.log('this.outboundData = ' + JSON.stringify(this.outboundData))
- this.done = r.entity.done;
- this.accountid = r.entity.accountid;
- this.userWorkLocation = r.entity.userWorkLocation;
- this.outOrderStringListLwc = r.entity.outOrderStringList;
- this.outordercountMapLwc = r.entity.outordercountMap;
- this.invoiceOrderRecoedschange = r.entity.invoiceOrderRecoedschange;
- this.isDisabledEdit = (this.coc.Invoice_status__c == '鎻愪氦' || this.coc.Invoice_status__c == '宸插畬鎴�') ? true : false;
- this.isDisabledReopen = this.coc.Invoice_status__c == '鎻愪氦' ? false : true;
- this.isDisabledDelete = this.coc.Invoice_status__c == '鑽夋涓�' ? false : true;
- this.isDisabledAttachment = this.coc.Invoice_status__c == '宸插畬鎴�' ? true : false;
- this.OrderCode = this.coc.Name;
- this.InvoiceDate = this.coc.Invoice_Date__c;
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.coc = r.entity.coc;
+ this.cocId = this.coc.Id;
+ this.EditAble = r.entity.EditAble;
+ this.isChange = r.entity.isChange;
+ this.ExistOutbound = r.entity.ExistOutbound;
+ this.outboundData = r.entity.invoiceOrderRecoeds;
+ console.log(
+ 'this.outboundData = ' +
+ JSON.stringify(this.outboundData)
+ );
+ this.done = r.entity.done;
+ this.accountid = r.entity.accountid;
+ this.userWorkLocation = r.entity.userWorkLocation;
+ this.outOrderStringListLwc =
+ r.entity.outOrderStringList;
+ this.outordercountMapLwc = r.entity.outordercountMap;
+ this.invoiceOrderRecoedschange =
+ r.entity.invoiceOrderRecoedschange;
+ this.isDisabledEdit =
+ this.coc.Invoice_status__c == '鎻愪氦' ||
+ this.coc.Invoice_status__c == '宸插畬鎴�'
+ ? true
+ : false;
+ this.isDisabledReopen =
+ this.coc.Invoice_status__c == '鎻愪氦' ? false : true;
+ this.isDisabledDelete =
+ this.coc.Invoice_status__c == '鑽夋涓�'
+ ? false
+ : true;
+ this.isDisabledAttachment =
+ this.coc.Invoice_status__c == '宸插畬鎴�'
+ ? true
+ : false;
+ this.OrderCode = this.coc.Name;
+ this.InvoiceDate = this.coc.Invoice_Date__c;
- for (var i in this.outboundData) {
- this.outboundData[i].Id = this.outboundData[i].esd.Id;
- if (this.outboundData[i].check)
- this.selectedRows.push(this.outboundData[i].esd.Id);
- }
- this.selectedRows = [...this.selectedRows];
- console.log('r.entity.attachmentRecoeds = ' + JSON.stringify(r.entity.attachmentRecoeds))
- if (!this.EditAble) {
- //闄勪欢鏄剧ず
- this.showLoadingSpinner = true;
- this.fileData = r.entity.attachmentRecoeds;
- for (var i in this.fileData) {
- this.fileData[i]["Id"] = this.fileData[i].cvInfo.Id;
- this.fileData[i]["recordId"] = this.fileData[i].cvInfo.Id;
- this.fileData[i]["url"] = "/" + this.fileData[i].cvInfo.Id;
- this.fileData[i]["Title"] = this.fileData[i].cvInfo.Title;
- this.fileData[i]["CreatedByName"] = this.fileData[i].cvInfo.Owner.Name;
- this.fileData[i]["CreatedByNameUrl"] = "/" + this.fileData[i].cvInfo.OwnerId;;
- this.fileData[i]["CreatedDate"] = this.fileData[i].cvInfo.CreatedDate;
- this.fileData[i]["attUrl"] = '/' + this.fileData[i].cvInfo.Id;
- this.fileData[i]['downloadUrl'] = '/sfc/servlet.shepherd/document/download/' + this.fileData[i].cvInfo.ContentDocumentId + '?operationContext=S1';
- if (this.isDisabledAttachment) {
- console.log('杩涘叆this.isDisabledAttachment')
- this.fileData[i]["isDisabledAttachment"] = true;
- }
- let typeOptions = [];
- for (var key in this.fileData[i].mailSelectOptsMap) {
- let typeOption = {};
- typeOption["label"] = this.fileData[i].mailSelectOptsMap[key];
- typeOption["value"] = key;
- typeOptions.push(typeOption);
- }
- this.fileData[i]["typeValue"] = this.fileData[i].mailSelectOptsin == null ? typeOptions[0].value : this.fileData[i].mailSelectOptsin;
- this.fileData[i]["typeOptions"] = typeOptions;
- this.fileData[i]["mailSelectOptsin"] = this.fileData[i].mailSelectOptsin == null ? typeOptions[0].value : this.fileData[i].mailSelectOptsin;
+ for (var i in this.outboundData) {
+ this.outboundData[i].Id =
+ this.outboundData[i].esd.Id;
+ if (this.outboundData[i].check)
+ this.selectedRows.push(
+ this.outboundData[i].esd.Id
+ );
}
- console.log('this.fileData = ' + JSON.stringify(this.fileData))
- }
+ this.selectedRows = [...this.selectedRows];
+ console.log(
+ 'r.entity.attachmentRecoeds = ' +
+ JSON.stringify(r.entity.attachmentRecoeds)
+ );
+ if (!this.EditAble) {
+ //闄勪欢鏄剧ず
+ this.showLoadingSpinner = true;
+ this.fileData = r.entity.attachmentRecoeds;
+ for (var i in this.fileData) {
+ this.fileData[i]['Id'] =
+ this.fileData[i].cvInfo.Id;
+ this.fileData[i]['recordId'] =
+ this.fileData[i].cvInfo.Id;
+ this.fileData[i]['url'] =
+ '/' + this.fileData[i].cvInfo.Id;
+ this.fileData[i]['Title'] =
+ this.fileData[i].cvInfo.Title;
+ this.fileData[i]['CreatedByName'] =
+ this.fileData[i].cvInfo.Owner.Name;
+ this.fileData[i]['CreatedByNameUrl'] =
+ '/' + this.fileData[i].cvInfo.OwnerId;
+ this.fileData[i]['CreatedDate'] =
+ this.fileData[i].cvInfo.CreatedDate;
+ this.fileData[i]['attUrl'] =
+ '/' + this.fileData[i].cvInfo.Id;
+ this.fileData[i]['downloadUrl'] =
+ '/sfc/servlet.shepherd/document/download/' +
+ this.fileData[i].cvInfo.ContentDocumentId +
+ '?operationContext=S1';
+ if (this.isDisabledAttachment) {
+ console.log(
+ '杩涘叆this.isDisabledAttachment'
+ );
+ this.fileData[i][
+ 'isDisabledAttachment'
+ ] = true;
+ }
+ let typeOptions = [];
+ for (var key in this.fileData[i]
+ .mailSelectOptsMap) {
+ let typeOption = {};
+ typeOption['label'] =
+ this.fileData[i].mailSelectOptsMap[key];
+ typeOption['value'] = key;
+ typeOptions.push(typeOption);
+ }
+ this.fileData[i]['typeValue'] =
+ this.fileData[i].mailSelectOptsin == null
+ ? typeOptions[0].value
+ : this.fileData[i].mailSelectOptsin;
+ this.fileData[i]['typeOptions'] = typeOptions;
+ this.fileData[i]['mailSelectOptsin'] =
+ this.fileData[i].mailSelectOptsin == null
+ ? typeOptions[0].value
+ : this.fileData[i].mailSelectOptsin;
+ }
+ console.log(
+ 'this.fileData = ' +
+ JSON.stringify(this.fileData)
+ );
+ }
- //鍙戠エ鏄庣粏
- this.invoiceOrderdetail1Recoeds = r.entity.invoiceOrderdetail1Recoeds;
- for (var i in this.invoiceOrderdetail1Recoeds) {
- this.invoiceOrderdetail1Recoeds[i]['esdetProductOutDate'] = this.invoiceOrderdetail1Recoeds[i].esdet.Product_OutDate__c;
- this.invoiceOrderdetail1Recoeds[i]['esdetInvoicedet1ODlinkName'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoicedet1_OD_link__r.Name;
- this.invoiceOrderdetail1Recoeds[i]['esdetAssetModelNo'] = this.invoiceOrderdetail1Recoeds[i].esdet.Asset_Model_No__c;
- this.invoiceOrderdetail1Recoeds[i]['esdetInvoiceUnit'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unit__c;
- this.invoiceOrderdetail1Recoeds[i]['esdetInvoiceUnitprice'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unitprice__c;
- this.invoiceOrderdetail1Recoeds[i]['esdetInvoicedCount'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoiced_Count__c;
- this.invoiceOrderdetail1Recoeds[i]['esdetInvoicedProCostRMB'] = this.invoiceOrderdetail1Recoeds[i].esdet.InvoicedProCost_RMB__c;
- }
- //瀹㈡埛鍚�
- this.HospitalName = r.entity.HospitalName;
- this.HospitalInfo = r.entity.HospitalInfo;
- this.agencyProType = r.entity.agencyProType;
- if (this.agencyProType != 'ET')
+ //鍙戠エ鏄庣粏
+ this.invoiceOrderdetail1Recoeds =
+ r.entity.invoiceOrderdetail1Recoeds;
+ for (var i in this.invoiceOrderdetail1Recoeds) {
+ this.invoiceOrderdetail1Recoeds[i][
+ 'esdetProductOutDate'
+ ] =
+ this.invoiceOrderdetail1Recoeds[
+ i
+ ].esdet.Product_OutDate__c;
+ this.invoiceOrderdetail1Recoeds[i][
+ 'esdetInvoicedet1ODlinkName'
+ ] =
+ this.invoiceOrderdetail1Recoeds[
+ i
+ ].esdet.Invoicedet1_OD_link__r.Name;
+ this.invoiceOrderdetail1Recoeds[i][
+ 'esdetAssetModelNo'
+ ] =
+ this.invoiceOrderdetail1Recoeds[
+ i
+ ].esdet.Asset_Model_No__c;
+ this.invoiceOrderdetail1Recoeds[i][
+ 'esdetInvoiceUnit'
+ ] =
+ this.invoiceOrderdetail1Recoeds[
+ i
+ ].esdet.Invoice_Unit__c;
+ this.invoiceOrderdetail1Recoeds[i][
+ 'esdetInvoiceUnitprice'
+ ] =
+ this.invoiceOrderdetail1Recoeds[
+ i
+ ].esdet.Invoice_Unitprice__c;
+ this.invoiceOrderdetail1Recoeds[i][
+ 'esdetInvoicedCount'
+ ] =
+ this.invoiceOrderdetail1Recoeds[
+ i
+ ].esdet.Invoiced_Count__c;
+ this.invoiceOrderdetail1Recoeds[i][
+ 'esdetInvoicedProCostRMB'
+ ] =
+ this.invoiceOrderdetail1Recoeds[
+ i
+ ].esdet.InvoicedProCost_RMB__c;
+ }
+ //瀹㈡埛鍚�
+ this.HospitalName = r.entity.HospitalName;
+ this.HospitalInfo = r.entity.HospitalInfo;
+ this.agencyProType = r.entity.agencyProType;
+ //if (this.agencyProType != 'ET')
this.isOpenReportDisabled = false;
- //绉戝
- this.ForCustomerText = this.coc.Order_ForCustomerText__c;
- //澶囨敞
- this.InvoiceNote = this.coc.Invoice_Note__c;
- //浜岀骇缁忛攢鍟�
- for (var key in r.entity.provinceOptsMap) {
- let object = {};
- object["label"] = r.entity.provinceOptsMap[key];
- object["value"] = key;
- this.provinceOptsMap.push(object);
- }
- //鍑鸿揣涓�瑙坈olumns
+ //绉戝
+ this.ForCustomerText =
+ this.coc.Order_ForCustomerText__c;
+ //澶囨敞
+ this.InvoiceNote = this.coc.Invoice_Note__c;
+ //浜岀骇缁忛攢鍟�
+ for (var key in r.entity.provinceOptsMap) {
+ let object = {};
+ object['label'] = r.entity.provinceOptsMap[key];
+ object['value'] = key;
+ this.provinceOptsMap.push(object);
+ }
+ //鍑鸿揣涓�瑙坈olumns
-
- if (this.EditAble) {
- let object1 = {
- label: '瀹㈡埛鍚�',
- fieldName: "hospitalName",
- hideDefaultActions: true,
- };
- let object2 = {
- label: '鍑鸿揣閲戦(鍏�)',
- fieldName: "shipmentAmount",
- type: "number",
- typeAttributes: {
- minimumFractionDigits: 2,
- },
- hideDefaultActions: true,
- };
- let object3 = {
- label: '杩斿搧閲戦(鍏�)',
- fieldName: "returnAmount",
- type: "number",
- typeAttributes: {
- minimumFractionDigits: 2,
- },
- hideDefaultActions: true,
- };
- this.outboundColumns.push(object1)
- this.outboundColumns.push(object2)
- this.outboundColumns.push(object3)
- }
- let object4 = {
- label: '鏈彂绁ㄩ噾棰�(鍏�)',
- fieldName: "uninvoicedAmount",
- type: "number",
- typeAttributes: {
- minimumFractionDigits: 2,
- },
- hideDefaultActions: true,
- };
- this.outboundColumns.push(object4)
-
- //鍑鸿揣涓�瑙圖ata
- let index = 0;
- for (var i in this.outboundData) {
- this.outboundData[i]['esdOutboundDate'] = this.outboundData[i].esd.Outbound_Date__c;
- this.outboundData[i]['esdNameUrl'] = '/s/lexsummonscreat?ESetid=' + this.outboundData[i].esd.Id;
- this.outboundData[i]['esdName'] = this.outboundData[i].esd.Name;
if (this.EditAble) {
- this.outboundData[i]['hospitalName'] = this.outboundData[i].esd.ShipmentAccount__c;
- this.outboundData[i]['shipmentAmount'] = this.outboundData[i].esd.Shipment_total_amount__c;
- this.outboundData[i]['returnAmount'] = this.outboundData[i].esd.RrturnPro_total_amount__c;
+ let object1 = {
+ label: '瀹㈡埛鍚�',
+ fieldName: 'hospitalName',
+ hideDefaultActions: true,
+ wrapText: true
+ };
+ let object2 = {
+ label: '鍑鸿揣閲戦(鍏�)',
+ fieldName: 'shipmentAmount',
+ type: 'number',
+ typeAttributes: {
+ minimumFractionDigits: 2
+ },
+ hideDefaultActions: true
+ };
+ let object3 = {
+ label: '杩斿搧閲戦(鍏�)',
+ fieldName: 'returnAmount',
+ type: 'number',
+ typeAttributes: {
+ minimumFractionDigits: 2
+ },
+ hideDefaultActions: true
+ };
+ this.outboundColumns.push(object1);
+ this.outboundColumns.push(object2);
+ this.outboundColumns.push(object3);
}
- this.outboundData[i]['uninvoicedAmount'] = this.outboundData[i].esd.InvoiceNotPro_money__c;
- this.outboundData[i]['invoiceFaceAmount'] = this.keepTwoDecimalStr(this.outboundData[i].needInvoiceCount);
- if (!(this.outboundData[i].esd.Billed_Status__c == '鍏ㄩ儴寮�绁�' || this.EditAble || this.coc.Invoice_status__c != '鑽夋涓�')) {
- console.log('杩涘叆 if')
- let url = "/lexconinvoiceview?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId;
- this.outboundData[i]['invoiceFaceAmountUrl'] = url;
- if (index == 0) {
- let object5 = {
- label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
- cellAttributes: { alignment: 'right' },
- type: 'url',
- fieldName: "invoiceFaceAmountUrl",
- typeAttributes: {
- label: { fieldName: "invoiceFaceAmount" },
- //target: "_blank",
- },
- hideDefaultActions: true,
- };
- this.outboundColumns.push(object5)
- index++;
+ let object4 = {
+ label: '鏈彂绁ㄩ噾棰�(鍏�)',
+ fieldName: 'uninvoicedAmount',
+ type: 'number',
+ typeAttributes: {
+ minimumFractionDigits: 2
+ },
+ hideDefaultActions: true
+ };
+ this.outboundColumns.push(object4);
+
+ //鍑鸿揣涓�瑙圖ata
+ let index = 0;
+ for (var i in this.outboundData) {
+ this.outboundData[i]['esdOutboundDate'] =
+ this.outboundData[i].esd.Outbound_Date__c;
+ this.outboundData[i]['esdNameUrl'] =
+ '/s/lexsummonscreat?ESetid=' +
+ this.outboundData[i].esd.Id;
+ this.outboundData[i]['esdName'] =
+ this.outboundData[i].esd.Name;
+ if (this.EditAble) {
+ this.outboundData[i]['hospitalName'] =
+ this.outboundData[i].esd.ShipmentAccount__c;
+ this.outboundData[i]['shipmentAmount'] =
+ this.outboundData[
+ i
+ ].esd.Shipment_total_amount__c;
+ this.outboundData[i]['returnAmount'] =
+ this.outboundData[
+ i
+ ].esd.RrturnPro_total_amount__c;
}
- } else {
- console.log('杩涘叆 else')
- if (index == 0) {
- let object5 = {
- label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
- cellAttributes: { alignment: 'right' },
- fieldName: "invoiceFaceAmount",
- hideDefaultActions: true,
- type: "number",
- typeAttributes: {
- minimumFractionDigits: 2,
- },
- };
- this.outboundColumns.push(object5)
- index++;
+ this.outboundData[i]['uninvoicedAmount'] =
+ this.outboundData[i].esd.InvoiceNotPro_money__c;
+ this.outboundData[i]['invoiceFaceAmount'] =
+ this.keepTwoDecimalStr(
+ this.outboundData[i].needInvoiceCount
+ );
+ if (
+ !(
+ this.outboundData[i].esd.Billed_Status__c ==
+ '鍏ㄩ儴寮�绁�' ||
+ this.EditAble ||
+ this.coc.Invoice_status__c != '鑽夋涓�'
+ )
+ ) {
+ console.log('杩涘叆 if');
+ let url =
+ '/lexconinvoiceview?orderId=' +
+ this.outboundData[i].esd.Id +
+ '&invoiceId=' +
+ this.invoiceId;
+ this.outboundData[i]['invoiceFaceAmountUrl'] =
+ url;
+ if (index == 0) {
+ let object5 = {
+ label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
+ cellAttributes: { alignment: 'right' },
+ type: 'url',
+ fieldName: 'invoiceFaceAmountUrl',
+ typeAttributes: {
+ label: {
+ fieldName: 'invoiceFaceAmount'
+ }
+ //target: "_blank",
+ },
+ hideDefaultActions: true
+ };
+ this.outboundColumns.push(object5);
+ index++;
+ }
+ } else {
+ console.log('杩涘叆 else');
+ if (index == 0) {
+ let object5 = {
+ label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
+ cellAttributes: { alignment: 'right' },
+ fieldName: 'invoiceFaceAmount',
+ hideDefaultActions: true,
+ type: 'number',
+ typeAttributes: {
+ minimumFractionDigits: 2
+ }
+ };
+ this.outboundColumns.push(object5);
+ index++;
+ }
}
+ //璁$畻鍙戠エ绁ㄩ潰閲戦
+ this.sumPrice +=
+ this.outboundData[i].needInvoiceCount;
}
- //璁$畻鍙戠エ绁ㄩ潰閲戦
- this.sumPrice += this.outboundData[i].needInvoiceCount;
- }
- //鍥涜垗浜斿叆
- //this.sumPrice = this.sumPrice.toFixed(2);
- //濡傛灉涓嶅洓鑸嶄簲鍏�
- console.log('start keepTwoDecimalStr')
- this.sumPrice = this.keepTwoDecimalStr(this.sumPrice);
- console.log('end keepTwoDecimalStr = ' + this.sumPrice)
- //鍔犳渶鍚庝竴琛屾樉绀洪噾棰�
- if (this.EditAble) {
- let lastOutboundData = {
- invoiceFaceAmount: this.sumPrice
+ //鍥涜垗浜斿叆
+ //this.sumPrice = this.sumPrice.toFixed(2);
+ //濡傛灉涓嶅洓鑸嶄簲鍏�
+ console.log('start keepTwoDecimalStr');
+ this.sumPrice = this.keepTwoDecimalStr(this.sumPrice);
+ console.log('end keepTwoDecimalStr = ' + this.sumPrice);
+ //鍔犳渶鍚庝竴琛屾樉绀洪噾棰�
+ if (this.EditAble) {
+ let lastOutboundData = {
+ invoiceFaceAmount: this.sumPrice
+ };
+ this.outboundDataSumPrice.push(lastOutboundData);
}
- this.outboundDataSumPrice.push(lastOutboundData);
+ this.outboundColumns = [...this.outboundColumns];
+
+ this.isEditInvoice = !(!this.EditAble || this.isChange);
+ if (
+ this.coc.SummonsForDirction__c == '閿�鍞粰浜岀骇缁忛攢鍟�'
+ )
+ this.isShowSecondaryDistributor = true;
+ if (
+ this.deliveryId == '' &&
+ !this.ExistOutbound &&
+ this.EditAble
+ )
+ this.hideCheckbox = false;
+ this.isShowSpinner = false;
+ this.showLoadingSpinner = false;
+ } else {
+ this.showMyToast('澶辫触', r.msg, 'Error');
}
- this.outboundColumns = [...this.outboundColumns];
-
-
- this.isEditInvoice = !(!this.EditAble || this.isChange);
- if (this.coc.SummonsForDirction__c == '閿�鍞粰浜岀骇缁忛攢鍟�')
- this.isShowSecondaryDistributor = true;
- if (this.deliveryId == '' && !this.ExistOutbound && this.EditAble)
- this.hideCheckbox = false;
- this.isShowSpinner = false;
- this.showLoadingSpinner = false;
- } else {
- this.showMyToast('澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- });
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
}
-
}
-
//涓婁紶閰嶇疆鍗�
uploadOrder(event) {
@@ -829,6 +1019,19 @@
this.fileName = '';
}
+ //鏄惁鏄剧ず闄勪欢绉婚櫎
+ get attDelBtn() {
+ if (
+ this.fileName != '' &&
+ this.fileName != null &&
+ this.fileName != '閫夋嫨涓�涓枃浠朵笂浼�'
+ ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
keepTwoDecimalStr(num) {
const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/));
let s = result.toString();
@@ -841,47 +1044,47 @@
s += '0';
}
return s;
- };
+ }
dataChange(event) {
- let fieldName = event.target.getAttribute("data-field");
+ let fieldName = event.target.getAttribute('data-field');
let value = event.detail.value;
- console.log("fieldName = " + fieldName + " value = " + value);
+ console.log('fieldName = ' + fieldName + ' value = ' + value);
switch (fieldName) {
- case "OrderCode":
+ case 'OrderCode':
this.OrderCode = value;
this.coc['Name'] = value;
break;
- case "ForCustomerText":
+ case 'ForCustomerText':
this.ForCustomerText = value;
this.coc['Order_ForCustomerText__c'] = value;
break;
- case "InvoiceDate":
+ case 'InvoiceDate':
this.InvoiceDate = value;
this.coc['Invoice_Date__c'] = value;
break;
- case "secondaryDistributor":
+ case 'secondaryDistributor':
this.secondaryDistributor = value;
break;
- case "deliveryFromDate":
+ case 'deliveryFromDate':
this.deliveryFromDate = value;
break;
- case "deliveryToDate":
+ case 'deliveryToDate':
this.deliveryToDate = value;
break;
- case "category1":
+ case 'category1':
this.category1 = value;
break;
- case "category2":
+ case 'category2':
this.category2 = value;
break;
- case "invoiceStatus":
+ case 'invoiceStatus':
this.invoiceStatusValue = value;
break;
- case "searchHospitalName":
+ case 'searchHospitalName':
this.searchHospitalName = value;
break;
- case "InvoiceNote":
+ case 'InvoiceNote':
this.InvoiceNote = value;
this.coc['Invoice_Note__c'] = value;
break;
@@ -896,58 +1099,68 @@
//鎼滅储瀹㈡埛鍚�
searchHospitalNameModal() {
- console.log("searchHospitalNameModal");
+ console.log('searchHospitalNameModal');
hospitalInit({
- ctype: this.agencyProType,
+ ctype: this.agencyProType
}).then((r) => {
r = JSON.parse(JSON.stringify(r));
- if (r.status == "Success") {
+ if (r.status == 'Success') {
this.hospitalList = r.entity.at;
for (var i in this.hospitalList) {
- this.hospitalList[i]["stateMasterName"] = this.hospitalList[i].State_Master__r.Name;
+ this.hospitalList[i]['stateMasterName'] =
+ this.hospitalList[i].State_Master__r.Name;
}
- console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
+ console.log(
+ 'hospitalInit r = ' + JSON.stringify(this.hospitalList)
+ );
this.isModalOpen = true;
}
});
}
searchHospital() {
- console.log("this.searchHospitalName = " + this.searchHospitalName);
+ console.log('this.searchHospitalName = ' + this.searchHospitalName);
serContact({
searchName: this.searchHospitalName,
- ctype: this.agencyProType,
+ ctype: this.agencyProType
}).then((r) => {
r = JSON.parse(JSON.stringify(r));
- if (r.status == "Success") {
+ if (r.status == 'Success') {
this.hospitalList = r.entity.at;
for (var i in this.hospitalList) {
- this.hospitalList[i]["stateMasterName"] =
+ this.hospitalList[i]['stateMasterName'] =
this.hospitalList[i].State_Master__r.Name;
}
- console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
+ console.log(
+ 'hospitalInit r = ' + JSON.stringify(this.hospitalList)
+ );
}
});
}
//閫夋嫨瀹㈡埛鍚�
searchHandleRowAction(event) {
- console.log("searchHandleRowAction");
+ console.log('searchHandleRowAction');
let row = event.detail.row;
this.HospitalInfo = row.Id;
this.HospitalName = row.Name;
- console.log("this.HospitalInfo = " + this.HospitalInfo + " this.HospitalName = " + this.HospitalName);
+ console.log(
+ 'this.HospitalInfo = ' +
+ this.HospitalInfo +
+ ' this.HospitalName = ' +
+ this.HospitalName
+ );
this.isModalOpen = false;
}
//褰撳鎴峰悕鏄┖鏃躲�傚鎴穒d涔熷彉涓虹┖
clearAgencyI(event) {
this.HospitalName = event.target.value;
- if (this.HospitalName == "" || this.HospitalName == null) {
- this.HospitalInfo = "";
+ if (this.HospitalName == '' || this.HospitalName == null) {
+ this.HospitalInfo = '';
}
- console.log("this.HospitalName = " + this.HospitalName);
- console.log("this.HospitalInfo = " + this.HospitalInfo);
+ console.log('this.HospitalName = ' + this.HospitalName);
+ console.log('this.HospitalInfo = ' + this.HospitalInfo);
}
closeModal() {
@@ -956,10 +1169,12 @@
SaveJs() {
this.isShowSpinner = true;
- let cloneData = this.outboundData
+ let cloneData = this.outboundData;
- debugger
- const selectedRows = this.template.querySelector("[data-field='outbound']").getSelectedRows();
+ debugger;
+ const selectedRows = this.template
+ .querySelector("[data-field='outbound']")
+ .getSelectedRows();
console.log('selectedRows = ' + JSON.stringify(selectedRows));
for (var i in cloneData) {
@@ -970,7 +1185,7 @@
cloneData[i].check = true;
}
}
- if(!b){
+ if (!b) {
cloneData[i].check = false;
}
delete cloneData[i].esdOutboundDate;
@@ -994,7 +1209,10 @@
console.log('this.accountid = ' + this.accountid);
console.log('this.agencyProType = ' + this.agencyProType);
console.log('this.reopen = ' + this.reopen);
- console.log('this.invoiceOrderRecoedschangeLwc = ' + JSON.stringify(this.invoiceOrderRecoedschange));
+ console.log(
+ 'this.invoiceOrderRecoedschangeLwc = ' +
+ JSON.stringify(this.invoiceOrderRecoedschange)
+ );
save({
cocLwc: this.coc,
HospitalNameLwc: this.HospitalName,
@@ -1006,32 +1224,37 @@
accountidLwc: this.accountid,
agencyProTypeLwc: this.agencyProType,
reopenLwc: this.reopen,
- invoiceOrderRecoedschangeLwc: JSON.stringify(this.invoiceOrderRecoedschange)
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success" && r.msg == '') {
- this.isShowSpinner = false;
- console.log('save success');
- let url = "/lexconinvoiceview?invoiceId=" + r.entity.invoiceId;
- console.log('url = ' + url);
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: url,
- },
- });
- } else {
- this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- });
+ invoiceOrderRecoedschangeLwc: JSON.stringify(
+ this.invoiceOrderRecoedschange
+ )
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success' && r.msg == '') {
+ this.isShowSpinner = false;
+ console.log('save success');
+ let url =
+ '/lexconinvoiceview?invoiceId=' + r.entity.invoiceId;
+ console.log('url = ' + url);
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: url
+ }
+ });
+ } else {
+ this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
}
//涓婁紶闄勪欢锛岀洿鎺ュ氨淇濆瓨濂斤紝鐒跺悗灞曠ず
handleFilesChange(event) {
- console.log("handleFilesChange");
+ console.log('handleFilesChange');
this.handleSave();
// if (event.target.files.length > 0) {
// this.filesUploaded = event.target.files;
@@ -1041,84 +1264,86 @@
}
handleSave() {
- this.isShowSpinner = true;
- console.log("saveFile");
+ console.log('saveFile');
if (this.filesUploaded.length > 0) {
+ this.showPopSpinner = true;
this.file = this.filesUploaded[0];
if (this.file.size > this.MAX_FILE_SIZE) {
this.showMyToast('淇濆瓨澶辫触', '鏂囦欢杩囧ぇ', 'Error');
return;
}
- this.showLoadingSpinner = true;
this.fileReader = new FileReader();
this.fileReader.onloadend = () => {
this.fileContents = this.fileReader.result;
- let base64 = "base64,";
- this.content = this.fileContents.indexOf(base64) + base64.length;
+ let base64 = 'base64,';
+ this.content =
+ this.fileContents.indexOf(base64) + base64.length;
this.fileContents = this.fileContents.substring(this.content);
this.saveToFile();
};
this.fileReader.readAsDataURL(this.file);
} else {
- this.fileName = "閫夋嫨涓�涓枃浠朵笂浼�";
+ this.fileName = '閫夋嫨涓�涓枃浠朵笂浼�';
}
}
saveToFile() {
- console.log("saveToFile");
- console.log("invoiceId = " + this.invoiceId);
- console.log("fileName = " + this.fileName);
- console.log("base64Data = " + encodeURIComponent(this.fileContents));
+ console.log('saveToFile');
+ console.log('invoiceId = ' + this.invoiceId);
+ console.log('fileName = ' + this.fileName);
+ console.log('base64Data = ' + encodeURIComponent(this.fileContents));
saveFile({
recordId: this.invoiceId,
fileName: this.fileName,
- base64Data: encodeURIComponent(this.fileContents),
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r != '') {
- this.showLoadingSpinner = false;
- this.showMyToast('闄勪欢涓婁紶鎴愬姛', '', 'Success');
- this.closePop();
- this.init();
- } else {
- this.showMyToast('涓婁紶澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + error.message);
- this.showMyToast('閿欒', '涓婁紶澶辫触', 'Error');
- });
+ base64Data: encodeURIComponent(this.fileContents)
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r != '') {
+ this.showPopSpinner = false;
+ this.showMyToast('涓婁紶鎴愬姛', '', 'Success');
+ this.closePop();
+ this.init();
+ } else {
+ this.showMyToast('涓婁紶澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
+ this.showMyToast('閿欒', '涓婁紶澶辫触', 'Error');
+ });
}
-
handleTypeChange(event) {
- console.log("handleTypeChange");
+ console.log('handleTypeChange');
const typeDetail = event.detail;
- console.log("typeDetail = " + JSON.stringify(typeDetail));
+ console.log('typeDetail = ' + JSON.stringify(typeDetail));
for (var i in this.fileData) {
if (this.fileData[i].recordId == typeDetail.data.recordId) {
this.fileData[i].typeValue = typeDetail.data.typeValue;
this.fileData[i].mailSelectOptsin = typeDetail.data.typeValue;
}
}
- console.log("this.fileData = " + JSON.stringify(this.fileData));
+ console.log('this.fileData = ' + JSON.stringify(this.fileData));
}
newInvoiceJs() {
- let url = "/lexconinvoiceview?isNew=yes";
+ let url = '/lexconinvoiceview?isNew=yes';
console.log('url = ' + url);
this[NavigationMixin.Navigate]({
- type: "standard__webPage",
+ type: 'standard__webPage',
attributes: {
- url: url,
- },
+ url: url
+ }
});
}
saveAttachmentJs() {
+ debugger;
this.showLoadingSpinner = true;
- let cloneData = this.fileData
+ let cloneData = this.deepClone(this.fileData);
for (var i in cloneData) {
delete cloneData[i].Id;
delete cloneData[i].recordId;
@@ -1135,74 +1360,96 @@
saveAttachment({
attachmentRecoedsLwc: JSON.stringify(cloneData),
invoiceId: this.invoiceId
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.showLoadingSpinner = false;
- this.isShowSpinner = true;
- // const event = new ShowToastEvent({
- // title: 'Success',
- // variant: 'Success',
- // message: '淇濆瓨鎴愬姛',
- // });
- // this.dispatchEvent(event);
- this.showMyToast('闄勪欢淇濆瓨鎴愬姛', '', 'Success');
- //this.init();
- setTimeout(function () {
- //1绉掑悗鎵ц鍒锋柊
- window.location.reload();
- }, 2000); //鍗曚綅鏄绉�
- // let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId;
- // console.log('url = ' + url);
- // this[NavigationMixin.Navigate]({
- // type: "standard__webPage",
- // attributes: {
- // url: url,
- // },
- // });
- } else {
- this.showMyToast('涓婁紶澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + error.message);
- this.showMyToast('閿欒', '涓婁紶澶辫触', 'Error');
- });
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.showLoadingSpinner = false;
+ this.isShowSpinner = true;
+ // const event = new ShowToastEvent({
+ // title: 'Success',
+ // variant: 'Success',
+ // message: '淇濆瓨鎴愬姛',
+ // });
+ // this.dispatchEvent(event);
+ this.showMyToast('闄勪欢淇濆瓨鎴愬姛', '', 'Success');
+ //this.init();
+ setTimeout(function () {
+ //1绉掑悗鎵ц鍒锋柊
+ window.location.reload();
+ }, 2000); //鍗曚綅鏄绉�
+ // let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId;
+ // console.log('url = ' + url);
+ // this[NavigationMixin.Navigate]({
+ // type: "standard__webPage",
+ // attributes: {
+ // url: url,
+ // },
+ // });
+ } else {
+ this.showMyToast('涓婁紶澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
+ this.showMyToast('閿欒', '涓婁紶澶辫触', 'Error');
+ });
}
invoiceCodeSearchJs() {
this.isShowSpinner = true;
invoiceCodeSearch({
- orderDateLwc: this.deliveryFromDate == null ? null : new Date(this.deliveryFromDate),
- deliverDateLwc: this.deliveryToDate == null ? null : new Date(this.deliveryToDate),
+ orderDateLwc:
+ this.deliveryFromDate == null
+ ? null
+ : new Date(this.deliveryFromDate),
+ deliverDateLwc:
+ this.deliveryToDate == null
+ ? null
+ : new Date(this.deliveryToDate),
invoiceStatusLwc: this.invoiceStatusValue,
category1Lwc: this.category1,
category2Lwc: this.category2,
accountidLwc: this.ConInvoiceListAccountId,
userWorkLocationLwc: this.ConInvoiceListUserWorkLocation,
- agencyProTypeLwc: this.ConInvoiceListAgencyProType,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.invoiceData = r.entity.raesList;
- for (var i in this.invoiceData) {
- this.invoiceData[i]['NameUrl'] = '/lexconinvoiceview?invoiceId=' + this.invoiceData[i].Id;
- }
- console.log("this.invoiceData = " + JSON.stringify(this.invoiceData));
- this.isShowSpinner = false;
- if (r.entity.raesListSize > 0) {
- this.showMyToast('鎼滅储鎴愬姛', '鍏辨绱㈠埌' + r.entity.raesListSize + '涓彂绁�', 'Success');
+ agencyProTypeLwc: this.ConInvoiceListAgencyProType
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.invoiceData = r.entity.raesList;
+ for (var i in this.invoiceData) {
+ this.invoiceData[i]['NameUrl'] =
+ '/lexconinvoiceview?invoiceId=' +
+ this.invoiceData[i].Id;
+ }
+ console.log(
+ 'this.invoiceData = ' + JSON.stringify(this.invoiceData)
+ );
+ this.isShowSpinner = false;
+ if (r.entity.raesListSize > 0) {
+ this.showMyToast(
+ '鎼滅储鎴愬姛',
+ '鍏辨绱㈠埌' + r.entity.raesListSize + '涓彂绁�',
+ 'Success'
+ );
+ } else {
+ this.showMyToast(
+ '鎼滅储澶辫触',
+ '娌℃湁鎼滅储鍒扮浉鍏冲彂绁�',
+ 'Error'
+ );
+ }
} else {
- this.showMyToast('鎼滅储澶辫触', '娌℃湁鎼滅储鍒扮浉鍏冲彂绁�', 'Error');
+ this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
}
- } else {
- this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + error.message);
- this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
- });
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
+ this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
+ });
}
ClearJs() {
@@ -1212,30 +1459,38 @@
this.category2 = '';
this.invoiceStatusValue = '';
this.isShowSpinner = true;
- conInvoiceListInit().then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("conInvoiceListInit r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.invoiceData = r.entity.raesList;
- for (var i in this.invoiceData) {
- this.invoiceData[i]['NameUrl'] = '/lexconinvoiceview?invoiceId=' + this.invoiceData[i].Id;
+ conInvoiceListInit()
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('conInvoiceListInit r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.invoiceData = r.entity.raesList;
+ for (var i in this.invoiceData) {
+ this.invoiceData[i]['NameUrl'] =
+ '/lexconinvoiceview?invoiceId=' +
+ this.invoiceData[i].Id;
+ }
+ console.log(
+ 'this.invoiceData = ' + JSON.stringify(this.invoiceData)
+ );
+ this.isShowSpinner = false;
+ } else {
+ this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
}
- console.log("this.invoiceData = " + JSON.stringify(this.invoiceData));
- this.isShowSpinner = false;
- } else {
- this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- });
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
}
InvoiceorderSearchJs() {
this.isShowSpinner = true;
- debugger
- let cloneData = this.outboundData
- const selectedRows = this.template.querySelector("[data-field='outbound']").getSelectedRows();
+ debugger;
+ let cloneData = this.outboundData;
+ const selectedRows = this.template
+ .querySelector("[data-field='outbound']")
+ .getSelectedRows();
console.log('selectedRows ' + JSON.stringify(selectedRows));
for (var i in cloneData) {
let b = false;
@@ -1245,7 +1500,7 @@
cloneData[i].check = true;
}
}
- if(!b){
+ if (!b) {
cloneData[i].check = false;
}
delete cloneData[i].esdOutboundDate;
@@ -1276,74 +1531,107 @@
agencyProTypeLwc: this.agencyProType,
HospitalInfoLwc: this.HospitalInfo,
SecondDealerLwc: this.secondaryDistributor,
- invoiceOrderRecoedsLwc: JSON.stringify(cloneData),
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.outboundData = r.entity.invoiceOrderRecoeds;
- console.log('this.outboundData = ' + JSON.stringify(this.outboundData));
- let index = 0;
- this.selectedRows = [];
- for (var i in this.outboundData) {
-
- if(this.outboundData[i].check)
- this.selectedRows.push(this.outboundData[i].esd.Id)
- this.outboundData[i].Id = this.outboundData[i].esd.Id;
- this.outboundData[i]['esdOutboundDate'] = this.outboundData[i].esd.Outbound_Date__c;
- this.outboundData[i]['esdNameUrl'] = '/s/lexsummonscreat?ESetid=' + this.outboundData[i].esd.Id;
- this.outboundData[i]['esdName'] = this.outboundData[i].esd.Name;
- if (this.EditAble) {
- this.outboundData[i]['hospitalName'] = this.outboundData[i].esd.ShipmentAccount__c;
- this.outboundData[i]['shipmentAmount'] = this.outboundData[i].esd.Shipment_total_amount__c;
- this.outboundData[i]['returnAmount'] = this.outboundData[i].esd.RrturnPro_total_amount__c;
- }
- this.outboundData[i]['uninvoicedAmount'] = this.outboundData[i].esd.InvoiceNotPro_money__c;
- this.outboundData[i]['invoiceFaceAmount'] = this.outboundData[i].needInvoiceCount;
- if (!(this.outboundData[i].esd.Billed_Status__c == '鍏ㄩ儴寮�绁�' || this.EditAble || this.coc.Invoice_status__c != '鑽夋涓�')) {
- //let url = "/ConInvoicedetails?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId;
- let url = "/s/lexconinvoiceview?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId;
- this.outboundData[i]['invoiceFaceAmountUrl'] = url;
+ invoiceOrderRecoedsLwc: JSON.stringify(cloneData)
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.outboundData = r.entity.invoiceOrderRecoeds;
+ console.log(
+ 'this.outboundData = ' +
+ JSON.stringify(this.outboundData)
+ );
+ let index = 0;
+ this.selectedRows = [];
+ for (var i in this.outboundData) {
+ if (this.outboundData[i].check)
+ this.selectedRows.push(this.outboundData[i].esd.Id);
+ this.outboundData[i].Id = this.outboundData[i].esd.Id;
+ this.outboundData[i]['esdOutboundDate'] =
+ this.outboundData[i].esd.Outbound_Date__c;
+ this.outboundData[i]['esdNameUrl'] =
+ '/s/lexsummonscreat?ESetid=' +
+ this.outboundData[i].esd.Id;
+ this.outboundData[i]['esdName'] =
+ this.outboundData[i].esd.Name;
+ if (this.EditAble) {
+ this.outboundData[i]['hospitalName'] =
+ this.outboundData[i].esd.ShipmentAccount__c;
+ this.outboundData[i]['shipmentAmount'] =
+ this.outboundData[
+ i
+ ].esd.Shipment_total_amount__c;
+ this.outboundData[i]['returnAmount'] =
+ this.outboundData[
+ i
+ ].esd.RrturnPro_total_amount__c;
+ }
+ this.outboundData[i]['uninvoicedAmount'] =
+ this.outboundData[i].esd.InvoiceNotPro_money__c;
+ this.outboundData[i]['invoiceFaceAmount'] =
+ this.outboundData[i].needInvoiceCount;
+ if (
+ !(
+ this.outboundData[i].esd.Billed_Status__c ==
+ '鍏ㄩ儴寮�绁�' ||
+ this.EditAble ||
+ this.coc.Invoice_status__c != '鑽夋涓�'
+ )
+ ) {
+ //let url = "/ConInvoicedetails?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId;
+ let url =
+ '/s/lexconinvoiceview?orderId=' +
+ this.outboundData[i].esd.Id +
+ '&invoiceId=' +
+ this.invoiceId;
+ this.outboundData[i]['invoiceFaceAmountUrl'] = url;
- if (index == 0) {
- let object5 = {
- label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
- cellAttributes: { alignment: 'right' },
- type: 'url',
- fieldName: "invoiceFaceAmountUrl",
- typeAttributes: {
- label: { fieldName: "invoiceFaceAmount" },
- target: "_blank",
- },
- hideDefaultActions: true,
- };
- this.outboundColumns.push(object5)
- index++;
+ if (index == 0) {
+ let object5 = {
+ label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
+ cellAttributes: { alignment: 'right' },
+ type: 'url',
+ fieldName: 'invoiceFaceAmountUrl',
+ typeAttributes: {
+ label: {
+ fieldName: 'invoiceFaceAmount'
+ },
+ target: '_blank'
+ },
+ hideDefaultActions: true
+ };
+ this.outboundColumns.push(object5);
+ index++;
+ }
+ } else {
+ if (index == 0) {
+ let object5 = {
+ label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
+ cellAttributes: { alignment: 'right' },
+ fieldName: 'invoiceFaceAmount',
+ hideDefaultActions: true
+ };
+ this.outboundColumns.push(object5);
+ index++;
+ }
}
- } else {
- if (index == 0) {
- let object5 = {
- label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
- cellAttributes: { alignment: 'right' },
- fieldName: "invoiceFaceAmount",
- hideDefaultActions: true,
- };
- this.outboundColumns.push(object5)
- index++;
- }
+ //璁$畻鍙戠エ绁ㄩ潰閲戦
+ this.sumPrice += this.outboundData[i].needInvoiceCount;
}
- //璁$畻鍙戠エ绁ㄩ潰閲戦
- this.sumPrice += this.outboundData[i].needInvoiceCount;
+ console.log(
+ 'this.selectedRows = ' +
+ JSON.stringify(this.selectedRows)
+ );
+ this.isShowSpinner = false;
+ } else {
+ this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
}
- console.log('this.selectedRows = ' + JSON.stringify(this.selectedRows))
- this.isShowSpinner = false;
- } else {
- this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + error.message);
- this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
- });
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
+ this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
+ });
}
getSelectedRows(event) {
@@ -1367,37 +1655,43 @@
this.isShowSpinner = true;
deleteButton({
cocLwc: this.coc,
- invoiceIdLwc: this.invoiceId,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.isShowSpinner = false
- let url = "/lexconinvoiceview";
- console.log('url = ' + url);
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: url,
- },
- });
- } else {
- this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + error.message);
- });
+ invoiceIdLwc: this.invoiceId
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.isShowSpinner = false;
+ let url = '/lexconinvoiceview';
+ console.log('url = ' + url);
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: url
+ }
+ });
+ } else {
+ this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
+ });
}
SetEditAbleJs() {
let statusEditAbleJs = 'Redirect';
- let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId + '&KeyWords=' + statusEditAbleJs;
+ let url =
+ '/lexconinvoiceview?invoiceId=' +
+ this.invoiceId +
+ '&KeyWords=' +
+ statusEditAbleJs;
console.log('url = ' + url);
this[NavigationMixin.Navigate]({
- type: "standard__webPage",
+ type: 'standard__webPage',
attributes: {
- url: url,
- },
+ url: url
+ }
});
}
@@ -1407,60 +1701,77 @@
outOrderStringListLwc: this.outOrderStringListLwc,
outordercountMapLwc: this.outordercountMapLwc,
invoiceIdLwc: this.invoiceId
-
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.isShowSpinner = false
- let url = "/s/lexconinvoiceview?invoiceId=" + this.invoiceId;
- console.log('url = ' + url);
- window.open(url, '_self');
- // this[NavigationMixin.Navigate]({
- // type: "standard__webPage",
- // attributes: {
- // url: url,
- // },
- // });
- } else {
- this.showMyToast('閿欒', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + error.message);
- });
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.isShowSpinner = false;
+ let url =
+ '/s/lexconinvoiceview?invoiceId=' + this.invoiceId;
+ console.log('url = ' + url);
+ window.open(url, '_self');
+ // this[NavigationMixin.Navigate]({
+ // type: "standard__webPage",
+ // attributes: {
+ // url: url,
+ // },
+ // });
+ } else {
+ this.showMyToast('閿欒', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
+ });
}
openReportJs() {
- console.log("openReportJs");
+ console.log('openReportJs');
let reportUrl = this.label.LexConInvoiceViewReport;
- let reportFilters = '[{"operator":"equals","value":"' + this.OrderCode + '","column":"FK_NAME"}]';
+ let reportFilters =
+ '[{"operator":"equals","value":"' +
+ this.OrderCode +
+ '","column":"FK_NAME"}]';
console.log('reportUrl = ' + reportUrl);
- let url = "/report/"+ reportUrl +"?reportFilters=" + encodeURIComponent(reportFilters);
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: url,
- },
- });
+ let url =
+ '/s/report/' +
+ reportUrl +
+ '?reportFilters=' +
+ encodeURIComponent(reportFilters);
+ window.open(url);
+ // this[NavigationMixin.Navigate]({
+ // type: "standard__webPage",
+ // attributes: {
+ // url: url,
+ // target: '_blank'
+ // },
+ // });
}
reopenJs() {
// statusEdit = 'Redirect';
// PageReference ref = new Pagereference('/ConInvoiceView?invoiceId=' + invoiceId + '&reopen=isreopen' + '&KeyWords=' + statusEdit);
let statusEditAbleJs = 'Redirect';
- let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId + '&reopen=isreopen' + '&KeyWords=' + statusEditAbleJs;
+ let url =
+ '/lexconinvoiceview?invoiceId=' +
+ this.invoiceId +
+ '&reopen=isreopen' +
+ '&KeyWords=' +
+ statusEditAbleJs;
console.log('url = ' + url);
this[NavigationMixin.Navigate]({
- type: "standard__webPage",
+ type: 'standard__webPage',
attributes: {
- url: url,
- },
+ url: url
+ }
});
}
showMyToast(title, message, variant) {
this.isShowSpinner = false;
this.showLoadingSpinner = false;
+ this.showPopSpinner = false;
this.showAttPop = false;
this.filesUploaded = [];
this.fileName = null;
@@ -1473,26 +1784,36 @@
iconName = 'utility:error';
}
if (message != '') {
- content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
} else {
content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
}
handleLoad() {
- console.log('handleLoad')
+ console.log('handleLoad');
try {
const style = document.createElement('style');
- style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}';
+ style.innerText =
+ '.hehe-layoutItem .slds-button__icon {display: none;}';
this.template.querySelector('.hideHelpText').appendChild(style);
const style2 = document.createElement('style');
- style2.innerText = '.hehe-layoutItem .slds-form-element__label {padding : 0px}';
+ style2.innerText =
+ '.hehe-layoutItem .slds-form-element__label {padding : 0px}';
this.template.querySelector('.hideHelpText').appendChild(style2);
const style3 = document.createElement('style');
- style3.innerText = '.readOnly .slds-form-element__label {padding-top: 7px;}';
+ style3.innerText =
+ '.readOnly .slds-form-element__label {padding-top: 7px;}';
this.template.querySelector('.hideHelpText').appendChild(style3);
} catch (error) {
console.log(error);
@@ -1511,17 +1832,19 @@
s += '0';
}
return s;
- };
+ }
handleLoad2() {
- console.log('handleLoad2')
+ console.log('handleLoad2');
try {
const style = document.createElement('style');
- style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}';
+ style.innerText =
+ '.hehe-layoutItem .slds-button__icon {display: none;}';
this.template.querySelector('.hideHelpText').appendChild(style);
const style2 = document.createElement('style');
- style2.innerText = '.hehe-layoutItem .slds-form-element__label {padding : 0px}';
+ style2.innerText =
+ '.hehe-layoutItem .slds-form-element__label {padding : 0px}';
this.template.querySelector('.hideHelpText').appendChild(style2);
} catch (error) {
console.log(error);
@@ -1529,127 +1852,216 @@
}
handleUnitChange(event) {
- console.log("handleUnitChange");
- this.invoiceAllpriceData[0].invoiceAllprice = 0.00;
+ console.log('handleUnitChange');
+ this.invoiceAllpriceData[0].invoiceAllprice = 0.0;
const unitDetail = event.detail;
- console.log("unitDetail = " + JSON.stringify(unitDetail));
+ console.log('unitDetail = ' + JSON.stringify(unitDetail));
for (var i in this.detailsData) {
if (this.detailsData[i].recordId == unitDetail.data.recordId) {
this.detailsData[i].unitValue = unitDetail.data.unitValue;
- this.detailsData[i].esd.Invoice_Unit__c = unitDetail.data.unitValue;
- if (this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) == -1)
+ this.detailsData[i].esd.Invoice_Unit__c =
+ unitDetail.data.unitValue;
+ if (
+ this.detailsSelectedRows.indexOf(
+ this.detailsData[i].recordId
+ ) == -1
+ )
this.detailsSelectedRows.push(this.detailsData[i].recordId);
}
}
this.detailsSelectedRows = [...this.detailsSelectedRows];
-
- console.log('this.detailsSelectedRows = ' + JSON.stringify(this.detailsSelectedRows))
+ console.log(
+ 'this.detailsSelectedRows = ' +
+ JSON.stringify(this.detailsSelectedRows)
+ );
for (var i in this.detailsData) {
- this.detailsData[i].invoiceAllprice = 0.00;
+ this.detailsData[i].invoiceAllprice = 0.0;
for (var j in this.detailsSelectedRows) {
- console.log('this.detailsData[i].Id = ' + this.detailsData[i].Id);
- console.log('this.detailsSelectedRows[j] = ' + this.detailsSelectedRows[j]);
+ console.log(
+ 'this.detailsData[i].Id = ' + this.detailsData[i].Id
+ );
+ console.log(
+ 'this.detailsSelectedRows[j] = ' +
+ this.detailsSelectedRows[j]
+ );
if (this.detailsData[i].Id == this.detailsSelectedRows[j]) {
- this.detailsData[i].invoiceAllprice = this.amend(this.detailsData[i].shipmentNumber, this.detailsData[i].esdInvoiceUnitprice, '*');
- console.log('this.detailsData[i].invoiceAllprice = ' + this.detailsData[i].invoiceAllprice);
+ this.detailsData[i].invoiceAllprice = this.amend(
+ this.detailsData[i].shipmentNumber,
+ this.detailsData[i].esdInvoiceUnitprice,
+ '*'
+ );
+ console.log(
+ 'this.detailsData[i].invoiceAllprice = ' +
+ this.detailsData[i].invoiceAllprice
+ );
}
}
- this.invoiceAllpriceData[0].invoiceAllprice = this.amend(this.invoiceAllpriceData[0].invoiceAllprice, this.detailsData[i].invoiceAllprice, '+');
+ this.invoiceAllpriceData[0].invoiceAllprice = this.amend(
+ this.invoiceAllpriceData[0].invoiceAllprice,
+ this.detailsData[i].invoiceAllprice,
+ '+'
+ );
}
this.detailsData = [...this.detailsData];
this.invoiceAllpriceData = [...this.invoiceAllpriceData];
}
handleShipmentNumber(event) {
- console.log("handleShipmentNumber");
- this.invoiceAllpriceData[0].invoiceAllprice = 0.00;
+ console.log('handleShipmentNumber');
+ this.invoiceAllpriceData[0].invoiceAllprice = 0.0;
const numberDetail = event.detail;
- console.log('numberDetail = ' + JSON.stringify(numberDetail))
+ console.log('numberDetail = ' + JSON.stringify(numberDetail));
if (numberDetail.data.shipmentnumber == 0) {
- if (this.detailsSelectedRows.indexOf(numberDetail.data.recordId) != -1) {
- this.detailsSelectedRows.splice(this.detailsSelectedRows.indexOf(numberDetail.data.recordId), 1);
+ if (
+ this.detailsSelectedRows.indexOf(numberDetail.data.recordId) !=
+ -1
+ ) {
+ this.detailsSelectedRows.splice(
+ this.detailsSelectedRows.indexOf(
+ numberDetail.data.recordId
+ ),
+ 1
+ );
}
}
- console.log("start this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows));
- console.log("numberDetail = " + JSON.stringify(numberDetail));
+ console.log(
+ 'start this.detailsSelectedRows = ' +
+ JSON.stringify(this.detailsSelectedRows)
+ );
+ console.log('numberDetail = ' + JSON.stringify(numberDetail));
for (var i in this.detailsData) {
if (this.detailsData[i].recordId == numberDetail.data.recordId) {
- this.detailsData[i].shipmentNumber = Number(numberDetail.data.shipmentnumber);
- this.detailsData[i].invoiceCount = Number(numberDetail.data.shipmentnumber);
- if (this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) == -1 && numberDetail.data.shipmentnumber != 0)
+ this.detailsData[i].shipmentNumber = Number(
+ numberDetail.data.shipmentnumber
+ );
+ this.detailsData[i].invoiceCount = Number(
+ numberDetail.data.shipmentnumber
+ );
+ if (
+ this.detailsSelectedRows.indexOf(
+ this.detailsData[i].recordId
+ ) == -1 &&
+ numberDetail.data.shipmentnumber != 0
+ )
this.detailsSelectedRows.push(this.detailsData[i].recordId);
}
}
- console.log("end this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows));
+ console.log(
+ 'end this.detailsSelectedRows = ' +
+ JSON.stringify(this.detailsSelectedRows)
+ );
this.detailsSelectedRows = [...this.detailsSelectedRows];
-
- console.log('this.detailsSelectedRows = ' + JSON.stringify(this.detailsSelectedRows));
+ console.log(
+ 'this.detailsSelectedRows = ' +
+ JSON.stringify(this.detailsSelectedRows)
+ );
for (var i in this.detailsData) {
- this.detailsData[i].invoiceAllprice = 0.00;
+ this.detailsData[i].invoiceAllprice = 0.0;
for (var j in this.detailsSelectedRows) {
- console.log('this.detailsData[i].Id = ' + this.detailsData[i].Id);
- console.log('this.detailsSelectedRows[j] = ' + this.detailsSelectedRows[j]);
+ console.log(
+ 'this.detailsData[i].Id = ' + this.detailsData[i].Id
+ );
+ console.log(
+ 'this.detailsSelectedRows[j] = ' +
+ this.detailsSelectedRows[j]
+ );
if (this.detailsData[i].Id == this.detailsSelectedRows[j]) {
- this.detailsData[i].invoiceAllprice = this.amend(this.detailsData[i].shipmentNumber, this.detailsData[i].esdInvoiceUnitprice, '*');
- console.log('this.detailsData[i].invoiceAllprice = ' + this.detailsData[i].invoiceAllprice);
+ this.detailsData[i].invoiceAllprice = this.amend(
+ this.detailsData[i].shipmentNumber,
+ this.detailsData[i].esdInvoiceUnitprice,
+ '*'
+ );
+ console.log(
+ 'this.detailsData[i].invoiceAllprice = ' +
+ this.detailsData[i].invoiceAllprice
+ );
}
}
- this.invoiceAllpriceData[0].invoiceAllprice = this.amend(this.invoiceAllpriceData[0].invoiceAllprice, this.detailsData[i].invoiceAllprice, '+');
+ this.invoiceAllpriceData[0].invoiceAllprice = this.amend(
+ this.invoiceAllpriceData[0].invoiceAllprice,
+ this.detailsData[i].invoiceAllprice,
+ '+'
+ );
}
this.detailsData = [...this.detailsData];
this.invoiceAllpriceData = [...this.invoiceAllpriceData];
}
detailsGetSelectedRows(event) {
- console.log("detailsGetSelectedRows ");
- this.invoiceAllpriceData[0].invoiceAllprice = 0.00;
+ console.log('detailsGetSelectedRows ');
+ this.invoiceAllpriceData[0].invoiceAllprice = 0.0;
let selectedRows = event.detail.selectedRows;
for (var i in this.detailsData) {
- this.detailsData[i].invoiceAllprice = 0.00;
+ this.detailsData[i].invoiceAllprice = 0.0;
for (var j in selectedRows) {
if (this.detailsData[i].Id == selectedRows[j].esd.Id) {
- this.detailsData[i].invoiceAllprice = this.amend(this.detailsData[i].shipmentNumber, this.detailsData[i].esdInvoiceUnitprice, '*');
- console.log('this.detailsData[i].invoiceAllprice = ' + this.detailsData[i].invoiceAllprice);
+ this.detailsData[i].invoiceAllprice = this.amend(
+ this.detailsData[i].shipmentNumber,
+ this.detailsData[i].esdInvoiceUnitprice,
+ '*'
+ );
+ console.log(
+ 'this.detailsData[i].invoiceAllprice = ' +
+ this.detailsData[i].invoiceAllprice
+ );
}
}
- this.invoiceAllpriceData[0].invoiceAllprice = this.amend(this.invoiceAllpriceData[0].invoiceAllprice, this.detailsData[i].invoiceAllprice, '+');
- console.log('this.invoiceAllpriceData[0].invoiceAllprice = ' + this.invoiceAllpriceData[0].invoiceAllprice);
+ this.invoiceAllpriceData[0].invoiceAllprice = this.amend(
+ this.invoiceAllpriceData[0].invoiceAllprice,
+ this.detailsData[i].invoiceAllprice,
+ '+'
+ );
+ console.log(
+ 'this.invoiceAllpriceData[0].invoiceAllprice = ' +
+ this.invoiceAllpriceData[0].invoiceAllprice
+ );
}
- console.log('start this.detailsData = ' + JSON.stringify(this.detailsData));
+ console.log(
+ 'start this.detailsData = ' + JSON.stringify(this.detailsData)
+ );
this.detailsData = [...this.detailsData];
- console.log('end this.detailsData = ' + JSON.stringify(this.detailsData));
+ console.log(
+ 'end this.detailsData = ' + JSON.stringify(this.detailsData)
+ );
this.invoiceAllpriceData = [...this.invoiceAllpriceData];
}
ComputePrice(index, number, price) {
- console.log("index = " + index);
- console.log("number = " + number);
- console.log("price = " + price);
- let shipmentAmount = this.amend(number, price, "*");
- console.log("shipmentAmount = " + shipmentAmount);
+ console.log('index = ' + index);
+ console.log('number = ' + number);
+ console.log('price = ' + price);
+ let shipmentAmount = this.amend(number, price, '*');
+ console.log('shipmentAmount = ' + shipmentAmount);
let sumPrice = 0.0;
this.data[index].shipmentAmount = shipmentAmount;
for (var i in this.data) {
- if (this.data[i].shipmentAmount) sumPrice += this.data[i].shipmentAmount;
+ if (this.data[i].shipmentAmount)
+ sumPrice += this.data[i].shipmentAmount;
}
- this.sumPrice = sumPrice + "鍏�";
+ this.sumPrice = sumPrice + '鍏�';
//瀛樹笅閫夋嫨琛岋紝涓嶄細琚竻绌�
if (this.selectedRows.indexOf(this.data[index].Id) == -1)
this.selectedRows.push(this.data[index].Id);
this.data = [...this.data];
- this.selectedRows = [...this.selectedRows]
- console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
- console.log("this.data = " + JSON.stringify(this.data));
+ this.selectedRows = [...this.selectedRows];
+ console.log('this.selectedRows = ' + JSON.stringify(this.selectedRows));
+ console.log('this.data = ' + JSON.stringify(this.data));
+ }
+
+ deepClone(obj) {
+ return JSON.parse(JSON.stringify(obj));
}
detailsSaveJs() {
this.isShowSpinner = true;
- let cloneData = this.detailsData;
+ let cloneData = this.deepClone(this.detailsData);
- let selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
+ let selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
console.log('selectedRows = ' + JSON.stringify(selectedRows));
for (var i in cloneData) {
@@ -1676,29 +2088,29 @@
}
console.log('cloneData = ' + JSON.stringify(cloneData));
-
-
detailsSave({
consumableorderdetails1RecordsLwc: JSON.stringify(cloneData),
invoiceIdLwc: this.invoiceId,
orderIdLwc: this.orderId
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId;
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: url,
- },
- });
- } else {
- this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + error.message);
- });
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ let url = '/lexconinvoiceview?invoiceId=' + this.invoiceId;
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: url
+ }
+ });
+ } else {
+ this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
+ });
}
//num1 num2浼犲叆涓や釜鍊� symbol +-*/绗﹀彿
@@ -1710,27 +2122,27 @@
str2Length;
//瑙e喅鏁存暟娌℃湁灏忔暟鐐规柟娉�
try {
- str1Length = str1.split(".")[1].length;
+ str1Length = str1.split('.')[1].length;
} catch (error) {
str1Length = 0;
}
try {
- str2Length = str2.split(".")[1].length;
+ str2Length = str2.split('.')[1].length;
} catch (error) {
str2Length = 0;
}
var step = Math.pow(10, Math.max(str1Length, str2Length));
switch (symbol) {
- case "+":
+ case '+':
result = (num1 * step + num2 * step) / step;
break;
- case "-":
+ case '-':
result = (num1 * step - num2 * step) / step;
break;
- case "*":
+ case '*':
result = (num1 * step * (num2 * step)) / step / step;
break;
- case "/":
+ case '/':
result = (num1 * step) / (num2 * step);
break;
default:
@@ -1743,22 +2155,23 @@
deleteAtt(event) {
this.isShowSpinner = true;
//var recordId = event.detail.data.recordId;
- var recordId = event.target.getAttribute("data-fileid");
+ var recordId = event.target.getAttribute('data-fileid');
console.log('attid:' + recordId);
deleteAtt({
contentVersionId: recordId
- }).then(result => {
- if (result.result == 'Success') {
- this.showMyToast('鍒犻櫎鎴愬姛', '', 'Success');
- if (this.fileData.length == 1)
- window.location.reload();
- else
- this.init();
- } else {
- this.showMyToast('鍒犻櫎澶辫触', result.errorMsg, 'Error');
- }
- }).catch(error => {
- this.showMyToast('閿欒', '鍒犻櫎澶辫触', 'Error');
})
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.showMyToast('鍒犻櫎鎴愬姛', '', 'Success');
+ if (this.fileData.length == 1) window.location.reload();
+ else this.init();
+ } else {
+ this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ this.showMyToast('閿欒', error.message, 'Error');
+ });
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexConsumable/lexConsumable.html b/force-app/main/default/lwc/lexConsumable/lexConsumable.html
index 4564898..f65c915 100644
--- a/force-app/main/default/lwc/lexConsumable/lexConsumable.html
+++ b/force-app/main/default/lwc/lexConsumable/lexConsumable.html
@@ -1,39 +1,106 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
<template if:true={showPage}>
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;">
- <div style="padding:10px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ "
+ >
+ <div style="padding: 10px">
<!-- 鎸夐挳 -->
<template if:true={showEditBtn}>
<!-- <lightning-button style="margin: 5px;" label="缂栬緫" disabled={disabledEditBtn} onclick={editOrder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" disabled={disabledEditBtn} onclick={editOrder}>缂栬緫</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ disabled={disabledEditBtn}
+ onclick={editOrder}
+ >
+ 缂栬緫
+ </button>
</template>
<template if:true={showPrintSheetBtn}>
<!-- <lightning-button style="margin: 5px;" label="鎵撳嵃閰嶇疆鍗�" onclick={printOrder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="鎵撳嵃閰嶇疆鍗�" onclick={printOrder}>鎵撳嵃閰嶇疆鍗�</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="鎵撳嵃閰嶇疆鍗�"
+ onclick={printOrder}
+ >
+ 鎵撳嵃閰嶇疆鍗�
+ </button>
</template>
<template if:true={showUploadSheetBtn}>
<!-- <lightning-button style="margin: 5px;" label="涓婁紶閰嶇疆鍗�" disabled={disabledUploadSheetBtn} onclick={uploadOrder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="涓婁紶閰嶇疆鍗�" disabled={disabledUploadSheetBtn} onclick={uploadOrder}>涓婁紶閰嶇疆鍗�</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="涓婁紶閰嶇疆鍗�"
+ disabled={disabledUploadSheetBtn}
+ onclick={uploadOrder}
+ >
+ 涓婁紶閰嶇疆鍗�
+ </button>
</template>
<template if:true={showSubOrderbtn}>
<!-- <lightning-button style="margin: 5px;" label="鎻愪氦璁㈠崟" disabled={disabledSubOrderbtn} onclick={submitOrder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="鎻愪氦璁㈠崟" disabled={disabledSubOrderbtn} onclick={submitOrder}>鎻愪氦璁㈠崟</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="鎻愪氦璁㈠崟"
+ disabled={disabledSubOrderbtn}
+ onclick={submitOrder}
+ >
+ 鎻愪氦璁㈠崟
+ </button>
</template>
<template if:true={showSaveOrderbtn1}>
<!-- <lightning-button style="margin: 5px;" label="淇濆瓨璁㈠崟" onclick={saveOrder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="淇濆瓨璁㈠崟" onclick={saveOrder}>淇濆瓨璁㈠崟</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="淇濆瓨璁㈠崟"
+ onclick={saveOrder}
+ >
+ 淇濆瓨璁㈠崟
+ </button>
</template>
<template if:true={showSaveOrderbtn2}>
<!-- <lightning-button style="margin: 5px;" label="淇濆瓨璁㈠崟" onclick={orderCopy}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="淇濆瓨璁㈠崟" onclick={orderCopy}>淇濆瓨璁㈠崟</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="淇濆瓨璁㈠崟"
+ onclick={orderCopy}
+ >
+ 淇濆瓨璁㈠崟
+ </button>
</template>
<template if:true={showDeleteBtn}>
<!-- <lightning-button style="margin: 5px;" label="鍒犻櫎" disabled={disabledDeleteBtn} onclick={deleteOrder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="鍒犻櫎" disabled={disabledDeleteBtn} onclick={deleteOrder}>鍒犻櫎</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="鍒犻櫎"
+ disabled={disabledDeleteBtn}
+ onclick={deleteOrder}
+ >
+ 鍒犻櫎
+ </button>
</template>
<!-- <template if:true={showOfferPriceInputBtn}>
<lightning-button style="margin: 5px;" label="鐗逛环閲戦褰曞叆" disabled={disabledOfferPriceInputBtn} onclick={inputOfferPrice}></lightning-button>
@@ -41,13 +108,32 @@
</template> -->
<template if:true={showReapplyBtn}>
<!-- <lightning-button style="margin: 5px;" label="鍐嶇敵璇�" onclick={reapplyOrder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="鍐嶇敵璇�" onclick={reapplyOrder}>鍐嶇敵璇�</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin: 5px"
+ label="鍐嶇敵璇�"
+ onclick={reapplyOrder}
+ >
+ 鍐嶇敵璇�
+ </button>
</template>
- <p style="height: 10px;"></p>
+ <p style="height: 10px"></p>
<!-- 璁㈠崟淇℃伅 -->
<template if:false={editAble}>
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -57,21 +143,35 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>璁㈠崟淇℃伅</strong></p> -->
</div>
- <div style="padding:10px;">
- <lightning-record-view-form record-id={cocId} object-api-name="Consumable_order__c">
- <table style="width: 100%;">
+ <div style="padding: 10px">
+ <lightning-record-view-form
+ record-id={cocId}
+ object-api-name="Consumable_order__c"
+ >
+ <table style="width: 100%">
<tbody>
<tr>
<td style="width: 10%"></td>
- <td style="width: 40%;"><lightning-output-field class="outputfont" field-name="Name"></lightning-output-field></td>
- <td style="width: 40%;"><lightning-output-field field-name="Order_status__c"></lightning-output-field></td>
+ <td style="width: 40%">
+ <lightning-output-field
+ class="outputfont"
+ field-name="Name"
+ ></lightning-output-field>
+ </td>
+ <td style="width: 40%">
+ <lightning-output-field
+ field-name="Order_status__c"
+ ></lightning-output-field>
+ </td>
<td style="width: 10%"></td>
</tr>
<tr>
<td></td>
<td>
<template if:false={editAble}>
- <lightning-output-field field-name="Total_amount__c"></lightning-output-field>
+ <lightning-output-field
+ field-name="Total_amount__c"
+ ></lightning-output-field>
</template>
</td>
<td>
@@ -80,11 +180,14 @@
<lightning-formatted-text value={contractName}></lightning-formatted-text>
</div> -->
<!-- style="pointer-events: none;" -->
- <lightning-output-field class="showContract" field-name="Order_effective_contact__c" ></lightning-output-field>
+ <lightning-output-field
+ class="showContract"
+ field-name="Order_effective_contact__c"
+ ></lightning-output-field>
</td>
<!-- <td>鍚堝悓锛�<lightning-formatted-text value={coc.Order_effective_contact__r.Name}></lightning-formatted-text></td> -->
<td></td>
- </tr>
+ </tr>
<tr>
<td></td>
<!-- <td>
@@ -96,8 +199,12 @@
</template>
</td> -->
<td>
- <template if:true={showAttUploadDate}>
- <lightning-output-field field-name="Consumable_pdf_insert_day__c"></lightning-output-field>
+ <template
+ if:true={showAttUploadDate}
+ >
+ <lightning-output-field
+ field-name="Consumable_pdf_insert_day__c"
+ ></lightning-output-field>
</template>
</td>
<td></td>
@@ -115,8 +222,12 @@
<tr>
<td></td>
<td>
- <template if:true={showOrderDate}>
- <lightning-output-field field-name="Order_date__c"></lightning-output-field>
+ <template
+ if:true={showOrderDate}
+ >
+ <lightning-output-field
+ field-name="Order_date__c"
+ ></lightning-output-field>
</template>
</td>
<td></td>
@@ -125,23 +236,71 @@
<tr>
<td></td>
<td colspan="2">
- <lightning-card class="attListTitle" variant="Narrow" title="闄勪欢鍒楄〃" icon-name="utility:attach">
- <lightning-layout slot="footer" multiple-rows="true">
- <template for:each={attachmentRecoeds} for:item="item" for:index="index">
- <lightning-layout-item padding="around-none" size="2" key={item.recordId} style="text-align: left;padding:5px">
- <lightning-icon title={item.fileFullName} style="margin-left: 20px;" icon-name="doctype:gform" alternative-text={item.fileFullName} size="large"></lightning-icon><br/>
- <span title={item.fileFullName}>
+ <lightning-card
+ class="attListTitle"
+ variant="Narrow"
+ title="闄勪欢鍒楄〃"
+ icon-name="utility:attach"
+ >
+ <lightning-layout
+ slot="footer"
+ multiple-rows="true"
+ >
+ <template
+ for:each={attachmentRecoeds}
+ for:item="item"
+ for:index="index"
+ >
+ <lightning-layout-item
+ padding="around-none"
+ size="2"
+ key={item.recordId}
+ style="
+ text-align: left;
+ padding: 5px;
+ "
+ >
+ <lightning-icon
+ title={item.fileFullName}
+ style="
+ margin-left: 20px;
+ "
+ icon-name="doctype:gform"
+ alternative-text={item.fileFullName}
+ size="large"
+ ></lightning-icon
+ ><br />
+ <!-- <span style="word-wrap:break-word; word-break:break-all;width:80px;display:flex;" title={item.fileFullName}>
{item.fileName}
- </span>
+ </span> -->
+ <div
+ title={item.fileFullName}
+ style="
+ width: 100px;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ "
+ >
+ {item.fileName}
+ </div>
<p>
<!-- <a data-fileid ={item.documentId} onclick={previweAtt}> -->
- <a href={item.attUrl} target="_blank">
- 棰勮
- </a> 路
- <a href={item.downloadUrl}>
- 涓嬭浇
- </a> 路
- <a data-fileid ={item.recordId} onclick={deleteAtt}>
+ <a
+ href={item.attUrl}
+ target="_blank"
+ >
+ 棰勮 </a
+ > 路
+ <a
+ href={item.downloadUrl}
+ >
+ 涓嬭浇 </a
+ > 路
+ <a
+ data-fileid={item.recordId}
+ onclick={deleteAtt}
+ >
鍒犻櫎
</a>
</p>
@@ -161,15 +320,22 @@
</template>
<!-- searchBlock -->
<template if:true={editAble}>
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="padding:10px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="padding: 10px">
<table>
<tbody>
- <tr>
- <td style="width: 90px;">
+ <!-- <tr>
+ <td style="width: 100px;">
<div style="color:#696969;font-size:16px;"><span style="color: red;">* </span>鍚堝悓</div>
</td>
- <td style="width:300px;">
+ <td style="width:320px;">
<div class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
<lightning-icon size="x-small" class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default" icon-name="utility:search" ></lightning-icon>
<lightning-input class="inputFont" variant="label-hidden" label="鍚堝悓" placeholder="璇烽�夋嫨鍚堝悓" value={contractName} onchange={changeCon} onclick={showSearchCon}></lightning-input>
@@ -189,70 +355,199 @@
</div>
</template>
</td>
- <!-- <td style="width: 30px;"></td>
- <td style="width: 66px;"></td>
- <td style="width:150px;"></td> -->
<td style="width: 30px;"></td>
- <td style="width: 66px;"></td>
- <td style="width:140px;"></td>
- <td style="width: 30px;"></td>
- <td></td>
- </tr>
- <tr style="height: 10px;"></tr>
- <!-- <tr>
- <td><div style="color:#696969;font-size:14px;"><span style="color: red;">* </span>鍚堝悓</div></td>
- <td style="padding-bottom:5px;padding-top:5px;">
- <div class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
- <lightning-icon size="x-small" class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default" icon-name="utility:search" ></lightning-icon>
- <lightning-input variant="label-hidden" label="鍚堝悓" placeholder="璇烽�夋嫨鍚堝悓" value={contractName} onchange={changeCon} onclick={showSearchCon}></lightning-input>
- </div>
- </td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- </tr> -->
- <tr>
- <td>
- <div style="color:#696969;font-size:16px;">娑堣�楀搧鍚嶇О</div>
- </td>
- <td>
- <lightning-input class="inputFont" variant="label-hidden" label="娑堣�楀搧鍚嶇О" value={category1} onchange={category1Change}></lightning-input>
- </td>
- <td></td>
- <td>
- <div style="color:#696969;font-size:16px;">绗�3鍒嗙被</div>
- </td>
- <td style="width:140px;">
- <lightning-combobox class="inputFont" variant="label-hidden" label="绗�3鍒嗙被" value={category3} options={category3Option} onchange={category3Change}></lightning-combobox>
- </td>
- <td style="width:30px;"></td>
- <td style="width:66px;">
- <div style="color:#696969;font-size:16px;">绗�4鍒嗙被</div>
- </td>
- <td style="width:140px;">
- <lightning-combobox class="inputFont" variant="label-hidden" label="绗�4鍒嗙被" value={category4} options={category4Option} onchange={category4Change}></lightning-combobox>
- </td>
- <td></td>
- <td>
- <div style="color:#696969;font-size:16px;">绗�5鍒嗙被</div>
- </td>
- <td>
- <lightning-combobox class="inputFont" variant="label-hidden" label="绗�5鍒嗙被" value={category5} options={category5Option} onchange={category5Change}></lightning-combobox>
- </td>
- <td></td>
- <td>
- <!-- <lightning-button style="margin-right: 10px;margin-left: 15px;" label="娑堣�楀搧鎼滅储" onclick={searchProduct}></lightning-button>
- <lightning-button label="娓呯┖" onclick={clear}></lightning-button> -->
+ <td colspan="4">
<button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="width:130px;height:32px;margin-right: 10px;" label="娑堣�楀搧鎼滅储" onclick={searchProduct}>娑堣�楀搧鎼滅储</button>
<button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="width:80px;height:32px;" label="娓呯┖" onclick={clear}>娓呯┖</button>
+ </td>
+ </tr> -->
+ <!-- <tr style="height: 10px;"></tr> -->
+ <tr>
+ <td>
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 娑堣�楀搧鍚嶇О
+ </div>
+ </td>
+ <td>
+ <lightning-input
+ class="inputFont"
+ variant="label-hidden"
+ label="娑堣�楀搧鍚嶇О"
+ value={category1}
+ onchange={category1Change}
+ ></lightning-input>
+ </td>
+ <td></td>
+ <td>
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 绗�3鍒嗙被
+ </div>
+ </td>
+ <td>
+ <lightning-combobox
+ class="inputFont"
+ variant="label-hidden"
+ label="绗�3鍒嗙被"
+ value={category3}
+ options={category3Option}
+ onchange={category3Change}
+ ></lightning-combobox>
+ </td>
+ <td style="width: 30px"></td>
+ <td style="width: 66px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 绗�4鍒嗙被
+ </div>
+ </td>
+ <td>
+ <lightning-combobox
+ class="inputFont"
+ variant="label-hidden"
+ label="绗�4鍒嗙被"
+ value={category4}
+ options={category4Option}
+ onchange={category4Change}
+ ></lightning-combobox>
+ </td>
+ <td></td>
+ <td style="width: 66px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 绗�5鍒嗙被
+ </div>
+ </td>
+ <td style="width: 160px">
+ <lightning-combobox
+ class="inputFont"
+ variant="label-hidden"
+ label="绗�5鍒嗙被"
+ value={category5}
+ options={category5Option}
+ onchange={category5Change}
+ ></lightning-combobox>
+ </td>
+ </tr>
+ <tr style="height: 10px"></tr>
+ <tr>
+ <td style="width: 100px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ <span style="color: red"
+ >* </span
+ >鍚堝悓
+ </div>
+ </td>
+ <td style="width: 320px">
+ <div
+ class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"
+ >
+ <lightning-icon
+ size="x-small"
+ class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default"
+ icon-name="utility:search"
+ ></lightning-icon>
+ <lightning-input
+ class="inputFont"
+ variant="label-hidden"
+ label="鍚堝悓"
+ placeholder="璇烽�夋嫨鍚堝悓"
+ value={contractName}
+ onchange={changeCon}
+ onclick={showSearchCon}
+ ></lightning-input>
+ </div>
+ </td>
+ <td style="width: 30px"></td>
+ <td style="width: 66px">
+ <template if:true={showHospital}>
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ <span style="color: red"
+ >* </span
+ >鍖婚櫌
+ </div>
+ </template>
+ </td>
+ <td
+ colspan="4"
+ style="
+ padding-bottom: 5px;
+ padding-top: 5px;
+ "
+ >
+ <template if:true={showHospital}>
+ <div
+ class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"
+ >
+ <lightning-icon
+ size="x-small"
+ class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default"
+ icon-name="utility:search"
+ ></lightning-icon>
+ <lightning-input
+ class="inputFont"
+ variant="label-hidden"
+ label="鍖婚櫌"
+ placeholder="璇烽�夋嫨鍖婚櫌"
+ value={hospitalName}
+ onclick={showSearchHos}
+ onchange={changeHos}
+ ></lightning-input>
+ </div>
+ </template>
+ </td>
+ <td style="width: 30px"></td>
+ <td colspan="2">
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="
+ width: 130px;
+ height: 32px;
+ margin-right: 10px;
+ "
+ label="娑堣�楀搧鎼滅储"
+ onclick={searchProduct}
+ >
+ 娑堣�楀搧鎼滅储
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ style="
+ width: 80px;
+ height: 32px;
+ "
+ label="娓呯┖"
+ onclick={clear}
+ >
+ 娓呯┖
+ </button>
</td>
</tr>
</tbody>
@@ -262,31 +557,94 @@
</template>
<!-- 璀﹀憡鎻愰啋 -->
<template if:true={hasWarning}>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;color:#ff6a00;font-size:17px;">
- <lightning-icon style="margin: 3px;" icon-name="utility:warning" size="small"></lightning-icon>
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ color: #ff6a00;
+ font-size: 17px;
+ "
+ >
+ <lightning-icon
+ style="margin: 3px"
+ icon-name="utility:warning"
+ size="small"
+ ></lightning-icon>
<strong> 璀﹀憡</strong>
</div>
<template for:each={warningMsgs} for:item="msg">
- <p key={msg} style="color:#ff6a00;padding-left:7px;font-size:16px;margin-bottom:7px;"> 銉� {msg}</p>
+ <p
+ key={msg}
+ style="
+ color: #ff6a00;
+ padding-left: 7px;
+ font-size: 16px;
+ margin-bottom: 7px;
+ "
+ >
+ 銉� {msg}
+ </p>
</template>
</div>
</template>
<!-- 鎶ラ敊鎻愰啋 -->
<template if:true={hasError}>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;color:red;font-size:17px;">
- <lightning-icon style="margin: 3px;" icon-name="utility:error" size="small"></lightning-icon>
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ color: red;
+ font-size: 17px;
+ "
+ >
+ <lightning-icon
+ style="margin: 3px"
+ icon-name="utility:error"
+ size="small"
+ ></lightning-icon>
<strong> 閿欒</strong>
</div>
<template for:each={errorMsgs} for:item="msg">
- <p key={msg} style="color:red;padding-left:7px;font-size:16px;margin-bottom:7px;"> 銉� {msg}</p>
+ <p
+ key={msg}
+ style="
+ color: red;
+ padding-left: 7px;
+ font-size: 16px;
+ margin-bottom: 7px;
+ "
+ >
+ 銉� {msg}
+ </p>
</template>
</div>
</template>
<!-- 娑堣�楀搧鏄庣粏 -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -296,24 +654,65 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>娑堣�楀搧鏄庣粏</strong></p> -->
</div>
- <div style="padding:10px;">
+ <div style="padding: 10px">
<template if:true={editAble}>
- <c-lex-custom-lightning-datatable class="wrapped-header-datatable" key-field="recordId" data={currentRecord} columns={cols}
- selected-rows={selectRows} onrowselection={checkRows} onchangevalue={conCountChange} onvalueblur={conCountBlur}
- default-sort-direction="asc" sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort}></c-lex-custom-lightning-datatable>
- <c-paginator onprevious={prePageClick} onnext={nextPageClick}
- onpageschange={pageSizeChange} onfirst={goFirstPage} onlast={goLastPage}
- page-size-options={pageSizeOptions} previous-button-disabled={previousButtonDisabled}
- next-button-disabled={nextButtonDisabled} record-start={recordStart}
- record-end={recordEnd} total-records={totalRecords}></c-paginator>
+ <c-lex-custom-lightning-datatable
+ class="wrapped-header-datatable"
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ key-field="recordId"
+ data={currentRecord}
+ columns={cols}
+ selected-rows={selectRows}
+ onrowselection={checkRows}
+ onchangevalue={conCountChange}
+ onvalueblur={conCountBlur}
+ default-sort-direction="asc"
+ sorted-direction={sortDirection}
+ sorted-by={sortedBy}
+ onsort={onHandleSort}
+ ></c-lex-custom-lightning-datatable>
+ <c-paginator
+ onprevious={prePageClick}
+ onnext={nextPageClick}
+ onpageschange={pageSizeChange}
+ onfirst={goFirstPage}
+ onlast={goLastPage}
+ page-size-options={pageSizeOptions}
+ previous-button-disabled={previousButtonDisabled}
+ next-button-disabled={nextButtonDisabled}
+ record-start={recordStart}
+ record-end={recordEnd}
+ total-records={totalRecords}
+ ></c-paginator>
</template>
<template if:false={editAble}>
- <c-lex-custom-lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="recordId" data={consumableorderdetailsRecordsview} columns={cols}></c-lex-custom-lightning-datatable>
- <c-paginator onprevious={prePageClick} onnext={nextPageClick}
- onpageschange={pageSizeChange} onfirst={goFirstPage} onlast={goLastPage}
- page-size-options={pageSizeOptions} previous-button-disabled={previousButtonDisabled}
- next-button-disabled={nextButtonDisabled} record-start={recordStart}
- record-end={recordEnd} total-records={totalRecords}></c-paginator>
+ <c-lex-custom-lightning-datatable
+ class="wrapped-header-datatable"
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ hide-checkbox-column
+ key-field="recordId"
+ data={consumableorderdetailsRecordsview}
+ columns={cols}
+ ></c-lex-custom-lightning-datatable>
+ <c-paginator
+ onprevious={prePageClick}
+ onnext={nextPageClick}
+ onpageschange={pageSizeChange}
+ onfirst={goFirstPage}
+ onlast={goLastPage}
+ page-size-options={pageSizeOptions}
+ previous-button-disabled={previousButtonDisabled}
+ next-button-disabled={nextButtonDisabled}
+ record-start={recordStart}
+ record-end={recordEnd}
+ total-records={totalRecords}
+ ></c-paginator>
</template>
</div>
</div>
@@ -338,27 +737,65 @@
</template> -->
<!-- 涓婁紶闄勪欢寮圭獥 -->
<template if:true={showAttPop}>
- <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small" style="border: 1px solid #D4D4D4;">
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-01"
+ aria-modal="true"
+ aria-describedby="modal-content-id-1"
+ class="slds-modal slds-fade-in-open slds-modal_small"
+ style="border: 1px solid #d4d4d4"
+ >
<template if:true={showPopSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <lightning-spinner
+ size="medium"
+ variant="brand"
+ ></lightning-spinner>
</template>
<div class="slds-modal__container">
- <header class="slds-modal__header" style="background-color: #F3F3F3;">
- <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closePop}>
- <lightning-icon icon-name="utility:close"
+ <header
+ class="slds-modal__header"
+ style="background-color: #f3f3f3"
+ >
+ <button
+ style=""
+ class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+ title="Close"
+ onclick={closePop}
+ >
+ <lightning-icon
+ icon-name="utility:close"
alternative-text="close"
variant="inverse"
- size="small" ></lightning-icon>
+ size="small"
+ ></lightning-icon>
<span class="slds-assistive-text">Close</span>
</button>
- <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">涓婁紶閰嶇疆鍗�</h2>
+ <h2
+ id="modal-heading-01"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
+ 涓婁紶閰嶇疆鍗�
+ </h2>
</header>
- <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" style="border: 1px solid #F3F3F3;">
+ <div
+ class="slds-modal__content slds-p-around_medium"
+ id="modal-content-id-1"
+ style="border: 1px solid #f3f3f3"
+ >
<div class="slds-m-top_medium slds-m-bottom_x-large">
<div class="slds-p-around_medium lgc-bg">
- <lightning-input class="fileUpload" type="file" label="闄勪欢涓婁紶" accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf" onchange={attChange}></lightning-input>
+ <lightning-input
+ class="fileUpload"
+ type="file"
+ label="闄勪欢涓婁紶"
+ accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf"
+ onchange={attChange}
+ ></lightning-input>
</div>
- <p style="font-size: 16px;">宸查�夋嫨鏂囦欢锛歿fileName}
+ <p style="font-size: 16px">
+ 宸查�夋嫨鏂囦欢锛歿fileName}
+
<template if:true={attDelBtn}>
<a onclick={removeAtt}>绉婚櫎</a>
</template>
@@ -368,8 +805,24 @@
<footer class="slds-modal__footer">
<!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷" onclick={closePop}></lightning-button>
<lightning-button style="margin-left: 10px;" variant="neutral" label="涓婁紶" onclick={uploadAtt}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" variant="neutral" label="鍙栨秷" onclick={closePop}>鍙栨秷</button>
- <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="margin-left: 10px;" variant="neutral" label="涓婁紶" onclick={uploadAtt}>涓婁紶</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ style="margin-left: 10px"
+ variant="neutral"
+ label="鍙栨秷"
+ onclick={closePop}
+ >
+ 鍙栨秷
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="margin-left: 10px"
+ variant="neutral"
+ label="涓婁紶"
+ onclick={uploadAtt}
+ >
+ 涓婁紶
+ </button>
</footer>
</div>
</section>
@@ -377,35 +830,104 @@
</template>
<!-- 鎼滅储鍖婚櫌 -->
<template if:true={showAttHosPop}>
- <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_medium" style="border: 1px solid #D4D4D4;">
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-01"
+ aria-modal="true"
+ aria-describedby="modal-content-id-1"
+ class="slds-modal slds-fade-in-open slds-modal_medium"
+ style="border: 1px solid #d4d4d4"
+ >
<div class="slds-modal__container">
- <header class="slds-modal__header" style="background-color: #F3F3F3;">
- <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closeHospitalPop}>
- <lightning-icon icon-name="utility:close"
+ <header
+ class="slds-modal__header"
+ style="background-color: #f3f3f3"
+ >
+ <button
+ style=""
+ class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+ title="Close"
+ onclick={closeHospitalPop}
+ >
+ <lightning-icon
+ icon-name="utility:close"
alternative-text="close"
variant="inverse"
- size="small" ></lightning-icon>
+ size="small"
+ ></lightning-icon>
<span class="slds-assistive-text">Close</span>
</button>
- <h2 id="modal-heading-02" class="slds-text-heading_medium slds-hyphenate">缁忛攢鍟嗗尰闄㈡绱�</h2>
+ <h2
+ id="modal-heading-02"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
+ 缁忛攢鍟嗗尰闄㈡绱�
+ </h2>
</header>
- <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-2" style="border: 1px solid #F3F3F3;">
- <table style="width: 100%;">
+ <div
+ class="slds-modal__content slds-p-around_medium"
+ id="modal-content-id-2"
+ style="border: 1px solid #f3f3f3"
+ >
+ <table style="width: 100%">
<tbody>
<tr>
- <td style="width: 74px;"><div style="color:#696969;font-size:16px;text-align: left;">鍖婚櫌鍚嶇О</div></td>
- <td style="width: 60%;"><lightning-input class="inputFont" label="鍖婚櫌鍚嶇О" variant="label-hidden" placeholder="璇疯緭鍏ュ尰闄㈠悕绉�" value={searchNameHos} onchange={searchNameHosChange}></lightning-input></td>
- <td style="width: 10px;"></td>
- <td><button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="height: 32px;" label="鎼滅储" onclick={searchHos}>鎼滅储</button></td>
+ <td style="width: 74px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ text-align: left;
+ "
+ >
+ 鍖婚櫌鍚嶇О
+ </div>
+ </td>
+ <td style="width: 60%">
+ <lightning-input
+ class="inputFont"
+ label="鍖婚櫌鍚嶇О"
+ variant="label-hidden"
+ placeholder="璇疯緭鍏ュ尰闄㈠悕绉�"
+ value={searchNameHos}
+ onchange={searchNameHosChange}
+ ></lightning-input>
+ </td>
+ <td style="width: 10px"></td>
+ <td>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="height: 32px"
+ label="鎼滅储"
+ onclick={searchHos}
+ >
+ 鎼滅储
+ </button>
+ </td>
</tr>
</tbody>
</table>
- <p style="height: 20px;"></p>
+ <p style="height: 20px"></p>
<!-- <p>宸查�夋嫨鍖婚櫌锛歿chooseHospital}</p> -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
<strong>鎼滅储缁撴灉</strong>
</p>
@@ -413,14 +935,27 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p> -->
</div>
- <div class="myTable" style="padding:10px;">
- <lightning-datatable class="wrapped-header-datatable" key-field="id" hide-checkbox-column="true" data={hospitalList} columns={hosCols} onrowaction={chooseHos}></lightning-datatable>
+ <div class="myTable" style="padding: 10px">
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ key-field="id"
+ hide-checkbox-column="true"
+ data={hospitalList}
+ columns={hosCols}
+ onrowaction={chooseHos}
+ ></lightning-datatable>
</div>
</div>
</div>
<footer class="slds-modal__footer">
<!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷" onclick={closeHospitalPop}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" label="鍙栨秷" onclick={closeHospitalPop}>鍙栨秷</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ label="鍙栨秷"
+ onclick={closeHospitalPop}
+ >
+ 鍙栨秷
+ </button>
<!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="纭" onclick={confirmHospital}></lightning-button> -->
</footer>
</div>
@@ -429,50 +964,132 @@
</template>
<!-- 鎼滅储鍚堝悓 -->
<template if:true={showConPop}>
- <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_medium" style="border: 1px solid #D4D4D4;">
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-01"
+ aria-modal="true"
+ aria-describedby="modal-content-id-1"
+ class="slds-modal slds-fade-in-open slds-modal_medium"
+ style="border: 1px solid #d4d4d4"
+ >
<div class="slds-modal__container">
- <header class="slds-modal__header" style="background-color: #F3F3F3;">
- <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closeContractPop}>
- <lightning-icon icon-name="utility:close"
+ <header
+ class="slds-modal__header"
+ style="background-color: #f3f3f3"
+ >
+ <button
+ style=""
+ class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+ title="Close"
+ onclick={closeContractPop}
+ >
+ <lightning-icon
+ icon-name="utility:close"
alternative-text="close"
variant="inverse"
- size="small" ></lightning-icon>
+ size="small"
+ ></lightning-icon>
<span class="slds-assistive-text">Close</span>
</button>
- <h2 id="modal-heading-03" class="slds-text-heading_medium slds-hyphenate">鍚堝悓妫�绱�</h2>
+ <h2
+ id="modal-heading-03"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
+ 鍚堝悓妫�绱�
+ </h2>
</header>
- <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-3" style="border: 1px solid #F3F3F3;">
- <table style="width: 100%;">
+ <div
+ class="slds-modal__content slds-p-around_medium"
+ id="modal-content-id-3"
+ style="border: 1px solid #f3f3f3"
+ >
+ <table style="width: 100%">
<tbody>
<tr>
- <td style="width: 74px;"><div style="color:#696969;font-size:16px;text-align: left;">鍚堝悓鍚嶇О</div></td>
- <td style="width: 60%;"><lightning-input class="inputFont" label="鍚堝悓鍚嶇О" variant="label-hidden" placeholder="璇疯緭鍏ュ悎鍚屽悕绉�" value={searchNameCon} onchange={searchNameConChange}></lightning-input></td>
- <td style="width: 10px;"></td>
- <td><button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="height: 32px;" label="鎼滅储" onclick={searchCon}>鎼滅储</button></td>
+ <td style="width: 74px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ text-align: left;
+ "
+ >
+ 鍚堝悓鍚嶇О
+ </div>
+ </td>
+ <td style="width: 60%">
+ <lightning-input
+ class="inputFont"
+ label="鍚堝悓鍚嶇О"
+ variant="label-hidden"
+ placeholder="璇疯緭鍏ュ悎鍚屽悕绉�"
+ value={searchNameCon}
+ onchange={searchNameConChange}
+ ></lightning-input>
+ </td>
+ <td style="width: 10px"></td>
+ <td>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="height: 32px"
+ label="鎼滅储"
+ onclick={searchCon}
+ >
+ 鎼滅储
+ </button>
+ </td>
<!-- <td><lightning-button label="鎼滅储" onclick={searchCon}></lightning-button></td> -->
</tr>
</tbody>
</table>
- <p style="height: 10px;"></p>
+ <p style="height: 10px"></p>
<!-- <p>宸查�夋嫨鍚堝悓锛歿chooseContract}</p> -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
<strong>鎼滅储缁撴灉</strong>
</p>
</lightning-layout-item>
</lightning-layout>
</div>
- <div style="padding:20px;">
- <lightning-datatable class="wrapped-header-datatable" key-field="id" hide-checkbox-column="true" data={contractList} columns={conCols} onrowaction={chooseCon}></lightning-datatable>
+ <div style="padding: 20px">
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ key-field="id"
+ hide-checkbox-column="true"
+ data={contractList}
+ columns={conCols}
+ onrowaction={chooseCon}
+ ></lightning-datatable>
</div>
</div>
</div>
<footer class="slds-modal__footer">
<!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷" onclick={closeContractPop}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" label="鍙栨秷" onclick={closeContractPop}>鍙栨秷</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ label="鍙栨秷"
+ onclick={closeContractPop}
+ >
+ 鍙栨秷
+ </button>
<!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="纭" onclick={confirmContract}></lightning-button> -->
</footer>
</div>
@@ -480,4 +1097,4 @@
<div class="slds-backdrop slds-backdrop_open"></div>
</template>
</template>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexConsumable/lexConsumable.js b/force-app/main/default/lwc/lexConsumable/lexConsumable.js
index 1bc8cee..dfde990 100644
--- a/force-app/main/default/lwc/lexConsumable/lexConsumable.js
+++ b/force-app/main/default/lwc/lexConsumable/lexConsumable.js
@@ -1,4 +1,4 @@
-import { LightningElement,wire,api,track } from 'lwc';
+import { LightningElement, wire, api, track } from 'lwc';
import { CurrentPageReference } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { NavigationMixin } from 'lightning/navigation';
@@ -19,1370 +19,1760 @@
import initContract from '@salesforce/apex/LexSearchContractController.init';
import searchContract from '@salesforce/apex/LexSearchContractController.searchContract';
import deleteAtt from '@salesforce/apex/LexConsumableController.deleteAtt';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
export default class LexConsumable extends NavigationMixin(LightningElement) {
-
- //椤甸潰鍩虹鏁版嵁
- @track editAble;
- @track pageType;
- @track esetId;
- @track keyWords;
- @track coc;
- @track cocId;
- @track userWorkLocation;
- @track accountName;
- @track accountid;
- @track specialCampaign = false;
- @track dealerProductId = [];
- @track category1;
- @track category3 = '';
- @track category4 = '';
- @track category5 = '';
- @track category_Goods;
- @track category3Option = [];
- @track category4Option = [];
- @track category5Option = [];
- @track consumableorderdetailsRecordsview = [];
- @track currentRecord = [];//鍒嗛〉
- @track selectRows = [];
- @track attachmentRecoeds = [];
- @track contactDealer = [];
- @track proLimitAndDate = [];
- @track agencyProType;
- @track agencyProType1;
- @track OSHFLG = false;
- @track bargainPrice;
- @track showOrderDate = false;
- @track showAttUploadDate = false;
- @track edoffersPrice = false;
- @track editDelCommitBtnDisabled = false;
- @track showEditBtn = false;
- @track disabledEditBtn = false;
- @track showPrintSheetBtn = false;
- @track showUploadSheetBtn = false;
- @track disabledUploadSheetBtn = false;
- @track showSubOrderbtn = false;
- @track disabledSubOrderbtn = false;
- @track showSaveOrderbtn1 = false;
- @track showSaveOrderbtn2 = false;
- @track showDeleteBtn = false;
- @track disabledDeleteBtn = false;
- @track showOfferPriceInputBtn = false;
- @track disabledOfferPriceInputBtn = false;
- @track showReapplyBtn = false;
- @track showHospital = false;
- @track showPage = false;
- @track cansee = false;
- @track showSpinner = true;
- @track showPopSpinner = false;
- stylesLoaded = false;
- //鏄惁涓�鐩存樉绀烘彁绀�
- @track isNoteStay = true;
- //鎺掑簭鐩稿叧
- @track sortDirection = 'asc';
- @track sortedBy;
- //鍒嗛〉
- @track currentPage = 1;
- @track pageSize = 10;
- // @track totalPage = 0;
- @track pageSizeOptions = [10, 25, 50, 100];
- @track recordStart = 0;
- @track recordEnd = 0;
- //鎶ラ敊鎻愰啋
- // @track hasError = false;
- @track errorMsgs = [];
- // @track hasWarning = false;
- @track warningMsgs = [];
- //闄勪欢涓婁紶
- @track showAttPop = false;
- @track filesUploaded = [];
- @track fileName;
- file;
- fileContents;
- fileReader;
- content;
- //鍖婚櫌鎼滅储
- @track showAttHosPop = false;
- @track hospitalList = [];
- @track searchNameHos;
- @track chooseHospital;
- @track chooseHospitalId;
- @track hospitalId;
- @track hospitalName;
- @track tempidHp;
- @track hosCols = [
- // {label:'鍖婚櫌鍚嶇О',fieldName:'Name',type:'button',typeAttributes:{label:{fieldName:'Name'},variant:'base'}},
- {label:'',type:'button',typeAttributes:{label:'閫夋嫨'},initialWidth:90,hideDefaultActions: true,wrapText:true},
- {label:'鍖婚櫌鍚嶇О',fieldName:'Name',initialWidth:380,wrapText:true,hideDefaultActions: true},
- {label:'鐪佷唤',fieldName:'StateMaster',initialWidth:80,hideDefaultActions: true,wrapText:true},
- {label:'鍦板潃',fieldName:'Address__c',hideDefaultActions: true,wrapText:true}
- ];
- //鍚堝悓鎼滅储
- @track contractLabel;
- @track showConPop = false;
- @track contractList = [];
- @track searchNameCon;
- @track chooseContract;
- @track chooseContractId;
- @track contractId;
- @track contractName;
- @track tempidPp;
- @track conCols = [
- {label:'',type:'button',typeAttributes:{label:'閫夋嫨'},initialWidth:90,hideDefaultActions: true,wrapText:true},
- {label:'鍚堝悓鍚嶇О',fieldName:'Name',wrapText:true,hideDefaultActions: true},
- {label:'鐪佷唤',fieldName:'StateMaster',initialWidth:80,hideDefaultActions: true,wrapText:true},
- {label:'鐢宠閿�鍞',fieldName:'Sales_Section__c',initialWidth:160,hideDefaultActions: true,wrapText:true},
- {label:'鍏佽鎶ヤ环鏈熼棿(寮�濮嬫棩)',fieldName:'Contract_Decide_Start_Date__c',initialWidth:175,hideDefaultActions: true,wrapText:true},
- {label:'鍏佽鎶ヤ环鏈熼棿(缁撴潫鏃�)',fieldName:'Contract_Decide_End_Date__c',initialWidth:175,hideDefaultActions: true,wrapText:true}
- ];
+ //椤甸潰鍩虹鏁版嵁
+ @track editAble;
+ @track pageType;
+ @track esetId;
+ @track keyWords;
+ @track coc;
+ @track cocId;
+ @track userWorkLocation;
+ @track accountName;
+ @track accountid;
+ @track specialCampaign = false;
+ @track dealerProductId = [];
+ @track category1;
+ @track category3 = '';
+ @track category4 = '';
+ @track category5 = '';
+ @track category_Goods;
+ @track category3Option = [];
+ @track category4Option = [];
+ @track category5Option = [];
+ @track consumableorderdetailsRecordsview = [];
+ @track currentRecord = []; //鍒嗛〉
+ @track selectRows = [];
+ @track attachmentRecoeds = [];
+ @track contactDealer = [];
+ @track proLimitAndDate = [];
+ @track agencyProType;
+ @track agencyProType1;
+ @track OSHFLG = false;
+ @track bargainPrice;
+ @track showOrderDate = false;
+ @track showAttUploadDate = false;
+ @track edoffersPrice = false;
+ @track editDelCommitBtnDisabled = false;
+ @track showEditBtn = false;
+ @track disabledEditBtn = false;
+ @track showPrintSheetBtn = false;
+ @track showUploadSheetBtn = false;
+ @track disabledUploadSheetBtn = false;
+ @track showSubOrderbtn = false;
+ @track disabledSubOrderbtn = false;
+ @track showSaveOrderbtn1 = false;
+ @track showSaveOrderbtn2 = false;
+ @track showDeleteBtn = false;
+ @track disabledDeleteBtn = false;
+ @track showOfferPriceInputBtn = false;
+ @track disabledOfferPriceInputBtn = false;
+ @track showReapplyBtn = false;
+ @track showHospital = false;
+ @track showPage = false;
+ @track cansee = false;
+ @track showSpinner = true;
+ @track showPopSpinner = false;
+ stylesLoaded = false;
+ //鏄惁涓�鐩存樉绀烘彁绀�
+ @track isNoteStay = true;
+ //鎺掑簭鐩稿叧
+ @track sortDirection = 'asc';
+ @track sortedBy;
+ //鍒嗛〉
+ @track currentPage = 1;
+ @track pageSize = 10;
+ // @track totalPage = 0;
+ @track pageSizeOptions = [10, 25, 50, 100];
+ @track recordStart = 0;
+ @track recordEnd = 0;
+ //鎶ラ敊鎻愰啋
+ // @track hasError = false;
+ @track errorMsgs = [];
+ // @track hasWarning = false;
+ @track warningMsgs = [];
+ //闄勪欢涓婁紶
+ @track showAttPop = false;
+ @track filesUploaded = [];
+ @track fileName;
+ file;
+ fileContents;
+ fileReader;
+ content;
+ //鍖婚櫌鎼滅储
+ @track showAttHosPop = false;
+ @track hospitalList = [];
+ @track searchNameHos;
+ @track chooseHospital;
+ @track chooseHospitalId;
+ @track hospitalId;
+ @track hospitalName;
+ @track tempidHp;
+ @track hosCols = [
+ // {label:'鍖婚櫌鍚嶇О',fieldName:'Name',type:'button',typeAttributes:{label:{fieldName:'Name'},variant:'base'}},
+ {
+ label: '',
+ type: 'button',
+ typeAttributes: { label: '閫夋嫨' },
+ initialWidth: 90,
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '鍖婚櫌鍚嶇О',
+ fieldName: 'Name',
+ initialWidth: 380,
+ wrapText: true,
+ hideDefaultActions: true
+ },
+ {
+ label: '鐪佷唤',
+ fieldName: 'StateMaster',
+ initialWidth: 80,
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '鍦板潃',
+ fieldName: 'Address__c',
+ hideDefaultActions: true,
+ wrapText: true
+ }
+ ];
+ //鍚堝悓鎼滅储
+ @track contractLabel;
+ @track showConPop = false;
+ @track contractList = [];
+ @track searchNameCon;
+ @track chooseContract;
+ @track chooseContractId;
+ @track contractId;
+ @track contractName;
+ @track tempidPp;
+ @track conCols = [
+ {
+ label: '',
+ type: 'button',
+ typeAttributes: { label: '閫夋嫨' },
+ initialWidth: 90,
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '鍚堝悓鍚嶇О',
+ fieldName: 'Name',
+ wrapText: true,
+ hideDefaultActions: true
+ },
+ {
+ label: '鐪佷唤',
+ fieldName: 'StateMaster',
+ initialWidth: 80,
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '鐢宠閿�鍞',
+ fieldName: 'Sales_Section__c',
+ initialWidth: 160,
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '鍏佽鎶ヤ环鏈熼棿(寮�濮嬫棩)',
+ fieldName: 'Contract_Decide_Start_Date__c',
+ initialWidth: 175,
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '鍏佽鎶ヤ环鏈熼棿(缁撴潫鏃�)',
+ fieldName: 'Contract_Decide_End_Date__c',
+ initialWidth: 175,
+ hideDefaultActions: true,
+ wrapText: true
+ }
+ ];
- //娑堣�楀搧鏁版嵁col
- get cols(){
- var cols = [];
- cols.push({label:'娑堣�楀搧鍚嶇О',fieldName:'prodName',wrapText:true,hideDefaultActions: true,sortable: true});
- cols.push({label:'瑙勬牸',fieldName:'packing_list',wrapText:true,hideDefaultActions: true,initialWidth:50,cellAttributes: { alignment: "right" }});
- cols.push({label:'CFDA鐘舵��',fieldName:'prodSFDAStatus',wrapText:true,hideDefaultActions: true,initialWidth:97});
- cols.push({label:'娉ㄥ唽璇佺紪鐮佸彿',fieldName:'approbation_No',wrapText:true,hideDefaultActions: true,initialWidth:120});
- cols.push({label:'娉ㄥ唽璇佹晥鏈�',fieldName:'expiration_Date',wrapText:true,hideDefaultActions: true,initialWidth:105});
- cols.push({label:'绗�3鍒嗙被',fieldName:'prodCategory3',wrapText:true,hideDefaultActions: true,initialWidth:78,sortable: true});
- cols.push({label:'绗�4鍒嗙被',fieldName:'prodCategory4',wrapText:true,hideDefaultActions: true,initialWidth:107,sortable: true});
- cols.push({label:'绗�5鍒嗙被',fieldName:'prodCategory5',wrapText:true,hideDefaultActions: true,initialWidth:80,sortable: true});
- if(this.cansee){
- cols.push({label:'鏍囧噯鍗曚环',type:'number',typeAttributes:{minimumFractionDigits: 2},fieldName:'prodIntraTradeList',hideDefaultActions: true,initialWidth:80});
- }
- if(this.editAble){
- cols.push(
- {label:'閲囪喘鏁伴噺',
- type: "customTableInput",typeAttributes: {
- recordId: { fieldName: "recordId" },
- inputValue: { fieldName: "consumableCount" },
- upperLimit: { fieldName: "upperlimit" },
- lowerLimit: { fieldName: "lowerlimit" },
- allnumber: { fieldName: "allnumber" },
- valueType: 'Number'
+ //娑堣�楀搧鏁版嵁col
+ get cols() {
+ var cols = [];
+ cols.push({
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'prodName',
+ wrapText: true,
+ hideDefaultActions: true,
+ sortable: true
+ // initialWidth: 136
+ });
+ cols.push({
+ label: '瑙勬牸',
+ fieldName: 'packing_list',
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 50,
+ cellAttributes: { alignment: 'right' }
+ });
+ cols.push({
+ label: 'CFDA鐘舵��',
+ fieldName: 'prodSFDAStatus',
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 84
+ });
+ cols.push({
+ label: '娉ㄥ唽璇佺紪鐮佸彿',
+ fieldName: 'approbation_No',
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 104
+ });
+ cols.push({
+ label: '娉ㄥ唽璇佹晥鏈�',
+ fieldName: 'expiration_Date',
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 95
+ });
+ cols.push({
+ label: '绗�3鍒嗙被',
+ fieldName: 'prodCategory3',
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 84,
+ sortable: true
+ });
+ cols.push({
+ label: '绗�4鍒嗙被',
+ fieldName: 'prodCategory4',
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 84,
+ sortable: true
+ });
+ cols.push({
+ label: '绗�5鍒嗙被',
+ fieldName: 'prodCategory5',
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 84,
+ sortable: true
+ });
+ if (this.cansee) {
+ cols.push({
+ label: '鏍囧噯鍗曚环',
+ type: 'number',
+ typeAttributes: { minimumFractionDigits: 2 },
+ fieldName: 'prodIntraTradeList',
+ hideDefaultActions: true,
+ initialWidth: 78
+ });
+ }
+ if (this.editAble) {
+ cols.push({
+ label: '閲囪喘鏁伴噺',
+ type: 'customTableInput',
+ typeAttributes: {
+ recordId: { fieldName: 'recordId' },
+ inputValue: { fieldName: 'consumableCount' },
+ upperLimit: { fieldName: 'upperlimit' },
+ lowerLimit: { fieldName: 'lowerlimit' },
+ allnumber: { fieldName: 'allnumber' },
+ valueType: 'Number'
+ },
+ hideDefaultActions: true,
+ initialWidth: 78
+ });
+ } else {
+ cols.push({
+ label: '閲囪喘鏁伴噺',
+ fieldName: 'consumableCount',
+ hideDefaultActions: true,
+ initialWidth: 78,
+ cellAttributes: { alignment: 'right' }
+ });
+ }
+ cols.push({
+ label: '鍦ㄥ簱鏁颁笅闄�',
+ fieldName: 'lowerlimit',
+ hideDefaultActions: true,
+ initialWidth: 86,
+ cellAttributes: { alignment: 'right' }
+ });
+ cols.push({
+ label: '鍦ㄥ簱鏁颁笂闄�',
+ fieldName: 'upperlimit',
+ hideDefaultActions: true,
+ initialWidth: 86,
+ cellAttributes: { alignment: 'right' }
+ });
+ // cols.push({label:'鏈夋晥鏈熷簱瀛�(鐩�)',fieldName:'allnumber',hideDefaultActions: true,initialWidth:105,sortable: true});
+ cols.push({
+ label: '鏈夋晥鏈熷簱瀛�(鐩�)',
+ type: 'customInventoryColor',
+ fieldName: 'allnumber',
+ typeAttributes: {
+ value: { fieldName: 'allnumber' },
+ upperlimit: { fieldName: 'upperlimit' },
+ lowerlimit: { fieldName: 'lowerlimit' },
+ boxPrice: '鐩�'
},
- hideDefaultActions: true,initialWidth:80});
- }else{
- cols.push({label:'閲囪喘鏁伴噺',fieldName:'consumableCount',hideDefaultActions: true,initialWidth:80,cellAttributes: { alignment: "right" }});
- }
- cols.push({label:'鍦ㄥ簱鏁颁笅闄�',fieldName:'lowerlimit',hideDefaultActions: true,initialWidth:100,cellAttributes: { alignment: "right" }});
- cols.push({label:'鍦ㄥ簱鏁颁笂闄�',fieldName:'upperlimit',hideDefaultActions: true,initialWidth:100,cellAttributes: { alignment: "right" }});
- // cols.push({label:'鏈夋晥鏈熷簱瀛�(鐩�)',fieldName:'allnumber',hideDefaultActions: true,initialWidth:105,sortable: true});
- cols.push(
- {label:'鏈夋晥鏈熷簱瀛�(鐩�)',
- type: "customInventoryColor",
- typeAttributes: {
- value: { fieldName: "allnumber" },
- upperlimit: { fieldName: "upperlimit" },
- lowerlimit: { fieldName: "lowerlimit" },
- boxPrice: '鐩�'
- },
- hideDefaultActions: true,initialWidth:126});
- cols.push({label:'鏈夋晥鏈熷簱瀛�(涓�)',fieldName:'allnumber_piece',hideDefaultActions: true,initialWidth:126,cellAttributes: { alignment: "right" }});
- return cols;
- }
+ hideDefaultActions: true,
+ initialWidth: 122,
+ sortable: true
+ });
+ cols.push({
+ label: '鏈夋晥鏈熷簱瀛�(涓�)',
+ fieldName: 'allnumber_piece',
+ hideDefaultActions: true,
+ initialWidth: 112,
+ cellAttributes: { alignment: 'right' }
+ });
+ return cols;
+ }
- //闄勪欢cols
- @track attCols = [
- {label:'鏍囬',fieldName:'attUrl',type:'url',typeAttributes:{label:{fieldName:'fileName'},target: "_blank"},hideDefaultActions: true},
- {label:'鍒涘缓浜�',fieldName:'ownerUrl',type:'url',typeAttributes:{label:{fieldName:'ownerName'},target: "_blank"},hideDefaultActions: true},
- {label:'涓婁紶鏃ユ湡',fieldName:'updateDate',hideDefaultActions: true},
- {label:'',type:'tableCellIcon',typeAttributes:{iconName:'utility:delete',recordId:{fieldName : 'recordId'}},initialWidth:50,hideDefaultActions: true}
- ];
+ //闄勪欢cols
+ @track attCols = [
+ {
+ label: '鏍囬',
+ fieldName: 'attUrl',
+ type: 'url',
+ typeAttributes: {
+ label: { fieldName: 'fileName' },
+ target: '_blank'
+ },
+ hideDefaultActions: true
+ },
+ {
+ label: '鍒涘缓浜�',
+ fieldName: 'ownerUrl',
+ type: 'url',
+ typeAttributes: {
+ label: { fieldName: 'ownerName' },
+ target: '_blank'
+ },
+ hideDefaultActions: true
+ },
+ {
+ label: '涓婁紶鏃ユ湡',
+ fieldName: 'updateDate',
+ hideDefaultActions: true
+ },
+ {
+ label: '',
+ type: 'tableCellIcon',
+ typeAttributes: {
+ iconName: 'utility:delete',
+ recordId: { fieldName: 'recordId' }
+ },
+ initialWidth: 50,
+ hideDefaultActions: true
+ }
+ ];
- //鍙栧緱鎵�鏈夎鍕鹃�夌殑浜у搧id
- getAllChecked(){
- this.selectRows = [];
- for(var i in this.currentRecord){
- if(this.currentRecord[i].check){
- this.selectRows.push(this.currentRecord[i].recordId);
- }
- }
- }
-
- //鍕鹃�夋搷浣�
- checkRows(event){
- this.selectRows = [];
- const selectedRows = event.detail.selectedRows;
- for(var i in this.consumableorderdetailsRecordsview){
- var count = 0;
- for(var j in selectedRows){
- if(this.consumableorderdetailsRecordsview[i].recordId == selectedRows[j].recordId){
- count++
- console.log("checkId:"+selectedRows[j].recordId+'---'+this.consumableorderdetailsRecordsview[i].prodName);
+ //鍙栧緱鎵�鏈夎鍕鹃�夌殑浜у搧id
+ getAllChecked() {
+ this.selectRows = [];
+ for (var i in this.currentRecord) {
+ if (this.currentRecord[i].check) {
+ this.selectRows.push(this.currentRecord[i].recordId);
}
- }
- if(count == 0){
- this.consumableorderdetailsRecordsview[i].check = false;
- }else{
- this.consumableorderdetailsRecordsview[i].check = true;
- this.selectRows.push(this.consumableorderdetailsRecordsview[i].recordId);
- }
- }
- for(var i in this.selectRows){
- console.log("checkId1:"+this.selectRows[i]);
- for(var i in this.currentRecord){
- if(this.currentRecord[i].recordId == this.selectRows[i]){
- console.log("currentRecord:"+this.selectRows[i]);
+ }
+ }
+
+ //鍕鹃�夋搷浣�
+ checkRows(event) {
+ this.selectRows = [];
+ const selectedRows = event.detail.selectedRows;
+ for (var i in this.consumableorderdetailsRecordsview) {
+ var count = 0;
+ for (var j in selectedRows) {
+ if (
+ this.consumableorderdetailsRecordsview[i].recordId ==
+ selectedRows[j].recordId
+ ) {
+ count++;
+ console.log(
+ 'checkId:' +
+ selectedRows[j].recordId +
+ '---' +
+ this.consumableorderdetailsRecordsview[i].prodName
+ );
+ }
}
- }
- }
- }
-
- //閲囪喘鏁伴噺鑾峰彇
- conCountChange(event){
- var recordId = event.detail.data.recordId;
- var conCount = event.detail.data.value;
- console.log('countChange:'+recordId+'---'+conCount);
- for(var i in this.consumableorderdetailsRecordsview){
- if(this.consumableorderdetailsRecordsview[i].recordId == recordId){
- this.consumableorderdetailsRecordsview[i].esd.Consumable_count__c = conCount;
- this.consumableorderdetailsRecordsview[i].consumableCount = conCount;
- if(conCount != null && conCount !=0 && conCount!=''){
- this.consumableorderdetailsRecordsview[i].check = true;
- }else{
- this.consumableorderdetailsRecordsview[i].check = false;
+ if (count == 0) {
+ this.consumableorderdetailsRecordsview[i].check = false;
+ } else {
+ this.consumableorderdetailsRecordsview[i].check = true;
+ this.selectRows.push(
+ this.consumableorderdetailsRecordsview[i].recordId
+ );
}
- }
- }
- this.getAllChecked();
- for(var i in this.currentRecord){
- if(this.currentRecord[i].recordId == recordId){
- console.log("currentRecord1:"+this.currentRecord[i].esd.Consumable_count__c);
- }
- }
- }
-
- //閲囪喘鏁伴噺澶辩劍
- conCountBlur(event){
- var conCount = event.detail.data.value;
- var allnumber = event.detail.data.allnumber;
- var upperLimit = event.detail.data.upperLimit;
- var lowerLimit = event.detail.data.lowerLimit;
- console.log('limit:'+conCount+'---'+ allnumber+'---'+lowerLimit+'---'+allnumber);
- if(upperLimit != null && lowerLimit != null && conCount != null && allnumber != null){
- if(parseInt(allnumber) + parseInt(conCount) > upperLimit){
- // window.alert("璇ヤ骇鍝佽璐暟閲忚秴鍑哄簱瀛樹笂闄愶紒");
- this.showMyToast('璇ヤ骇鍝佽璐暟閲忚秴鍑哄簱瀛樹笂闄愶紒','','error');
- }
- if(parseInt(allnumber) + parseInt(conCount) < lowerLimit){
- // window.alert("璇ヤ骇鍝佽璐暟閲忎綆浜庡簱瀛樹笅闄愶紒");
- this.showMyToast('璇ヤ骇鍝佽璐暟閲忎綆浜庡簱瀛樹笅闄愶紒','','error');
- }
- }
- }
-
- @wire(CurrentPageReference)
- getStateParameters(currentPageReference) {
- console.log('CurrentPageReference');
- if (currentPageReference) {
- this.pageType = currentPageReference.state?.type;
- this.esetId = currentPageReference.state?.ESetid;
- this.keyWords = currentPageReference.state?.KeyWords;
- console.log('type:'+this.pageType);
- console.log('esetId:'+this.esetId);
- console.log('keyWords:'+this.keyWords);
- }
- }
-
- renderedCallback(){
- if (!this.stylesLoaded) {
- Promise.all([loadStyle(this, WrappedHeaderTable)])
- .then(() => {
- console.log("Custom styles loaded");
- this.stylesLoaded = true;
- })
- .catch((error) => {
- console.error("Error loading custom styles");
- });
- }
- }
-
- //椤甸潰鍒濆鍖�
- connectedCallback(){
- this.showSpinner = true;
- initPage({type:this.pageType, esetId:this.esetId, keywordStr:this.keyWords})
- .then(result=>{
- this.isNoteStay = result.isNoteStay;
- if(result.result == 'Success'){
- this.editAble = result.editAble;
- this.edoffersPrice = result.edoffersPrice;
- this.cansee = result.cansee;
- this.editDelCommitBtnDisabled = result.editDelCommitBtnDisabled;
- this.category3Option = result.category3Option;
- this.category4Option = result.category4Option;
- this.category5Option = result.category5Option;
- this.agencyProType = result.agencyProType;
- this.agencyProType1 = result.agencyProType1;
- this.OSHFLG = result.OSHFLG;
- this.hospitalName = result.hospitalName;
- this.contractName = result.contractName;
- this.contractLabel = '缁忛攢鍟嗘湁鏁堝悎鍚�';
- this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview;
- this.currentPage = 1;
- this.showCurrentReocrd();
- this.getAllChecked();
- this.attachmentRecoeds = result.attachmentRecoeds;
- console.log("attSize:"+this.attachmentRecoeds.length);
- for(var i in this.attachmentRecoeds){
- this.attachmentRecoeds[i]['recordId'] = this.attachmentRecoeds[i].Concc.Id;
- this.attachmentRecoeds[i]['documentId'] = this.attachmentRecoeds[i].Concc.ContentDocumentId;
- this.attachmentRecoeds[i]['fileFullName'] = this.attachmentRecoeds[i].Concc.Title;
- var contractionName = this.attachmentRecoeds[i].Concc.Title;
- // var contractionName = '闀挎枃浠堕暱鏂囦欢闀挎枃浠堕暱鏂囦欢';
- if(contractionName.length > 25){
- contractionName = contractionName.substr(0,21) + "...";
- }
- this.attachmentRecoeds[i]['fileName'] = contractionName;
- this.attachmentRecoeds[i]['ownerName'] = this.attachmentRecoeds[i].Concc.Owner.Name;
- this.attachmentRecoeds[i]['downloadUrl'] = '/sfc/servlet.shepherd/document/download/'+this.attachmentRecoeds[i].Concc.ContentDocumentId+'?operationContext=S1';
- // var date = this.attachmentRecoeds[i].Concc.CreatedDate;
- // var year = date.getFullYear();
- // var month = date.getMonth();
- // var day = date.getDay();
- // console.log(year+'-'+month+'-'+day);
- this.attachmentRecoeds[i]['updateDate'] = new Date(Date.parse(this.attachmentRecoeds[i].Concc.CreatedDate)).toLocaleString();
- this.attachmentRecoeds[i]['attUrl'] = '/'+this.attachmentRecoeds[i].Concc.Id;
- this.attachmentRecoeds[i]['ownerUrl'] = '/'+this.attachmentRecoeds[i].Concc.OwnerId;
- }
- this.errorMsgs = result.errorMsgList;
- this.warningMsgs = result.warningMsgList;
- this.userWorkLocation = result.userWorkLocation;
- this.accountName = result.accountName;
- this.accountid = result.accountid;
- this.hospitalId = result.hospitalId;
- this.contractId = result.contractId;
- this.category_Goods = result.category_Goods;
- this.specialCampaign = result.specialCampaign;
- this.dealerProductId = result.dealerProductId;
- this.contactDealer = result.contactDealer;
- this.pageType = result.methodType;
- this.proLimitAndDate = result.proLimitAndDate;
- console.log("proLimitAndDate:"+JSON.stringify(this.proLimitAndDate));
- this.coc = result.coc;
- this.cocId = this.coc.Id;
- if(this.pageType == 'hospitalorder' && this.agencyProType != 'ET'){
- this.showHospital = true;
- }
- if(this.coc.Order_status__c == "宸叉彁浜�" || this.coc.Order_status__c == "鎵瑰噯"){
- this.showOrderDate = true;
- }
- if(this.coc.Consumable_pdf_insert_day__c != null){
- this.showAttUploadDate = true;
- }
- if(!(this.editAble || this.edoffersPrice)){
- this.showEditBtn = true;
- this.showOfferPriceInputBtn = true;
- }
- if(this.coc.Order_status__c == "宸叉彁浜�" || this.coc.Order_status__c == "鎵瑰噯" || this.coc.Order_status__c == "椹冲洖"){
- this.disabledEditBtn = true;
- this.disabledUploadSheetBtn = true;
- this.disabledSubOrderbtn = true;
- this.disabledDeleteBtn = true;
- this.disabledOfferPriceInputBtn = true;
- }
- if(!(this.editDelCommitBtnDisabled || this.editAble || this.edoffersPrice)){
- this.showPrintSheetBtn = true;
- this.showUploadSheetBtn = true;
- this.showSubOrderbtn = true;
- this.showDeleteBtn = true;
- }
- if((this.editDelCommitBtnDisabled || this.editAble || this.edoffersPrice) && this.coc.Order_status__c != "椹冲洖"){
- this.showSaveOrderbtn1 = true;
- }
- if(this.coc.Order_status__c == "椹冲洖" && this.editAble){
- this.showSaveOrderbtn2 = true;
- }
- if(this.coc.Order_status__c == "椹冲洖" && !this.editAble){
- this.showReapplyBtn = true;
- }
- this.showSpinner = false;
- this.showPage = true;
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鍒濆鍖栭〉闈㈠け璐�',result.errorMsg,'error');
+ }
+ for (var i in this.selectRows) {
+ console.log('checkId1:' + this.selectRows[i]);
+ for (var i in this.currentRecord) {
+ if (this.currentRecord[i].recordId == this.selectRows[i]) {
+ console.log('currentRecord:' + this.selectRows[i]);
+ }
}
- })
- .catch(error=>{
+ }
+ }
+
+ //閲囪喘鏁伴噺鑾峰彇
+ conCountChange(event) {
+ var recordId = event.detail.data.recordId;
+ var conCount = event.detail.data.value;
+ console.log('countChange:' + recordId + '---' + conCount);
+ for (var i in this.consumableorderdetailsRecordsview) {
+ if (
+ this.consumableorderdetailsRecordsview[i].recordId == recordId
+ ) {
+ this.consumableorderdetailsRecordsview[
+ i
+ ].esd.Consumable_count__c = conCount;
+ this.consumableorderdetailsRecordsview[i].consumableCount =
+ conCount;
+ if (conCount != null && conCount != 0 && conCount != '') {
+ this.consumableorderdetailsRecordsview[i].check = true;
+ } else {
+ this.consumableorderdetailsRecordsview[i].check = false;
+ this.consumableorderdetailsRecordsview[
+ i
+ ].esd.Consumable_count__c = null;
+ this.consumableorderdetailsRecordsview[i].consumableCount =
+ null;
+ }
+ }
+ }
+ this.getAllChecked();
+ for (var i in this.currentRecord) {
+ if (this.currentRecord[i].recordId == recordId) {
+ console.log(
+ 'currentRecord1:' +
+ this.currentRecord[i].esd.Consumable_count__c
+ );
+ }
+ }
+ }
+
+ //閲囪喘鏁伴噺澶辩劍
+ conCountBlur(event) {
+ var conCount = event.detail.data.value;
+ var allnumber = event.detail.data.allnumber;
+ var upperLimit = event.detail.data.upperLimit;
+ var lowerLimit = event.detail.data.lowerLimit;
+ console.log(
+ 'limit:' +
+ conCount +
+ '---' +
+ allnumber +
+ '---' +
+ lowerLimit +
+ '---' +
+ allnumber
+ );
+ if (
+ upperLimit != null &&
+ lowerLimit != null &&
+ conCount != null &&
+ allnumber != null
+ ) {
+ if (parseInt(allnumber) + parseInt(conCount) > upperLimit) {
+ // window.alert("璇ヤ骇鍝佽璐暟閲忚秴鍑哄簱瀛樹笂闄愶紒");
+ this.showMyToast('璇ヤ骇鍝佽璐暟閲忚秴鍑哄簱瀛樹笂闄愶紒', '', 'error');
+ }
+ if (parseInt(allnumber) + parseInt(conCount) < lowerLimit) {
+ // window.alert("璇ヤ骇鍝佽璐暟閲忎綆浜庡簱瀛樹笅闄愶紒");
+ this.showMyToast('璇ヤ骇鍝佽璐暟閲忎綆浜庡簱瀛樹笅闄愶紒', '', 'error');
+ }
+ }
+ }
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ console.log('CurrentPageReference');
+ if (currentPageReference) {
+ this.pageType = currentPageReference.state?.type;
+ this.esetId = currentPageReference.state?.ESetid;
+ this.keyWords = currentPageReference.state?.KeyWords;
+ console.log('type:' + this.pageType);
+ console.log('esetId:' + this.esetId);
+ console.log('keyWords:' + this.keyWords);
+ }
+ }
+
+ renderedCallback() {
+ if (!this.stylesLoaded) {
+ Promise.all([loadStyle(this, WrappedHeaderTable)])
+ .then(() => {
+ console.log('Custom styles loaded');
+ this.stylesLoaded = true;
+ })
+ .catch((error) => {
+ console.error('Error loading custom styles');
+ });
+ }
+ }
+
+ //椤甸潰鍒濆鍖�
+ connectedCallback() {
+ this.showSpinner = true;
+ initPage({
+ type: this.pageType,
+ esetId: this.esetId,
+ keywordStr: this.keyWords
+ })
+ .then((result) => {
+ this.isNoteStay = result.isNoteStay;
+ if (result.result == 'Success') {
+ this.editAble = result.editAble;
+ this.edoffersPrice = result.edoffersPrice;
+ this.cansee = result.cansee;
+ this.editDelCommitBtnDisabled =
+ result.editDelCommitBtnDisabled;
+ this.category3Option = result.category3Option;
+ this.category4Option = result.category4Option;
+ this.category5Option = result.category5Option;
+ this.agencyProType = result.agencyProType;
+ this.agencyProType1 = result.agencyProType1;
+ this.OSHFLG = result.OSHFLG;
+ this.hospitalName = result.hospitalName;
+ this.contractName = result.contractName;
+ this.contractLabel = '缁忛攢鍟嗘湁鏁堝悎鍚�';
+ this.consumableorderdetailsRecordsview =
+ result.consumableorderdetailsRecordsview;
+ this.currentPage = 1;
+ this.showCurrentReocrd();
+ this.getAllChecked();
+ this.attachmentRecoeds = result.attachmentRecoeds;
+ console.log('attSize:' + this.attachmentRecoeds.length);
+ for (var i in this.attachmentRecoeds) {
+ this.attachmentRecoeds[i]['recordId'] =
+ this.attachmentRecoeds[i].Concc.Id;
+ this.attachmentRecoeds[i]['documentId'] =
+ this.attachmentRecoeds[i].Concc.ContentDocumentId;
+ this.attachmentRecoeds[i]['fileFullName'] =
+ this.attachmentRecoeds[i].Concc.Title;
+ var contractionName =
+ this.attachmentRecoeds[i].Concc.Title;
+ // var contractionName = '闀挎枃浠堕暱鏂囦欢闀挎枃浠堕暱鏂囦欢';
+ if (contractionName.length > 25) {
+ contractionName =
+ contractionName.substr(0, 21) + '...';
+ }
+ this.attachmentRecoeds[i]['fileName'] = contractionName;
+ this.attachmentRecoeds[i]['ownerName'] =
+ this.attachmentRecoeds[i].Concc.Owner.Name;
+ this.attachmentRecoeds[i]['downloadUrl'] =
+ '/sfc/servlet.shepherd/document/download/' +
+ this.attachmentRecoeds[i].Concc.ContentDocumentId +
+ '?operationContext=S1';
+ // var date = this.attachmentRecoeds[i].Concc.CreatedDate;
+ // var year = date.getFullYear();
+ // var month = date.getMonth();
+ // var day = date.getDay();
+ // console.log(year+'-'+month+'-'+day);
+ this.attachmentRecoeds[i]['updateDate'] = new Date(
+ Date.parse(
+ this.attachmentRecoeds[i].Concc.CreatedDate
+ )
+ ).toLocaleString();
+ this.attachmentRecoeds[i]['attUrl'] =
+ '/' + this.attachmentRecoeds[i].Concc.Id;
+ this.attachmentRecoeds[i]['ownerUrl'] =
+ '/' + this.attachmentRecoeds[i].Concc.OwnerId;
+ }
+ this.errorMsgs = result.errorMsgList;
+ this.warningMsgs = result.warningMsgList;
+ this.userWorkLocation = result.userWorkLocation;
+ this.accountName = result.accountName;
+ this.accountid = result.accountid;
+ this.hospitalId = result.hospitalId;
+ this.contractId = result.contractId;
+ this.category_Goods = result.category_Goods;
+ this.specialCampaign = result.specialCampaign;
+ this.dealerProductId = result.dealerProductId;
+ this.contactDealer = result.contactDealer;
+ this.pageType = result.methodType;
+ this.proLimitAndDate = result.proLimitAndDate;
+ console.log(
+ 'proLimitAndDate:' +
+ JSON.stringify(this.proLimitAndDate)
+ );
+ this.coc = result.coc;
+ this.cocId = this.coc.Id;
+ if (
+ this.pageType == 'hospitalorder' &&
+ this.agencyProType != 'ET'
+ ) {
+ this.showHospital = true;
+ }
+ if (
+ this.coc.Order_status__c == '宸叉彁浜�' ||
+ this.coc.Order_status__c == '鎵瑰噯'
+ ) {
+ this.showOrderDate = true;
+ }
+ if (this.coc.Consumable_pdf_insert_day__c != null) {
+ this.showAttUploadDate = true;
+ }
+ if (!(this.editAble || this.edoffersPrice)) {
+ this.showEditBtn = true;
+ this.showOfferPriceInputBtn = true;
+ }
+ if (
+ this.coc.Order_status__c == '宸叉彁浜�' ||
+ this.coc.Order_status__c == '鎵瑰噯' ||
+ this.coc.Order_status__c == '椹冲洖'
+ ) {
+ this.disabledEditBtn = true;
+ this.disabledUploadSheetBtn = true;
+ this.disabledSubOrderbtn = true;
+ this.disabledDeleteBtn = true;
+ this.disabledOfferPriceInputBtn = true;
+ }
+ if (
+ !(
+ this.editDelCommitBtnDisabled ||
+ this.editAble ||
+ this.edoffersPrice
+ )
+ ) {
+ this.showPrintSheetBtn = true;
+ this.showUploadSheetBtn = true;
+ this.showSubOrderbtn = true;
+ this.showDeleteBtn = true;
+ }
+ if (
+ (this.editDelCommitBtnDisabled ||
+ this.editAble ||
+ this.edoffersPrice) &&
+ this.coc.Order_status__c != '椹冲洖'
+ ) {
+ this.showSaveOrderbtn1 = true;
+ }
+ if (this.coc.Order_status__c == '椹冲洖' && this.editAble) {
+ this.showSaveOrderbtn2 = true;
+ }
+ if (this.coc.Order_status__c == '椹冲洖' && !this.editAble) {
+ this.showReapplyBtn = true;
+ }
+ this.showSpinner = false;
+ this.showPage = true;
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast(
+ '鍒濆鍖栭〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ })
+ .catch((error) => {
+ this.showSpinner = false;
+ console.log('error:' + error);
+ this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', error, 'error');
+ });
+ }
+
+ //鎺掑簭
+ onHandleSort(event) {
+ //灏嗗凡缁忛�夊ソ浜嗙殑鏀惧埌鍓嶉潰锛屼笉杩涜鎺掑簭
+ console.log('sort');
+ if (this.editAble) {
+ const { fieldName: sortedBy, sortDirection } = event.detail;
+ const cloneData = [...this.currentRecord];
+ cloneData.sort(
+ this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1)
+ );
+ let index = 0;
+ let selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
+ let selectedRowsIds = [];
+ for (var i in selectedRows) {
+ selectedRowsIds.push(selectedRows[i].recordId);
+ }
+ console.log('selectedRowsIds = ' + JSON.stringify(selectedRowsIds));
+ for (var i = 0; i < cloneData.length; i++) {
+ if (selectedRowsIds.indexOf(cloneData[i].recordId) != -1) {
+ if (i != 0) {
+ let temp = cloneData[index];
+ cloneData[index] = cloneData[i];
+ cloneData[i] = temp;
+ }
+ index++;
+ }
+ }
+ this.currentRecord = cloneData;
+ this.sortDirection = sortDirection;
+ this.sortedBy = sortedBy;
+ } else {
+ const { fieldName: sortedBy, sortDirection } = event.detail;
+ const cloneData = [...this.currentRecord];
+ cloneData.sort(
+ this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1)
+ );
+ this.currentRecord = cloneData;
+ this.sortDirection = sortDirection;
+ this.sortedBy = sortedBy;
+ }
+ }
+
+ sortBy(field, reverse, primer) {
+ const key = primer
+ ? function (x) {
+ return primer(x[field]);
+ }
+ : function (x) {
+ return x[field];
+ };
+
+ return function (a, b) {
+ a = key(a);
+ b = key(b);
+ return reverse * ((a > b) - (b > a));
+ };
+ }
+
+ //鏄惁鏈夎鍛�
+ get hasWarning() {
+ if (this.warningMsgs == null || this.warningMsgs.length == 0) {
+ return false;
+ }
+ if (this.warningMsgs.length > 0) {
+ return true;
+ }
+ }
+
+ //鏄惁鏈夐敊璇�
+ get hasError() {
+ if (this.errorMsgs == null || this.errorMsgs.length == 0) {
+ return false;
+ }
+ if (this.errorMsgs.length > 0) {
+ return true;
+ }
+ }
+
+ //鐗逛环change浜嬩欢
+ offerPriceChange(event) {
+ this.coc.Offers_Price__c = event.detail.value;
+ }
+
+ //娑堣�楀搧鍚嶇Оchange浜嬩欢
+ category1Change(event) {
+ this.category1 = event.detail.value;
+ }
+
+ //绗笁鍒嗙被change浜嬩欢
+ category3Change(event) {
+ this.showSpinner = true;
+ this.category3 = event.detail.value;
+ this.category4 = '';
+ this.category5 = '';
+ categoryAllload({
+ agencyProTypeStr: this.agencyProType,
+ category3Str: this.category3
+ }).then((result) => {
+ if (result.result == 'Success') {
+ this.category4Option = result.category4Option;
+ this.category5Option = result.category5Option;
+ this.showSpinner = false;
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('鍔犺浇鍒嗙被澶辫触', result.errorMsg, 'error');
+ }
+ });
+ }
+
+ //绗洓鍒嗙被change浜嬩欢
+ category4Change(event) {
+ this.showSpinner = true;
+ this.category4 = event.detail.value;
+ this.category5 = '';
+ categoryload({
+ agencyProTypeStr: this.agencyProType,
+ category3Str: this.category3,
+ category4Str: this.category4
+ }).then((result) => {
+ if (result.result == 'Success') {
+ this.category4Option = result.category4Option;
+ this.category5Option = result.category5Option;
+ this.showSpinner = false;
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('鍔犺浇鍒嗙被澶辫触', result.errorMsg, 'error');
+ }
+ });
+ }
+
+ //绗簲鍒嗙被change浜嬩欢
+ category5Change(event) {
+ this.category5 = event.detail.value;
+ }
+
+ //鎼滅储浜у搧
+ searchProduct(event) {
+ this.showSpinner = true;
+ searchConsumableorderdetails({
+ userWorkLocationStr: this.userWorkLocation,
+ agencyProTypeStr: this.agencyProType,
+ accountNameStr: this.accountName,
+ accountIdStr: this.accountid,
+ contractIdStr: this.contractId,
+ hospitalIdStr: this.hospitalId,
+ category1Str: this.category1,
+ category3Str: this.category3,
+ category4Str: this.category4,
+ category5Str: this.category5,
+ category_GoodStr: this.category_Goods,
+ specialCampaignStr: this.specialCampaign,
+ dealerProductIdStr: JSON.stringify(this.dealerProductId),
+ methodTypeStr: this.pageType,
+ editAbleStr: this.editAble,
+ consumableorderdetailsRecordsviewStr: JSON.stringify(
+ this.consumableorderdetailsRecordsview
+ ),
+ proLimitAndDateList: this.proLimitAndDate
+ })
+ .then((result) => {
+ if (result.result == 'Success') {
+ this.consumableorderdetailsRecordsview =
+ result.consumableorderdetailsRecordsview;
+ this.currentPage = 1;
+ this.currentRecord = [];
+ this.showCurrentReocrd();
+ this.getAllChecked();
+ this.showSpinner = false;
+ this.errorMsgs = result.errorMsgList;
+ this.warningMsgs = result.warningMsgList;
+ // this.hasError = result.hasError;
+ // this.hasWarning = result.hasWarning;
+ this.showMyToast('鎼滅储鎴愬姛', result.errorMsg, 'success');
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ if (result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�') {
+ this.showMyToast(result.errorMsg, '', 'error');
+ } else {
+ this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
+ }
+ }
+ })
+ .catch((error) => {
+ console.log('Error:' + error);
+ });
+ }
+
+ //娓呴櫎鎼滅储鏍�
+ clear(event) {
+ this.category1 = '';
+ this.category3 = '';
+ this.category4 = '';
+ this.category5 = '';
+ this.showSpinner = true;
+ searchConsumableorderdetails({
+ userWorkLocationStr: this.userWorkLocation,
+ agencyProTypeStr: this.agencyProType,
+ accountNameStr: this.accountName,
+ accountIdStr: this.accountid,
+ contractIdStr: this.contractId,
+ hospitalIdStr: this.hospitalId,
+ category1Str: this.category1,
+ category3Str: this.category3,
+ category4Str: this.category4,
+ category5Str: this.category5,
+ category_GoodStr: this.category_Goods,
+ specialCampaignStr: this.specialCampaign,
+ dealerProductIdStr: JSON.stringify(this.dealerProductId),
+ methodTypeStr: this.pageType,
+ editAbleStr: this.editAble,
+ consumableorderdetailsRecordsviewStr: JSON.stringify(
+ this.consumableorderdetailsRecordsview
+ ),
+ proLimitAndDateList: this.proLimitAndDate
+ }).then((result) => {
+ if (result.result == 'Success') {
+ this.consumableorderdetailsRecordsview =
+ result.consumableorderdetailsRecordsview;
+ this.currentPage = 1;
+ this.currentRecord = [];
+ this.showCurrentReocrd();
+ this.getAllChecked();
+ this.showSpinner = false;
+ this.showMyToast('鎼滅储鎴愬姛', result.errorMsg, 'success');
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ if (result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�') {
+ this.showMyToast(result.errorMsg, '', 'error');
+ } else {
+ this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
+ }
+ }
+ });
+ }
+
+ //閫夋嫨鎵�鏈�
+ checkAll(event) {
+ for (
+ let i = 0, len = this.consumableorderdetailsRecordsview.length;
+ i < len;
+ i++
+ ) {
+ this.consumableorderdetailsRecordsview[i].check =
+ event.target.checked;
+ }
+ }
+
+ //閫夋嫨
+ check(event) {
+ let index = event.target.getAttribute('data-index');
+ this.consumableorderdetailsRecordsview[index].check =
+ event.target.checked;
+ }
+
+ //閲囪喘鏁伴噺change浜嬩欢
+ // consumableCountChange(event){
+ // let index = event.target.getAttribute("data-index");
+ // var value = event.target.value;
+ // this.consumableorderdetailsRecordsview[index].esd.Consumable_count__c = value;
+ // if(isNaN(value)){
+ // value=0.00;
+ // }
+ // if(value != null && value !=0 && value!=''){
+ // this.consumableorderdetailsRecordsview[index].check = true;
+ // }else{
+ // this.consumableorderdetailsRecordsview[index].check = false;
+ // }
+ // }
+
+ //淇濆瓨璁㈠崟
+ saveOrder(event) {
+ this.showSpinner = true;
+ console.log('start save');
+ save({
+ contractNameStr: this.contractName,
+ cocStr: JSON.stringify(this.coc),
+ agencyProTypeStr: this.agencyProType,
+ accountidStr: this.accountid,
+ consumableorderdetailsRecordsviewStr: JSON.stringify(
+ this.consumableorderdetailsRecordsview
+ ),
+ contactDealerStr: JSON.stringify(this.contactDealer),
+ methodTypeStr: this.pageType,
+ eSetIdStr: this.esetId,
+ hospitalIdStr: this.hospitalId,
+ contractIdStr: this.contractId,
+ agencyProType1Str: this.agencyProType1,
+ OSHFLGStr: this.OSHFLG
+ }).then((result) => {
this.showSpinner = false;
- console.log("error:"+error);
- this.showMyToast('鍒濆鍖栭〉闈㈠け璐�',error,'error');
- })
- }
-
- //鎺掑簭
- onHandleSort(event){
- //灏嗗凡缁忛�夊ソ浜嗙殑鏀惧埌鍓嶉潰锛屼笉杩涜鎺掑簭
- console.log('sort');
- if(this.editAble){
- const { fieldName: sortedBy, sortDirection } = event.detail;
- const cloneData = [...this.currentRecord];
- cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
- let index = 0;
- let selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
- let selectedRowsIds = [];
- for(var i in selectedRows){
- selectedRowsIds.push(selectedRows[i].recordId);
- }
- console.log('selectedRowsIds = ' + JSON.stringify(selectedRowsIds));
- for(var i = 0;i < cloneData.length ; i++){
- if(selectedRowsIds.indexOf(cloneData[i].recordId) != -1){
- if(i != 0){
- let temp = cloneData[index];
- cloneData[index] = cloneData[i];
- cloneData[i] = temp;
- }
- index++;
+ if (result.result == 'Success') {
+ this.esetId = result.eSetId;
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url:
+ '/lexconsumable?ESetid=' +
+ this.esetId +
+ '&type=' +
+ this.pageType
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('淇濆瓨澶辫触', result.errorMsg, 'error');
}
- }
- this.currentRecord = cloneData;
- this.sortDirection = sortDirection;
- this.sortedBy = sortedBy;
- }else{
- const { fieldName: sortedBy, sortDirection } = event.detail;
- const cloneData = [...this.currentRecord];
- cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
- this.currentRecord = cloneData;
- this.sortDirection = sortDirection;
- this.sortedBy = sortedBy;
- }
- }
+ });
+ }
- sortBy(field, reverse, primer) {
- const key = primer
- ? function (x) {
- return primer(x[field]);
- }
- : function (x) {
- return x[field];
- };
-
- return function (a, b) {
- a = key(a);
- b = key(b);
- return reverse * ((a > b) - (b > a));
- };
- }
-
- //鏄惁鏈夎鍛�
- get hasWarning(){
- if(this.warningMsgs == null || this.warningMsgs.length == 0){
- return false;
- }
- if(this.warningMsgs.length > 0){
- return true;
- }
- }
-
- //鏄惁鏈夐敊璇�
- get hasError(){
- if(this.errorMsgs == null || this.errorMsgs.length == 0){
- return false;
- }
- if(this.errorMsgs.length > 0){
- return true;
- }
- }
-
- //鐗逛环change浜嬩欢
- offerPriceChange(event){
- this.coc.Offers_Price__c = event.detail.value;
- }
-
- //娑堣�楀搧鍚嶇Оchange浜嬩欢
- category1Change(event){
- this.category1 = event.detail.value;
- }
-
- //绗笁鍒嗙被change浜嬩欢
- category3Change(event){
- this.showSpinner = true;
- this.category3 = event.detail.value;
- this.category4 = '';
- this.category5 = '';
- categoryAllload({agencyProTypeStr:this.agencyProType, category3Str:this.category3})
- .then(result=>{
- if(result.result == 'Success'){
- this.category4Option = result.category4Option;
- this.category5Option = result.category5Option;
- this.showSpinner = false;
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鍔犺浇鍒嗙被澶辫触',result.errorMsg,'error');
- }
- })
- }
-
- //绗洓鍒嗙被change浜嬩欢
- category4Change(event){
- this.showSpinner = true;
- this.category4 = event.detail.value;
- this.category5 = '';
- categoryload({agencyProTypeStr:this.agencyProType, category3Str:this.category3, category4Str:this.category4})
- .then(result=>{
- if(result.result == 'Success'){
- this.category4Option = result.category4Option;
- this.category5Option = result.category5Option;
- this.showSpinner = false;
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鍔犺浇鍒嗙被澶辫触',result.errorMsg,'error');
- }
- })
- }
-
- //绗簲鍒嗙被change浜嬩欢
- category5Change(event){
- this.category5 = event.detail.value;
- }
-
- //鎼滅储浜у搧
- searchProduct(event){
- this.showSpinner = true;
- searchConsumableorderdetails({userWorkLocationStr:this.userWorkLocation,
- agencyProTypeStr:this.agencyProType,
- accountNameStr:this.accountName,
- accountIdStr:this.accountid,
- contractIdStr:this.contractId,
- hospitalIdStr:this.hospitalId,
- category1Str:this.category1,
- category3Str:this.category3,
- category4Str:this.category4,
- category5Str:this.category5,
- category_GoodStr:this.category_Goods,
- specialCampaignStr:this.specialCampaign,
- dealerProductIdStr:JSON.stringify(this.dealerProductId),
- methodTypeStr:this.pageType,
- editAbleStr:this.editAble,
- consumableorderdetailsRecordsviewStr:JSON.stringify(this.consumableorderdetailsRecordsview),
- proLimitAndDateList : this.proLimitAndDate
- })
- .then(result=>{
- if(result.result == 'Success'){
- this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview;
- this.currentPage = 1;
- this.currentRecord = [];
- this.showCurrentReocrd();
- this.getAllChecked();
- this.showSpinner = false;
- this.errorMsgs = result.errorMsgList;
- this.warningMsgs = result.warningMsgList;
- // this.hasError = result.hasError;
- // this.hasWarning = result.hasWarning;
- this.showMyToast('鎼滅储鎴愬姛',result.errorMsg,'success');
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- if(result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�'){
- this.showMyToast(result.errorMsg,'','error');
- }else{
- this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error');
- }
- }
- })
- .catch(error=>{
- console.log("Error:"+error);
- })
- }
-
- //娓呴櫎鎼滅储鏍�
- clear(event){
- this.category1 = '';
- this.category3 = '';
- this.category4 = '';
- this.category5 = '';
- this.showSpinner = true;
- searchConsumableorderdetails({
- userWorkLocationStr:this.userWorkLocation,
- agencyProTypeStr:this.agencyProType,
- accountNameStr:this.accountName,
- accountIdStr:this.accountid,
- contractIdStr:this.contractId,
- hospitalIdStr:this.hospitalId,
- category1Str:this.category1,
- category3Str:this.category3,
- category4Str:this.category4,
- category5Str:this.category5,
- category_GoodStr:this.category_Goods,
- specialCampaignStr:this.specialCampaign,
- dealerProductIdStr:JSON.stringify(this.dealerProductId),
- methodTypeStr:this.pageType,
- editAbleStr:this.editAble,
- consumableorderdetailsRecordsviewStr:JSON.stringify(this.consumableorderdetailsRecordsview),
- proLimitAndDateList : this.proLimitAndDate
- }).then(result=>{
- if(result.result == 'Success'){
- this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview;
- this.currentPage = 1;
- this.currentRecord = [];
- this.showCurrentReocrd();
- this.getAllChecked();
- this.showSpinner = false;
- this.showMyToast('鎼滅储鎴愬姛',result.errorMsg,'success');
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- if(result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�'){
- this.showMyToast(result.errorMsg,'','error');
- }else{
- this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error');
- }
- }
- })
- }
-
- //閫夋嫨鎵�鏈�
- checkAll(event){
- for(let i=0, len=this.consumableorderdetailsRecordsview.length; i < len ;i++){
- this.consumableorderdetailsRecordsview[i].check = event.target.checked;
- }
- }
-
- //閫夋嫨
- check(event){
- let index = event.target.getAttribute("data-index");
- this.consumableorderdetailsRecordsview[index].check = event.target.checked;
- }
-
- //閲囪喘鏁伴噺change浜嬩欢
- // consumableCountChange(event){
- // let index = event.target.getAttribute("data-index");
- // var value = event.target.value;
- // this.consumableorderdetailsRecordsview[index].esd.Consumable_count__c = value;
- // if(isNaN(value)){
- // value=0.00;
- // }
- // if(value != null && value !=0 && value!=''){
- // this.consumableorderdetailsRecordsview[index].check = true;
- // }else{
- // this.consumableorderdetailsRecordsview[index].check = false;
- // }
- // }
-
- //淇濆瓨璁㈠崟
- saveOrder(event){
- this.showSpinner = true;
- console.log('start save');
- save({
- contractNameStr:this.contractName,
- cocStr:JSON.stringify(this.coc),
- agencyProTypeStr:this.agencyProType,
- accountidStr:this.accountid,
- consumableorderdetailsRecordsviewStr:JSON.stringify(this.consumableorderdetailsRecordsview),
- contactDealerStr:JSON.stringify(this.contactDealer),
- methodTypeStr:this.pageType,
- eSetIdStr:this.esetId,
- hospitalIdStr : this.hospitalId,
- contractIdStr : this.contractId,
- agencyProType1Str : this.agencyProType1,
- OSHFLGStr : this.OSHFLG
- }).then(result=>{
- this.showSpinner = false;
- if(result.result == 'Success'){
- this.esetId = result.eSetId;
- const config = {
- type: 'standard__webPage',
- attributes: {
- url: '/lexconsumable?ESetid=' + this.esetId + '&type=' + this.pageType
- }
- };
- this[NavigationMixin.Navigate](config);
- }else{
+ //淇濆瓨璁㈠崟锛堥┏鍥烇級
+ orderCopy(event) {
+ this.showSpinner = true;
+ ordrCopy({
+ contractNameStr: this.contractName,
+ cocStr: JSON.stringify(this.coc),
+ agencyProTypeStr: this.agencyProType,
+ accountidStr: this.accountid,
+ consumableorderdetailsRecordsviewStr: JSON.stringify(
+ this.consumableorderdetailsRecordsview
+ ),
+ contactDealerStr: JSON.stringify(this.contactDealer),
+ methodTypeStr: this.pageType,
+ hospitalIdStr: this.hospitalId,
+ contractIdStr: this.contractId,
+ agencyProType1Str: this.agencyProType1,
+ OSHFLGStr: this.OSHFLG
+ }).then((result) => {
this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- this.showMyToast('淇濆瓨澶辫触',result.errorMsg,'error');
- }
- })
- }
-
- //淇濆瓨璁㈠崟锛堥┏鍥烇級
- orderCopy(event){
- this.showSpinner = true;
- ordrCopy({
- contractNameStr:this.contractName,
- cocStr:JSON.stringify(this.coc),
- agencyProTypeStr:this.agencyProType,
- accountidStr:this.accountid,
- consumableorderdetailsRecordsviewStr:JSON.stringify(this.consumableorderdetailsRecordsview),
- contactDealerStr:JSON.stringify(this.contactDealer),
- methodTypeStr:this.pageType,
- hospitalIdStr:this.hospitalId,
- contractIdStr : this.contractId,
- agencyProType1Str : this.agencyProType1,
- OSHFLGStr : this.OSHFLG
- }).then(result=>{
- this.showSpinner = false;
- if(result.result == 'Success'){
- this.esetId = result.eSetId;
- const config = {
- type: 'standard__webPage',
- attributes: {
- url: '/lexconsumable?ESetid=' + this.esetId + '&type=' + this.pageType
- }
- };
- this[NavigationMixin.Navigate](config);
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- this.showMyToast('淇濆瓨澶辫触',result.errorMsg,'error');
- }
- })
- }
-
- //缂栬緫
- editOrder(event){
- setEditAble({eSetidStr:this.esetId})
- .then(result=>{
- if(result.result == 'Success'){
- const config = {
- type: 'standard__webPage',
- attributes: {
- url: result.url
- }
- };
- this[NavigationMixin.Navigate](config);
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- this.showMyToast('缂栬緫澶辫触',result.errorMsg,'error');
+ if (result.result == 'Success') {
+ this.esetId = result.eSetId;
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url:
+ '/lexconsumable?ESetid=' +
+ this.esetId +
+ '&type=' +
+ this.pageType
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('淇濆瓨澶辫触', result.errorMsg, 'error');
}
- })
- }
+ });
+ }
- //鎵撳嵃閰嶇疆鍗�
- printOrder(event){
- var site = window.location.origin;
- const config = {
- type: 'standard__webPage',
- attributes: {
- url: site+'/consumable/PrintConsumblePDF?ESetid='+this.esetId
- }
- };
- this[NavigationMixin.Navigate](config);
- }
-
- //涓婁紶閰嶇疆鍗�
- uploadOrder(event){
- this.showAttPop = true;
- }
-
- //鎻愪氦璁㈠崟
- submitOrder(event){
- sorder({eSetidStr:this.esetId,accountidStr:this.accountid})
- .then(result=>{
- if(result.result == 'Success'){
- const config = {
- type: 'standard__webPage',
- attributes: {
- url: result.url
- }
- };
- this[NavigationMixin.Navigate](config);
- }else{
- this.showSpinner = false;
- this.errorMsgs = result.errorMsgList;
- this.warningMsgs = result.warningMsgList;
- console.log("Error:"+result.errorMsg);
- if(result.errorMsg.indexOf("璇蜂笂浼犺璐ч厤缃崟闄勪欢") != -1){
- result.errorMsg = '璇蜂笂浼犺璐ч厤缃崟闄勪欢';
- }
- this.showMyToast('鎻愪氦澶辫触',result.errorMsg,'error');
+ //缂栬緫
+ editOrder(event) {
+ setEditAble({ eSetidStr: this.esetId }).then((result) => {
+ if (result.result == 'Success') {
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url: result.url
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('缂栬緫澶辫触', result.errorMsg, 'error');
}
- })
- .catch(error=>{
- console.log("Error:"+error);
- })
- }
+ });
+ }
- //鍒犻櫎璁㈠崟
- deleteOrder(event){
- if(!window.confirm('鍒犻櫎鏄笉鍙仮澶嶇殑锛屼綘纭瑕佸垹闄ゅ悧锛�')){
- return;
- }
- delConsumable({eSetidStr:this.esetId})
- .then(result=>{
- if(result.result == 'Success'){
- const config = {
- type: 'standard__webPage',
- attributes: {
- url: result.url
- }
+ //鎵撳嵃閰嶇疆鍗�
+ printOrder(event) {
+ var site = window.location.origin;
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url:
+ site + '/consumable/PrintConsumblePDF?ESetid=' + this.esetId
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ }
+
+ //涓婁紶閰嶇疆鍗�
+ uploadOrder(event) {
+ this.showAttPop = true;
+ }
+
+ //鎻愪氦璁㈠崟
+ submitOrder(event) {
+ sorder({ eSetidStr: this.esetId, accountidStr: this.accountid })
+ .then((result) => {
+ if (result.result == 'Success') {
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url: result.url
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ } else {
+ this.showSpinner = false;
+ this.errorMsgs = result.errorMsgList;
+ this.warningMsgs = result.warningMsgList;
+ console.log('Error:' + result.errorMsg);
+ if (result.errorMsg.indexOf('璇蜂笂浼犺璐ч厤缃崟闄勪欢') != -1) {
+ result.errorMsg = '璇蜂笂浼犺璐ч厤缃崟闄勪欢';
+ }
+ this.showMyToast('鎻愪氦澶辫触', result.errorMsg, 'error');
+ }
+ })
+ .catch((error) => {
+ console.log('Error:' + error);
+ });
+ }
+
+ //鍒犻櫎璁㈠崟
+ deleteOrder(event) {
+ if (!window.confirm('鍒犻櫎鏄笉鍙仮澶嶇殑锛屼綘纭瑕佸垹闄ゅ悧锛�')) {
+ return;
+ }
+ delConsumable({ eSetidStr: this.esetId }).then((result) => {
+ if (result.result == 'Success') {
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url: result.url
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('鍒犻櫎澶辫触', result.errorMsg, 'error');
+ }
+ });
+ }
+
+ //鐗逛环閲戦褰曞叆
+ inputOfferPrice(event) {
+ this.edoffersPrice = true;
+ if (!(this.editAble || this.edoffersPrice)) {
+ this.showEditBtn = true;
+ this.showOfferPriceInputBtn = true;
+ } else {
+ this.showEditBtn = false;
+ this.showOfferPriceInputBtn = false;
+ }
+ if (
+ !(
+ this.editDelCommitBtnDisabled ||
+ this.editAble ||
+ this.edoffersPrice
+ )
+ ) {
+ this.showPrintSheetBtn = true;
+ this.showUploadSheetBtn = true;
+ this.showSubOrderbtn = true;
+ this.showDeleteBtn = true;
+ } else {
+ this.showPrintSheetBtn = false;
+ this.showUploadSheetBtn = false;
+ this.showSubOrderbtn = false;
+ this.showDeleteBtn = false;
+ }
+ if (
+ (this.editDelCommitBtnDisabled ||
+ this.editAble ||
+ this.edoffersPrice) &&
+ this.coc.Order_status__c != '椹冲洖'
+ ) {
+ this.showSaveOrderbtn1 = true;
+ } else {
+ this.showSaveOrderbtn1 = false;
+ }
+ }
+
+ //鍐嶇敵璇�
+ reapplyOrder(event) {
+ backOrder({ eSetidStr: this.esetId }).then((result) => {
+ if (result.result == 'Success') {
+ const config = {
+ type: 'standard__webPage',
+ attributes: {
+ url: result.url
+ }
+ };
+ this[NavigationMixin.Navigate](config);
+ } else {
+ this.showSpinner = false;
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('鍐嶇敵璇峰け璐�', result.errorMsg, 'error');
+ }
+ });
+ }
+
+ //闄勪欢change浜嬩欢
+ attChange(event) {
+ if (event.target.files.length > 0) {
+ this.filesUploaded = event.target.files;
+ this.fileName = event.target.files[0].name;
+ console.log('this.fileName:' + this.fileName);
+ }
+ }
+
+ //鏄惁鏄剧ず闄勪欢绉婚櫎
+ get attDelBtn() {
+ if (
+ this.fileName != '' &&
+ this.fileName != null &&
+ this.fileName != '璇烽�夋嫨涓�涓枃浠朵笂浼�'
+ ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ //鍏抽棴闄勪欢寮圭獥
+ closePop() {
+ this.showAttPop = false;
+ this.filesUploaded = [];
+ this.fileName = null;
+ }
+
+ //绉婚櫎闄勪欢
+ removeAtt() {
+ this.filesUploaded = [];
+ this.fileName = '';
+ }
+
+ //涓婁紶闄勪欢
+ uploadAtt(event) {
+ if (this.filesUploaded.length > 0) {
+ this.file = this.filesUploaded[0];
+ if (this.file.size > this.MAX_FILE_SIZE) {
+ window.console.log('鏂囦欢杩囧ぇ');
+ return;
+ }
+ this.fileReader = new FileReader();
+
+ this.fileReader.onloadend = () => {
+ this.fileContents = this.fileReader.result;
+ let base64 = 'base64,';
+ this.content =
+ this.fileContents.indexOf(base64) + base64.length;
+ this.fileContents = this.fileContents.substring(this.content);
+ this.saveToFile();
};
- this[NavigationMixin.Navigate](config);
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鍒犻櫎澶辫触',result.errorMsg,'error');
- }
- })
- }
+ this.fileReader.readAsDataURL(this.file);
+ } else {
+ this.fileName = '璇烽�夋嫨涓�涓枃浠朵笂浼�';
+ }
+ }
- //鐗逛环閲戦褰曞叆
- inputOfferPrice(event){
- this.edoffersPrice = true;
- if(!(this.editAble || this.edoffersPrice)){
- this.showEditBtn = true;
- this.showOfferPriceInputBtn = true;
- }else{
- this.showEditBtn = false;
- this.showOfferPriceInputBtn = false;
- }
- if(!(this.editDelCommitBtnDisabled || this.editAble || this.edoffersPrice)){
- this.showPrintSheetBtn = true;
- this.showUploadSheetBtn = true;
- this.showSubOrderbtn = true;
- this.showDeleteBtn = true;
- }else{
- this.showPrintSheetBtn = false;
- this.showUploadSheetBtn = false;
- this.showSubOrderbtn = false;
- this.showDeleteBtn = false;
- }
- if((this.editDelCommitBtnDisabled || this.editAble || this.edoffersPrice) && this.coc.Order_status__c != "椹冲洖"){
- this.showSaveOrderbtn1 = true;
- }else{
- this.showSaveOrderbtn1 = false;
- }
- }
-
- //鍐嶇敵璇�
- reapplyOrder(event){
- backOrder({eSetidStr:this.esetId})
- .then(result=>{
- if(result.result == 'Success'){
- const config = {
- type: 'standard__webPage',
- attributes: {
- url: result.url
- }
- };
- this[NavigationMixin.Navigate](config);
- }else{
- this.showSpinner = false;
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鍐嶇敵璇峰け璐�',result.errorMsg,'error');
- }
- })
- }
-
- //闄勪欢change浜嬩欢
- attChange(event){
- if(event.target.files.length > 0) {
- this.filesUploaded = event.target.files;
- this.fileName = event.target.files[0].name;
- console.log('this.fileName:'+this.fileName);
- }
- }
-
- //鏄惁鏄剧ず闄勪欢绉婚櫎
- get attDelBtn(){
- if(this.fileName != '' && this.fileName != null && this.fileName != '璇烽�夋嫨涓�涓枃浠朵笂浼�'){
- return true;
- }else{
- return false;
- }
- }
-
- //鍏抽棴闄勪欢寮圭獥
- closePop(){
- this.showAttPop = false;
- this.filesUploaded = [];
- this.fileName = null;
- }
-
- //绉婚櫎闄勪欢
- removeAtt(){
- this.filesUploaded = [];
- this.fileName = '';
- }
-
- //涓婁紶闄勪欢
- uploadAtt(event){
- if(this.filesUploaded.length > 0) {
- this.file = this.filesUploaded[0];
- if (this.file.size > this.MAX_FILE_SIZE) {
- window.console.log('鏂囦欢杩囧ぇ');
- return ;
- }
- this.fileReader= new FileReader();
-
- this.fileReader.onloadend = (() => {
- this.fileContents = this.fileReader.result;
- let base64 = 'base64,';
- this.content = this.fileContents.indexOf(base64) + base64.length;
- this.fileContents = this.fileContents.substring(this.content);
- this.saveToFile();
- });
- this.fileReader.readAsDataURL(this.file);
- }
- else {
- this.fileName = '璇烽�夋嫨涓�涓枃浠朵笂浼�';
- }
- }
-
- //璋冪敤涓婁紶闄勪欢鍚庡彴鏂规硶
- saveToFile() {
- this.showPopSpinner = true;
- filesUpload({pId:this.esetId, fileName: this.file.name, base64Data: encodeURIComponent(this.fileContents)})
- .then(result => {
- this.showPopSpinner = false;
- if(result.result == 'Success'){
- this.closePop();
- window.location.reload();
- }else{
- console.log("Error:"+result.errorMsg);
- this.showMyToast('涓婁紶澶辫触',result.errorMsg,'error');
- }
- })
- .catch(error => {
- this.showPopSpinner = false;
- this.showMyToast('涓婁紶澶辫触',error,'error');
- });
- }
-
- //鍒犻櫎闄勪欢
- deleteAtt(event){
- this.showSpinner = true;
- var recordId = event.target.getAttribute("data-fileid");
- console.log('attid:'+recordId);
- deleteAtt({contentVersionId : recordId})
- .then(result=>{
- this.showSpinner = false;
- if(result.result == 'Success'){
- window.location.reload();
- }else{
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鍒犻櫎澶辫触',result.errorMsg,'error');
- }
- })
- .catch(error=>{
- this.showSpinner = false;
- console.log("Error:"+error);
- this.showMyToast('鍒犻櫎澶辫触',JSON.stringify(error),'error');
- })
- }
-
- //棰勮闄勪欢
- previweAtt(event){
- var recordId = event.target.getAttribute("data-fileid");
- console.log(recordId);
- this[NavigationMixin.Navigate]({
- type:'standard__namedPage',
- attributes:{
- pageName:'filePreview'
- },
- state:{
- recordIds: recordId,
- selectedRecordId: recordId
- }
- });
- }
-
- //鎵撳紑鎼滅储寮圭獥锛屽苟鍒濆鍖栧脊绐�
- showSearchHos(event){
- initHospital()
- .then(result=>{
- if(result.result == 'Success'){
- this.showAttHosPop = true;
- this.hospitalList = result.attList;
- for(var i in this.hospitalList){
- if(this.hospitalList[i].State_Master__c){
- this.hospitalList[i]['StateMaster'] = this.hospitalList[i].State_Master__r.Name;
- }
- }
- }else{
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鍒濆鍖栨绱㈠尰闄㈤〉闈㈠け璐�',result.errorMsg,'error');
- }
- })
- .catch(error=>{
- console.log("Error:"+error);
- this.showMyToast('鍒濆鍖栨绱㈠尰闄㈤〉闈㈠け璐�',error,'error');
- })
- }
-
- //妫�绱㈠尰闄�
- searchHos(event){
- searchHospital({searchName:this.searchNameHos, accountId:this.accountid})
- .then(result=>{
- if(result.result == 'Success'){
- this.hospitalList = result.attList;
- for(var i in this.hospitalList){
- if(this.hospitalList[i].State_Master__c){
- this.hospitalList[i]['StateMaster'] = this.hospitalList[i].State_Master__r.Name;
- }
- }
- }else{
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error');
- }
- })
- .catch(error=>{
- console.log("Error:"+error);
- this.showMyToast('鎼滅储澶辫触',error,'error');
- })
- }
-
- //鍖婚櫌鍚嶇Оchange
- searchNameHosChange(event){
- this.searchNameHos = event.detail.value;
- }
-
- //鍏抽棴寮圭獥
- closeHospitalPop(){
- this.showAttHosPop = false;
- this.chooseHospital = '';
- this.chooseHospitalId = '';
- }
-
- // //閫夋嫨鍖婚櫌
- // chooseHos(event){
- // var hosName = event.target.getAttribute("data-name");
- // var hosid = event.target.getAttribute("data-hosid");
- // console.log('hos:'+hosName+'---'+hosid);
- // this.chooseHospital = hosName;
- // this.chooseHospitalId = hosid;
- // }
-
- changeHos(event){
- this.hospitalName = event.detail.value;
- }
-
- changeCon(event){
- this.contractName = event.detail.value;
- }
-
- chooseHos(event){
- const row = event.detail.row;
- this.chooseHospitalId = row.Id;
- this.chooseHospital = row.Name;
- console.log('row.Id:'+row.Id);
- console.log('row.Name:'+row.Name);
- this.confirmHospital();
- }
-
- //纭閫夋嫨鍖婚櫌
- confirmHospital(){
- if(this.chooseHospital != '' && this.chooseHospital != null){
- this.hospitalId = this.chooseHospitalId;
- this.tempidHp = this.chooseHospitalId;
- this.hospitalName = this.chooseHospital;
- this.closeHospitalPop();
- //娑堥櫎璀﹀憡
- var arr = [];
- for(var i in this.warningMsgs){
- if(this.warningMsgs[i] != '璇烽�夋嫨鍖婚櫌'){
- arr.push(this.warningMsgs[i]);
- }
- }
- this.warningMsgs = arr;
- if(this.tempidHp != 'tempId' && this.tempidHp != ''){
- searchorderdetails({
- methodTypeStr : this.pageType,
- accountIdStr : this.accountid,
- hospitalIdStr : this.hospitalId,
- contractIdStr : this.contractId,
- userWorkLocationStr : this.userWorkLocation,
- accountNameStr : this.accountName,
- proLimitAndDateList : this.proLimitAndDate,
- editAbleStr : this.editAble
- }).then(result=>{
- if(result.result == 'Success'){
- this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview;
- this.currentPage = 1;
- this.currentRecord = [];
- this.showCurrentReocrd();
- this.getAllChecked();
- this.showMyToast('鎼滅储鎴愬姛',result.errorMsg,'success');
- }else{
- console.log("Error:"+result.errorMsg);
- if(result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�'){
- this.showMyToast(result.errorMsg,'','error');
- }else{
- this.showMyToast('鎼滅储浜у搧澶辫触',result.errorMsg,'error');
- }
- }
+ //璋冪敤涓婁紶闄勪欢鍚庡彴鏂规硶
+ saveToFile() {
+ this.showPopSpinner = true;
+ filesUpload({
+ pId: this.esetId,
+ fileName: this.file.name,
+ base64Data: encodeURIComponent(this.fileContents)
+ })
+ .then((result) => {
+ this.showPopSpinner = false;
+ if (result.result == 'Success') {
+ this.closePop();
+ window.location.reload();
+ } else {
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('涓婁紶澶辫触', result.errorMsg, 'error');
+ }
})
- .catch(error=>{
- console.log("Error:"+error);
- this.showMyToast('鎼滅储浜у搧澶辫触',error,'error');
+ .catch((error) => {
+ this.showPopSpinner = false;
+ this.showMyToast('涓婁紶澶辫触', error, 'error');
+ });
+ }
+
+ //鍒犻櫎闄勪欢
+ deleteAtt(event) {
+ this.showSpinner = true;
+ var recordId = event.target.getAttribute('data-fileid');
+ console.log('attid:' + recordId);
+ deleteAtt({ contentVersionId: recordId, cocId: this.esetId })
+ .then((result) => {
+ this.showSpinner = false;
+ if (result.result == 'Success') {
+ window.location.reload();
+ } else {
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('鍒犻櫎澶辫触', result.errorMsg, 'error');
+ }
})
- this.tempidHp = 'tempId';
- }
- }else{
- this.showMyToast('璇烽�夋嫨鍖婚櫌','','error');
- }
- }
+ .catch((error) => {
+ this.showSpinner = false;
+ console.log('Error:' + error);
+ this.showMyToast('鍒犻櫎澶辫触', JSON.stringify(error), 'error');
+ });
+ }
- //鎵撳紑鍚堝悓妫�绱㈠脊绐楀苟鍒濆鍖�
- showSearchCon(){
- initContract({ctype:this.agencyProType1})
- .then(result=>{
- if(result.result == 'Success'){
- this.showConPop = true;
- this.contractList = result.attList;
- for(var i in this.contractList){
- if(this.contractList[i].State_Master__c){
- this.contractList[i]['StateMaster'] = this.contractList[i].State_Master__r.Name;
- }
+ //棰勮闄勪欢
+ previweAtt(event) {
+ var recordId = event.target.getAttribute('data-fileid');
+ console.log(recordId);
+ this[NavigationMixin.Navigate]({
+ type: 'standard__namedPage',
+ attributes: {
+ pageName: 'filePreview'
+ },
+ state: {
+ recordIds: recordId,
+ selectedRecordId: recordId
}
- }else{
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鍒濆鍖栨绱㈠悎鍚岄〉闈㈠け璐�',result.errorMsg,'error');
- }
- })
- .catch(error=>{
- console.log("Error:"+error);
- this.showMyToast('鍒濆鍖栨绱㈠悎鍚岄〉闈㈠け璐�',error,'error');
- })
- }
+ });
+ }
- //妫�绱㈠悎鍚�
- searchCon(){
- searchContract({searchName:this.searchNameCon, accountId:this.accountid, ctype:this.agencyProType1,OSHFLGStr : this.OSHFLG})
- .then(result=>{
- if(result.result == 'Success'){
- this.contractList = result.attList;
- for(var i in this.contractList){
- if(this.contractList[i].State_Master__c){
- this.contractList[i]['StateMaster'] = this.contractList[i].State_Master__r.Name;
- }
- }
- }else{
- console.log("Error:"+result.errorMsg);
- this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error');
- }
- })
- .catch(error=>{
- console.log("Error:"+error);
- this.showMyToast('鎼滅储澶辫触',error,'error');
- })
- }
-
- searchNameConChange(event){
- this.searchNameCon = event.detail.value;
- }
-
- //鍏抽棴寮圭獥
- closeContractPop(){
- this.showConPop = false;
- this.chooseContract = '';
- this.chooseContractId = '';
- }
-
- //閫夋嫨鍚堝悓
- // chooseCon(event){
- // var conName = event.target.getAttribute("data-name");
- // var conid = event.target.getAttribute("data-hosid");
- // console.log('hos:'+conName+'---'+conid);
- // this.chooseContract = conName;
- // this.chooseContractId = conid;
- // }
-
- chooseCon(event){
- const row = event.detail.row;
- this.chooseContractId = row.Id;
- this.chooseContract = row.Name;
- console.log('row.Id:'+row.Id);
- console.log('row.Name:'+row.Name);
- this.confirmContract();
- }
-
- //纭閫夋嫨鍚堝悓
- confirmContract(){
- if(this.chooseContract != '' && this.chooseContract != null){
- this.contractId = this.chooseContractId;
- this.tempidPp = this.chooseContractId;
- this.contractName = this.chooseContract;
- this.closeContractPop();
- if(this.tempidPp != 'tempId' && this.tempidPp != '' && this.contractId != '' && this.pageType == 'promotionorder'){
- searchorderdetails({
- methodTypeStr : this.pageType,
- accountIdStr : this.accountid,
- hospitalIdStr : this.hospitalId,
- contractIdStr : this.contractId,
- userWorkLocationStr : this.userWorkLocation,
- accountNameStr : this.accountName,
- proLimitAndDateList : this.proLimitAndDate,
- editAbleStr : this.editAble
- }).then(result=>{
- if(result.result == 'Success'){
- this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview;
- this.currentPage = 1;
- this.currentRecord = [];
- this.showCurrentReocrd();
- this.getAllChecked();
- this.showMyToast('鎼滅储鎴愬姛',result.errorMsg,'success');
- }else{
- console.log("Error:"+result.errorMsg);
- if(result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�'){
- this.showMyToast(result.errorMsg,'','error');
- }else{
- this.showMyToast('鎼滅储浜у搧澶辫触',result.errorMsg,'error');
- }
- }
+ //鎵撳紑鎼滅储寮圭獥锛屽苟鍒濆鍖栧脊绐�
+ showSearchHos(event) {
+ initHospital()
+ .then((result) => {
+ if (result.result == 'Success') {
+ this.showAttHosPop = true;
+ this.hospitalList = result.attList;
+ for (var i in this.hospitalList) {
+ if (this.hospitalList[i].State_Master__c) {
+ this.hospitalList[i]['StateMaster'] =
+ this.hospitalList[i].State_Master__r.Name;
+ }
+ }
+ } else {
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast(
+ '鍒濆鍖栨绱㈠尰闄㈤〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
})
- .catch(error=>{
- console.log("Error:"+error);
- this.showMyToast('鎼滅储浜у搧澶辫触',error,'error');
+ .catch((error) => {
+ console.log('Error:' + error);
+ this.showMyToast('鍒濆鍖栨绱㈠尰闄㈤〉闈㈠け璐�', error, 'error');
+ });
+ }
+
+ //妫�绱㈠尰闄�
+ searchHos(event) {
+ searchHospital({
+ searchName: this.searchNameHos,
+ accountId: this.accountid
+ })
+ .then((result) => {
+ if (result.result == 'Success') {
+ this.hospitalList = result.attList;
+ for (var i in this.hospitalList) {
+ if (this.hospitalList[i].State_Master__c) {
+ this.hospitalList[i]['StateMaster'] =
+ this.hospitalList[i].State_Master__r.Name;
+ }
+ }
+ } else {
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
+ }
})
- this.tempidPp = 'tempId';
- }
- }else{
- this.showMyToast('璇烽�夋嫨鍚堝悓','','error');
- }
- }
+ .catch((error) => {
+ console.log('Error:' + error);
+ this.showMyToast('鎼滅储澶辫触', error, 'error');
+ });
+ }
- showMyToast(title, message, variant) {
- console.log('show custom message');
- var iconName = '';
- var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
- }
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
- }
- this.template.querySelector('c-common-toast').
- showToast(variant,content,iconName,10000);
- // var mode;
- // if(this.isNoteStay){
- // mode ='sticky';
- // }else{
- // mode = 'dismissable';
- // }
- // const evt = new ShowToastEvent({
- // title: title,
- // message: message,
- // variant: variant,
- // mode: mode
- // });
- // this.dispatchEvent(evt);
- }
+ //鍖婚櫌鍚嶇Оchange
+ searchNameHosChange(event) {
+ this.searchNameHos = event.detail.value;
+ }
- //鍒嗛〉
- showCurrentReocrd(){
- var startIndex = 0;
- var endIndex = 0;
- console.log('len:'+this.consumableorderdetailsRecordsview.length);
- if(this.consumableorderdetailsRecordsview != null && this.consumableorderdetailsRecordsview.length > 0){
- var currentRecord = [];
- var currentCount = 0;
- var mu = this.consumableorderdetailsRecordsview.length % this.pageSize;
- if(this.currentPage == this.totalPage){
- if(mu != 0){
- currentCount = mu;
- }else{
- currentCount = this.pageSize;
+ //鍏抽棴寮圭獥
+ closeHospitalPop() {
+ this.showAttHosPop = false;
+ this.chooseHospital = '';
+ this.chooseHospitalId = '';
+ }
+
+ // //閫夋嫨鍖婚櫌
+ // chooseHos(event){
+ // var hosName = event.target.getAttribute("data-name");
+ // var hosid = event.target.getAttribute("data-hosid");
+ // console.log('hos:'+hosName+'---'+hosid);
+ // this.chooseHospital = hosName;
+ // this.chooseHospitalId = hosid;
+ // }
+
+ changeHos(event) {
+ this.hospitalName = event.detail.value;
+ }
+
+ changeCon(event) {
+ this.contractName = event.detail.value;
+ }
+
+ chooseHos(event) {
+ const row = event.detail.row;
+ this.chooseHospitalId = row.Id;
+ this.chooseHospital = row.Name;
+ console.log('row.Id:' + row.Id);
+ console.log('row.Name:' + row.Name);
+ this.confirmHospital();
+ }
+
+ //纭閫夋嫨鍖婚櫌
+ confirmHospital() {
+ if (this.chooseHospital != '' && this.chooseHospital != null) {
+ this.hospitalId = this.chooseHospitalId;
+ this.tempidHp = this.chooseHospitalId;
+ this.hospitalName = this.chooseHospital;
+ this.closeHospitalPop();
+ //娑堥櫎璀﹀憡
+ var arr = [];
+ for (var i in this.warningMsgs) {
+ if (this.warningMsgs[i] != '璇烽�夋嫨鍖婚櫌') {
+ arr.push(this.warningMsgs[i]);
+ }
}
- }else{
- currentCount = this.pageSize;
- }
- console.log('this.totalPage:'+this.totalPage);
- console.log('this.pageSize:'+this.pageSize);
- console.log('mu:'+mu);
- console.log('currentCount:'+currentCount);
- startIndex = (this.currentPage - 1) * this.pageSize;
- endIndex = parseInt(startIndex) + parseInt(currentCount) - 1;
- console.log('startIndex:'+startIndex);
- console.log('endIndex:'+endIndex);
- if(this.editAble){
- for(var i in this.currentRecord){
- if(this.currentRecord[i].check){
- currentRecord.push(this.currentRecord[i]);
- }
+ this.warningMsgs = arr;
+ if (this.tempidHp != 'tempId' && this.tempidHp != '') {
+ searchorderdetails({
+ methodTypeStr: this.pageType,
+ accountIdStr: this.accountid,
+ hospitalIdStr: this.hospitalId,
+ contractIdStr: this.contractId,
+ userWorkLocationStr: this.userWorkLocation,
+ accountNameStr: this.accountName,
+ proLimitAndDateList: this.proLimitAndDate,
+ editAbleStr: this.editAble
+ })
+ .then((result) => {
+ if (result.result == 'Success') {
+ this.consumableorderdetailsRecordsview =
+ result.consumableorderdetailsRecordsview;
+ this.currentPage = 1;
+ this.currentRecord = [];
+ this.showCurrentReocrd();
+ this.getAllChecked();
+ this.showMyToast(
+ '鎼滅储鎴愬姛',
+ result.errorMsg,
+ 'success'
+ );
+ } else {
+ console.log('Error:' + result.errorMsg);
+ if (result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�') {
+ this.showMyToast(result.errorMsg, '', 'error');
+ } else {
+ this.showMyToast(
+ '鎼滅储浜у搧澶辫触',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ }
+ })
+ .catch((error) => {
+ console.log('Error:' + error);
+ this.showMyToast('鎼滅储浜у搧澶辫触', error, 'error');
+ });
+ this.tempidHp = 'tempId';
}
- }
- for(var i = startIndex; i <= endIndex; i++){
- var count = 0;
- for(var j in this.currentRecord){
- if(this.consumableorderdetailsRecordsview[i].recordId == this.currentRecord[j].recordId){
- count++;
- }
+ } else {
+ this.showMyToast('璇烽�夋嫨鍖婚櫌', '', 'error');
+ }
+ }
+
+ //鎵撳紑鍚堝悓妫�绱㈠脊绐楀苟鍒濆鍖�
+ showSearchCon() {
+ initContract({ ctype: this.agencyProType1 })
+ .then((result) => {
+ if (result.result == 'Success') {
+ this.showConPop = true;
+ this.contractList = result.attList;
+ for (var i in this.contractList) {
+ if (this.contractList[i].State_Master__c) {
+ this.contractList[i]['StateMaster'] =
+ this.contractList[i].State_Master__r.Name;
+ }
+ }
+ } else {
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast(
+ '鍒濆鍖栨绱㈠悎鍚岄〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ })
+ .catch((error) => {
+ console.log('Error:' + error);
+ this.showMyToast('鍒濆鍖栨绱㈠悎鍚岄〉闈㈠け璐�', error, 'error');
+ });
+ }
+
+ //妫�绱㈠悎鍚�
+ searchCon() {
+ searchContract({
+ searchName: this.searchNameCon,
+ accountId: this.accountid,
+ ctype: this.agencyProType1,
+ OSHFLGStr: this.OSHFLG
+ })
+ .then((result) => {
+ if (result.result == 'Success') {
+ this.contractList = result.attList;
+ for (var i in this.contractList) {
+ if (this.contractList[i].State_Master__c) {
+ this.contractList[i]['StateMaster'] =
+ this.contractList[i].State_Master__r.Name;
+ }
+ }
+ } else {
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
+ }
+ })
+ .catch((error) => {
+ console.log('Error:' + error);
+ this.showMyToast('鎼滅储澶辫触', error, 'error');
+ });
+ }
+
+ searchNameConChange(event) {
+ this.searchNameCon = event.detail.value;
+ }
+
+ //鍏抽棴寮圭獥
+ closeContractPop() {
+ this.showConPop = false;
+ this.chooseContract = '';
+ this.chooseContractId = '';
+ }
+
+ //閫夋嫨鍚堝悓
+ // chooseCon(event){
+ // var conName = event.target.getAttribute("data-name");
+ // var conid = event.target.getAttribute("data-hosid");
+ // console.log('hos:'+conName+'---'+conid);
+ // this.chooseContract = conName;
+ // this.chooseContractId = conid;
+ // }
+
+ chooseCon(event) {
+ const row = event.detail.row;
+ this.chooseContractId = row.Id;
+ this.chooseContract = row.Name;
+ console.log('row.Id:' + row.Id);
+ console.log('row.Name:' + row.Name);
+ this.confirmContract();
+ }
+
+ //纭閫夋嫨鍚堝悓
+ confirmContract() {
+ if (this.chooseContract != '' && this.chooseContract != null) {
+ this.contractId = this.chooseContractId;
+ this.tempidPp = this.chooseContractId;
+ this.contractName = this.chooseContract;
+ this.closeContractPop();
+ if (
+ this.tempidPp != 'tempId' &&
+ this.tempidPp != '' &&
+ this.contractId != '' &&
+ this.pageType == 'promotionorder'
+ ) {
+ searchorderdetails({
+ methodTypeStr: this.pageType,
+ accountIdStr: this.accountid,
+ hospitalIdStr: this.hospitalId,
+ contractIdStr: this.contractId,
+ userWorkLocationStr: this.userWorkLocation,
+ accountNameStr: this.accountName,
+ proLimitAndDateList: this.proLimitAndDate,
+ editAbleStr: this.editAble
+ })
+ .then((result) => {
+ if (result.result == 'Success') {
+ this.consumableorderdetailsRecordsview =
+ result.consumableorderdetailsRecordsview;
+ this.currentPage = 1;
+ this.currentRecord = [];
+ this.showCurrentReocrd();
+ this.getAllChecked();
+ this.showMyToast(
+ '鎼滅储鎴愬姛',
+ result.errorMsg,
+ 'success'
+ );
+ } else {
+ console.log('Error:' + result.errorMsg);
+ if (result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�') {
+ this.showMyToast(result.errorMsg, '', 'error');
+ } else {
+ this.showMyToast(
+ '鎼滅储浜у搧澶辫触',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ }
+ })
+ .catch((error) => {
+ console.log('Error:' + error);
+ this.showMyToast('鎼滅储浜у搧澶辫触', error, 'error');
+ });
+ this.tempidPp = 'tempId';
}
- if(count == 0){
- currentRecord.push(this.consumableorderdetailsRecordsview[i]);
+ } else {
+ this.showMyToast('璇烽�夋嫨鍚堝悓', '', 'error');
+ }
+ }
+
+ showMyToast(title, message, variant) {
+ console.log('show custom message');
+ var iconName = '';
+ var content = '';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
+ }
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
+ }
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
+ // var mode;
+ // if(this.isNoteStay){
+ // mode ='sticky';
+ // }else{
+ // mode = 'dismissable';
+ // }
+ // const evt = new ShowToastEvent({
+ // title: title,
+ // message: message,
+ // variant: variant,
+ // mode: mode
+ // });
+ // this.dispatchEvent(evt);
+ }
+
+ //鍒嗛〉
+ showCurrentReocrd() {
+ var startIndex = 0;
+ var endIndex = 0;
+ console.log('len:' + this.consumableorderdetailsRecordsview.length);
+ if (
+ this.consumableorderdetailsRecordsview != null &&
+ this.consumableorderdetailsRecordsview.length > 0
+ ) {
+ var currentRecord = [];
+ var currentCount = 0;
+ var mu =
+ this.consumableorderdetailsRecordsview.length % this.pageSize;
+ if (this.currentPage == this.totalPage) {
+ if (mu != 0) {
+ currentCount = mu;
+ } else {
+ currentCount = this.pageSize;
+ }
+ } else {
+ currentCount = this.pageSize;
}
- }
- this.recordStart = startIndex + 1;
- this.recordEnd = endIndex + 1;
- this.currentRecord = currentRecord;
- }else{
- this.currentPage = 0;
- this.currentRecord = [];
- }
- }
+ console.log('this.totalPage:' + this.totalPage);
+ console.log('this.pageSize:' + this.pageSize);
+ console.log('mu:' + mu);
+ console.log('currentCount:' + currentCount);
+ startIndex = (this.currentPage - 1) * this.pageSize;
+ endIndex = parseInt(startIndex) + parseInt(currentCount) - 1;
+ console.log('startIndex:' + startIndex);
+ console.log('endIndex:' + endIndex);
+ if (this.editAble) {
+ for (var i in this.currentRecord) {
+ if (this.currentRecord[i].check) {
+ currentRecord.push(this.currentRecord[i]);
+ }
+ }
+ }
+ for (var i = startIndex; i <= endIndex; i++) {
+ var count = 0;
+ for (var j in this.currentRecord) {
+ if (
+ this.consumableorderdetailsRecordsview[i].recordId ==
+ this.currentRecord[j].recordId
+ ) {
+ count++;
+ }
+ }
+ if (count == 0) {
+ currentRecord.push(
+ this.consumableorderdetailsRecordsview[i]
+ );
+ }
+ }
+ this.recordStart = startIndex + 1;
+ this.recordEnd = endIndex + 1;
+ this.currentRecord = currentRecord;
+ } else {
+ this.currentPage = 0;
+ this.currentRecord = [];
+ }
+ }
- get prePage(){
- return this.currentPage - 1;
- }
+ get prePage() {
+ return this.currentPage - 1;
+ }
- get nextPage(){
- return this.currentPage + 1;
- }
+ get nextPage() {
+ return this.currentPage + 1;
+ }
- get totalPage(){
- if(this.consumableorderdetailsRecordsview.length % this.pageSize == 0){
- return Math.trunc(this.consumableorderdetailsRecordsview.length / this.pageSize);
- }else{
- return Math.trunc(this.consumableorderdetailsRecordsview.length / this.pageSize) + 1;
- }
- }
+ get totalPage() {
+ if (
+ this.consumableorderdetailsRecordsview.length % this.pageSize ==
+ 0
+ ) {
+ return Math.trunc(
+ this.consumableorderdetailsRecordsview.length / this.pageSize
+ );
+ } else {
+ return (
+ Math.trunc(
+ this.consumableorderdetailsRecordsview.length /
+ this.pageSize
+ ) + 1
+ );
+ }
+ }
- get totalRecords(){
- return this.consumableorderdetailsRecordsview.length;
- }
+ get totalRecords() {
+ return this.consumableorderdetailsRecordsview.length;
+ }
- //绗竴椤�
- goFirstPage(){
- this.currentPage = 1;
- this.showCurrentReocrd();
- }
+ //绗竴椤�
+ goFirstPage() {
+ this.currentPage = 1;
+ this.showCurrentReocrd();
+ }
- //鏈�鍚庝竴椤�
- goLastPage(){
- this.currentPage = this.totalPage;
- this.showCurrentReocrd();
- }
+ //鏈�鍚庝竴椤�
+ goLastPage() {
+ this.currentPage = this.totalPage;
+ this.showCurrentReocrd();
+ }
- //涓婁竴椤�
- prePageClick(){
- this.currentPage = this.currentPage - 1;
- this.showCurrentReocrd();
- }
+ //涓婁竴椤�
+ prePageClick() {
+ this.currentPage = this.currentPage - 1;
+ this.showCurrentReocrd();
+ }
- //涓嬩竴椤�
- nextPageClick(){
- this.currentPage = this.currentPage + 1;
- this.showCurrentReocrd();
- }
+ //涓嬩竴椤�
+ nextPageClick() {
+ this.currentPage = this.currentPage + 1;
+ this.showCurrentReocrd();
+ }
- //page size change
- pageSizeChange(event){
- console.log('pagesize:'+event.detail);
- this.pageSize = event.detail;
- this.currentPage = 1;
- this.currentRecord = [];
- this.showCurrentReocrd();
- }
-
- //涓婁竴椤垫寜閽槸鍚isable
- get previousButtonDisabled() {
- return this.currentPage == 1 || this.currentPage == 0;
- }
+ //page size change
+ pageSizeChange(event) {
+ console.log('pagesize:' + event.detail);
+ this.pageSize = event.detail;
+ this.currentPage = 1;
+ this.currentRecord = [];
+ this.showCurrentReocrd();
+ }
- //涓嬩竴椤垫寜閽槸鍚isable
- get nextButtonDisabled() {
- return this.currentPage == this.totalPage;
- }
-}
\ No newline at end of file
+ //涓婁竴椤垫寜閽槸鍚isable
+ get previousButtonDisabled() {
+ return this.currentPage == 1 || this.currentPage == 0;
+ }
+
+ //涓嬩竴椤垫寜閽槸鍚isable
+ get nextButtonDisabled() {
+ return this.currentPage == this.totalPage;
+ }
+}
diff --git a/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.html b/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.html
index d0db616..b1101b4 100644
--- a/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.html
+++ b/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.html
@@ -1,45 +1,76 @@
<!-- sldsValidatorIgnore -->
<!-- sldsValidatorIgnore -->
<template>
- <c-common-toast></c-common-toast>
<template if:true={isShowSpinner}>
- <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
+ <lightning-spinner size="medium" variant="brand"></lightning-spinner>
</template>
-
+ <c-common-toast></c-common-toast>
<template if:false={isShowAccountInfo}>
<div class="outerBorderCss">
<div style="padding: 5px">
<div class="borderCss">
<div class="headerDorderCss">
<lightning-layout>
- <lightning-layout-item padding="around-small" size="2">
- <lightning-icon icon-name="action:priority" alternative-text="priority" title="priority"
- size="x-small" style="float: left;"></lightning-icon>
- <p style="font-size: 18px; margin-left: 5px;float: left;">
+ <lightning-layout-item
+ padding="around-small"
+ size="2"
+ >
+ <lightning-icon
+ icon-name="action:priority"
+ alternative-text="priority"
+ title="priority"
+ size="x-small"
+ style="float: left"
+ ></lightning-icon>
+ <p
+ style="
+ font-size: 18px;
+ margin-left: 5px;
+ float: left;
+ "
+ >
<strong>閿�閲忓墠鍗�</strong>
</p>
</lightning-layout-item>
- <lightning-layout-item size="7"></lightning-layout-item>
- <lightning-layout-item padding="around-small" size="3">
- <lightning-combobox name="progress" label="璐㈠勾" value={fiscalYearOption}
- variant="label-hidden" options={fiscalYearOptions} onchange={dataChange}
- data-field="fiscalYearOption" class="inputFont" style="
- min-width: 250px;
- max-width: 250px;
- margin-left: 10px;
- float: left;
- "></lightning-combobox>
+ <lightning-layout-item
+ size="7"
+ ></lightning-layout-item>
+ <lightning-layout-item
+ padding="around-small"
+ size="3"
+ >
+ <lightning-combobox
+ name="progress"
+ label="璐㈠勾"
+ value={fiscalYearOption}
+ variant="label-hidden"
+ options={fiscalYearOptions}
+ onchange={dataChange}
+ data-field="fiscalYearOption"
+ class="inputFont"
+ style="
+ min-width: 250px;
+ max-width: 250px;
+ margin-left: 10px;
+ float: left;
+ "
+ ></lightning-combobox>
</lightning-layout-item>
</lightning-layout>
</div>
<div style="padding: 7px">
<!-- <lightning-datatable key-field="id" data={topAccountData} columns={topColumns} hide-checkbox-column
- class="wrapped-header-datatable">
+ class="wrapped-header-datatable">
</lightning-datatable> -->
- <c-lex-custom-lightning-datatable key-field="Id" data={topAccountData} columns={topColumns}
- hide-checkbox-column style="word-wrap: break-word; word-break: break-all"
- class="wrapped-header-datatable">
+ <c-lex-custom-lightning-datatable
+ key-field="Id"
+ data={topAccountData}
+ columns={topColumns}
+ hide-checkbox-column
+ style="word-wrap: break-word; word-break: break-all"
+ class="wrapped-header-datatable"
+ >
</c-lex-custom-lightning-datatable>
</div>
</div>
@@ -72,16 +103,29 @@
<p style="font-size: 18px; margin-left: 5px;float: left;">
<strong>閿�閲忓墠鍗�</strong>
</p> -->
- <lightning-icon icon-name="standard:account" alternative-text="Account" title="瀹㈡埛"
- size="small" style="float: left;margin-top:3px"></lightning-icon>
- <lightning-combobox name="progress" label="瀹㈡埛" value={viewOption} variant="label-hidden"
- options={listViewOptions} onchange={dataChange} data-field="viewOption"
- class="inputFont" style="
- min-width: 250px;
- max-width: 250px;
- margin-left: 10px;
- float: left;
- "></lightning-combobox>
+ <lightning-icon
+ icon-name="standard:account"
+ alternative-text="Account"
+ title="瀹㈡埛"
+ size="small"
+ style="float: left; margin-top: 3px"
+ ></lightning-icon>
+ <lightning-combobox
+ name="progress"
+ label="瀹㈡埛"
+ value={viewOption}
+ variant="label-hidden"
+ options={listViewOptions}
+ onchange={dataChange}
+ data-field="viewOption"
+ class="inputFont"
+ style="
+ min-width: 250px;
+ max-width: 250px;
+ margin-left: 10px;
+ float: left;
+ "
+ ></lightning-combobox>
</lightning-layout-item>
</lightning-layout>
</div>
@@ -92,17 +136,31 @@
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
<div class="slds-m-top_small slds-m-bottom_medium">
- <lightning-datatable key-field="id" data={pageRecords} columns={columns}
- hide-checkbox-column default-sort-direction={defaultSortDirection}
- sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort}
- class="wrapped-header-datatable">
+ <lightning-datatable
+ key-field="id"
+ data={pageRecords}
+ columns={columns}
+ hide-checkbox-column
+ default-sort-direction={defaultSortDirection}
+ sorted-direction={sortDirection}
+ sorted-by={sortedBy}
+ onsort={onHandleSort}
+ class="wrapped-header-datatable grayBackground"
+ >
</lightning-datatable>
- <c-paginator onprevious={handlePrevious} onnext={handleNext}
- onpageschange={handlePageschange} onfirst={handleFirst} onlast={handleLast}
+ <c-paginator
+ onprevious={handlePrevious}
+ onnext={handleNext}
+ onpageschange={handlePageschange}
+ onfirst={handleFirst}
+ onlast={handleLast}
page-size-options={pageSizeOptions}
previous-button-disabled={previousButtonDisabled}
- next-button-disabled={nextButtonDisabled} record-start={recordStart}
- record-end={recordEnd} total-records={totalRecords}></c-paginator>
+ next-button-disabled={nextButtonDisabled}
+ record-start={recordStart}
+ record-end={recordEnd}
+ total-records={totalRecords}
+ ></c-paginator>
</div>
</div>
</div>
@@ -118,13 +176,19 @@
<div></div>
<strong style="font-size: 20px">{accountDataInfo.name}</strong>
<p>
- <lightning-formatted-url value="/lexconsumableaccount" label="杩斿洖鍒楄〃"></lightning-formatted-url>
+ <lightning-formatted-url
+ value="/lexconsumableaccount"
+ label="杩斿洖鍒楄〃"
+ ></lightning-formatted-url>
</p>
</lightning-layout-item>
<lightning-layout-item size="9"></lightning-layout-item>
<lightning-layout-item size="1">
<p>
- <lightning-formatted-url value={printUrl} label="鍙墦鍗拌鍥�"></lightning-formatted-url>
+ <lightning-formatted-url
+ value={printUrl}
+ label="鍙墦鍗拌鍥�"
+ ></lightning-formatted-url>
</p>
</lightning-layout-item>
</lightning-layout>
@@ -156,76 +220,31 @@
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="瀹㈡埛鍚�" value={accountDataInfo.name}
- variant="label-inline" read-only style="
- border-bottom: 1px solid #dde4e9;
- " class="adjustHeight"></lightning-input>
- </lightning-layout-item>
- <lightning-layout-item size="1">
- </lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-input type="text" label="瀹㈡埛鎵�鏈変汉" value={accountDataInfo.ownerName}
- variant="label-inline" read-only style="
- border-bottom: 1px solid #dde4e9;
- "></lightning-input>
- </lightning-layout-item>
- </lightning-layout>
-
- <lightning-layout multiple-rows="true">
- <lightning-layout-item size="1">
- </lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-input type="text" label="鍒悕1" value={accountDataInfo.site}
- variant="label-inline" read-only style="
- border-bottom: 1px solid #dde4e9;
- "></lightning-input>
- </lightning-layout-item>
- <lightning-layout-item size="1">
- </lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-input type="text" label="鏈夋晥/鏃犳晥" value={accountDataInfo.isActive}
- variant="label-inline" read-only style="
- border-bottom: 1px solid #dde4e9;
- "></lightning-input>
- </lightning-layout-item>
- </lightning-layout>
-
- <lightning-layout multiple-rows="true">
- <lightning-layout-item size="1">
- </lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-input type="text" label="鍒悕2" value={accountDataInfo.aliasName2}
- variant="label-inline" read-only style="
- border-bottom: 1px solid #dde4e9;
- "></lightning-input>
- </lightning-layout-item>
- <lightning-layout-item size="1">
- </lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-input type="text" label="绂佺敤鐞嗙敱" value={accountDataInfo.banOnUseReason}
- variant="label-inline" read-only style="
- border-bottom: 1px solid #dde4e9;
- "></lightning-input>
- </lightning-layout-item>
- </lightning-layout>
-
- <lightning-layout multiple-rows="true">
- <lightning-layout-item size="1">
- </lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-input type="text" label="鏀垮簻绛夌礆" value={accountDataInfo.grade}
- variant="label-inline" read-only style="
- border-bottom: 1px solid #dde4e9;
- "></lightning-input>
- </lightning-layout-item>
- <lightning-layout-item size="1">
- </lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-input type="text" label="鍖婚櫌鎵�灞炴�ц川"
- value={accountDataInfo.attributeType} variant="label-inline" read-only
+ <lightning-input
+ type="text"
+ label="瀹㈡埛鍚�"
+ value={accountDataInfo.name}
+ variant="label-inline"
+ read-only
style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ class="adjustHeight"
+ ></lightning-input>
+ </lightning-layout-item>
+ <lightning-layout-item size="1">
+ </lightning-layout-item>
+ <lightning-layout-item size="4">
+ <lightning-input
+ type="text"
+ label="瀹㈡埛鎵�鏈変汉"
+ value={accountDataInfo.ownerName}
+ variant="label-inline"
+ read-only
+ style="
+ border-bottom: 1px solid #dde4e9;
+ "
+ ></lightning-input>
</lightning-layout-item>
</lightning-layout>
@@ -233,19 +252,117 @@
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="OCSM鍒嗙被(鍖婚櫌)"
+ <lightning-input
+ type="text"
+ label="鍒悕1"
+ value={accountDataInfo.site}
+ variant="label-inline"
+ read-only
+ style="
+ border-bottom: 1px solid #dde4e9;
+ "
+ ></lightning-input>
+ </lightning-layout-item>
+ <lightning-layout-item size="1">
+ </lightning-layout-item>
+ <lightning-layout-item size="4">
+ <lightning-input
+ type="text"
+ label="鏈夋晥/鏃犳晥"
+ value={accountDataInfo.isActive}
+ variant="label-inline"
+ read-only
+ style="
+ border-bottom: 1px solid #dde4e9;
+ "
+ ></lightning-input>
+ </lightning-layout-item>
+ </lightning-layout>
+
+ <lightning-layout multiple-rows="true">
+ <lightning-layout-item size="1">
+ </lightning-layout-item>
+ <lightning-layout-item size="4">
+ <lightning-input
+ type="text"
+ label="鍒悕2"
+ value={accountDataInfo.aliasName2}
+ variant="label-inline"
+ read-only
+ style="
+ border-bottom: 1px solid #dde4e9;
+ "
+ ></lightning-input>
+ </lightning-layout-item>
+ <lightning-layout-item size="1">
+ </lightning-layout-item>
+ <lightning-layout-item size="4">
+ <lightning-input
+ type="text"
+ label="绂佺敤鐞嗙敱"
+ value={accountDataInfo.banOnUseReason}
+ variant="label-inline"
+ read-only
+ style="
+ border-bottom: 1px solid #dde4e9;
+ "
+ ></lightning-input>
+ </lightning-layout-item>
+ </lightning-layout>
+
+ <lightning-layout multiple-rows="true">
+ <lightning-layout-item size="1">
+ </lightning-layout-item>
+ <lightning-layout-item size="4">
+ <lightning-input
+ type="text"
+ label="鏀垮簻绛夌礆"
+ value={accountDataInfo.grade}
+ variant="label-inline"
+ read-only
+ style="
+ border-bottom: 1px solid #dde4e9;
+ "
+ ></lightning-input>
+ </lightning-layout-item>
+ <lightning-layout-item size="1">
+ </lightning-layout-item>
+ <lightning-layout-item size="4">
+ <lightning-input
+ type="text"
+ label="鍖婚櫌鎵�灞炴�ц川"
+ value={accountDataInfo.attributeType}
+ variant="label-inline"
+ read-only
+ style="
+ border-bottom: 1px solid #dde4e9;
+ "
+ ></lightning-input>
+ </lightning-layout-item>
+ </lightning-layout>
+
+ <lightning-layout multiple-rows="true">
+ <lightning-layout-item size="1">
+ </lightning-layout-item>
+ <lightning-layout-item size="4">
+ <!-- <lightning-input type="text" label="OCSM鍒嗙被(鍖婚櫌)"
value={accountDataInfo.oCMCategory} variant="label-inline" read-only style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "></lightning-input> -->
</lightning-layout-item>
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="鍖婚櫌涓撲笟鍖哄垎"
- value={accountDataInfo.specialityType} variant="label-inline" read-only
+ <lightning-input
+ type="text"
+ label="鍖婚櫌涓撲笟鍖哄垎"
+ value={accountDataInfo.specialityType}
+ variant="label-inline"
+ read-only
style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
</lightning-layout>
</div>
@@ -267,18 +384,30 @@
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="鐪�" value={accountDataInfo.stateMasterName}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="鐪�"
+ value={accountDataInfo.stateMasterName}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="鐢佃瘽" value={accountDataInfo.phone}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="鐢佃瘽"
+ value={accountDataInfo.phone}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
</lightning-layout>
@@ -286,18 +415,30 @@
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="甯�" value={accountDataInfo.cityMasterName}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="甯�"
+ value={accountDataInfo.cityMasterName}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="鐢佃瘽2" value={accountDataInfo.phoneCall}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="鐢佃瘽2"
+ value={accountDataInfo.phoneCall}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
</lightning-layout>
@@ -305,18 +446,30 @@
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="鍘�/鍖�" value={accountDataInfo.town}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="鍘�/鍖�"
+ value={accountDataInfo.town}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="浼犵湡" value={accountDataInfo.fax}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="浼犵湡"
+ value={accountDataInfo.fax}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
</lightning-layout>
@@ -324,18 +477,30 @@
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="琛楅亾" value={accountDataInfo.street}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="琛楅亾"
+ value={accountDataInfo.street}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="閭紪" value={accountDataInfo.postalCode}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="閭紪"
+ value={accountDataInfo.postalCode}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
</lightning-layout>
@@ -343,10 +508,16 @@
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="鍦板潃" value={accountDataInfo.address}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="鍦板潃"
+ value={accountDataInfo.address}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
</lightning-layout>
</div>
@@ -368,10 +539,16 @@
<lightning-layout-item size="1">
</lightning-layout-item>
<lightning-layout-item size="4">
- <lightning-input type="text" label="姣嶅叕鍙�" value={accountDataInfo.parentName}
- variant="label-inline" read-only style="
+ <lightning-input
+ type="text"
+ label="姣嶅叕鍙�"
+ value={accountDataInfo.parentName}
+ variant="label-inline"
+ read-only
+ style="
border-bottom: 1px solid #dde4e9;
- "></lightning-input>
+ "
+ ></lightning-input>
</lightning-layout-item>
</lightning-layout>
</div>
@@ -381,4 +558,4 @@
</div>
</div>
</template>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js b/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js
index 8687cd2..a81d360 100644
--- a/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js
+++ b/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js
@@ -1,219 +1,233 @@
-import { LightningElement, wire, api, track } from "lwc";
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import init from "@salesforce/apex/LexConsumableAccountController.init";
-import changeFiscalYearView from "@salesforce/apex/LexConsumableAccountController.changeFiscalYearView";
-import changelistView from "@salesforce/apex/LexConsumableAccountController.changelistView";
-import accountInit from "@salesforce/apex/LexConsumableAccountInfoController.init";
+import { LightningElement, wire, api, track } from 'lwc';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init from '@salesforce/apex/LexConsumableAccountController.init';
+import changeFiscalYearView from '@salesforce/apex/LexConsumableAccountController.changeFiscalYearView';
+import changelistView from '@salesforce/apex/LexConsumableAccountController.changelistView';
+import accountInit from '@salesforce/apex/LexConsumableAccountInfoController.init';
//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
const columns = [
{
- label: "瀹㈡埛鍚�",
- fieldName: "NameUrl",
+ label: '瀹㈡埛鍚�',
+ fieldName: 'NameUrl',
hideDefaultActions: true,
wrapText: true,
- initialWidth: 345,
+ initialWidth: 200,
sortable: true,
- type: "url",
+ type: 'url',
typeAttributes: {
label: {
- fieldName: "Name",
+ fieldName: 'Name'
},
- },
+ target: '_blank'
+ }
+ },
+ // {
+ // label: "鐪�",
+ // fieldName: "StateMasterUrl",
+ // hideDefaultActions: true,
+ // wrapText: true,
+ // sortable: true,
+ // type: "url",
+ // typeAttributes: {
+ // label: {
+ // fieldName: "StateMasterName",
+ // },
+ // target: "_blank",
+ // },
+ // },
+ {
+ label: '鐪�',
+ fieldName: 'StateMasterName',
+ hideDefaultActions: true,
+ wrapText: true,
+ sortable: true
},
{
- label: "鐪�",
- fieldName: "StateMasterUrl",
+ label: '閿�鍞湰閮ㄥ尰闄�',
+ fieldName: 'Salesdepartment_HP__c',
hideDefaultActions: true,
- initialWidth: 80,
- wrapText: true,
sortable: true,
- type: "url",
+ wrapText: true
+ },
+ {
+ label: '鍒涘缓鏃ユ湡',
+ fieldName: 'CreatedDate',
+ hideDefaultActions: true,
+ sortable: true,
+ wrapText: true,
+ type: 'date',
typeAttributes: {
- label: {
- fieldName: "StateMasterName",
- },
- target: "_blank",
- },
+ timeZone: 'Asia/Shanghai',
+ day: 'numeric',
+ month: 'numeric',
+ year: 'numeric'
+ }
},
{
- label: "閿�鍞湰閮ㄥ尰闄�",
- fieldName: "Salesdepartment_HP__c",
- initialWidth: 115,
+ label: '鏈夋晥/鏃犳晥',
+ fieldName: 'Is_Active__c',
hideDefaultActions: true,
sortable: true,
- wrapText: true,
+ wrapText: true
+ },
+ // {
+ // label: "瀹㈡埛璁板綍绫诲瀷",
+ // fieldName: "RecordTypeName",
+ // hideDefaultActions: true,
+ // sortable: true,
+ // wrapText: true,
+ // initialWidth: 130,
+ // },
+ {
+ label: '鏀垮簻绛夌骇',
+ fieldName: 'Grade__c',
+ hideDefaultActions: true,
+ sortable: true,
+ wrapText: true
+ },
+ // {
+ // label: "OCSM鍒嗙被(鍖婚櫌)",
+ // fieldName: "OCM_Category__c",
+ // hideDefaultActions: true,
+ // sortable: true,
+ // wrapText: true,
+ // },
+ // {
+ // label: "甯�",
+ // fieldName: "CityMasterNameUrl",
+ // hideDefaultActions: true,
+ // sortable: true,
+ // wrapText: true,
+ // type: "url",
+ // typeAttributes: {
+ // label: {
+ // fieldName: "CityMasterName",
+ // },
+ // target: "_blank",
+ // },
+ // },
+ {
+ label: '甯�',
+ fieldName: 'CityMasterName',
+ hideDefaultActions: true,
+ sortable: true,
+ wrapText: true
},
{
- label: "鍒涘缓鏃ユ湡",
- fieldName: "CreatedDate",
+ label: '鍘�/鍖�',
+ fieldName: 'Town__c',
hideDefaultActions: true,
sortable: true,
- wrapText: true,
- type: "date",
- typeAttributes: {
- timeZone: "Asia/Shanghai",
- day: "numeric",
- month: "numeric",
- year: "numeric",
- },
- initialWidth: 100,
+ wrapText: true
},
{
- label: "鏈夋晥/鏃犳晥",
- fieldName: "Is_Active__c",
+ label: '瀹㈡埛鐢佃瘽',
+ fieldName: 'Phone',
hideDefaultActions: true,
sortable: true,
- wrapText: true,
- initialWidth: 91,
- },
- {
- label: "瀹㈡埛璁板綍绫诲瀷",
- fieldName: "RecordTypeName",
- hideDefaultActions: true,
- sortable: true,
- wrapText: true,
- initialWidth: 130,
- },
- {
- label: "鏀垮簻绛夌骇",
- fieldName: "Grade__c",
- hideDefaultActions: true,
- sortable: true,
- wrapText: true,
- initialWidth: 86,
- },
- {
- label: "OCSM鍒嗙被(鍖婚櫌)",
- fieldName: "OCM_Category__c",
- hideDefaultActions: true,
- sortable: true,
- wrapText: true,
- initialWidth: 150,
- },
- {
- label: "甯�",
- fieldName: "CityMasterNameUrl",
- hideDefaultActions: true,
- sortable: true,
- wrapText: true,
- type: "url",
- typeAttributes: {
- label: {
- fieldName: "CityMasterName",
- },
- target: "_blank",
- },
- },
- {
- label: "鍘�/鍖�",
- fieldName: "Town__c",
- hideDefaultActions: true,
- sortable: true,
- wrapText: true,
- },
- {
- label: "瀹㈡埛鐢佃瘽",
- fieldName: "Phone",
- hideDefaultActions: true,
- sortable: true,
- wrapText: true,
- },
+ wrapText: true
+ }
];
const topColumns = [
{
- label: "瀹㈡埛鍚�",
- fieldName: "NameUrl",
+ label: '瀹㈡埛鍚�',
hideDefaultActions: true,
+ fieldName: 'accountName',
wrapText: true,
- type: "url",
+ type: 'customShowAccountUrl',
typeAttributes: {
- label: {
- fieldName: "Name",
- },
- },
+ accountName: { fieldName: 'accountName' },
+ accountUrl: { fieldName: 'accountUrl' },
+ isDisable: { fieldName: 'isDisable' }
+ }
},
+ // {
+ // label: "甯�",
+ // fieldName: "CityMasterName",
+ // hideDefaultActions: true,
+ // wrapText: true,
+ // type: "customShowAccountUrl",
+ // typeAttributes: {
+ // accountName: { fieldName: "CityMasterName" },
+ // accountUrl: { fieldName: "CityMasterNameUrl" },
+ // isDisable: { fieldName: "isDisable" },
+ // },
+ // },
{
- label: "甯�",
- fieldName: "CityMasterNameUrl",
+ label: '甯�',
+ fieldName: 'CityMasterName',
hideDefaultActions: true,
- wrapText: true,
- type: "url",
- typeAttributes: {
- label: {
- fieldName: "CityMasterName",
- },
- target: "_blank",
- },
+ wrapText: true
},
{
- label: "鍘�/鍖�",
- fieldName: "Town__c",
+ label: '鍘�/鍖�',
+ fieldName: 'Town__c',
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "閿�閲忓崰姣�",
- fieldName: "proportion",
+ label: '閿�閲忓崰姣�',
+ fieldName: 'proportion',
hideDefaultActions: true,
wrapText: true,
initialWidth: 100,
- cellAttributes: { alignment: "right" },
+ cellAttributes: { alignment: 'right' }
},
{
- label: "鎿嶄綔",
- fieldName: "Town__c",
+ label: '鎿嶄綔',
+ fieldName: 'Town__c',
type: 'weeklyReport',
initialWidth: 150,
typeAttributes: {
- recordId: { fieldName: "Id" },
- hospitalName: { fieldName: "Name" },
- isShowButton: { fieldName: "isShowButton" },
+ recordId: { fieldName: 'Id' },
+ hospitalName: { fieldName: 'Name' },
+ isShowButton: { fieldName: 'isShowButton' }
},
- hideDefaultActions: true,
+ hideDefaultActions: true
}
];
export default class LexConsumableAccount extends LightningElement {
columns = columns;
topColumns = topColumns;
- @track isShowSpinner = true;
+ @track isShowSpinner = false;
@track pageRecords = [];
- @track accountId = "";
- @track agencyProType = "";
- @track agencyProTypestr = "";
+ @track accountId = '';
+ @track agencyProType = '';
+ @track agencyProTypestr = '';
@track listViewOptions = [
{
- label: "01. 鍖婚櫌_Hospital",
- value: "01. 鍖婚櫌_Hospital",
+ label: '01. 鍖婚櫌_Hospital',
+ value: '01. 鍖婚櫌_Hospital'
},
+ // {
+ // label: "61. 鍖婚櫌_Hospital鑽夋涓殑鍖婚櫌",
+ // value: "61. 鍖婚櫌_Hospital鑽夋涓殑鍖婚櫌",
+ // },
+ // {
+ // label: "62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌",
+ // value: "62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌",
+ // },
{
- label: "61. 鍖婚櫌_Hospital鑽夋涓殑鍖婚櫌",
- value: "61. 鍖婚櫌_Hospital鑽夋涓殑鍖婚櫌",
- },
- {
- label: "62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌",
- value: "62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌",
- },
- {
- label: "63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�",
- value: "63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�",
- },
+ label: '63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�',
+ value: '63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�'
+ }
];
- @track viewOption = "01. 鍖婚櫌_Hospital";
+ @track viewOption = '01. 鍖婚櫌_Hospital';
@track isShowAccountInfo = false;
@track topAccountData = [];
//鍓嶇鎺掑簭
- defaultSortDirection = "asc";
- sortDirection = "asc";
+ defaultSortDirection = 'asc';
+ sortDirection = 'asc';
sortedBy;
//鍒嗛〉start
- @track sortBy = "";
+ @track sortBy = '';
@track pageSize = 10;
error;
records;
@@ -229,31 +243,30 @@
@track recordEnd = 0;
//end
- @track AccId = "";
- @track printUrl = "";
+ @track AccId = '';
+ @track printUrl = '';
@track accountDataInfo = {
- name: "",
- ownerName: "",
- site: "",
- isActive: "",
- aliasName2: "",
- banOnUseReason: "",
- grade: "",
- attributeType: "",
- oCMCategory: "",
- specialityType: "",
- stateMasterName: "",
- phone: "",
- cityMasterName: "",
- phoneCall: "",
- town: "",
- fax: "",
- street: "",
- postalCode: "",
- address: "",
- parentName: "",
+ name: '',
+ ownerName: '',
+ site: '',
+ isActive: '',
+ aliasName2: '',
+ banOnUseReason: '',
+ grade: '',
+ attributeType: '',
+ oCMCategory: '',
+ specialityType: '',
+ stateMasterName: '',
+ phone: '',
+ cityMasterName: '',
+ phoneCall: '',
+ town: '',
+ fax: '',
+ street: '',
+ postalCode: '',
+ address: '',
+ parentName: ''
};
-
stylesLoaded = false;
@@ -261,7 +274,7 @@
@track fiscalYearOptions = [
{ label: '鏈储骞�', value: 'thisYear' },
{ label: '涓婁竴璐㈠勾', value: 'lastYear' },
- { label: '涓婁竴璐㈠勾+鏈储骞�', value: 'allYear' },
+ { label: '涓婁竴璐㈠勾+鏈储骞�', value: 'allYear' }
];
@track fiscalYearOption = 'thisYear';
@track topInfo = [];
@@ -270,19 +283,19 @@
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
//鑾峰彇閾炬帴鍙傛暟
getQueryString(name) {
- console.log("getQueryString name " + name);
- let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+ console.log('getQueryString name ' + name);
+ let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]);
@@ -291,154 +304,263 @@
}
connectedCallback() {
- this.AccId = this.getQueryString("AccId");
- this.AccId = this.AccId == null ? "" : this.AccId;
- if (this.AccId != "") {
- console.log("this.AccId = " + this.AccId);
+ this.isShowSpinner = true;
+ this.AccId = this.getQueryString('AccId');
+ this.AccId = this.AccId == null ? '' : this.AccId;
+ if (this.AccId != '') {
+ console.log('this.AccId = ' + this.AccId);
accountInit({
- accId: this.AccId,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.accountDataInfo.name = r.entity.obj.Name;
- this.accountDataInfo.ownerName =
- r.entity.obj.Owner == null ? "" : r.entity.obj.Owner.Name;
- this.accountDataInfo.site = r.entity.obj.site;
- this.accountDataInfo.isActive = r.entity.obj.Is_Active__c;
- this.accountDataInfo.aliasName2 = r.entity.obj.Alias_Name2__c;
- this.accountDataInfo.banOnUseReason =
- r.entity.obj.Ban_On_Use_Reason__c;
- this.accountDataInfo.grade = r.entity.obj.Grade__c;
- this.accountDataInfo.attributeType = r.entity.obj.Attribute_Type__c;
- this.accountDataInfo.oCMCategory = r.entity.obj.OCM_Category__c;
- this.accountDataInfo.specialityType =
- r.entity.obj.Speciality_Type__c;
- this.accountDataInfo.stateMasterName =
- r.entity.obj.State_Master__r == null
- ? ""
- : r.entity.obj.State_Master__r.Name;
- this.accountDataInfo.phone = r.entity.obj.Phone;
- this.accountDataInfo.cityMasterName =
- r.entity.obj.City_Master__r == null
- ? ""
- : r.entity.obj.City_Master__r.Name;
- this.accountDataInfo.phoneCall = r.entity.obj.PhoneCall__c;
- this.accountDataInfo.town = r.entity.obj.Town__c;
- this.accountDataInfo.fax = r.entity.obj.Fax;
- this.accountDataInfo.street = r.entity.obj.Street__c;
- this.accountDataInfo.postalCode = r.entity.obj.Postal_Code__c;
- this.accountDataInfo.address = r.entity.obj.Address__c;
- this.accountDataInfo.parentName =
- r.entity.obj.Parent == null ? "" : r.entity.obj.Parent.Name;
- console.log(
- "this.accountDataInfo = " + JSON.stringify(this.accountDataInfo)
- );
- this.printUrl =
- "/lexconsumableaccountinfoprint?AccId=" + this.AccId;
- this.isShowAccountInfo = true;
- this.isShowSpinner = false;
- } else {
- console.log("r = " + JSON.stringify(r));
- this.showMyToast('Error', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- this.showMyToast('Error', '鍒濆鍖栧け璐�', 'Error');
- });
+ accId: this.AccId
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ console.log(
+ 'r.entity.obj = ' + JSON.stringify(r.entity.obj)
+ );
+ this.accountDataInfo.name = r.entity.obj.Name;
+ this.accountDataInfo.ownerName =
+ r.entity.obj.Owner == null
+ ? ''
+ : r.entity.obj.Owner.Name;
+ this.accountDataInfo.site = r.entity.obj.site;
+ this.accountDataInfo.isActive =
+ r.entity.obj.Is_Active__c;
+ this.accountDataInfo.aliasName2 =
+ r.entity.obj.Alias_Name2__c;
+ this.accountDataInfo.banOnUseReason =
+ r.entity.obj.Ban_On_Use_Reason__c;
+ this.accountDataInfo.grade = r.entity.obj.Grade__c;
+ this.accountDataInfo.attributeType =
+ r.entity.obj.Attribute_Type__c;
+ this.accountDataInfo.oCMCategory =
+ r.entity.obj.OCM_Category__c;
+ this.accountDataInfo.specialityType =
+ r.entity.obj.Speciality_Type__c;
+ this.accountDataInfo.stateMasterName =
+ r.entity.obj.State_Master__r == null
+ ? ''
+ : r.entity.obj.State_Master__r.Name;
+ this.accountDataInfo.phone = r.entity.obj.Phone;
+ this.accountDataInfo.cityMasterName =
+ r.entity.obj.City_Master__r == null
+ ? ''
+ : r.entity.obj.City_Master__r.Name;
+ this.accountDataInfo.phoneCall =
+ r.entity.obj.PhoneCall__c;
+ this.accountDataInfo.town = r.entity.obj.Town__c;
+ this.accountDataInfo.fax = r.entity.obj.Fax;
+ this.accountDataInfo.street = r.entity.obj.Street__c;
+ this.accountDataInfo.postalCode =
+ r.entity.obj.Postal_Code__c;
+ this.accountDataInfo.address = r.entity.obj.Address__c;
+ this.accountDataInfo.parentName =
+ r.entity.obj.Parent == null
+ ? ''
+ : r.entity.obj.Parent.Name;
+ console.log(
+ 'this.accountDataInfo = ' +
+ JSON.stringify(this.accountDataInfo)
+ );
+ this.printUrl =
+ '/lexconsumableaccountinfoprint?AccId=' +
+ this.AccId;
+ this.isShowAccountInfo = true;
+ this.isShowSpinner = false;
+ } else {
+ console.log('r = ' + JSON.stringify(r));
+ this.showMyToast('Error', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showMyToast('Error', '鍒濆鍖栧け璐�', 'Error');
+ });
} else {
init({
pageSizeLWC: this.pageSize,
pageTokenLWC: this.currentPageToken,
fiscalYear: this.fiscalYearOption
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- //鍒嗛〉
- this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
- this.totalRecords = r.entity.paginatedAccounts.totalRecords;
- this.recordStart = r.entity.paginatedAccounts.recordStart;
- this.recordEnd = r.entity.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(
- r.entity.paginatedAccounts.totalRecords / this.pageSize
- );
- console.log("this.totalPages = " + this.totalPages);
- this.paginationVisibility = this.totalPages > 1 ? true : false;
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ //鍒嗛〉
+ this.nextPageToken =
+ r.entity.paginatedAccounts.nextPageToken;
+ this.totalRecords =
+ r.entity.paginatedAccounts.totalRecords;
+ this.recordStart =
+ r.entity.paginatedAccounts.recordStart;
+ this.recordEnd = r.entity.paginatedAccounts.recordEnd;
+ this.totalPages = Math.ceil(
+ r.entity.paginatedAccounts.totalRecords /
+ this.pageSize
+ );
+ console.log('this.totalPages = ' + this.totalPages);
+ this.paginationVisibility =
+ this.totalPages > 1 ? true : false;
- this.pageRecords = r.entity.pageRecords;
- this.accountId = r.entity.accountId;
- this.agencyProType = r.entity.agencyProType;
- this.agencyProTypestr = r.entity.agencyProTypestr;
- console.log("this.agencyProTypestr = " + this.agencyProTypestr);
- for (var i in this.pageRecords) {
- this.pageRecords[i]["NameUrl"] = "/lexconsumableaccount?AccId=" + this.pageRecords[i].Id;
- this.pageRecords[i]["StateMasterName"] = this.pageRecords[i].State_Master__r.Name;
- this.pageRecords[i]["StateMasterUrl"] = "/" + this.pageRecords[i].State_Master__c;
- this.pageRecords[i]["CityMasterName"] = this.pageRecords[i].City_Master__r.Name;
- this.pageRecords[i]["CityMasterNameUrl"] = "/" + this.pageRecords[i].City_Master__c;
- this.pageRecords[i]["RecordTypeName"] = this.pageRecords[i].RecordType.Name;
- }
- console.log(
- "this.listViewOptions = " + JSON.stringify(this.listViewOptions)
- );
-
- console.log('r.entity.topInfo = ' + JSON.stringify(r.entity.topInfo))
- //top10瀹㈡埛
- this.topInfo = r.entity.topInfo;
- console.log("this.topInfo = " + JSON.stringify(this.topInfo));
- this.topAccountData = this.topInfo.acList;
- console.log(
- "this.topAccountData = " + JSON.stringify(this.topAccountData)
- );
- console.log('9/3 = ' + this.keepTwoDecimalStr(this.amend(9, 3, '/').toFixed(2)));
- let total = 100;
- for (var i in this.topAccountData) {
- console.log('i = ' + i);
- this.topAccountData[i]["NameUrl"] = "/lexconsumableaccount?AccId=" + this.topAccountData[i].Id;
- this.topAccountData[i]["StateMasterName"] = this.topAccountData[i].State_Master__r.Name;
- this.topAccountData[i]["StateMasterUrl"] = "/" + this.topAccountData[i].State_Master__c;
- this.topAccountData[i]["CityMasterName"] = this.topAccountData[i].City_Master__r.Name;
- this.topAccountData[i]["CityMasterNameUrl"] = "/" + this.topAccountData[i].City_Master__c;
- this.topAccountData[i]["RecordTypeName"] = this.topAccountData[i].RecordType.Name;
- this.topAccountData[i]["isShowButton"] = true;
- let number = this.keepTwoDecimalStr((this.amend(this.topInfo.deList[i], this.topInfo.saleAmount, '/') * 100).toFixed(2));
- total -= number;
- this.topAccountData[i]["proportion"] = number + '%';
- }
-
- // //鍏朵粬
- if (total != 100) {
- this.topAccountData.push({
- Name: '...',
- NameUrl: '/lexconsumableaccount',
- proportion: total.toFixed(2) + '%',
- CityMasterName: '...',
- CityMasterNameUrl: '/lexconsumableaccount',
- Town__c: '...',
- isShowButton: false
- })
- } else {
- let title = '';
- for (var key in this.fiscalYearOptions) {
- if (this.fiscalYearOption == this.fiscalYearOptions[key].value)
- title = this.fiscalYearOptions[key].label;
+ this.pageRecords = r.entity.pageRecords;
+ this.accountId = r.entity.accountId;
+ this.agencyProType = r.entity.agencyProType;
+ this.agencyProTypestr = r.entity.agencyProTypestr;
+ console.log(
+ 'this.agencyProTypestr = ' + this.agencyProTypestr
+ );
+ for (var i in this.pageRecords) {
+ this.pageRecords[i]['Is_Active__c'] =
+ this.pageRecords[i].Is_Active__c.replace(
+ '鍔�',
+ '鏁�'
+ );
+ this.pageRecords[i]['NameUrl'] =
+ '/s/lexconsumableaccount?AccId=' +
+ this.pageRecords[i].Id;
+ this.pageRecords[i]['StateMasterName'] =
+ this.pageRecords[i].State_Master__r.Name;
+ this.pageRecords[i]['StateMasterUrl'] =
+ '/' + this.pageRecords[i].State_Master__c;
+ this.pageRecords[i]['CityMasterName'] =
+ this.pageRecords[i].City_Master__r.Name;
+ this.pageRecords[i]['CityMasterNameUrl'] =
+ '/' + this.pageRecords[i].City_Master__c;
+ this.pageRecords[i]['RecordTypeName'] =
+ this.pageRecords[i].RecordType.Name;
}
- this.showMyToast(title, '鏃犳暟鎹�', 'Error');
+ console.log(
+ 'this.listViewOptions = ' +
+ JSON.stringify(this.listViewOptions)
+ );
+
+ console.log(
+ 'r.entity.topInfo = ' +
+ JSON.stringify(r.entity.topInfo)
+ );
+ //top10瀹㈡埛
+ this.topInfo = r.entity.topInfo;
+ console.log(
+ 'this.topInfo = ' + JSON.stringify(this.topInfo)
+ );
+ this.topAccountData = this.topInfo.acList;
+ console.log(
+ 'this.topAccountData = ' +
+ JSON.stringify(this.topAccountData)
+ );
+ console.log(
+ '9/3 = ' +
+ this.keepTwoDecimalStr(
+ this.amend(9, 3, '/').toFixed(2)
+ )
+ );
+ let total = 100;
+ try {
+ for (var i in this.topAccountData) {
+ this.topAccountData[i]['accountName'] =
+ this.topAccountData[i].Name;
+ this.topAccountData[i]['accountUrl'] =
+ '/s/lexconsumableaccount?AccId=' +
+ this.topAccountData[i].Id;
+ this.topAccountData[i]['isDisable'] = false;
+ this.topAccountData[i]['StateMasterName'] =
+ this.topAccountData[i].State_Master__r.Name;
+ this.topAccountData[i]['StateMasterUrl'] =
+ '/' +
+ this.topAccountData[i].State_Master__c;
+ this.topAccountData[i]['CityMasterName'] =
+ this.topAccountData[i].City_Master__r.Name;
+ this.topAccountData[i]['CityMasterNameUrl'] =
+ '/' + this.topAccountData[i].City_Master__c;
+ this.topAccountData[i]['RecordTypeName'] =
+ this.topAccountData[i].RecordType.Name;
+ this.topAccountData[i]['isShowButton'] = true;
+ let number = this.keepTwoDecimalStr(
+ (
+ this.amend(
+ this.topInfo.deList[i],
+ this.topInfo.saleAmount,
+ '/'
+ ) * 100
+ ).toFixed(2)
+ );
+ console.log(
+ 'this.amend = ' +
+ this.amend(
+ this.topInfo.deList[i],
+ this.topInfo.saleAmount,
+ '/'
+ ) *
+ 100
+ );
+ total -= number;
+ this.topAccountData[i]['proportion'] =
+ number + '%';
+ }
+
+ console.log(
+ 'this.topAccountData = ' +
+ JSON.stringify(this.topAccountData)
+ );
+
+ //鍏朵粬
+ console.log(
+ '(total.toFixed(2) > 0.00 ? total.toFixed(2) : 0.00) = ' +
+ (total.toFixed(2) > 0.0
+ ? total.toFixed(2)
+ : '0.00')
+ );
+ if (total != 100) {
+ this.topAccountData.push({
+ accountName: '...',
+ accountUrl: '/s/lexconsumableaccount',
+ isDisable: true,
+ proportion:
+ (total.toFixed(2) > 0.0
+ ? total.toFixed(2)
+ : '0.00') + '%',
+ CityMasterName: '...',
+ CityMasterNameUrl: '/lexconsumableaccount',
+ Town__c: '...',
+ isShowButton: false
+ });
+ } else {
+ let title = '';
+ for (var key in this.fiscalYearOptions) {
+ if (
+ this.fiscalYearOption ==
+ this.fiscalYearOptions[key].value
+ )
+ title =
+ this.fiscalYearOptions[key].label;
+ }
+ this.showMyToast(title, '鏃犳暟鎹�', 'Error');
+ }
+ this.isShowSpinner = false;
+ } catch (error) {
+ console.log('error = ' + error.message);
+ }
+ } else {
+ console.log('r = ' + JSON.stringify(r));
+ this.showMyToast('Error', r.msg, 'Error');
}
- this.isShowSpinner = false;
- } else {
- console.log("r = " + JSON.stringify(r));
- this.showMyToast('Error', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- this.showMyToast('Error', '閿�閲忓墠鍗佸鎴峰垵濮嬪寲澶辫触', 'Error');
- });
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showMyToast(
+ 'Error',
+ '閿�閲忓墠鍗佸鎴峰垵濮嬪寲澶辫触',
+ 'Error'
+ );
+ });
}
}
amend(num1, num2, symbol) {
+ console.log('num1 = ' + num1);
+ console.log('num2 = ' + num2);
+ console.log('symbol = ' + symbol);
var str1 = num1.toString(),
str2 = num2.toString(),
result,
@@ -446,28 +568,28 @@
str2Length;
//瑙e喅鏁存暟娌℃湁灏忔暟鐐规柟娉�
try {
- str1Length = str1.split(".")[1].length;
+ str1Length = str1.split('.')[1].length;
} catch (error) {
str1Length = 0;
}
try {
- str2Length = str2.split(".")[1].length;
+ str2Length = str2.split('.')[1].length;
} catch (error) {
str2Length = 0;
}
var step = Math.pow(10, Math.max(str1Length, str2Length));
console.log(step);
switch (symbol) {
- case "+":
+ case '+':
result = (num1 * step + num2 * step) / step;
break;
- case "-":
+ case '-':
result = (num1 * step - num2 * step) / step;
break;
- case "*":
+ case '*':
result = (num1 * step * (num2 * step)) / step / step;
break;
- case "/":
+ case '/':
result = (num1 * step) / (num2 * step);
break;
default:
@@ -475,7 +597,6 @@
}
return result;
}
-
keepTwoDecimalStr(num) {
const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/));
@@ -489,12 +610,12 @@
s += '0';
}
return s;
- };
+ }
dataChange(event) {
- let fieldName = event.target.getAttribute("data-field");
+ let fieldName = event.target.getAttribute('data-field');
let value = event.detail.value;
- console.log("fieldName = " + fieldName + " value = " + value);
+ console.log('fieldName = ' + fieldName + ' value = ' + value);
switch (fieldName) {
case 'viewOption':
this.viewOption = value;
@@ -511,61 +632,91 @@
this.isShowSpinner = true;
changeFiscalYearView({
fiscalYear: this.fiscalYearOption
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- //top10瀹㈡埛
- this.topInfo = r.entity.topInfo;
- console.log("this.topInfo = " + JSON.stringify(this.topInfo));
- this.topAccountData = this.topInfo.acList;
- console.log(
- "this.topAccountData = " + JSON.stringify(this.topAccountData)
- );
- let total = 100;
- for (var i in this.topAccountData) {
- console.log('i = ' + i);
- this.topAccountData[i]["NameUrl"] = "/lexconsumableaccount?AccId=" + this.topAccountData[i].Id;
- this.topAccountData[i]["StateMasterName"] = this.topAccountData[i].State_Master__r.Name;
- this.topAccountData[i]["StateMasterUrl"] = "/" + this.topAccountData[i].State_Master__c;
- this.topAccountData[i]["CityMasterName"] = this.topAccountData[i].City_Master__r.Name;
- this.topAccountData[i]["CityMasterNameUrl"] = "/" + this.topAccountData[i].City_Master__c;
- this.topAccountData[i]["RecordTypeName"] = this.topAccountData[i].RecordType.Name;
- this.topAccountData[i]["isShowButton"] = true;
- let number = this.keepTwoDecimalStr((this.amend(this.topInfo.deList[i], this.topInfo.saleAmount, '/') * 100).toFixed(2));
- total -= number;
- this.topAccountData[i]["proportion"] = number + '%';
- }
-
- // //鍏朵粬
- if (total != 100) {
- this.topAccountData.push({
- Name: '...',
- NameUrl: '/lexconsumableaccount',
- proportion: total.toFixed(2) + '%',
- CityMasterName: '...',
- CityMasterNameUrl: '/lexconsumableaccount',
- Town__c: '...',
- isShowButton: false
- })
- } else {
- let title = '';
- for (var key in this.fiscalYearOptions) {
- if (this.fiscalYearOption == this.fiscalYearOptions[key].value)
- title = this.fiscalYearOptions[key].label;;
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ //top10瀹㈡埛
+ this.topInfo = r.entity.topInfo;
+ console.log(
+ 'this.topInfo = ' + JSON.stringify(this.topInfo)
+ );
+ this.topAccountData = this.topInfo.acList;
+ console.log(
+ 'this.topAccountData = ' +
+ JSON.stringify(this.topAccountData)
+ );
+ let total = 100;
+ for (var i in this.topAccountData) {
+ console.log('i = ' + i);
+ this.topAccountData[i]['accountName'] =
+ this.topAccountData[i].Name;
+ this.topAccountData[i]['accountUrl'] =
+ '/s/lexconsumableaccount?AccId=' +
+ this.topAccountData[i].Id;
+ this.topAccountData[i]['isDisable'] = false;
+ this.topAccountData[i]['StateMasterName'] =
+ this.topAccountData[i].State_Master__r.Name;
+ this.topAccountData[i]['StateMasterUrl'] =
+ '/' + this.topAccountData[i].State_Master__c;
+ this.topAccountData[i]['CityMasterName'] =
+ this.topAccountData[i].City_Master__r.Name;
+ this.topAccountData[i]['CityMasterNameUrl'] =
+ '/' + this.topAccountData[i].City_Master__c;
+ this.topAccountData[i]['RecordTypeName'] =
+ this.topAccountData[i].RecordType.Name;
+ this.topAccountData[i]['isShowButton'] = true;
+ let number = this.keepTwoDecimalStr(
+ (
+ this.amend(
+ this.topInfo.deList[i],
+ this.topInfo.saleAmount,
+ '/'
+ ) * 100
+ ).toFixed(2)
+ );
+ total -= number;
+ this.topAccountData[i]['proportion'] = number + '%';
}
- this.showMyToast(title, '鏃犳暟鎹�', 'Error');
- }
- this.isShowSpinner = false;
- } else {
- console.log("r = " + JSON.stringify(r));
- this.showMyToast('Error', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- this.showMyToast('Error', '閿�閲忓墠鍗佸鎴峰垵濮嬪寲澶辫触', 'Error');
- });
+ // //鍏朵粬
+ if (total != 100) {
+ this.topAccountData.push({
+ accountName: '...',
+ accountUrl: '/s/lexconsumableaccount',
+ isDisable: true,
+ proportion:
+ (total.toFixed(2) > 0.0
+ ? total.toFixed(2)
+ : '0.00') + '%',
+ CityMasterName: '...',
+ CityMasterNameUrl: '/lexconsumableaccount',
+ Town__c: '...',
+ isShowButton: false
+ });
+ } else {
+ let title = '';
+ for (var key in this.fiscalYearOptions) {
+ if (
+ this.fiscalYearOption ==
+ this.fiscalYearOptions[key].value
+ )
+ title = this.fiscalYearOptions[key].label;
+ }
+ this.showMyToast(title, '鏃犳暟鎹�', 'Error');
+ }
+
+ this.isShowSpinner = false;
+ } else {
+ console.log('r = ' + JSON.stringify(r));
+ this.showMyToast('Error', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showMyToast('Error', '閿�閲忓墠鍗佸鎴峰垵濮嬪寲澶辫触', 'Error');
+ });
}
changelistView() {
@@ -577,45 +728,54 @@
pageSizeLWC: this.pageSize,
pageTokenLWC: this.currentPageToken,
sortFieldLWC: this.sortBy,
- sortOrderLWC: this.sortDirection,
+ sortOrderLWC: this.sortDirection
})
.then((r) => {
r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
//鍒嗛〉
- this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
+ this.nextPageToken =
+ r.entity.paginatedAccounts.nextPageToken;
this.totalRecords = r.entity.paginatedAccounts.totalRecords;
this.recordStart = r.entity.paginatedAccounts.recordStart;
this.recordEnd = r.entity.paginatedAccounts.recordEnd;
this.totalPages = Math.ceil(
r.entity.paginatedAccounts.totalRecords / this.pageSize
);
- console.log("this.totalPages = " + this.totalPages);
- this.paginationVisibility = this.totalPages > 1 ? true : false;
+ console.log('this.totalPages = ' + this.totalPages);
+ this.paginationVisibility =
+ this.totalPages > 1 ? true : false;
this.pageRecords = r.entity.pageRecords;
- console.log("this.pageRecords = " + JSON.stringify(this.pageRecords));
+ console.log(
+ 'this.pageRecords = ' + JSON.stringify(this.pageRecords)
+ );
for (var i in this.pageRecords) {
- this.pageRecords[i]["NameUrl"] =
- "/lexconsumableaccount?AccId=" + this.pageRecords[i].Id;
- this.pageRecords[i]["StateMasterName"] =
+ this.pageRecords[i]['Is_Active__c'] = this.pageRecords[
+ i
+ ].Is_Active__c.replace('鍔�', '鏁�');
+ this.pageRecords[i]['NameUrl'] =
+ '/s/lexconsumableaccount?AccId=' +
+ this.pageRecords[i].Id;
+ this.pageRecords[i]['StateMasterName'] =
this.pageRecords[i].State_Master__r.Name;
- this.pageRecords[i]["StateMasterUrl"] =
- "/" + this.pageRecords[i].State_Master__c;
- this.pageRecords[i]["CityMasterName"] =
+ this.pageRecords[i]['StateMasterUrl'] =
+ '/' + this.pageRecords[i].State_Master__c;
+ this.pageRecords[i]['CityMasterName'] =
this.pageRecords[i].City_Master__r.Name;
- this.pageRecords[i]["CityMasterNameUrl"] =
- "/" + this.pageRecords[i].City_Master__c;
- this.pageRecords[i]["RecordTypeName"] =
+ this.pageRecords[i]['CityMasterNameUrl'] =
+ '/' + this.pageRecords[i].City_Master__c;
+ this.pageRecords[i]['RecordTypeName'] =
this.pageRecords[i].RecordType.Name;
}
this.isShowSpinner = false;
} else {
this.showMyToast('Error', r.msg, 'Error');
}
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error.message))
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error.message));
});
}
@@ -630,21 +790,28 @@
iconName = 'utility:error';
}
if (message != '') {
- content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
} else {
content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
}
sortByMethod(field, reverse, primer) {
const key = primer
? function (x) {
- return primer(x[field]);
- }
+ return primer(x[field]);
+ }
: function (x) {
- return x[field];
- };
+ return x[field];
+ };
return function (a, b) {
a = key(a);
@@ -654,28 +821,29 @@
}
onHandleSort(event) {
+ console.log('event.detail.fieldName = ' + event.detail.fieldName);
this.sortBy = event.detail.fieldName;
switch (this.sortBy) {
- case "NameUrl":
- this.sortBy = "Name";
+ case 'NameUrl':
+ this.sortBy = 'Name';
break;
- case "StateMasterUrl":
- this.sortBy = "State_Master__r.Name";
+ case 'StateMasterName':
+ this.sortBy = 'State_Master__r.Name';
break;
- case "RecordTypeName":
- this.sortBy = "RecordType.Name";
+ case 'RecordTypeName':
+ this.sortBy = 'RecordType.Name';
break;
- case "CityMasterNameUrl":
- this.sortBy = "City_Master__r.Name";
+ case 'CityMasterName':
+ this.sortBy = 'City_Master__r.Name';
break;
}
this.sortDirection = event.detail.sortDirection;
this.currentPageToken = 0;
- console.log("this.sortBy = " + this.sortBy);
- console.log("this.sortDirection = " + this.sortDirection);
+ console.log('this.sortBy = ' + this.sortBy);
+ console.log('this.sortDirection = ' + this.sortDirection);
this.changelistView();
const { fieldName: sortedBy, sortDirection } = event.detail;
- this.sortByMethod(sortedBy, sortDirection === "asc" ? 1 : -1);
+ this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1);
this.sortDirection = sortDirection;
this.sortedBy = sortedBy;
}
@@ -715,4 +883,4 @@
get nextButtonDisabled() {
return this.nextPageToken === undefined;
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexConsumableOrderManage/lexConsumableOrderManage.html b/force-app/main/default/lwc/lexConsumableOrderManage/lexConsumableOrderManage.html
index 2f7e121..f04a522 100644
--- a/force-app/main/default/lwc/lexConsumableOrderManage/lexConsumableOrderManage.html
+++ b/force-app/main/default/lwc/lexConsumableOrderManage/lexConsumableOrderManage.html
@@ -1,26 +1,66 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
<template if:true={showPage}>
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;">
- <div style="padding:10px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ "
+ >
+ <div style="padding: 10px">
<!-- 鎸夐挳 -->
<!-- <lightning-button style="margin: 5px;" label="鍗忚璁㈣揣" onclick={agreementorder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin-right: 150px;" onclick={agreementorder}>鍗忚璁㈣揣</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin-right: 150px"
+ onclick={agreementorder}
+ >
+ 鍗忚璁㈣揣
+ </button>
<template if:true={showHop}>
<!-- <lightning-button style="margin: 5px;" label="鍖婚櫌鐗逛环" onclick={hospitalorder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin-right: 150px;" onclick={hospitalorder}>鍖婚櫌鐗逛环</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="margin-right: 150px"
+ onclick={hospitalorder}
+ >
+ 鍖婚櫌鐗逛环
+ </button>
</template>
<template if:true={hasSpecial}>
<!-- <lightning-button style="margin: 5px;" label="淇冮攢璁㈣揣" onclick={promotionorder}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" onclick={promotionorder}>淇冮攢璁㈣揣</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ onclick={promotionorder}
+ >
+ 淇冮攢璁㈣揣
+ </button>
</template>
- <p style="height: 10px;"></p>
+ <p style="height: 10px"></p>
<!-- 鎼滅储 -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -30,37 +70,103 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>妫�绱㈡潯浠�</strong></p> -->
</div>
- <div style="padding:10px;">
+ <div style="padding: 10px">
<table>
<tbody>
<tr>
- <td style="width:10px;"></td>
- <td style="width:122px;">
- <div style="color:#696969;font-size:16px;">娑堣�楀搧璁㈠崟鍚嶇О</div>
+ <td style="width: 10px"></td>
+ <td style="width: 122px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 娑堣�楀搧璁㈠崟鍚嶇О
+ </div>
</td>
- <td style="width: 200px;">
- <lightning-input class="inputFont" type="text" label="娑堣�楀搧璁㈠崟鍚嶇О" value={category1} variant="label-hidden" onchange={category1Change}></lightning-input>
+ <td>
+ <lightning-input
+ class="inputFont"
+ type="text"
+ label="娑堣�楀搧璁㈠崟鍚嶇О"
+ value={category1}
+ variant="label-hidden"
+ onchange={category1Change}
+ ></lightning-input>
</td>
- <td style="width:30px;"></td>
- <td style="width: 74px;">
- <div style="color:#696969;font-size:16px;">璁㈠崟鏃ユ湡</div>
+ <td style="width: 30px"></td>
+ <td style="width: 74px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 璁㈠崟鏃ユ湡
+ </div>
</td>
- <td style="width: 200px;">
- <lightning-input class="inputFont" type="date" name="orderDate" value={orderDate} label="璁㈠崟鏃ユ湡" variant="label-hidden" onchange={orderDateChange}></lightning-input>
+ <td>
+ <lightning-input
+ class="inputFont"
+ type="date"
+ name="orderDate"
+ value={orderDate}
+ label="璁㈠崟鏃ユ湡"
+ variant="label-hidden"
+ onchange={orderDateChange}
+ ></lightning-input>
</td>
- <td style="width:30px;"></td>
- <td style="width: 74px;">
- <div style="color:#696969;font-size:16px;">璁㈠崟鐘舵��</div>
+ <td style="width: 30px"></td>
+ <td style="width: 74px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ "
+ >
+ 璁㈠崟鐘舵��
+ </div>
</td>
- <td style="width: 200px;">
- <lightning-combobox class="inputFont" name="orderStatus" label="璁㈠崟鐘舵��" value={orderStatus} placeholder="璇烽�夋嫨..." options={provinceOpts} variant="label-hidden" onchange={orderStatusChange}></lightning-combobox>
+ <td style="width: 250px">
+ <lightning-combobox
+ class="inputFont"
+ name="orderStatus"
+ label="璁㈠崟鐘舵��"
+ value={orderStatus}
+ placeholder="璇烽�夋嫨..."
+ options={provinceOpts}
+ variant="label-hidden"
+ onchange={orderStatusChange}
+ ></lightning-combobox>
</td>
- <td style="width: 30px;"></td>
- <td style="width: 400;">
- <!-- <lightning-button style="margin: 5px;" label="鎼滅储" onclick={searchProduct}></lightning-button>
- <lightning-button style="margin: 5px;" label="娓呯┖" onclick={clear}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="margin-right: 30px;height:32px;" onclick={searchProduct}>鎼滅储</button>
- <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="height:32px;" onclick={clear}>娓呯┖</button>
+ </tr>
+ </tbody>
+ </table>
+ <p style="height: 10px"></p>
+ <table>
+ <tbody>
+ <tr>
+ <td></td>
+ <td style="width: 325px">
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="
+ margin-right: 20px;
+ height: 32px;
+ width: 150px;
+ "
+ onclick={searchProduct}
+ >
+ 鎼滅储
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ style="height: 32px; width: 150px"
+ onclick={clear}
+ >
+ 娓呯┖
+ </button>
</td>
</tr>
</tbody>
@@ -68,8 +174,15 @@
</div>
</div>
<!-- 璁㈣揣鏄庣粏 -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -79,13 +192,19 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>璁㈣揣鏄庣粏</strong></p> -->
</div>
- <div style="padding:10px;">
+ <div style="padding: 10px">
<div class="table-container">
- <lightning-datatable class="wrapped-header-datatable" key-field="id" hide-checkbox-column="true" data={raesList} columns={cols}></lightning-datatable>
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ key-field="id"
+ hide-checkbox-column="true"
+ data={raesList}
+ columns={cols}
+ ></lightning-datatable>
</div>
</div>
</div>
</div>
</div>
</template>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexCssUtility/lexCssUtility.css b/force-app/main/default/lwc/lexCssUtility/lexCssUtility.css
index b9825ca..cca1121 100644
--- a/force-app/main/default/lwc/lexCssUtility/lexCssUtility.css
+++ b/force-app/main/default/lwc/lexCssUtility/lexCssUtility.css
@@ -1,84 +1,80 @@
/* .lexstyle{ */
- /* font-size: 13px;
+/* font-size: 13px;
width: 80% !important;
/* width:50px; */
- /* --sds-c-button-text-color:red; */
- /* 鑳屾櫙棰滆壊 */
- /* --slds-c-button-brand-color-background:rgb(8,16,132); */
- /* 瀛椾綋棰滆壊 */
- /* --slds-c-button-brand-text-color:#FFFFFF; */
- /* --slds-c-button-brand-text-color-hover:#ccc; */
+/* --sds-c-button-text-color:red; */
+/* 鑳屾櫙棰滆壊 */
+/* --slds-c-button-brand-color-background:rgb(8,16,132); */
+/* 瀛椾綋棰滆壊 */
+/* --slds-c-button-brand-text-color:#FFFFFF; */
+/* --slds-c-button-brand-text-color-hover:#ccc; */
/* } */
-
/* button杈规 */
-.lexBorder{
+.lexBorder {
font-size: 18px;
font-family: 'sans-serif';
- font-weight:500;
- color:#0A81DF;
+ font-weight: 500;
+ color: #0a81df;
/* border:2px solid rgb(8,16,132); */
/* border-color:rgb(8,16,132); */
width: 160px;
height: 36px;
border-radius: 4px;
opacity: 1;
- background: #FFFFFF;
+ background: #ffffff;
box-sizing: border-box;
- border:1px solid #0A81DF;
+ border: 1px solid #0a81df;
}
-.lexsearchStyle{
+.lexsearchStyle {
font-size: 18px;
font-family: 'sans-serif';
- font-weight:500;
+ font-weight: 500;
width: 160px;
height: 36px;
border-radius: 4px;
opacity: 1;
- background:#090F84;
- color:#FFFFFF;
+ background: #090f84;
+ color: #ffffff;
}
-.lexclearStyle{
+.lexclearStyle {
font-size: 18px;
font-family: 'sans-serif';
- font-weight:500;
+ font-weight: 500;
width: 160px;
height: 36px;
border-radius: 4px;
opacity: 1;
- background: #FFFFFF;
- border:1px solid #4d4d4d;
- color:#333333;
-
+ background: #ffffff;
+ border: 1px solid #4d4d4d;
+ color: #333333;
}
-
/* button杈规 */
-.lexBorderWidth{
+.lexBorderWidth {
font-size: 18px;
font-family: 'sans-serif';
- font-weight:500;
- color:#0A81DF;;
+ font-weight: 500;
+ color: #0a81df;
/* border:2px solid rgb(8,16,132); */
/* border-color:rgb(8,16,132); */
width: 200px;
height: 36px;
border-radius: 4px;
opacity: 1;
- background: #FFFFFF;
+ background: #ffffff;
box-sizing: border-box;
border-style: rgb(212, 212, 212);
}
-
/* button璺濈 */
-.buttonMarginLeft{
- margin-left:150px;
+.buttonMarginLeft {
+ margin-left: 150px;
}
/* button鐭窛绂� */
-.buttonminMarginLeft{
- margin-left:50px;
+.buttonminMarginLeft {
+ margin-left: 50px;
}
*:disabled {
@@ -87,30 +83,34 @@
}
/* 搴撳瓨鐩樼偣鍙樺寲鏄庣粏 */
-.changeDetail{
- width:250px;
- height:36px;
+.changeDetail {
+ width: 250px;
+ height: 36px;
font-size: 18px;
font-family: 'sans-serif';
- font-weight:500;
- color:#0A81DF;;
+ font-weight: 500;
+ color: #0a81df;
border-radius: 4px;
opacity: 1;
- background: #FFFFFF;
+ background: #ffffff;
box-sizing: border-box;
border-style: rgb(212, 212, 212);
}
/* 妫�绱㈡潯浠跺瓧浣� */
-.searchName{
+.searchName {
font-size: 16px;
font-family: 'sans-serif';
- font-weight:500;
-
+ font-weight: 500;
}
-
/* input 瀛椾綋澶у皬 by Link */
.inputFont {
font-size: 14px;
- --lwc-fontSize2:14px;
-}
\ No newline at end of file
+ --lwc-fontSize2: 14px;
+}
+
+/* spinner_container By Link */
+.slds-spinner_container {
+ position: fixed;
+ top: 123px;
+}
diff --git a/force-app/main/default/lwc/lexCustomDiffReasonComp/lexCustomDiffReasonComp.html b/force-app/main/default/lwc/lexCustomDiffReasonComp/lexCustomDiffReasonComp.html
index dbe7731..b40f598 100644
--- a/force-app/main/default/lwc/lexCustomDiffReasonComp/lexCustomDiffReasonComp.html
+++ b/force-app/main/default/lwc/lexCustomDiffReasonComp/lexCustomDiffReasonComp.html
@@ -1,9 +1,10 @@
<template>
<lightning-input
- variant="label-hidden"
- type='text'
- value = {DiffReason}
- onblur={diffReasonBlur}>
-
+ style="width: 90%"
+ variant="label-hidden"
+ type="text"
+ value={DiffReason}
+ onblur={diffReasonBlur}
+ >
</lightning-input>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexCustomInventoryColor/lexCustomInventoryColor.html b/force-app/main/default/lwc/lexCustomInventoryColor/lexCustomInventoryColor.html
index 98db636..0f067e2 100644
--- a/force-app/main/default/lwc/lexCustomInventoryColor/lexCustomInventoryColor.html
+++ b/force-app/main/default/lwc/lexCustomInventoryColor/lexCustomInventoryColor.html
@@ -1,17 +1,55 @@
<template>
<template if:true={showNormal}>
- <div style="margin-left: 10px;margin-right: 10px;margin-top: 10px;margin-bottom: 10px;font-size:16px;text-align: right;padding-right:10px;">
- <lightning-formatted-number value={value}></lightning-formatted-number>
+ <div
+ style="
+ margin-left: 10px;
+ margin-right: 10px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ font-size: 14px;
+ text-align: right;
+ padding-right: 10px;
+ "
+ >
+ <lightning-formatted-number
+ value={value}
+ ></lightning-formatted-number>
</div>
</template>
<template if:true={showRed}>
- <div style="margin-left: 10px;margin-right: 10px;margin-top: 10px;margin-bottom: 10px;font-size:16px;background-color:red;text-align: right;padding-right:10px;">
- <lightning-formatted-number value={value}></lightning-formatted-number>
+ <div
+ style="
+ margin-left: 10px;
+ margin-right: 10px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ font-size: 14px;
+ background-color: red;
+ text-align: right;
+ padding-right: 10px;
+ "
+ >
+ <lightning-formatted-number
+ value={value}
+ ></lightning-formatted-number>
</div>
</template>
<template if:true={showYellow}>
- <div style="margin-left: 10px;margin-right: 10px;margin-top: 10px;margin-bottom: 10px;font-size:16px;background-color:yellow;text-align: right;padding-right:10px;">
- <lightning-formatted-number value={value}></lightning-formatted-number>
+ <div
+ style="
+ margin-left: 10px;
+ margin-right: 10px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ font-size: 14px;
+ background-color: yellow;
+ text-align: right;
+ padding-right: 10px;
+ "
+ >
+ <lightning-formatted-number
+ value={value}
+ ></lightning-formatted-number>
</div>
</template>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexCustomLightningDatatable/customMyDrCheckBox.html b/force-app/main/default/lwc/lexCustomLightningDatatable/customMyDrCheckBox.html
new file mode 100644
index 0000000..7346a5a
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomLightningDatatable/customMyDrCheckBox.html
@@ -0,0 +1,10 @@
+<!-- sldsValidatorIgnore -->
+<!-- sldsValidatorIgnore -->
+<template>
+ <c-custom-mydr-comp
+ record-id={typeAttributes.recordId}
+ is-checked-my-dr={typeAttributes.isCheckedMyDr}
+ onunitchange={handleDataChange}
+ >
+ </c-custom-mydr-comp>
+</template>
diff --git a/force-app/main/default/lwc/lexCustomLightningDatatable/customShipmentNumber.html b/force-app/main/default/lwc/lexCustomLightningDatatable/customShipmentNumber.html
index 9213e1e..c5bd77d 100644
--- a/force-app/main/default/lwc/lexCustomLightningDatatable/customShipmentNumber.html
+++ b/force-app/main/default/lwc/lexCustomLightningDatatable/customShipmentNumber.html
@@ -1,9 +1,10 @@
<template>
<c-custom-shipment-number-comp
- style="border-color: red;"
- record-id={typeAttributes.recordId}
- shipment-number={typeAttributes.shipmentNumber}
+ style="border-color: red"
+ record-id={typeAttributes.recordId}
+ shipment-number={typeAttributes.shipmentNumber}
+ is-coninvoice={typeAttributes.isConinvoice}
+ esd-invoice-pro-not-count={typeAttributes.esdInvoiceProNotCount}
>
-
</c-custom-shipment-number-comp>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexCustomLightningDatatable/customaccountUrl.html b/force-app/main/default/lwc/lexCustomLightningDatatable/customaccountUrl.html
new file mode 100644
index 0000000..a19561d
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomLightningDatatable/customaccountUrl.html
@@ -0,0 +1,10 @@
+<!-- sldsValidatorIgnore -->
+<!-- sldsValidatorIgnore -->
+<template>
+ <c-custom-account-url-comp
+ account-name={typeAttributes.accountName}
+ account-url={typeAttributes.accountUrl}
+ is-disable={typeAttributes.isDisable}
+ >
+ </c-custom-account-url-comp>
+</template>
diff --git a/force-app/main/default/lwc/lexCustomLightningDatatable/customdeleteReason.html b/force-app/main/default/lwc/lexCustomLightningDatatable/customdeleteReason.html
new file mode 100644
index 0000000..c9b0bc3
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomLightningDatatable/customdeleteReason.html
@@ -0,0 +1,6 @@
+<!-- sldsValidatorIgnore -->
+<!-- sldsValidatorIgnore -->
+<template>
+ <c-custom-delete-reason-comp record-id={typeAttributes.recordId}>
+ </c-custom-delete-reason-comp>
+</template>
diff --git a/force-app/main/default/lwc/lexCustomLightningDatatable/lexCustomLightningDatatable.js b/force-app/main/default/lwc/lexCustomLightningDatatable/lexCustomLightningDatatable.js
index e82595a..405d6bf 100644
--- a/force-app/main/default/lwc/lexCustomLightningDatatable/lexCustomLightningDatatable.js
+++ b/force-app/main/default/lwc/lexCustomLightningDatatable/lexCustomLightningDatatable.js
@@ -13,72 +13,107 @@
import customOutboundCountTemplate from './customOutboundCount.html';
import customWeeklyReportTemplate from './customWeeklyReport.html';
import customAgencyOppInputTemplate from './customAgencyOppInput.html';
-import { loadStyle} from 'lightning/platformResourceLoader';
+import customMyDrCheckBoxTemplate from './customMyDrCheckBox.html';
+import customdeleteReasonTemplate from './customdeleteReason.html';
+import customAccountUrlTemplate from './customaccountUrl.html';
+import { loadStyle } from 'lightning/platformResourceLoader';
import LexCustomDataTable from '@salesforce/resourceUrl/LexCustomDataTable';
export default class LexCustomLightningDatatable extends LightningDatatable {
static customTypes = {
customUnit: {
template: customUnitTemplate,
- typeAttributes: ['unitValue','unitOptions','recordId','isDisabled'],
+ typeAttributes: [
+ 'unitValue',
+ 'unitOptions',
+ 'recordId',
+ 'isDisabled'
+ ]
},
customShipment: {
template: customShipmentNumberTemplate,
- typeAttributes: ['shipmentNumber','recordId'],
+ typeAttributes: [
+ 'shipmentNumber',
+ 'recordId',
+ 'isConinvoice',
+ 'esdInvoiceProNotCount'
+ ]
},
customShipmentUnitPrice: {
template: customShippingUnitPriceTemplate,
- typeAttributes: ['shippingUnitPrice','recordId'],
+ typeAttributes: ['shippingUnitPrice', 'recordId']
},
customShipmentAmount: {
template: customShipmentAmountTemplate,
- typeAttributes: ['shipmentAmount','recordId'],
+ typeAttributes: ['shipmentAmount', 'recordId']
},
- customDiffReason : {
+ customDiffReason: {
template: customDiffReasonTemplate,
- typeAttributes: ['ProdId','boxPiece'],
+ typeAttributes: ['ProdId', 'boxPiece']
},
customAttachmentType: {
template: attachmentTypeTemplate,
- typeAttributes: ['typeValue','typeOptions','recordId','isDisabledAttachment'],
+ typeAttributes: [
+ 'typeValue',
+ 'typeOptions',
+ 'recordId',
+ 'isDisabledAttachment'
+ ]
},
customTableInput: {
template: customTableInputTemplate,
- typeAttributes:['inputValue','recordId','valueType','upperLimit','lowerLimit','allnumber'],
+ typeAttributes: [
+ 'inputValue',
+ 'recordId',
+ 'valueType',
+ 'upperLimit',
+ 'lowerLimit',
+ 'allnumber'
+ ]
},
- customOutputGood:{
+ customOutputGood: {
template: customOutputGoodsTemplate,
- typeAttributes:['outputValue','type','recordId'],
+ typeAttributes: ['outputValue', 'type', 'recordId']
},
- customReturnGoodInput:{
+ customReturnGoodInput: {
template: customReturnGoodInputTemplate,
- typeAttributes:['inputValue','boxPrice','recordId'],
+ typeAttributes: ['inputValue', 'boxPrice', 'recordId']
},
- customInventoryColor:{
+ customInventoryColor: {
template: customInventoryColorTemplate,
- typeAttributes:['value','upperlimit','lowerlimit','boxPrice'],
+ typeAttributes: ['value', 'upperlimit', 'lowerlimit', 'boxPrice']
},
- tableCellIcon:{
+ tableCellIcon: {
template: customTableCellIconTemplate,
- typeAttributes:['iconName','recordId'],
+ typeAttributes: ['iconName', 'recordId']
},
- outboundCount:{
+ outboundCount: {
template: customOutboundCountTemplate,
- typeAttributes:['isDisable','recordId','Count'],
+ typeAttributes: ['isDisable', 'recordId', 'Count']
},
- weeklyReport:{
+ weeklyReport: {
template: customWeeklyReportTemplate,
- typeAttributes:['recordId','hospitalName','isShowButton'],
+ typeAttributes: ['recordId', 'hospitalName', 'isShowButton']
},
- agencyOppInput:{
+ agencyOppInput: {
template: customAgencyOppInputTemplate,
- typeAttributes:['inputValue','recordId','fieldName','showType'],
+ typeAttributes: ['inputValue', 'recordId', 'fieldName', 'showType']
+ },
+ MyDrCheckBox: {
+ template: customMyDrCheckBoxTemplate,
+ typeAttributes: ['recordId', 'isCheckedMyDr']
+ },
+ deleteReason: {
+ template: customdeleteReasonTemplate,
+ typeAttributes: ['recordId']
+ },
+ customShowAccountUrl: {
+ template: customAccountUrlTemplate,
+ typeAttributes: ['accountName', 'accountUrl', 'isDisable']
}
};
constructor() {
super();
- Promise.all([
- loadStyle(this, LexCustomDataTable),
- ]).then(() => {})
+ Promise.all([loadStyle(this, LexCustomDataTable)]).then(() => {});
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexInventory/lexInventory.css b/force-app/main/default/lwc/lexInventory/lexInventory.css
index 9a393b0..8e1f462 100644
--- a/force-app/main/default/lwc/lexInventory/lexInventory.css
+++ b/force-app/main/default/lwc/lexInventory/lexInventory.css
@@ -7,12 +7,21 @@
.accordionClass2 {
font-weight: normal;
}
-.count{
- --slds-c-button-brand-color-background:rgb(8,16,132);
- /* 瀛椾綋棰滆壊 */
- --slds-c-button-brand-text-color:#FFFFFF;
+.count {
+ --slds-c-button-brand-color-background: rgb(8, 16, 132);
+ /* 瀛椾綋棰滆壊 */
+ --slds-c-button-brand-text-color: #ffffff;
}
:host {
--lwc-inputStaticFontSize: 16px;
--lwc-formLabelFontSize: 16px;
-}
\ No newline at end of file
+}
+/* .spinner-container{
+ position: fixed; */
+/* width:100%;
+ height:90%; */
+/* top: 90%; */
+/* left: 100%;
+ transform: translate(-50%, -50%); */
+/* z-index: 9999;
+} */
diff --git a/force-app/main/default/lwc/lexInventory/lexInventory.html b/force-app/main/default/lwc/lexInventory/lexInventory.html
index 8e8f0d4..77f620f 100644
--- a/force-app/main/default/lwc/lexInventory/lexInventory.html
+++ b/force-app/main/default/lwc/lexInventory/lexInventory.html
@@ -1,23 +1,59 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner class="spinner-container" size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
<template if:true={showcount}>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;">
- <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:3px;">
- <div style="margin:12px;">
- <p style="font-size: 18px;float:left"><strong>搴撳瓨鐩樼偣</strong></p>
+ <div style="border: 1px solid #d4d4d4; border-radius: 5px">
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <div style="margin: 12px">
+ <p style="font-size: 18px; float: left">
+ <strong>搴撳瓨鐩樼偣</strong>
+ </p>
</div>
- <div style="margin-left:400px;margin-bottom:12px;">
+ <div style="margin-left: 400px; margin-bottom: 12px">
<!-- <lightning-button class = 'lexstyle' label="鐩樼偣纭" title="鐩樼偣纭" onclick={saveConfirm}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="鐩樼偣纭" onclick={saveConfirm}>鐩樼偣纭</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="鐩樼偣纭"
+ onclick={saveConfirm}
+ >
+ 鐩樼偣纭
+ </button>
</div>
</div>
- <div style="padding:10px;">
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div style="padding: 10px">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<table>
<colgroup>
<col width="160px" />
@@ -38,13 +74,28 @@
<tbody>
<tr>
<td></td>
- <td align="right" class="searchName">BarCode</td>
- <td style="width:600px"><lightning-textarea class="inputFont" name="BarCode" label=""
- onchange={handleChange}></lightning-textarea></td>
+ <td align="right" class="searchName">
+ BarCode
+ </td>
+ <td style="width: 600px">
+ <lightning-textarea
+ class="inputFont"
+ name="BarCode"
+ label=""
+ onchange={handleChange}
+ ></lightning-textarea>
+ </td>
<td align="right"></td>
<td></td>
- <td style="width:200px">
- <button style="margin-top:14px;" class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="鑾峰彇鏄庣粏" onclick={barcodeEntrys}>鑾峰彇鏄庣粏</button>
+ <td style="width: 200px">
+ <button
+ style="margin-top: 14px"
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="鑾峰彇鏄庣粏"
+ onclick={barcodeEntrys}
+ >
+ 鑾峰彇鏄庣粏
+ </button>
<!-- <lightning-button class = 'lexstyle' label="BarCode褰曞叆" title="BarCode褰曞叆"
onclick={barcodeEntrys} style="width: 300px;"></lightning-button> -->
</td>
@@ -54,8 +105,20 @@
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<!-- <p style="font-size: 16px;"><strong>鍦ㄥ簱鍟嗗搧搴撳瓨涓�瑙�</strong></p> -->
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -65,122 +128,222 @@
</lightning-layout-item>
</lightning-layout>
</div>
- <div style="padding:10px;">
-
- <div style="height: 300px;">
+ <div style="padding: 10px">
+ <div style="height: 300px">
<template if:true={showTable}>
- <c-lex-custom-lightning-datatable key-field="key" data={data} columns={columns}
- ondiffreasons={diffreasons} onrowselection={getSelectedRows}
- selected-rows={selectedRows} class="wrapped-header-datatable">
+ <c-lex-custom-lightning-datatable
+ key-field="key"
+ data={data}
+ columns={columns}
+ ondiffreasons={diffreasons}
+ onrowselection={getSelectedRows}
+ selected-rows={selectedRows}
+ class="wrapped-header-datatable"
+ >
</c-lex-custom-lightning-datatable>
</template>
-
-
</div>
-
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<table>
<tr>
<td>
<!-- <p style="font-size: 16px;"><strong>璋冩暣鏄庣粏</strong></p> -->
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
<strong>璋冩暣鏄庣粏</strong>
</p>
</lightning-layout-item>
</lightning-layout>
-
</td>
<template if:true={showbutton}>
- <td align="center">
+ <td align="center">
<!-- <lightning-button variant="brand" class='count' label="涓嬭浇鏈鐩樼偣搴撳瓨鍙樺寲鏄庣粏" title="涓嬭浇鏈鐩樼偣搴撳瓨鍙樺寲鏄庣粏"
onclick={exportData} style="width: 150px;"></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch changeDetail" label="涓嬭浇鏈鐩樼偣搴撳瓨鍙樺寲鏄庣粏" onclick={exportData}>涓嬭浇鏈鐩樼偣搴撳瓨鍙樺寲鏄庣粏</button>
- </td>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch changeDetail"
+ label="涓嬭浇鏈鐩樼偣搴撳瓨鍙樺寲鏄庣粏"
+ onclick={exportData}
+ >
+ 涓嬭浇鏈鐩樼偣搴撳瓨鍙樺寲鏄庣粏
+ </button>
+ </td>
</template>
</tr>
</table>
</div>
<!-- <template if:true={showTable}> -->
- <div style="padding:10px;">
- <lightning-datatable key-field="id" data={pageCodeRecords} columns={column}
- hide-checkbox-column={hidecheckbox} class="wrapped-header-datatable">
+ <div style="padding: 10px">
+ <lightning-datatable
+ key-field="id"
+ data={pageCodeRecords}
+ columns={column}
+ hide-checkbox-column={hidecheckbox}
+ class="wrapped-header-datatable"
+ style="word-wrap: break-word; word-break: break-all"
+ >
</lightning-datatable>
- <c-paginator onprevious={handlePrevious} onnext={handleNext} onpageschange={handlePageschange}
- onfirst={handleFirst} onlast={handleLast} page-size-options={pageSizeOptions}
- previous-button-disabled={previousButtonDisabled} next-button-disabled={nextButtonDisabled}
- record-start={recordStart} record-end={recordEnd}
- total-records={totalRecords}></c-paginator>
+ <c-paginator
+ onprevious={handlePrevious}
+ onnext={handleNext}
+ onpageschange={handlePageschange}
+ onfirst={handleFirst}
+ onlast={handleLast}
+ page-size-options={pageSizeOptions}
+ previous-button-disabled={previousButtonDisabled}
+ next-button-disabled={nextButtonDisabled}
+ record-start={recordStart}
+ record-end={recordEnd}
+ total-records={totalRecords}
+ ></c-paginator>
</div>
<!-- </template> -->
</div>
</div>
-
-
</div>
</template>
-
<template if:true={EditAble}>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;">
- <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:3px;">
- <div style="border: 1px solid #D4D4D4;border-radius:5px;">
- <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:6px;">
- <p style="font-size: 19px;"><strong>鐩樼偣鎯呭喌涓�瑙�</strong></p>
+ <div style="border: 1px solid #d4d4d4; border-radius: 5px">
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <div style="border: 1px solid #d4d4d4; border-radius: 5px">
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 6px;
+ "
+ >
+ <p style="font-size: 19px">
+ <strong>鐩樼偣鎯呭喌涓�瑙�</strong>
+ </p>
</div>
<div class="acc-container">
- <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={conId}
- onload={handleLoad2} class="hideHelpText">
- <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={conId}
+ onload={handleLoad2}
+ class="hideHelpText"
+ >
+ <div
+ class="slds-modal__content slds-p-around_medium"
+ id="modal-content-id-1"
+ >
<div class="slds-grid">
<div class="slds-col slds-size_1-of-2">
- <lightning-output-field field-name="Name"
- class="hehe-layoutItem" style="padding-left:20px;"></lightning-output-field>
+ <lightning-output-field
+ field-name="Name"
+ class="hehe-layoutItem"
+ style="padding-left: 20px"
+ ></lightning-output-field>
</div>
<div class="slds-col slds-size_1-of-2">
- <lightning-output-field field-name="Inventory_date__c"
- class="hehe-layoutItem"></lightning-output-field>
+ <lightning-output-field
+ field-name="Inventory_date__c"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</div>
</div>
</div>
</lightning-record-edit-form>
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-top:10px">
- <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:6px;">
- <lightning-accordion allow-multiple-sections-open class="slds-m-around_medium"
- active-section-name={activeSections}>
- <lightning-accordion-section name="dataExpand" label="鐩樼偣鏄庣粏" class="accordionClass">
- <lightning-datatable key-field="id" data={detailData} columns={dcolumns}
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-top: 10px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 6px;
+ "
+ >
+ <lightning-accordion
+ allow-multiple-sections-open
+ class="slds-m-around_medium"
+ active-section-name={activeSections}
+ >
+ <lightning-accordion-section
+ name="dataExpand"
+ label="鐩樼偣鏄庣粏"
+ class="accordionClass"
+ >
+ <lightning-datatable
+ key-field="id"
+ data={detailData}
+ columns={dcolumns}
hide-checkbox-column={hidecheckbox}
- class="wrapped-header-datatable accordionClass2">
+ class="wrapped-header-datatable accordionClass2"
+ >
</lightning-datatable>
</lightning-accordion-section>
</lightning-accordion>
-
-
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-top:10px">
- <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:6px;">
- <lightning-accordion allow-multiple-sections-open class="slds-m-around_medium"
- active-section-name={activeSections}>
- <lightning-accordion-section name="dataExpand" label="鍦ㄥ簱璋冩暣鏄庣粏" class="accordionClass">
- <lightning-datatable key-field="id" data={adjustdata} columns={stockadjustcolumns}
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-top: 10px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 6px;
+ "
+ >
+ <lightning-accordion
+ allow-multiple-sections-open
+ class="slds-m-around_medium"
+ active-section-name={activeSections}
+ >
+ <lightning-accordion-section
+ name="dataExpand"
+ label="鍦ㄥ簱璋冩暣鏄庣粏"
+ class="accordionClass"
+ >
+ <lightning-datatable
+ key-field="id"
+ data={adjustdata}
+ columns={stockadjustcolumns}
hide-checkbox-column={hidecheckbox}
- class="wrapped-header-datatable accordionClass2">
+ class="wrapped-header-datatable accordionClass2"
+ >
</lightning-datatable>
</lightning-accordion-section>
</lightning-accordion>
-
</div>
</div>
</div>
</div>
-
</template>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexInventory/lexInventory.js b/force-app/main/default/lwc/lexInventory/lexInventory.js
index 43d0f99..ac48985 100644
--- a/force-app/main/default/lwc/lexInventory/lexInventory.js
+++ b/force-app/main/default/lwc/lexInventory/lexInventory.js
@@ -1,760 +1,853 @@
-import { LightningElement, wire, api, track } from "lwc";
-import oninit from "@salesforce/apex/LexInventoryController.init";
+import { LightningElement, wire, api, track } from 'lwc';
+import oninit from '@salesforce/apex/LexInventoryController.init';
// import sheetjs from '@salesforce/resourceUrl/sheetjs';
-import barcodeEntry from "@salesforce/apex/LexInventoryController.searchConsumableorderdetails";
-import save from "@salesforce/apex/LexInventoryController.save";
-import datainit from "@salesforce/apex/LexInventoryListController.init";
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import { NavigationMixin } from "lightning/navigation";
+import barcodeEntry from '@salesforce/apex/LexInventoryController.searchConsumableorderdetails';
+import save from '@salesforce/apex/LexInventoryController.save';
+import datainit from '@salesforce/apex/LexInventoryListController.init';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
//搴撳瓨鐩樼偣涓婚〉闈㈡暟鎹�
const columns = [
- {
- label: "鏄惁鐩樼偣",
- fieldName: "iscount",
- hideDefaultActions: true,
- initialWidth: 80,
-
- },
- {
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "Name__c",
- hideDefaultActions: true,
- // initialWidth: 400,
- wrapText:true
-
- },
- {
- label: "瑙勬牸",
- initialWidth: 50,
- fieldName: "Packing_list_manual__c",
- cellAttributes: { alignment: "right" },
- hideDefaultActions: true,
-
-
- },
- {
- label: "鍗曚綅",
- fieldName: "boxPiece",
- initialWidth: 50,
- hideDefaultActions: true,
-
-
- },
- {
- label: "鏈夋晥鏈熷唴搴撳瓨",
- fieldName: "limitCount",
- initialWidth: 120,
- hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
- },
+ {
+ label: '鏄惁鐩樼偣',
+ fieldName: 'iscount',
+ hideDefaultActions: true,
+ initialWidth: 80
+ },
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ hideDefaultActions: true,
+ // initialWidth: 400,
+ wrapText: true
+ },
+ {
+ label: '瑙勬牸',
+ initialWidth: 50,
+ fieldName: 'Packing_list_manual__c',
+ cellAttributes: { alignment: 'right' },
+ hideDefaultActions: true
+ },
+ {
+ label: '鍗曚綅',
+ fieldName: 'boxPiece',
+ initialWidth: 50,
+ hideDefaultActions: true
+ },
+ {
+ label: '鏈夋晥鏈熷唴搴撳瓨',
+ fieldName: 'limitCount',
+ initialWidth: 120,
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'right' }
+ },
- {
- label: "杩囨湡搴撳瓨",
- initialWidth: 100,
- fieldName: "overlimitCount",
- hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
-
-
- },
- {
- label: "鐩樼偣",
- initialWidth: 50,
- fieldName: "Pandian",
- hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
-
-
- },
- {
- label: "涓㈠け",
- initialWidth: 50,
- fieldName: "Diff",
- hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
-
-
- },
- {
- label: "瀵诲洖",
- initialWidth: 50,
- fieldName: "refind",
- hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
-
-
- },
- {
- label: "宸紓鍘熷洜",
- // fieldName: "DiffReason",
- initialWidth: 200,
- hideDefaultActions: true,
- type: "customDiffReason",
- typeAttributes: {
- DiffReason: { fieldName: "DiffReason" },
- ProdId: { fieldName: "ProdId" },
- boxPiece: { fieldName: "boxPiece" }
-
- },
-
- },
+ {
+ label: '杩囨湡搴撳瓨',
+ initialWidth: 100,
+ fieldName: 'overlimitCount',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '鐩樼偣',
+ initialWidth: 50,
+ fieldName: 'Pandian',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '涓㈠け',
+ initialWidth: 50,
+ fieldName: 'Diff',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '瀵诲洖',
+ initialWidth: 50,
+ fieldName: 'refind',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '宸紓鍘熷洜',
+ // fieldName: "DiffReason",
+ initialWidth: 200,
+ hideDefaultActions: true,
+ type: 'customDiffReason',
+ typeAttributes: {
+ DiffReason: { fieldName: 'DiffReason' },
+ ProdId: { fieldName: 'ProdId' },
+ boxPiece: { fieldName: 'boxPiece' }
+ }
+ }
];
//璋冩暣鏄庣粏
const column = [
- {
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "Name__c",
- wrapText: true,
- hideDefaultActions: true,
- },
- {
- label: "鍗曚綅",
- fieldName: "Box_Piece__c",
- hideDefaultActions: true,
- initialWidth: 50,
-
- },
- {
- label: "BarCode",
- fieldName: "Bar_Code__c",
- hideDefaultActions: true,
- wrapText: true,
- initialWidth: 500,
- },
- {
- label: "璋冩暣鍘熷洜",
- fieldName: "DiffReason",
- hideDefaultActions: true,
- wrapText: true,
-
- },
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ wrapText: true,
+ hideDefaultActions: true
+ // initialWidth: 550
+ },
+ {
+ label: '鍗曚綅',
+ fieldName: 'Box_Piece__c',
+ hideDefaultActions: true,
+ initialWidth: 50
+ },
+ {
+ label: 'BarCode',
+ fieldName: 'Bar_Code__c',
+ hideDefaultActions: true,
+ wrapText: true
+ // initialWidth: 300,
+ },
+ {
+ label: '璋冩暣鍘熷洜',
+ fieldName: 'DiffReason',
+ hideDefaultActions: true,
+ wrapText: true
+ // initialWidth:
+ }
];
//鐩樼偣鏄庣粏
const dcolumns = [
- {
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "Name__c",
- hideDefaultActions: true,
- // initialWidth: 250,
- wrapText: true,
-
-
- },
- {
- label: "搴撳瓨",
- fieldName: "Count_Sum__c",
- hideDefaultActions: true,
- initialWidth: 100,
- cellAttributes: { alignment: "right" },
-
- },
- {
- label: "鐩樼偣",
- fieldName: "inventory_sum__c",
- hideDefaultActions: true,
- initialWidth: 100,
- cellAttributes: { alignment: "right" },
-
- },
- {
- label: "涓㈠け",
- fieldName: "Diff__c",
- hideDefaultActions: true,
- initialWidth: 100,
- cellAttributes: { alignment: "right" },
-
- },
- {
- label: "瀵诲洖",
- fieldName: "Product_Refind__c",
- hideDefaultActions: true,
- initialWidth: 100,
- cellAttributes: { alignment: "right" },
-
- },
- {
- label: "宸紓鍘熷洜",
- fieldName: "Lose_reason__c",
- hideDefaultActions: true,
-
- },
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ hideDefaultActions: true,
+ // initialWidth: 250,
+ wrapText: true
+ },
+ {
+ label: '搴撳瓨',
+ fieldName: 'Count_Sum__c',
+ hideDefaultActions: true,
+ initialWidth: 100,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '鐩樼偣',
+ fieldName: 'inventory_sum__c',
+ hideDefaultActions: true,
+ initialWidth: 100,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '涓㈠け',
+ fieldName: 'Diff__c',
+ hideDefaultActions: true,
+ initialWidth: 100,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '瀵诲洖',
+ fieldName: 'Product_Refind__c',
+ hideDefaultActions: true,
+ initialWidth: 100,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: '宸紓鍘熷洜',
+ fieldName: 'Lose_reason__c',
+ hideDefaultActions: true
+ }
];
//鍦ㄥ簱璋冩暣鏄庣粏
const stockadjustcolumns = [
- {
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "Name__c",
- wrapText: true,
- hideDefaultActions: true,
-
- },
- {
- label: "浜у搧鍨嬪彿",
- fieldName: "Asset_Model_No__c",
- hideDefaultActions: true,
-
- },
- {
- label: "宸紓鍘熷洜",
- fieldName: "Lose_reason__c",
- hideDefaultActions: true,
- initialWidth: 150,
-
- },
- {
- label: "鏄惁涓㈠け",
- type: "boolean",
- fieldName: "Lose_Flag__c",
- hideDefaultActions: true,
-
- },
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ wrapText: true,
+ hideDefaultActions: true
+ },
+ {
+ label: '浜у搧鍨嬪彿',
+ fieldName: 'Asset_Model_No__c',
+ hideDefaultActions: true
+ },
+ {
+ label: '宸紓鍘熷洜',
+ fieldName: 'Lose_reason__c',
+ hideDefaultActions: true,
+ initialWidth: 150
+ },
+ {
+ label: '鏄惁涓㈠け',
+ type: 'boolean',
+ fieldName: 'Lose_Flag__c',
+ hideDefaultActions: true
+ }
];
export default class LexInventory extends NavigationMixin(LightningElement) {
- columns = columns;
- column = column;
- stockadjustcolumns = stockadjustcolumns;
- dcolumns = dcolumns;
- @track data = [];
- @track codPageRecords = [];
- @track pageCodeRecords = [];
- @track accountName;
- @track agencyProType;
- @track userWorkLocation;
- @track accountid
- @track pandiandetailsMap
- @track reSet
- @track reSet1
+ columns = columns;
+ column = column;
+ stockadjustcolumns = stockadjustcolumns;
+ dcolumns = dcolumns;
+ @track data = [];
+ @track codPageRecords = [];
+ @track pageCodeRecords = [];
+ @track accountName;
+ @track agencyProType;
+ @track userWorkLocation;
+ @track accountid;
+ @track pandiandetailsMap;
+ @track reSet;
+ @track reSet1;
- @track showTable = false;
- @track showbutton = false;
- @track barcode = "";
- @track ConsumableorderdetailsRecordsview = [];
- @track consumableorderdetailsRecords = [];
- @track showcount = true;
+ @track showTable = false;
+ @track showbutton = false;
+ @track barcode = '';
+ @track ConsumableorderdetailsRecordsview = [];
+ @track consumableorderdetailsRecords = [];
+ @track showcount = true;
- @track iSinventory = false
- @track numberDetail;
- @track hidecheckbox = true;
- //鍒嗛〉start
- @track sortBy = "";
- @track sortDirection = "asc";
- @track pageSize = 10;
- error;
- records;
- currentPageToken = 0;
- nextPageToken = this.pageSize;
- @track totalRecords = 0;
- @track loader = false;
- @track pageNumber = 1;
- @track paginationVisibility = false;
- @track totalPages = 1;
- pageSizeOptions = [10, 25, 50, 100];
- @track recordStart = 0;
- @track recordEnd = 0;
- //end
+ @track iSinventory = false;
+ @track numberDetail;
+ @track hidecheckbox = true;
+ //鍒嗛〉start
+ @track sortBy = '';
+ @track sortDirection = 'asc';
+ @track pageSize = 10;
+ error;
+ records;
+ currentPageToken = 0;
+ nextPageToken = this.pageSize;
+ @track totalRecords = 0;
+ @track loader = false;
+ @track pageNumber = 1;
+ @track paginationVisibility = false;
+ @track totalPages = 1;
+ pageSizeOptions = [10, 25, 50, 100];
+ @track recordStart = 0;
+ @track recordEnd = 0;
+ //end
+ //鍔犺浇妗�
+ // @track casesSpinner = true;
+ @track showSpinner = true;
- //鍔犺浇妗�
- // @track casesSpinner = true;
- @track showSpinner = true;
+ //row
+ @track selectedRows = [];
+ //inventoryList
+ @track isSummonsFlag;
+ //灞曞紑鏍�
+ activeSections = ['dataExpand'];
+ columnHeader = ['娑堣�楀搧鍚嶇О', '鍗曚綅', 'BarCode', '璋冩暣鍘熷洜'];
+ //纭涓�瑙�
+ @track eSetId = '';
+ @track EditAble = false;
+ @track selectedData;
+ @track conId;
+ @track detailData = [];
+ @track adjustdata = [];
+ @track detalipan = [];
- //row
- @track selectedRows = [];
- //inventoryList
- @track isSummonsFlag;
- //灞曞紑鏍�
- activeSections = ["dataExpand"];
- columnHeader = ["娑堣�楀搧鍚嶇О", "鍗曚綅", "barCode", "璋冩暣鍘熷洜"];
- //纭涓�瑙�
- @track eSetId = "";
- @track EditAble = false;
- @track selectedData;
- @track conId;
- @track detailData = [];
- @track adjustdata = [];
- @track detalipan = [];
+ //瀵煎嚭csv
+ xlsDataHeader = ['娑堣�楀搧鍚嶇О', '鍗曚綅', 'barCode', '璋冩暣鍘熷洜'];
-
- //瀵煎嚭csv
- xlsDataHeader = ['娑堣�楀搧鍚嶇О', '鍗曚綅', 'barCode', '璋冩暣鍘熷洜'];
-
- //鑾峰彇閾炬帴鍙傛暟
- getQueryString(name) {
- console.log("getQueryString name " + name);
- let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
- let r = window.location.search.substr(1).match(reg);
- if (r != null) {
- return decodeURIComponent(r[2]);
- }
- return null;
- }
- renderedCallback() {
+ //鑾峰彇閾炬帴鍙傛暟
+ getQueryString(name) {
+ console.log('getQueryString name ' + name);
+ let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+ let r = window.location.search.substr(1).match(reg);
+ if (r != null) {
+ return decodeURIComponent(r[2]);
+ }
+ return null;
+ }
+ renderedCallback() {
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
+ connectedCallback() {
+ console.log('===>鍒濆鍖�');
- connectedCallback() {
- console.log("===>鍒濆鍖�");
+ //鑾峰彇ESetid
+ this.eSetId = this.getQueryString('eSetId');
+ this.eSetId = this.eSetId == null ? '' : this.eSetId;
+ console.log(' this.eSetId' + this.eSetId);
+ if (this.eSetId == '') {
+ this.EditAble = false;
+ this.init();
+ } else {
+ this.inits();
+ this.showcount = false;
+ this.EditAble = true;
+ }
+ }
+ init() {
+ this.showSpinner = true;
+ oninit()
+ .then((result) => {
+ console.log('1112' + JSON.stringify(result));
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result.status = ' + result.status);
+ console.log(
+ 'ConsumableorderdetailsRecordsview= ' +
+ result.entity.ConsumableorderdetailsRecordsview
+ );
+ this.ConsumableorderdetailsRecordsview = JSON.parse(
+ result.entity.ConsumableorderdetailsRecordsview
+ );
+ this.consumableorderdetailsRecords =
+ result.entity.consumableorderdetailsRecords;
+ console.log(
+ 'consumableorderdetailsRecords= ' +
+ result.entity.consumableorderdetailsRecords
+ );
+ console.log(
+ '浼犲弬绫诲瀷',
+ typeof this.consumableorderdetailsRecords
+ );
+ if (result.status == 'Success') {
+ this.data = [];
+ this.data = this.ConsumableorderdetailsRecordsview[0];
+ console.log('this.data ==>' + JSON.stringify(this.data));
+ for (let i in this.data) {
+ this.data[i]['key'] =
+ this.data[i]['ProdId'] + this.data[i]['boxPiece'];
+ this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
+ this.data[i]['Packing_list_manual__c'] =
+ this.data[i].Prod.Packing_list_manual__c;
+ }
+ this.accountName = result.entity.accountName;
+ this.agencyProType = result.entity.agencyProType;
+ this.userWorkLocation = result.entity.userWorkLocation;
+ this.showSpinner = false;
+ this.accountid = result.entity.accountid;
+ this.showTable = true;
+ } else {
+ this.showMyToast('鍒濆鍖栧け璐�', result.msg, 'error');
+ this.showSpinner = false;
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showSpinner = false;
+ });
+ //榛樿灞曞紑鏍�
+ this.activeSections = ['dataExpand'];
+ this.showTable = false;
+ this.showbutton = false;
+ }
- //鑾峰彇ESetid
- this.eSetId = this.getQueryString("eSetId");
- this.eSetId = this.eSetId == null ? "" : this.eSetId;
- console.log(" this.eSetId" + this.eSetId);
- if (this.eSetId == "") {
- this.EditAble = false;
- this.init();
- } else {
- this.inits();
- this.showcount = false;
- this.EditAble = true;
- }
+ //褰曞叆barcode
+ barcodeEntrys() {
+ console.log('Test');
+ this.showTable = false;
+ this.showbutton = false;
+ this.showSpinner = true;
- }
- init() {
+ //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
+ const selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
+ console.log('selectedRows========> ' + JSON.stringify(selectedRows));
+ for (var i in this.data) {
+ this.data[i]['check'] = false;
+ }
+ for (var i in this.data) {
+ for (var j in selectedRows) {
+ if (
+ this.data[i].ProdId + this.data[i]['boxPiece'] ==
+ selectedRows[j].ProdId + selectedRows[j]['boxPiece']
+ ) {
+ this.data[i]['check'] = true;
+ }
+ // console.log('this.data[i].ProdId+this.data[i]["boxPiece"]'+this.data[i].ProdId+this.data[i]["boxPiece"]);
+ console.log(
+ 'selectedRows[j].ProdId+this.data[i]["boxPiece"]' +
+ selectedRows[j].ProdId +
+ selectedRows[j]['boxPiece']
+ );
+ }
+ }
+ // if(this.barcode == ''||this.barcode == null){
+ // this.showMyToast('鑾峰彇澶辫触','璇疯緭鍏arCode鍙�','error');
- this.showSpinner = true;
- oninit()
- .then((result) => {
- console.log("1112" + JSON.stringify(result));
- result = JSON.parse(JSON.stringify(result));
- console.log("result.status = " + result.status);
- console.log("ConsumableorderdetailsRecordsview= " + result.entity.ConsumableorderdetailsRecordsview);
- this.ConsumableorderdetailsRecordsview = JSON.parse(result.entity.ConsumableorderdetailsRecordsview);
- this.consumableorderdetailsRecords = result.entity.consumableorderdetailsRecords;
- console.log("consumableorderdetailsRecords= " + result.entity.consumableorderdetailsRecords);
- console.log("浼犲弬绫诲瀷", typeof this.consumableorderdetailsRecords);
- if (result.status == "Success") {
- this.data = [];
- this.data = this.ConsumableorderdetailsRecordsview[0];
- console.log("this.data ==>" + JSON.stringify(this.data));
- for (let i in this.data) {
- this.data[i]["key"] = this.data[i]["ProdId"] + this.data[i]["boxPiece"];
- this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
- this.data[i]["Packing_list_manual__c"] = this.data[i].Prod.Packing_list_manual__c;
- }
- this.accountName = result.entity.accountName;
- this.agencyProType = result.entity.agencyProType;
- this.userWorkLocation = result.entity.userWorkLocation;
- this.showSpinner = false;
- this.accountid = result.entity.accountid;
- this.showTable = true;
- } else {
- this.showMyToast('鍒濆鍖栧け璐�',result.msg,'error');
- this.showSpinner = false;
- }
- })
- .catch((error) => {
- console.log("error = " + JSON.stringify(error));
- this.showSpinner = false;
- });
- //榛樿灞曞紑鏍�
- this.activeSections = ["dataExpand"];
- this.showTable = false;
- this.showbutton = false;
- }
+ // }
+ console.log('this.data--->' + JSON.stringify(this.data));
+ console.log('this.currentPageToken' + this.currentPageToken);
+ this.selectedRows = [];
+ barcodeEntry({
+ accountName: this.accountName,
+ agencyProType: this.agencyProType,
+ userWorkLocation: this.userWorkLocation,
+ barcode: this.barcode,
+ consumableorderdetailsRecordsLWC: JSON.stringify(this.data),
+ pageSizeLWC: this.pageSize,
+ pageTokenLWC: this.currentPageToken,
+ sortFieldLWC: this.sortBy,
+ sortOrderLWC: this.sortDirection
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result ===>' + JSON.stringify(result));
+ if (result.status == 'Success1') {
+ //鍒嗛〉start
+ this.nextPageToken =
+ result.entity.paginatedAccounts.nextPageToken;
+ this.totalRecords =
+ result.entity.paginatedAccounts.totalRecords;
+ this.recordStart =
+ result.entity.paginatedAccounts.recordStart;
+ this.recordEnd = result.entity.paginatedAccounts.recordEnd;
+ this.totalPages = Math.ceil(
+ result.entity.paginatedAccounts.totalRecords /
+ this.pageSize
+ );
+ console.log('this.totalPages = ' + this.totalPages);
+ this.paginationVisibility =
+ this.totalPages > 1 ? true : false;
+ console.log('this.sortDirection = ' + this.sortDirection);
+ //鍒嗛〉end
+ this.codPageRecords = JSON.parse(
+ result.entity.codPageRecords
+ );
+ for (var i in this.codPageRecords) {
+ this.codPageRecords[i]['Name__c'] =
+ this.codPageRecords[i].Prod.Name__c;
+ this.codPageRecords[i]['Box_Piece__c'] =
+ this.codPageRecords[i].orderdetails2.Box_Piece__c;
+ this.codPageRecords[i]['Bar_Code__c'] =
+ this.codPageRecords[i].orderdetails2.Bar_Code__c;
+ }
+ this.pageCodeRecords = result.entity.pageCodeRecords;
+ for (var i in this.pageCodeRecords) {
+ this.pageCodeRecords[i]['Name__c'] =
+ this.pageCodeRecords[i].Prod.Name__c;
+ this.pageCodeRecords[i]['Box_Piece__c'] =
+ this.pageCodeRecords[i].orderdetails2.Box_Piece__c;
+ this.pageCodeRecords[i]['Bar_Code__c'] =
+ this.pageCodeRecords[i].orderdetails2.Bar_Code__c;
+ }
+ this.data = JSON.parse(
+ result.entity.consumableorderdetailsRecords
+ );
+ for (var i in this.data) {
+ this.data[i]['key'] =
+ this.data[i]['ProdId'] + this.data[i]['boxPiece'];
+ this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
+ this.data[i]['Packing_list_manual__c'] =
+ this.data[i].Prod.Packing_list_manual__c;
+ if (this.data[i]['check']) {
+ this.selectedRows.push(
+ this.data[i].ProdId + this.data[i]['boxPiece']
+ );
+ console.log('selectedRows:' + this.selectedRows);
+ }
+ }
+ this.iSinventory = result.entity.iSinventory;
+ this.pandiandetailsMap = result.entity.pandiandetailsMap;
+ this.reSet = result.entity.reSet1;
+ console.log('iSinventory:' + this.iSinventory);
+ this.showTable = true;
+ this.showbutton = true;
+ this.showSpinner = false;
+ console.log('result褰曞叆= ' + JSON.stringify(result));
+ } else {
+ if (result.status == 'Sucess') {
+ //鍒嗛〉start
+ this.nextPageToken =
+ result.entity.paginatedAccounts.nextPageToken;
+ this.totalRecords =
+ result.entity.paginatedAccounts.totalRecords;
+ this.recordStart =
+ result.entity.paginatedAccounts.recordStart;
+ this.recordEnd =
+ result.entity.paginatedAccounts.recordEnd;
+ this.totalPages = Math.ceil(
+ result.entity.paginatedAccounts.totalRecords /
+ this.pageSize
+ );
+ console.log('this.totalPages = ' + this.totalPages);
+ this.paginationVisibility =
+ this.totalPages > 1 ? true : false;
+ console.log(
+ 'this.sortDirection = ' + this.sortDirection
+ );
+ //鍒嗛〉end
+ this.codPageRecords = JSON.parse(
+ result.entity.codPageRecords
+ );
+ for (var i in this.codPageRecords) {
+ this.codPageRecords[i]['Name__c'] =
+ this.codPageRecords[i].Prod.Name__c;
+ this.codPageRecords[i]['Box_Piece__c'] =
+ this.codPageRecords[
+ i
+ ].orderdetails2.Box_Piece__c;
+ this.codPageRecords[i]['Bar_Code__c'] =
+ this.codPageRecords[
+ i
+ ].orderdetails2.Bar_Code__c;
+ }
+ this.pageCodeRecords = result.entity.pageCodeRecords;
+ for (var i in this.pageCodeRecords) {
+ this.pageCodeRecords[i]['Name__c'] =
+ this.pageCodeRecords[i].Prod.Name__c;
+ this.pageCodeRecords[i]['Box_Piece__c'] =
+ this.pageCodeRecords[
+ i
+ ].orderdetails2.Box_Piece__c;
+ this.pageCodeRecords[i]['Bar_Code__c'] =
+ this.pageCodeRecords[
+ i
+ ].orderdetails2.Bar_Code__c;
+ }
+ this.data = JSON.parse(
+ result.entity.consumableorderdetailsRecords
+ );
+ for (var i in this.data) {
+ this.data[i]['key'] =
+ this.data[i]['ProdId'] +
+ this.data[i]['boxPiece'];
+ this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
+ this.data[i]['Packing_list_manual__c'] =
+ this.data[i].Prod.Packing_list_manual__c;
+ if (this.data[i]['check']) {
+ this.selectedRows.push(
+ this.data[i].ProdId +
+ this.data[i]['boxPiece']
+ );
+ console.log(
+ 'selectedRows:' + this.selectedRows
+ );
+ }
+ }
+ this.iSinventory = result.entity.iSinventory;
+ this.pandiandetailsMap =
+ result.entity.pandiandetailsMap;
+ this.reSet = result.entity.reSet;
+ console.log('iSinventory:' + this.iSinventory);
+ this.showTable = true;
+ this.showbutton = true;
+ this.showSpinner = false;
+ console.log('result褰曞叆= ' + JSON.stringify(result));
+ } else {
+ console.log('Error:' + result.msg);
+ this.showMyToast(result.msg, '', 'error');
+ this.showSpinner = false;
+ this.showTable = true;
+ }
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
+ }
+ //鑾峰彇褰撳墠杈撳叆鍊�
+ handleChange(event) {
+ let value = event.detail.value;
+ console.log('value' + value);
+ this.barcode = value;
+ }
- //褰曞叆barcode
- barcodeEntrys() {
- console.log('Test');
- this.showTable = false;
- this.showbutton = false;
- this.showSpinner = true;
-
- //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
- const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
- console.log('selectedRows========> ' + JSON.stringify(selectedRows));
- for (var i in this.data) {
- this.data[i]["check"] = false;
- }
- for (var i in this.data) {
- for (var j in selectedRows) {
- if (this.data[i].ProdId+this.data[i]["boxPiece"] == selectedRows[j].ProdId+ selectedRows[j]["boxPiece"]) {
- this.data[i]["check"] = true;
- }
- // console.log('this.data[i].ProdId+this.data[i]["boxPiece"]'+this.data[i].ProdId+this.data[i]["boxPiece"]);
- console.log('selectedRows[j].ProdId+this.data[i]["boxPiece"]'+selectedRows[j].ProdId+selectedRows[j]["boxPiece"]);
+ getSelectedRows(event) {
+ let selectedRowsEvent = event.detail.selectedRows;
+ this.selectedRows = [];
+ for (var i in this.data) {
+ for (var j in selectedRowsEvent) {
+ if (
+ this.data[i].ProdId + this.data[i]['boxPiece'] ==
+ selectedRowsEvent[j].ProdId +
+ selectedRowsEvent[j]['boxPiece']
+ ) {
+ this.selectedRows.push(
+ selectedRowsEvent[j].ProdId + this.data[i]['boxPiece']
+ );
+ }
+ }
+ // for (var i in selectedRowsEvent) {
+ // this.selectedRows.push(selectedRowsEvent[i].ProdId+this.data[i]["boxPiece"]);
+ // }
+ }
+ }
+ //瀵煎嚭涓篶sv
+ exportData() {
+ // Prepare a html table
+ let doc = '<table>';
+ // Add styles for the table
+ doc += '<style>';
+ doc += 'table,th,td{';
+ doc += ' border: 1px solid;';
+ doc += ' border-collapse: collapse;';
+ doc += ' font-weight: normal;';
+ doc += ' text-align: left;';
+ doc += '}';
+ doc += '</style>';
+ // Add all the Table Headers
+ doc += '<tr>';
+ this.columnHeader.forEach((element) => {
+ doc += '<th style="font-weight: bold";>' + element + '</th>';
+ });
+ doc += '</tr>';
+ // Add the data rows
+ this.codPageRecords.forEach((record) => {
+ doc += '<tr>';
+ doc += '<td>' + record.Name__c + '</td>';
+ doc += '<td>' + record.Box_Piece__c + '</td>';
+ doc += '<td>' + record.Bar_Code__c + '</td>';
+ doc += '<td>' + record.DiffReason + '</td>';
+ doc += '</tr>';
+ });
+ doc += '</table>';
+ console.log('doc' + doc);
+ var bom = '\uFEFF';
+ var element =
+ 'data:application/vnd.ms-excel,' + encodeURIComponent(bom + doc);
+ let downloadElement = document.createElement('a');
+ downloadElement.href = element;
+ downloadElement.target = '_self';
+ // use .csv as extension on below line if you want to export data as csv
+ downloadElement.download = '鍦ㄥ簱璋冩暣涓�瑙�.xls';
+ document.body.appendChild(downloadElement);
+ downloadElement.click();
+ }
- }
- }
- // if(this.barcode == ''||this.barcode == null){
- // this.showMyToast('鑾峰彇澶辫触','璇疯緭鍏arCode鍙�','error');
+ //鑷畾涔塪ataType
- // }
- console.log('this.data--->'+JSON.stringify(this.data));
- console.log('this.currentPageToken'+this.currentPageToken);
- this.selectedRows = [];
- barcodeEntry({
- accountName: this.accountName,
- agencyProType: this.agencyProType,
- userWorkLocation: this.userWorkLocation,
- barcode: this.barcode,
- consumableorderdetailsRecordsLWC: JSON.stringify(this.data),
- pageSizeLWC: this.pageSize,
- pageTokenLWC: this.currentPageToken,
- sortFieldLWC: this.sortBy,
- sortOrderLWC: this.sortDirection
+ diffreasons(event) {
+ const numberDetail = event.detail;
+ // this.numberDetail = numberDetail;
+ console.log('numberDetail' + JSON.stringify(numberDetail));
+ for (var i in this.data) {
+ console.log('this.data[i]["key"]' + this.data[i]['key']);
+ console.log(
+ 'numberDetail.data.ProdId+numberDetail.data.boxPiece' +
+ numberDetail.data.ProdId +
+ numberDetail.data.boxPiece
+ );
- })
- .then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log("result ===>" + JSON.stringify(result));
- if (result.status == "Success1") {
- //鍒嗛〉start
- this.nextPageToken = result.entity.paginatedAccounts.nextPageToken;
- this.totalRecords = result.entity.paginatedAccounts.totalRecords;
- this.recordStart = result.entity.paginatedAccounts.recordStart;
- this.recordEnd = result.entity.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(result.entity.paginatedAccounts.totalRecords / this.pageSize);
- console.log('this.totalPages = ' + this.totalPages);
- this.paginationVisibility = this.totalPages > 1 ? true : false;
- console.log('this.sortDirection = ' + this.sortDirection);
- //鍒嗛〉end
- this.codPageRecords = JSON.parse(result.entity.codPageRecords);
- for (var i in this.codPageRecords) {
- this.codPageRecords[i]["Name__c"] = this.codPageRecords[i].Prod.Name__c;
- this.codPageRecords[i]["Box_Piece__c"] = this.codPageRecords[i].orderdetails2.Box_Piece__c;
- this.codPageRecords[i]["Bar_Code__c"] = this.codPageRecords[i].orderdetails2.Bar_Code__c;
- }
- this.pageCodeRecords = result.entity.pageCodeRecords;
- for (var i in this.pageCodeRecords) {
- this.pageCodeRecords[i]["Name__c"] = this.pageCodeRecords[i].Prod.Name__c;
- this.pageCodeRecords[i]["Box_Piece__c"] = this.pageCodeRecords[i].orderdetails2.Box_Piece__c;
- this.pageCodeRecords[i]["Bar_Code__c"] = this.pageCodeRecords[i].orderdetails2.Bar_Code__c;
- }
- this.data = JSON.parse(result.entity.consumableorderdetailsRecords);
- for (var i in this.data) {
- this.data[i]["key"] = this.data[i]["ProdId"] + this.data[i]["boxPiece"];
- this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
- this.data[i]["Packing_list_manual__c"] = this.data[i].Prod.Packing_list_manual__c;
- if (this.data[i]["check"]) {
- this.selectedRows.push(this.data[i].ProdId + this.data[i]["boxPiece"]);
- console.log("selectedRows:" + this.selectedRows);
- }
- }
- this.iSinventory = result.entity.iSinventory;
- this.pandiandetailsMap = result.entity.pandiandetailsMap;
- this.reSet = result.entity.reSet1;
- console.log("iSinventory:" + this.iSinventory);
- this.showTable = true;
- this.showbutton = true;
- this.showSpinner = false;
- console.log("result褰曞叆= " + JSON.stringify(result));
- }
- else {
- if (result.status == "Sucess") {
- //鍒嗛〉start
- this.nextPageToken = result.entity.paginatedAccounts.nextPageToken;
- this.totalRecords = result.entity.paginatedAccounts.totalRecords;
- this.recordStart = result.entity.paginatedAccounts.recordStart;
- this.recordEnd = result.entity.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(result.entity.paginatedAccounts.totalRecords / this.pageSize);
- console.log('this.totalPages = ' + this.totalPages);
- this.paginationVisibility = this.totalPages > 1 ? true : false;
- console.log('this.sortDirection = ' + this.sortDirection);
- //鍒嗛〉end
- this.codPageRecords = JSON.parse(result.entity.codPageRecords);
- for (var i in this.codPageRecords) {
- this.codPageRecords[i]["Name__c"] = this.codPageRecords[i].Prod.Name__c;
- this.codPageRecords[i]["Box_Piece__c"] = this.codPageRecords[i].orderdetails2.Box_Piece__c;
- this.codPageRecords[i]["Bar_Code__c"] = this.codPageRecords[i].orderdetails2.Bar_Code__c;
- }
- this.pageCodeRecords = result.entity.pageCodeRecords;
- for (var i in this.pageCodeRecords) {
- this.pageCodeRecords[i]["Name__c"] = this.pageCodeRecords[i].Prod.Name__c;
- this.pageCodeRecords[i]["Box_Piece__c"] = this.pageCodeRecords[i].orderdetails2.Box_Piece__c;
- this.pageCodeRecords[i]["Bar_Code__c"] = this.pageCodeRecords[i].orderdetails2.Bar_Code__c;
- }
- this.data = JSON.parse(result.entity.consumableorderdetailsRecords);
- for (var i in this.data) {
- this.data[i]["key"] = this.data[i]["ProdId"] + this.data[i]["boxPiece"];
- this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
- this.data[i]["Packing_list_manual__c"] = this.data[i].Prod.Packing_list_manual__c;
- if (this.data[i]["check"]) {
- this.selectedRows.push(this.data[i].ProdId + this.data[i]["boxPiece"]);
- console.log("selectedRows:" + this.selectedRows);
- }
- }
- this.iSinventory = result.entity.iSinventory;
- this.pandiandetailsMap = result.entity.pandiandetailsMap;
- this.reSet = result.entity.reSet;
- console.log("iSinventory:" + this.iSinventory);
- this.showTable = true;
- this.showbutton = true;
- this.showSpinner = false;
- console.log("result褰曞叆= " + JSON.stringify(result));
- } else {
- console.log('Error:' + result.msg);
- this.showMyToast(result.msg,'','error');
- this.showSpinner = false;
- this.showTable = true;
- }
- }
- })
- .catch((error) => {
- console.log("error = " + JSON.stringify(error));
- });
- }
- //鑾峰彇褰撳墠杈撳叆鍊�
- handleChange(event) {
- let value = event.detail.value;
- console.log("value" + value);
- this.barcode = value;
- }
+ if (
+ this.data[i]['key'] ==
+ numberDetail.data.ProdId + numberDetail.data.boxPiece
+ ) {
+ this.data[i]['DiffReason'] = numberDetail.data.DiffReason;
+ }
+ }
+ console.log(' this.data==>' + JSON.stringify(this.data));
+ }
- getSelectedRows(event) {
- let selectedRowsEvent = event.detail.selectedRows;
- this.selectedRows = [];
- for (var i in selectedRowsEvent) {
- this.selectedRows.push(selectedRowsEvent[i].ProdId+this.data[i]["boxPiece"]);
- }
- const selectedRows = event.detail.selectedRows;
- console.log("this.selectedRows = " + JSON.stringify(selectedRows));
- for (var i in selectedRows) {
- this.selectedRows.push(selectedRows[i].ProdId+this.data[i]["boxPiece"]);
- }
+ saveConfirm() {
+ console.log('杩涘叆鐩樼偣纭');
+ console.log('reSet' + this.reSet);
+ this.showSpinner = true;
+ console.log('pandiandetailsMap' + this.pandiandetailsMap);
+ //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
+ const selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
+ console.log('selectedRows========> ' + JSON.stringify(selectedRows));
+ for (var i in this.data) {
+ this.data[i]['check'] = false;
+ }
+ for (var i in this.data) {
+ for (var j in selectedRows) {
+ if (
+ this.data[i].ProdId + this.data[i]['boxPiece'] ==
+ selectedRows[j].ProdId + selectedRows[j]['boxPiece']
+ ) {
+ this.data[i]['check'] = true;
+ }
+ // console.log('this.data[i].ProdId+this.data[i]["boxPiece"]'+this.data[i].ProdId+this.data[i]["boxPiece"]);
+ console.log(
+ 'selectedRows[j].ProdId+this.data[i]["boxPiece"]' +
+ selectedRows[j].ProdId +
+ selectedRows[j]['boxPiece']
+ );
+ }
+ }
- }
+ // var el = this.template.querySelector("c-lex-custom-lightning-datatable");
+ // var selected = el.getSelectedRows();
+ // this.selectedData = selected;
+ // console.log("閫変腑鏁版嵁" + JSON.stringify(this.selectedData));
+ // console.log("reset" + JSON.stringify(this.reSet));
+ // console.log("reset1" + JSON.stringify(this.reSet1));
+ // console.log("r" + JSON.stringify(this.reSet1));
- //瀵煎嚭涓篶sv
- exportData() {
- // Prepare a html table
- let doc = '<table>';
- // Add styles for the table
- doc += '<style>';
- doc += 'table, th, td {';
- doc += ' border: 1px solid black;';
- doc += ' border-collapse: collapse;';
- doc += '}';
- doc += '</style>';
- // Add all the Table Headers
- doc += '<tr>';
- this.columnHeader.forEach(element => {
- doc += '<th>' + element + '</th>'
- });
- doc += '</tr>';
- // Add the data rows
- this.codPageRecords.forEach(record => {
- doc += '<tr>';
- doc += '<th>' + record.Name__c + '</th>';
- doc += '<th>' + record.Box_Piece__c + '</th>';
- doc += '<th>' + record.Bar_Code__c + '</th>';
- doc += '<th>' + record.DiffReason + '</th>';
- doc += '</tr>';
- });
- doc += '</table>';
- console.log('doc' + doc);
- var element = 'data:application/vnd.ms-excel,' + encodeURIComponent(doc);
- let downloadElement = document.createElement('a');
- downloadElement.href = element;
- downloadElement.target = '_self';
- // use .csv as extension on below line if you want to export data as csv
- downloadElement.download = '鍦ㄥ簱璋冩暣涓�瑙�.xls';
- document.body.appendChild(downloadElement);
- downloadElement.click();
- }
+ save({
+ iSinventory: this.iSinventory,
+ consumableorderdetailsRecordsLWC: JSON.stringify(this.data),
+ accountid: this.accountid,
+ agencyProType: this.agencyProType,
+ reSet: this.reSet,
+ pandiandetailsMap: this.pandiandetailsMap
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result = ' + JSON.stringify(result));
+ console.log('111111');
+ if (result.status == 'Success') {
+ let url = '/lexinventory?ESetid=' + result.entity.eSetId;
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: url
+ }
+ });
+ this.showSpinner = false;
+ console.log('Id' + this.eSetId);
+ // this.EditAble = true;
+ // this.showcount = false;
+ } else {
+ this.showMyToast('鐩樼偣澶辫触', result.msg, 'error');
+ this.showSpinner = false;
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showSpinner = false;
+ });
+ }
- //鑷畾涔塪ataType
+ inits() {
+ this.showSpinner = true;
+ datainit({
+ eSetId: this.eSetId
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('鐩樼偣涓�瑙�===>' + JSON.stringify(result));
- diffreasons(event) {
- const numberDetail = event.detail;
- // this.numberDetail = numberDetail;
- console.log("numberDetail" + JSON.stringify(numberDetail));
- for (var i in this.data) {
- console.log('this.data[i]["key"]' + this.data[i]["key"]);
- console.log('numberDetail.data.ProdId+numberDetail.data.boxPiece' + numberDetail.data.ProdId + numberDetail.data.boxPiece);
+ for (var i in result.entity.qs) {
+ this.conId = result.entity.qs[i].Id;
+ }
+ console.log('this.conId' + typeof this.conId);
+ this.detailData = JSON.parse(
+ result.entity.consumableorderdetailsRecords
+ );
+ if (result.entity.ConsumableorderdetailsRecordsError != null) {
+ this.adjustdata = JSON.parse(
+ result.entity.ConsumableorderdetailsRecordsError
+ );
+ for (let i in this.detailData) {
+ this.detailData[i].Name__c =
+ this.detailData[i].Prod.Name__c;
+ this.detailData[i].Count_Sum__c =
+ this.detailData[i].orderdetails1.Count_Sum__c;
+ this.detailData[i].inventory_sum__c =
+ this.detailData[i].orderdetails1.inventory_sum__c;
+ this.detailData[i].Diff__c =
+ this.detailData[i].orderdetails1.Diff__c;
+ this.detailData[i].Product_Refind__c =
+ this.detailData[i].orderdetails1.Product_Refind__c;
+ this.detailData[i].Lose_reason__c =
+ this.detailData[i].orderdetails1.Lose_reason__c;
+ }
+ for (let i in this.adjustdata) {
+ this.adjustdata[i].Name__c =
+ this.adjustdata[i].Prod.Name__c;
+ this.adjustdata[i].Asset_Model_No__c =
+ this.adjustdata[i].Prod.Asset_Model_No__c;
+ this.adjustdata[i].Lose_reason__c =
+ this.adjustdata[i].orderdetails2.Lose_reason__c;
+ this.adjustdata[i].Lose_Flag__c =
+ this.adjustdata[i].orderdetails2.Lose_Flag__c;
+ }
+ }
+ this.showSpinner = false;
+ console.log('result鐩樼偣Id' + JSON.stringify(this.conId));
+ console.log('璋冩暣鏄庣粏' + JSON.stringify(this.adjustdata));
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showSpinner = false;
+ });
+ }
+ //鍒嗛〉
+ handlePrevious() {
+ this.currentPageToken =
+ Number(this.currentPageToken) - Number(this.pageSize);
+ this.barcodeEntrys();
+ }
- if (this.data[i]["key"] == numberDetail.data.ProdId + numberDetail.data.boxPiece) {
- this.data[i]["DiffReason"] = numberDetail.data.DiffReason;
- }
- }
- console.log(" this.data==>" + JSON.stringify(this.data));
- }
+ handleNext() {
+ console.log('111');
+ this.currentPageToken =
+ Number(this.currentPageToken) + Number(this.pageSize);
+ this.barcodeEntrys();
+ }
+ handleFirst() {
+ this.currentPageToken = 0;
+ this.barcodeEntrys();
+ }
- saveConfirm() {
- console.log("杩涘叆鐩樼偣纭");
- console.log('reSet' + this.reSet);
- this.showSpinner = true;
- console.log('pandiandetailsMap' + this.pandiandetailsMap);
- //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
- const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
- console.log('selectedRows========> ' + JSON.stringify(selectedRows));
- for (var i in this.data) {
- this.data[i]["check"] = false;
- }
- for (var i in this.data) {
- for (var j in selectedRows) {
- if (this.data[i].ProdId+this.data[i]["boxPiece"] == selectedRows[j].ProdId+ selectedRows[j]["boxPiece"]) {
- this.data[i]["check"] = true;
- }
- // console.log('this.data[i].ProdId+this.data[i]["boxPiece"]'+this.data[i].ProdId+this.data[i]["boxPiece"]);
- console.log('selectedRows[j].ProdId+this.data[i]["boxPiece"]'+selectedRows[j].ProdId+selectedRows[j]["boxPiece"]);
+ handleLast() {
+ this.currentPageToken =
+ this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+ this.barcodeEntrys();
+ }
- }
- }
+ handlePageschange(event) {
+ console.log(event.detail);
+ this.pageSize = event.detail;
+ this.currentPageToken = 0;
+ this.barcodeEntrys();
+ }
+ get previousButtonDisabled() {
+ return this.currentPageToken === 0;
+ }
- // var el = this.template.querySelector("c-lex-custom-lightning-datatable");
- // var selected = el.getSelectedRows();
- // this.selectedData = selected;
- // console.log("閫変腑鏁版嵁" + JSON.stringify(this.selectedData));
- // console.log("reset" + JSON.stringify(this.reSet));
- // console.log("reset1" + JSON.stringify(this.reSet1));
- // console.log("r" + JSON.stringify(this.reSet1));
+ get nextButtonDisabled() {
+ return this.nextPageToken === undefined;
+ }
- save({
- iSinventory: this.iSinventory,
- consumableorderdetailsRecordsLWC:JSON.stringify(this.data),
- accountid: this.accountid,
- agencyProType: this.agencyProType,
- reSet: this.reSet,
- pandiandetailsMap: this.pandiandetailsMap
- })
- .then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log("result = " + JSON.stringify(result));
- console.log("111111");
-
- if (result.status == "Success") {
- let url = "/lexinventory?ESetid=" + result.entity.eSetId;
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: url,
- },
- });
- this.showSpinner = false;
- console.log("Id" + this.eSetId);
- // this.EditAble = true;
- // this.showcount = false;
- } else {
- this.showMyToast('鐩樼偣澶辫触',result.msg,'error');
- this.showSpinner = false;
- }
- })
- .catch((error) => {
- console.log("error = " + JSON.stringify(error));
- this.showSpinner = false;
- });
- }
-
- inits() {
- this.showSpinner = true
- datainit({
- eSetId: this.eSetId,
- })
- .then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log('鐩樼偣涓�瑙�===>' + JSON.stringify(result));
-
- for (var i in result.entity.qs) {
- this.conId = result.entity.qs[i].Id;
- }
- console.log("this.conId" + typeof this.conId);
- this.detailData = JSON.parse(result.entity.consumableorderdetailsRecords);
- if (result.entity.ConsumableorderdetailsRecordsError != null) {
- this.adjustdata = JSON.parse(
- result.entity.ConsumableorderdetailsRecordsError
- );
- for (let i in this.detailData) {
- this.detailData[i].Name__c = this.detailData[i].Prod.Name__c;
- this.detailData[i].Count_Sum__c = this.detailData[i].orderdetails1.Count_Sum__c;
- this.detailData[i].inventory_sum__c = this.detailData[i].orderdetails1.inventory_sum__c;
- this.detailData[i].Diff__c = this.detailData[i].orderdetails1.Diff__c;
- this.detailData[i].Product_Refind__c = this.detailData[i].orderdetails1.Product_Refind__c;
- this.detailData[i].Lose_reason__c = this.detailData[i].orderdetails1.Lose_reason__c;
- }
- for (let i in this.adjustdata) {
- this.adjustdata[i].Name__c = this.adjustdata[i].Prod.Name__c;
- this.adjustdata[i].Asset_Model_No__c = this.adjustdata[i].Prod.Asset_Model_No__c;
- this.adjustdata[i].Lose_reason__c = this.adjustdata[i].orderdetails2.Lose_reason__c;
- this.adjustdata[i].Lose_Flag__c = this.adjustdata[i].orderdetails2.Lose_Flag__c;
- }
- }
- this.showSpinner = false;
- console.log("result鐩樼偣Id" + JSON.stringify(this.conId));
- console.log("璋冩暣鏄庣粏" + JSON.stringify(this.adjustdata));
- })
- .catch((error) => {
- console.log("error = " + JSON.stringify(error));
- this.showSpinner = false;
- });
- }
- //鍒嗛〉
- handlePrevious() {
- this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);
- this.barcodeEntrys();
- }
-
- handleNext() {
- console.log('111');
- this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize);
- this.barcodeEntrys();
- }
- handleFirst() {
- this.currentPageToken = 0;
- this.barcodeEntrys();
- }
-
- handleLast() {
- this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
- this.barcodeEntrys();
- }
-
- handlePageschange(event) {
- console.log(event.detail);
- this.pageSize = event.detail;
- this.currentPageToken = 0;
- this.barcodeEntrys();
- }
- get previousButtonDisabled() {
- return this.currentPageToken === 0;
- }
-
- get nextButtonDisabled() {
- return this.nextPageToken === undefined;
- }
-
- handleLoad2() {
- console.log('handleLoad2')
+ handleLoad2() {
+ console.log('handleLoad2');
try {
const style2 = document.createElement('style');
- style2.innerText = '.hehe-layoutItem .slds-form-element__label {padding : 0px}';
+ style2.innerText =
+ '.hehe-layoutItem .slds-form-element__label {padding : 0px}';
this.template.querySelector('.hideHelpText').appendChild(style2);
} catch (error) {
console.log(error);
}
}
- showMyToast(title, message, variant) {
+ showMyToast(title, message, variant) {
console.log('show custom message');
var iconName = '';
var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
}
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').showToast(variant,content,iconName,10000);
- }
-}
\ No newline at end of file
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
+ }
+}
diff --git a/force-app/main/default/lwc/lexLookup/lexLookup.html b/force-app/main/default/lwc/lexLookup/lexLookup.html
index 36864a9..a251f05 100644
--- a/force-app/main/default/lwc/lexLookup/lexLookup.html
+++ b/force-app/main/default/lwc/lexLookup/lexLookup.html
@@ -1,75 +1,147 @@
<template>
<div class={getFormElementClass}>
<label lwc:if={label} class={getLabelClass} for="combobox">
- <abbr lwc:if={required} title="required" class="slds-required">*</abbr>
+ <abbr lwc:if={required} title="required" class="slds-required"
+ >*</abbr
+ >
{label}
</label>
<div class="slds-form-element__control">
<div class={getContainerClass}>
- <div class={getDropdownClass} aria-expanded={isListboxOpen} aria-haspopup="listbox" aria-owns="listbox"
- role="combobox">
+ <div
+ class={getDropdownClass}
+ aria-expanded={isListboxOpen}
+ aria-haspopup="listbox"
+ aria-owns="listbox"
+ role="combobox"
+ >
<!-- Search input start -->
<div class={getComboboxClass} role="none">
<template lwc:if={isSingleEntry}>
- <lightning-icon icon-name={getSelectIconName} size="small"
- alternative-text="Selected item icon" class={getSelectIconClass}>
+ <lightning-icon
+ icon-name={getSelectIconName}
+ size="small"
+ alternative-text="Selected item icon"
+ class={getSelectIconClass}
+ >
</lightning-icon>
</template>
<!-- Text input -->
- <input type="text" class={getInputClass} aria-autocomplete="list" aria-controls="listbox"
- aria-activedescendant={_focusedResultIndex} autocomplete="off" role="textbox" id="combobox"
- placeholder={placeholder} value={getInputValue} title={getInputTitle}
- readonly={isInputReadonly} disabled={disabled} onfocus={handleFocus} onblur={handleBlur}
- oninput={handleInput} onkeydown={handleKeyDown} />
+ <input
+ type="text"
+ class={getInputClass}
+ aria-autocomplete="list"
+ aria-controls="listbox"
+ aria-activedescendant={_focusedResultIndex}
+ autocomplete="off"
+ role="textbox"
+ id="combobox"
+ placeholder={placeholder}
+ value={getInputValue}
+ title={getInputTitle}
+ readonly={isInputReadonly}
+ disabled={disabled}
+ onfocus={handleFocus}
+ onblur={handleBlur}
+ oninput={handleInput}
+ onkeydown={handleKeyDown}
+ />
<!-- Search icon -->
- <lightning-icon icon-name="utility:search" size="x-small" alternative-text="Search icon"
- class={getSearchIconClass}></lightning-icon>
+ <lightning-icon
+ icon-name="utility:search"
+ size="x-small"
+ alternative-text="Search icon"
+ class={getSearchIconClass}
+ ></lightning-icon>
<!-- Clear selection button icon for single entry lookups -->
<template lwc:if={isSingleEntry}>
- <button title="Remove selected option" type="button" onclick={handleClearSelection}
- class={getClearSelectionButtonClass} disabled={disabled}>
- <lightning-icon icon-name="utility:close" size="x-small"
+ <button
+ title="Remove selected option"
+ type="button"
+ onclick={handleClearSelection}
+ class={getClearSelectionButtonClass}
+ disabled={disabled}
+ >
+ <lightning-icon
+ icon-name="utility:close"
+ size="x-small"
alternative-text="Remove selected option"
- class="slds-button__icon"></lightning-icon>
+ class="slds-button__icon"
+ ></lightning-icon>
</button>
</template>
</div>
<!-- Search input end -->
<!-- Result list box start -->
- <div id="listbox" role="listbox" aria-label={label} onmousedown={handleComboboxMouseDown}
- onmouseup={handleComboboxMouseUp} class={getListboxClass}>
- <ul class="slds-listbox slds-listbox_vertical" role="presentation">
+ <div
+ id="listbox"
+ role="listbox"
+ aria-label={label}
+ onmousedown={handleComboboxMouseDown}
+ onmouseup={handleComboboxMouseUp}
+ class={getListboxClass}
+ >
+ <ul
+ class="slds-listbox slds-listbox_vertical"
+ role="presentation"
+ >
<!-- Spinner to display when waiting for results of search -->
<div lwc:if={loading}>
- <lightning-spinner alternative-text="Loading" size="small"></lightning-spinner>
+ <lightning-spinner
+ alternative-text="Loading"
+ size="small"
+ ></lightning-spinner>
</div>
<!-- Result list start -->
- <template for:each={searchResultsLocalState} for:item="item" for:index="index"
- lwc:if={hasResults}>
- <li key={item.result.id} role="presentation" class="slds-listbox__item">
- <div class={item.classes} role="option" id={index} aria-label={item.result.title}
- onclick={handleResultClick} data-recordid={item.result.id}>
- <span class="slds-media__figure slds-listbox__option-icon">
- <lightning-icon icon-name={item.result.icon} size="small"
- alternative-text="Result item icon"></lightning-icon>
+ <template
+ for:each={searchResultsLocalState}
+ for:item="item"
+ for:index="index"
+ lwc:if={hasResults}
+ >
+ <li
+ key={item.result.id}
+ role="presentation"
+ class="slds-listbox__item"
+ >
+ <div
+ class={item.classes}
+ role="option"
+ id={index}
+ aria-label={item.result.title}
+ onclick={handleResultClick}
+ data-recordid={item.result.id}
+ >
+ <span
+ class="slds-media__figure slds-listbox__option-icon"
+ >
+ <lightning-icon
+ icon-name={item.result.icon}
+ size="small"
+ alternative-text="Result item icon"
+ ></lightning-icon>
</span>
<span class="slds-media__body">
- <span class="slds-listbox__option-text slds-listbox__option-text_entity">
- <lightning-formatted-rich-text value={item.result.titleFormatted}
- disable-linkify>
+ <span
+ class="slds-listbox__option-text slds-listbox__option-text_entity"
+ >
+ <lightning-formatted-rich-text
+ value={item.result.titleFormatted}
+ disable-linkify
+ >
</lightning-formatted-rich-text>
</span>
- <span lwc:if={item.result.subtitleFormatted}
+ <!-- <span lwc:if={item.result.subtitleFormatted}
class="slds-listbox__option-meta slds-listbox__option-meta_entity">
<lightning-formatted-rich-text value={item.result.subtitleFormatted}
disable-linkify>
</lightning-formatted-rich-text>
- </span>
+ </span> -->
</span>
</div>
</li>
@@ -79,25 +151,53 @@
<!-- No results start -->
<template lwc:else>
<li role="presentation">
- <span class="slds-media slds-listbox__option_entity" role="option">
- <span lwc:if={loading} class="slds-media__body">Loading...</span>
- <span lwc:else class="slds-media__body">No results.</span>
+ <span
+ class="slds-media slds-listbox__option_entity"
+ role="option"
+ >
+ <span
+ lwc:if={loading}
+ class="slds-media__body"
+ >Loading...</span
+ >
+ <span lwc:else class="slds-media__body"
+ >No results.</span
+ >
</span>
</li>
</template>
<!-- No results end -->
<!-- Create new records -->
- <template for:each={newRecordOptions} for:item="newRecord">
- <li key={newRecord.value} role="presentation" class="slds-listbox__item">
- <div class="slds-media slds-media_center slds-listbox__option slds-listbox__option_entity"
- onclick={handleNewRecordClick} data-sobject={newRecord.value} role="option">
- <span class="slds-media__figure slds-listbox__option-icon">
- <lightning-icon icon-name="utility:add" size="small"
- alternative-text={newRecord.label}></lightning-icon>
+ <template
+ for:each={newRecordOptions}
+ for:item="newRecord"
+ >
+ <li
+ key={newRecord.value}
+ role="presentation"
+ class="slds-listbox__item"
+ >
+ <div
+ class="slds-media slds-media_center slds-listbox__option slds-listbox__option_entity"
+ onclick={handleNewRecordClick}
+ data-sobject={newRecord.value}
+ role="option"
+ >
+ <span
+ class="slds-media__figure slds-listbox__option-icon"
+ >
+ <lightning-icon
+ icon-name="utility:add"
+ size="small"
+ alternative-text={newRecord.label}
+ ></lightning-icon>
</span>
<span class="slds-media__body">
- <span class="slds-listbox__option-text">{newRecord.label}</span>
+ <span
+ class="slds-listbox__option-text"
+ >{newRecord.label}</span
+ >
</span>
</div>
</li>
@@ -111,14 +211,28 @@
<!-- Multi-selection start -->
<template lwc:if={isMultiEntry}>
- <div id="selection" role="listbox" aria-label={label} aria-orientation="horizontal">
- <ul class="slds-listbox slds-listbox_inline slds-var-p-top_xxx-small" role="group"
- aria-label="Selected options">
+ <div
+ id="selection"
+ role="listbox"
+ aria-label={label}
+ aria-orientation="horizontal"
+ >
+ <ul
+ class="slds-listbox slds-listbox_inline slds-var-p-top_xxx-small"
+ role="group"
+ aria-label="Selected options"
+ >
<template for:each={selection} for:item="item">
<li key={item.id} role="presentation">
- <lightning-pill label={item.title} title={item.title}
- onremove={handleRemoveSelectedItem} name={item.id}>
- <lightning-icon icon-name={item.icon}></lightning-icon>
+ <lightning-pill
+ label={item.title}
+ title={item.title}
+ onremove={handleRemoveSelectedItem}
+ name={item.id}
+ >
+ <lightning-icon
+ icon-name={item.icon}
+ ></lightning-icon>
</lightning-pill>
</li>
</template>
@@ -129,11 +243,15 @@
<!-- Errors start -->
<template for:each={_errors} for:item="error">
- <div key={error.id} role="alert" class="slds-form-element__label slds-var-m-top_xx-small form-error">
+ <div
+ key={error.id}
+ role="alert"
+ class="slds-form-element__label slds-var-m-top_xx-small form-error"
+ >
{error.message}
</div>
</template>
<!-- Errors end -->
</div>
</div>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.css b/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.css
new file mode 100644
index 0000000..f4ea061
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.css
@@ -0,0 +1,2 @@
+.This {
+}
diff --git a/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.html b/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.html
new file mode 100644
index 0000000..faa6a37
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.html
@@ -0,0 +1,146 @@
+<!-- sldsValidatorIgnore -->
+<!-- sldsValidatorIgnore -->
+<template>
+ <template if:true={isDoctor}>
+ <!-- 灞曠ず -->
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-modal="true"
+ aria-labelledby="modal-heading-01"
+ class="slds-modal slds-fade-in-open slds-modal_medium"
+ >
+ <div class="slds-modal__container">
+ <div class="slds-scrollable">
+ <button
+ class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+ >
+ <svg
+ class="slds-button__icon slds-button__icon_large"
+ aria-hidden="true"
+ >
+ <use
+ xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#close"
+ ></use>
+ </svg>
+ <span class="slds-assistive-text"
+ >Cancel and close</span
+ >
+ </button>
+ <div class="slds-modal__header">
+ <h1
+ id="modal-heading-01"
+ class="slds-modal__title slds-hyphenate"
+ >
+ 鏂板缓瀹㈡埛浜哄憳
+ </h1>
+ </div>
+ <div class="slds-modal__content" id="modal-content-id-1">
+ <lightning-card class="slds-text-align_center">
+ <template if:true={isShowSpinner}>
+ <lightning-spinner
+ size="large"
+ alternative-text="Loading"
+ style="height: 100%"
+ ></lightning-spinner>
+ </template>
+ <lightning-record-edit-form
+ object-api-name={sobjectType}
+ record-type-id={recordTypeId}
+ record-id={recordId}
+ onsubmit={handleSubmit}
+ onsuccess={handleSuccess}
+ onerror={handleError}
+ >
+ <template
+ for:each={layout}
+ for:item="layoutSection"
+ >
+ <lightning-accordion
+ lwc:if={layoutSection.editHeading}
+ class="greyyyy"
+ active-section-name={sectionName}
+ allow-multiple-sections-open
+ key={layoutSection.name}
+ >
+ <lightning-accordion-section
+ name={layoutSection.label}
+ label={layoutSection.label}
+ >
+ <lightning-layout
+ multiple-rows="true"
+ >
+ <template
+ for:each={layoutSection.layoutColumns}
+ for:item="layoutColumns"
+ >
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="6"
+ key={layoutColumns.index}
+ >
+ <template
+ for:each={layoutColumns.layoutItems}
+ for:item="layoutField"
+ >
+ <template
+ if:false={layoutField.isDisable}
+ >
+ <template
+ if:false={layoutField.isModify}
+ >
+ <lightning-input-field
+ field-name={layoutField.field}
+ value={layoutField.value}
+ required={layoutField.isRequired}
+ data-field={layoutField.field}
+ key={layoutField.field}
+ >
+ </lightning-input-field>
+ </template>
+ <template
+ if:true={layoutField.isModify}
+ >
+ <lightning-input
+ label={layoutField.fieldLabel}
+ value={layoutField.value}
+ required={layoutField.isRequired}
+ data-field={layoutField.field}
+ variant="label-inline"
+ onchange={dataChange}
+ key={layoutField.field}
+ >
+ </lightning-input>
+ </template>
+ </template>
+ </template>
+ </lightning-layout-item>
+ </template>
+ </lightning-layout>
+ </lightning-accordion-section>
+ </lightning-accordion>
+ </template>
+ </lightning-record-edit-form>
+ </lightning-card>
+ </div>
+ </div>
+ <div class="slds-modal__footer">
+ <div class="slds-text-align_center">
+ <lightning-button
+ label="淇濆瓨"
+ type="submit"
+ onsubmit={handleSubmit}
+ class="slds-m-right_x-small"
+ ></lightning-button>
+ <lightning-button
+ label="鍙栨秷"
+ onclick={cancel}
+ class="slds-m-right_x-small"
+ ></lightning-button>
+ </div>
+ </div>
+ </div>
+ </section>
+ </template>
+ <div class="slds-backdrop slds-backdrop_open"></div>
+</template>
diff --git a/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.js b/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.js
new file mode 100644
index 0000000..a9f5362
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.js
@@ -0,0 +1,505 @@
+import { LightningElement, api, track, wire } from 'lwc';
+import { CurrentPageReference } from 'lightning/navigation';
+import initData from '@salesforce/apex/LexNewAndEditContactPIPLController.initData';
+import { NavigationMixin } from 'lightning/navigation';
+import { AWSService } from 'c/piUtils';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+
+export default class LexNewAndEditContactPIPL extends NavigationMixin(
+ LightningElement
+) {
+ sobjectType = 'Contact';
+
+ @api recordId;
+ @track recordTypeId = '';
+ @wire(CurrentPageReference) pageRef;
+ @track recordData = {};
+ @track title = '';
+ @track isShowSpinner = true;
+ @track layout = [];
+ @track isDoctor = true;
+
+ @track staticResource;
+ @track staticResourceContact;
+ @track piFieldsMap;
+ @track abstractData = '';
+ @track data = {};
+ @track piplData = {};
+ @track isNewMode = false;
+ @track isCloneMode = false;
+ @track isEditMode = false;
+ @track sectionName = [];
+ @track AWSToSobjectMap = {};
+ @track AWSDataId = '';
+ @track txId = '';
+ @track isShowSearchAccount = false;
+ @track hospitalId = '';
+ @track contactId = '';
+ AWSService;
+
+ @track modifyObj = {};
+ modifyArray = ['LastName'];
+
+ connectedCallback() {
+ console.log('enter connectedCallback');
+ this.AWSService = new AWSService();
+ if (!this.recordId || this.isCloneMode) {
+ this.title = '鏂板缓瀹㈡埛浜哄憳';
+ this.isNewMode = true;
+ }
+ if (this.recordId) {
+ this.title = '缂栬緫瀹㈡埛浜哄憳';
+ this.isEditMode = true;
+ }
+ if (this.pageRef && this.pageRef.state) {
+ this.recordTypeId = this.pageRef.state.recordTypeId;
+ console.log('this.recordTypeId = ' + this.recordTypeId);
+ }
+ console.log(
+ 'recordId = ' +
+ this.recordId +
+ ' recordTypeId = ' +
+ this.recordTypeId +
+ ' sobjectType = ' +
+ this.sobjectType
+ );
+ initData({
+ rid: this.recordId,
+ recordTypeId: this.recordTypeId,
+ sobjectType: this.sobjectType
+ }).then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.isDoctor = r.entity.isDoctor;
+ console.log('this.isDoctor = ' + this.isDoctor);
+ if (this.isEditMode) {
+ this.recordTypeId = r.entity.recordTypeId;
+ }
+ console.log('this.recordTypeId = ' + this.recordTypeId);
+ debugger;
+ //濡傛灉涓嶆槸鍖婚櫌绫诲瀷锛屼娇鐢ㄦ爣鍑嗛〉闈�
+ if (!this.isDoctor) {
+ if (this.isNewMode) this.RedirectStandardNewPage();
+ if (this.isEditMode) this.RedirectStandardEditPage();
+ return;
+ }
+ this.AWSDataId = r.entity.AWSDataId;
+ let layout = JSON.parse(r.entity.layout);
+ console.log('layout = ' + JSON.stringify(layout));
+ console.log('layout = ' + typeof layout);
+
+ let index = 1;
+ this.sectionName = layout.map((s) => s.label);
+ for (let s of layout) {
+ for (let c of s.layoutColumns) {
+ c['index'] = index++;
+ if (c.layoutItems) {
+ for (let item of c.layoutItems) {
+ item['isDisable'] =
+ item.behavior == 'Readonly' ? true : false;
+ item['isRequired'] =
+ item.behavior == 'Required' ? true : false;
+ item['isModify'] = false;
+ if (item['field'] == 'Name') {
+ item.field = 'LastName';
+ item.fieldLabel = '濮撳悕';
+ item['isModify'] = true;
+ if (this.isEditMode) {
+ item['value'] =
+ this.recordData.LastName;
+ }
+ }
+ }
+ }
+ }
+ }
+ this.layout = layout;
+ console.log('this.layout = ' + JSON.stringify(this.layout));
+ this.AWSToSobjectMap = JSON.parse(
+ JSON.stringify(r.entity.AWSToSobjectNonEncryptedMap)
+ );
+ this.staticResource = JSON.parse(r.entity.staticResource);
+
+ //缂栬緫
+ if (this.isEditMode) {
+ //瑙e瘑瀹㈡埛鐨勫姞瀵嗗瓧娈�
+ this.querySobjectFromAWS();
+ }
+ this.isShowSpinner = false;
+ } else {
+ this.showToast('Error', r.msg);
+ }
+ });
+ }
+
+ querySobjectFromAWS() {
+ debugger;
+ var that = this;
+ this.AWSService.query(
+ this.staticResource.queryUrl,
+ this.AWSDataId,
+ function (data) {
+ console.log(
+ 'queryLeadFromAWSIFS data = ' + JSON.stringify(data)
+ );
+ if (data.object) {
+ for (let s of that.layout) {
+ for (let lc of s.layoutColumns) {
+ if (lc.layoutItems) {
+ for (let c of lc.layoutItems) {
+ for (let f in that.AWSToSobjectMap) {
+ if (
+ data.object.hasOwnProperty(f) &&
+ c['field'] ==
+ that.AWSToSobjectMap[f]
+ ) {
+ c['value'] =
+ data.object[f] == null
+ ? ''
+ : data.object[f];
+ if (c['field'] == 'LastName') {
+ that.modifyObj['LastName'] =
+ data.object[f] == null
+ ? ''
+ : data.object[f];
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ // for (var s of that.layout) {
+ // for (var c of s.layoutFields) {
+ // for (let f in that.AWSToSobjectMap) {
+ // if (data.object.hasOwnProperty(f) && c['fieldAPI'] == that.AWSToSobjectMap[f]) {
+ // c['value'] = data.object[f] == null ? '' : data.object[f];
+ // if (c['fieldAPI'] == 'LastName') {
+ // that.modifyObj['LastName'] = data.object[f] == null ? '' : data.object[f];
+ // }
+ // }
+ // }
+ // }
+ // }
+ }
+ },
+ this.staticResource.token
+ );
+ }
+
+ dataChange(event) {
+ let fieldName = event.target.getAttribute('data-field');
+ let value = event.detail.value;
+ console.log(
+ 'fieldName = ' + fieldName + ' value = ' + event.detail.value
+ );
+ switch (fieldName) {
+ case 'LastName':
+ this.modifyObj[fieldName] = value;
+ break;
+ }
+ }
+
+ handleSubmit(event) {
+ this.isShowSpinner = true;
+ //1. Get Sobject Information from Form
+ console.log('handleSubmit');
+ event.preventDefault();
+ const fields = event.detail.fields;
+ console.log('this.modifyObj = ' + JSON.stringify(this.modifyObj));
+ Object.assign(fields, this.modifyObj);
+ console.log('fields = ' + JSON.stringify(fields));
+
+ debugger;
+ //2. select cannot actively select redaction option
+ let validationResultMessage = this.validateFieldValueFormate(fields);
+ console.log(validationResultMessage);
+ if (validationResultMessage) {
+ this.showToast('Error', validationResultMessage);
+ return;
+ }
+
+ //3. Check Required Field
+ let checkRequiredFieldMsgResult = this.checkRequiredFieldMsg(fields);
+ console.log(
+ 'checkRequiredFieldMsgResult = ' + checkRequiredFieldMsgResult
+ );
+ if (checkRequiredFieldMsgResult != '') {
+ this.showToast(
+ 'Error',
+ checkRequiredFieldMsgResult + '闇�瑕佽繘琛屽~鍐�'
+ );
+ return;
+ }
+
+ //4. Prepare the payload for New PI API To AWS - To Do
+ let payloadForNewPI = this.getPIPayload(fields);
+ console.log('payloadForNewPI = ' + payloadForNewPI);
+
+ //5. PI To AWS
+ //鏂板缓
+ if (this.isNewMode) {
+ this.NewPIToAWS(payloadForNewPI, fields);
+ }
+ //缂栬緫
+ if (this.isEditMode) {
+ this.UpdatePIToAWS(payloadForNewPI, fields);
+ }
+ }
+
+ //楠岃瘉瀛楁
+ validateFieldValueFormate(fields) {
+ let error_msg = '';
+ let b = false;
+ for (var key in fields) {
+ if (fields[key] == '*****') b = true;
+ }
+ if (b) error_msg = '涓嬫媺妗嗕笉鑳戒富鍔ㄩ�夋嫨瀵嗘枃閫夐」';
+ return error_msg;
+ }
+
+ //楠岃瘉required瀛楁闇�瑕佽繘琛屽~鍐�
+ checkRequiredFieldMsg(fields) {
+ let msg = '';
+ try {
+ for (let s of this.layout) {
+ for (let lc of s.layoutColumns) {
+ if (lc.layoutItems) {
+ for (let c of lc.layoutItems) {
+ if (
+ !c.isDisable &&
+ c.isRequired &&
+ (fields[c.field] == null ||
+ fields[c.field] == '')
+ ) {
+ msg += ';' + c.fieldLabel;
+ }
+ }
+ }
+ }
+ }
+ } catch (err) {
+ this.showToast('Error', err.message);
+ }
+ msg = msg.substring(1);
+ return msg;
+ }
+
+ //鑾峰彇PI瀛楁
+ getPIPayload(sobjJsonLwc) {
+ console.log();
+ let leadPayloadList = [];
+ let leadPIData = {};
+
+ for (let f in this.AWSToSobjectMap) {
+ if (sobjJsonLwc.hasOwnProperty(this.AWSToSobjectMap[f])) {
+ leadPIData[f] = sobjJsonLwc[this.AWSToSobjectMap[f]];
+ } else {
+ console.log(this.AWSToSobjectMap[f] + 'is not in sobjJsonLwc');
+ }
+ }
+
+ leadPIData.medicalStaffFullName = leadPIData.lastName;
+ leadPIData.sfRecordId = '';
+ console.log('Sobject PI Data x :' + leadPIData);
+ leadPayloadList.push(leadPIData);
+ console.log('leadPayloadList = ' + JSON.stringify(leadPayloadList));
+ return JSON.stringify(leadPayloadList);
+ }
+
+ //鏂板缓淇濆瓨ToAWS
+ NewPIToAWS(payloadForNewPI, fields) {
+ this.AWSService.post(
+ this.staticResource.newUrl,
+ payloadForNewPI,
+ (result) => {
+ if (result && result.object) {
+ console.log('result = ' + JSON.stringify(result));
+ for (let f in this.AWSToSobjectMap) {
+ if (result.object[0].hasOwnProperty(f)) {
+ fields[this.AWSToSobjectMap[f]] =
+ result.object[0][f];
+ console.log(
+ 'this.AWSToSobjectMap[f] = ' +
+ this.AWSToSobjectMap[f]
+ );
+ console.log(
+ 'fields[this.AWSToSobjectMap[f]] = ' +
+ fields[this.AWSToSobjectMap[f]]
+ );
+ } else {
+ console.log(f + 'is not in result.object[0]');
+ }
+ }
+ fields['AWS_Data_Id__c'] = result.object[0].dataId;
+ this.txId = result.txId;
+ //淇濆瓨鍒板悗绔�
+ this.template
+ .querySelector('lightning-record-edit-form')
+ .submit(fields);
+ } else {
+ console.log('result = ' + JSON.stringify(result));
+ }
+ },
+ this.staticResource.token
+ );
+ }
+
+ //缂栬緫淇濆瓨ToAWS
+ UpdatePIToAWS(payloadForNewPI, fields) {
+ let obj = JSON.parse(payloadForNewPI);
+ obj[0].dataId = this.AWSDataId;
+ let payloadForNewPIJson = JSON.stringify(obj);
+ this.AWSService.post(
+ this.staticResource.updateUrl,
+ payloadForNewPIJson,
+ (result) => {
+ if (result && result.object) {
+ console.log('result = ' + JSON.stringify(result));
+ for (let f in this.AWSToSobjectMap) {
+ if (result.object[0].hasOwnProperty(f)) {
+ fields[this.AWSToSobjectMap[f]] =
+ result.object[0][f];
+ console.log(
+ 'this.AWSToSobjectMap[f] = ' +
+ this.AWSToSobjectMap[f]
+ );
+ console.log(
+ 'fields[this.AWSToSobjectMap[f]] = ' +
+ fields[this.AWSToSobjectMap[f]]
+ );
+ } else {
+ console.log(f + 'is not in result.object[0]');
+ }
+ }
+ fields['AWS_Data_Id__c'] = this.AWSDataId;
+ this.txId = result.txId;
+ console.log('this.txId = ' + this.txId);
+ console.log('PI After fields = ' + JSON.stringify(fields));
+ if (fields.RecordTypeId) {
+ fields['RecordTypeId'] = fields.RecordTypeId.substring(
+ 1,
+ fields.RecordTypeId.length - 1
+ );
+ }
+ //淇濆瓨鍒板悗绔�
+ console.log('update submit = ' + JSON.stringify(fields));
+ this.template
+ .querySelector('lightning-record-edit-form')
+ .submit(fields);
+ } else {
+ console.log('result = ' + JSON.stringify(result));
+ }
+ },
+ this.staticResource.token
+ );
+ }
+
+ //鎻愪氦淇濆瓨鎴愬姛
+ handleSuccess(event) {
+ let updatedRecord = event.detail.id;
+ console.log('onsuccess: ', updatedRecord);
+ console.log('confirmTrans');
+ let that = this;
+ this.AWSService.confirm(
+ true,
+ updatedRecord,
+ this.txId,
+ this.staticResource.token,
+ this.staticResource.transactionUrl,
+ function (result) {
+ console.log('result = ' + JSON.stringify(result));
+ that.showToast('Success', '淇濆瓨鎴愬姛');
+ console.log('updatedRecord = ' + updatedRecord);
+ that[NavigationMixin.Navigate]({
+ type: 'standard__recordPage',
+ attributes: {
+ actionName: 'view',
+ recordId: updatedRecord,
+ objectApiName: that.sobjectType
+ }
+ });
+ }
+ );
+ }
+
+ //鎻愪氦淇濆瓨澶辫触
+ handleError(event) {
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ this.showToast('Error', event.detail.detail);
+ this.AWSService.confirm(
+ false,
+ '',
+ this.txId,
+ this.staticResource.token,
+ this.staticResource.transactionUrl,
+ function (result) {
+ console.log('result = ' + JSON.stringify(result));
+ }
+ );
+ }
+
+ //change浜嬩欢
+ dataChange(event) {
+ let fieldName = event.target.getAttribute('data-field');
+ let value = event.detail.value;
+ console.log(
+ 'fieldName = ' + fieldName + ' value = ' + event.detail.value
+ );
+ if (this.modifyArray.indexOf(fieldName) != -1) {
+ switch (fieldName) {
+ case 'LastName':
+ this.modifyObj[fieldName] = value;
+ break;
+ }
+ }
+ }
+
+ //鍙栨秷
+ cancel() {
+ console.log('cancel');
+ window.history.back();
+ }
+
+ //鏍囧噯鏂板缓椤甸潰璺宠浆
+ RedirectStandardNewPage() {
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Contact',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ recordTypeId: this.recordTypeId
+ }
+ });
+ }
+
+ //鏍囧噯缂栬緫椤甸潰璺宠浆
+ RedirectStandardEditPage() {
+ this[NavigationMixin.Navigate]({
+ type: 'standard__recordPage',
+ attributes: {
+ objectApiName: 'Contact',
+ recordId: this.recordId,
+ actionName: 'edit'
+ },
+ state: {
+ nooverride: '1'
+ }
+ });
+ }
+
+ //鏄剧ず淇℃伅
+ showToast(type, msg) {
+ this.isShowSpinner = false;
+ const event = new ShowToastEvent({
+ title: type,
+ variant: type,
+ message: msg
+ });
+ this.dispatchEvent(event);
+ }
+}
diff --git a/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.js-meta.xml b/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.js-meta.xml
new file mode 100644
index 0000000..a1a42a8
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewAndEditContactPIPL/lexNewAndEditContactPIPL.js-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <isExposed>false</isExposed>
+</LightningComponentBundle>
diff --git a/force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.html b/force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.html
index 3a9786f..fe5196e 100644
--- a/force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.html
+++ b/force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.html
@@ -3,7 +3,17 @@
<template>
<c-common-toast></c-common-toast>
<template if:true={isShowSpinner}>
- <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ 聽 聽 聽 聽 聽 聽 聽 聽 <span class="slds-assistive-text">Loading</span> 聽 聽
+ 聽 聽 聽 聽 聽 聽
+ <div class="slds-spinner__dot-a"></div>
+ 聽 聽 聽 聽 聽 聽 聽 聽
+ <div class="slds-spinner__dot-b"></div>
+ 聽 聽 聽 聽
+ </div>
</template>
<div class="outerBorderCss">
<div style="padding: 5px">
@@ -12,11 +22,22 @@
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false" class="centerCss searchName">
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="4" style="display: flex;align-items: center;">
- <lightning-input class="floatLeft" label="" name="file uploader"
- onchange={handleFilesChange} type="file" accept={acceptedType}
- variant="label-hidden"></lightning-input>
- <div class="slds-text-body_small floatLeft fontWeight">
+ <lightning-layout-item
+ size="4"
+ style="display: flex; align-items: center"
+ >
+ <lightning-input
+ class="floatLeft"
+ label=""
+ name="file uploader"
+ onchange={handleFilesChange}
+ type="file"
+ accept={acceptedType}
+ variant="label-hidden"
+ ></lightning-input>
+ <div
+ class="slds-text-body_small floatLeft fontWeight"
+ >
{fileName}
</div>
</lightning-layout-item>
@@ -25,8 +46,12 @@
label="璇诲彇csv鏂囦欢"
onclick={getCsvFile}
></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={getCsvFile}>璇诲彇csv鏂囦欢</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ onclick={getCsvFile}
+ >
+ 璇诲彇csv鏂囦欢
+ </button>
</lightning-layout-item>
<lightning-layout-item size="4">
<!-- <lightning-button
@@ -34,13 +59,18 @@
onclick={dataImport}
disabled={saveFLGbln}
></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={dataImport} disabled={saveFLGbln}>瀵煎叆鏁版嵁</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ onclick={dataImport}
+ disabled={saveFLGbln}
+ >
+ 瀵煎叆鏁版嵁
+ </button>
</lightning-layout-item>
</lightning-layout>
</div>
- <div class="borderCss" style="margin-top: 10px;">
+ <div class="borderCss" style="margin-top: 10px">
<div class="headerDorderCss">
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -53,9 +83,17 @@
<div style="padding: 7px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
- <lightning-datatable key-field="id" data={data} columns={columns} hide-checkbox-column
- default-sort-direction={defaultSortDirection} sorted-direction={sortDirection}
- sorted-by={sortedBy} onsort={onHandleSort} class="wrapped-header-datatable">
+ <lightning-datatable
+ key-field="id"
+ data={data}
+ columns={columns}
+ hide-checkbox-column
+ default-sort-direction={defaultSortDirection}
+ sorted-direction={sortDirection}
+ sorted-by={sortedBy}
+ onsort={onHandleSort}
+ class="wrapped-header-datatable"
+ >
</lightning-datatable>
</div>
</div>
@@ -64,4 +102,4 @@
</div>
</div>
</div>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.js b/force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.js
index db4e6a3..669ce79 100644
--- a/force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.js
+++ b/force-app/main/default/lwc/lexOutboundorderImport/lexOutboundorderImport.js
@@ -1,71 +1,78 @@
-import { LightningElement, api, track, wire } from "lwc";
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import init from "@salesforce/apex/LexOutboundorderImportController.init";
-import importCSVFile from "@salesforce/apex/LexOutboundorderImportController.importCSVFile";
-import dataImport from "@salesforce/apex/LexOutboundorderImportController.dataImport";
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+import { LightningElement, api, track, wire } from 'lwc';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init from '@salesforce/apex/LexOutboundorderImportController.init';
+import importCSVFile from '@salesforce/apex/LexOutboundorderImportController.importCSVFile';
+import dataImport from '@salesforce/apex/LexOutboundorderImportController.dataImport';
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
const columns = [
{
- label: "鍑哄簱鍗曞悕绉�",
- fieldName: "orderName",
+ label: '鍑哄簱鍗曞悕绉�',
+ fieldName: 'orderName',
hideDefaultActions: true,
- initialWidth: 200
+ initialWidth: 200,
+ wrapText: true
},
{
- label: "鐩殑",
- fieldName: "orderSummonsForDirction",
+ label: '鐩殑',
+ fieldName: 'orderSummonsForDirction',
hideDefaultActions: true,
+ wrapText: true
},
{
- label: "鍖婚櫌缂栫爜",
- fieldName: "hospitalCode",
+ label: '鍖婚櫌缂栫爜',
+ fieldName: 'hospitalCode',
hideDefaultActions: true,
+ wrapText: true
},
{
- label: "鍖婚櫌鍚嶇О",
- fieldName: "hospitalName",
+ label: '鍖婚櫌鍚嶇О',
+ fieldName: 'hospitalName',
hideDefaultActions: true,
+ wrapText: true,
initialWidth: 300
},
{
- label: "绉戝",
- fieldName: "orderOrderForCustomerText",
+ label: '绉戝',
+ fieldName: 'orderOrderForCustomerText',
hideDefaultActions: true,
+ wrapText: true
},
{
- label: "浜岀骇缁忛攢鍟�",
- fieldName: "agencyName",
+ label: '浜岀骇缁忛攢鍟�',
+ fieldName: 'agencyName',
hideDefaultActions: true,
+ wrapText: true
},
{
- label: "鍑哄簱/閿�鍞棩鏈�",
- fieldName: "orderOutboundDate",
+ label: '鍑哄簱/閿�鍞棩鏈�',
+ fieldName: 'orderOutboundDate',
hideDefaultActions: true,
- },
+ wrapText: true
+ }
];
export default class LexOutboundorderImport extends LightningElement {
@track isShowSpinner = true;
//鏂囦欢涓婁紶
@track showLoadingSpinner = false;
- @track UploadFile = "Upload File";
- @track fileName = "";
+ @track UploadFile = 'Upload File';
+ @track fileName = '';
@track fileData = [];
@track fileColumns = [
{
- label: "鏍囬",
- fieldName: "url",
- type: "url",
- typeAttributes: { label: { fieldName: "Title" }, target: "_blank" },
- hideDefaultActions: true,
+ label: '鏍囬',
+ fieldName: 'url',
+ type: 'url',
+ typeAttributes: { label: { fieldName: 'Title' }, target: '_blank' },
+ hideDefaultActions: true
},
{
- label: "鍒涘缓浜�",
- fieldName: "CreatedByName",
- hideDefaultActions: true,
- },
+ label: '鍒涘缓浜�',
+ fieldName: 'CreatedByName',
+ hideDefaultActions: true
+ }
];
filesUploaded = [];
fileContents;
@@ -73,7 +80,7 @@
content;
MAX_FILE_SIZE = 1500000;
get acceptedType() {
- return [".csv"];
+ return ['.csv'];
}
//鍒楄〃
@@ -81,11 +88,11 @@
@track data = [];
//鏁版嵁
- @track accountid = "";
- @track userWorkLocation = "";
- @track agencyProType = "";
- @track accountName = "";
- @track sqlagencyProType = "";
+ @track accountid = '';
+ @track userWorkLocation = '';
+ @track agencyProType = '';
+ @track accountName = '';
+ @track sqlagencyProType = '';
@track csvRecordStr = [];
@track saveFLGbln = false;
@track secondAgencyMap = {};
@@ -96,35 +103,37 @@
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
connectedCallback() {
- init().then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.accountid = r.entity.accountid;
- this.userWorkLocation = r.entity.userWorkLocation;
- this.agencyProType = r.entity.agencyProType;
- console.log('this.agencyProType = ' + this.agencyProType);
- this.accountName = r.entity.accountName;
- this.sqlagencyProType = r.entity.sqlagencyProType;
- this.isShowSpinner = false;
- } else {
- console.log("r = " + JSON.stringify(r));
- this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error')
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error')
- });
+ init()
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.accountid = r.entity.accountid;
+ this.userWorkLocation = r.entity.userWorkLocation;
+ this.agencyProType = r.entity.agencyProType;
+ console.log('this.agencyProType = ' + this.agencyProType);
+ this.accountName = r.entity.accountName;
+ this.sqlagencyProType = r.entity.sqlagencyProType;
+ this.isShowSpinner = false;
+ } else {
+ console.log('r = ' + JSON.stringify(r));
+ this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error');
+ });
}
getCsvFile() {
@@ -133,7 +142,7 @@
if (this.filesUploaded.length > 0) {
this.file = this.filesUploaded[0];
if (this.file.size > this.MAX_FILE_SIZE) {
- window.console.log("鏂囦欢杩囧ぇ");
+ window.console.log('鏂囦欢杩囧ぇ');
this.isShowSpinner = false;
return;
}
@@ -141,65 +150,78 @@
this.fileReader.onloadend = () => {
this.fileContents = this.fileReader.result;
- let base64 = "base64,";
- this.content = this.fileContents.indexOf(base64) + base64.length;
+ let base64 = 'base64,';
+ this.content =
+ this.fileContents.indexOf(base64) + base64.length;
this.fileContents = this.fileContents.substring(this.content);
- console.log('getCsvFile')
+ console.log('getCsvFile');
this.importCSVFile();
};
this.fileReader.readAsDataURL(this.file);
} else {
- this.fileName = "閫夋嫨涓�涓猚sv鏂囦欢涓婁紶";
- this.showMyToast('涓婁紶澶辫触', '閫夋嫨涓�涓猚sv鏂囦欢涓婁紶', 'Error')
+ this.fileName = '閫夋嫨涓�涓猚sv鏂囦欢涓婁紶';
+ this.showMyToast('涓婁紶澶辫触', '閫夋嫨涓�涓猚sv鏂囦欢涓婁紶', 'Error');
}
}
importCSVFile() {
- console.log('importCSVFile')
+ console.log('importCSVFile');
console.log('this.sqlagencyProType = ' + this.sqlagencyProType);
console.log('this.userWorkLocation = ' + this.userWorkLocation);
console.log('this.accountName = ' + this.accountName);
+ console.log(
+ 'encodeURIComponent(this.fileContents) = ' +
+ encodeURIComponent(this.fileContents)
+ );
importCSVFile({
base64DataLwc: encodeURIComponent(this.fileContents),
sqlagencyProTypeLwc: this.sqlagencyProType,
userWorkLocationLwc: this.userWorkLocation,
- accountNameLwc: this.accountName,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success" && r.msg == "") {
- console.log("importCSVFile success");
- this.saveFLGbln = r.entity.saveFLGbln;
- this.csvRecordStr = r.entity.csvRecordStr;
- this.secondAgencyMap = r.entity.secondAgencyMap;
- this.hospitalSysMap = r.entity.hospitalSysMap;
- this.data = r.entity.orderRecords;
- for (var i in this.data) {
- this.data[i]['orderName'] = this.data[i].order.Name;
- this.data[i]['orderSummonsForDirction'] = this.data[i].order.SummonsForDirction__c;
- this.data[i]['orderOrderForCustomerText'] = this.data[i].order.Order_ForCustomerText__c;
- this.data[i]['orderOutboundDate'] = this.data[i].order.Outbound_Date__c;
+ accountNameLwc: this.accountName
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success' && r.msg == '') {
+ console.log('importCSVFile success');
+ this.saveFLGbln = r.entity.saveFLGbln;
+ this.csvRecordStr = r.entity.csvRecordStr;
+ this.secondAgencyMap = r.entity.secondAgencyMap;
+ this.hospitalSysMap = r.entity.hospitalSysMap;
+ this.data = r.entity.orderRecords;
+ for (var i in this.data) {
+ this.data[i]['orderName'] = this.data[i].order.Name;
+ this.data[i]['orderSummonsForDirction'] =
+ this.data[i].order.SummonsForDirction__c;
+ this.data[i]['orderOrderForCustomerText'] =
+ this.data[i].order.Order_ForCustomerText__c;
+ this.data[i]['orderOutboundDate'] =
+ this.data[i].order.Outbound_Date__c;
+ }
+ this.isShowSpinner = false;
+ } else if (r.msg != '') {
+ console.log('r.msg = ' + JSON.stringify(r.msg));
+ this.saveFLGbln = r.entity.saveFLGbln;
+ this.data = r.entity.orderRecords;
+ for (var i in this.data) {
+ this.data[i]['orderName'] = this.data[i].order.Name;
+ this.data[i]['orderSummonsForDirction'] =
+ this.data[i].order.SummonsForDirction__c;
+ this.data[i]['orderOrderForCustomerText'] =
+ this.data[i].order.Order_ForCustomerText__c;
+ this.data[i]['orderOutboundDate'] =
+ this.data[i].order.Outbound_Date__c;
+ }
+ this.showMyToast('瀵煎叆澶辫触', r.msg, 'Error');
+ } else {
+ console.log('r.msg = ' + JSON.stringify(r.msg));
+ this.showMyToast('瀵煎叆澶辫触', r.msg, 'Error');
}
- this.isShowSpinner = false;
- } else if (r.msg != "") {
- console.log("r.msg = " + JSON.stringify(r.msg));
- this.saveFLGbln = r.entity.saveFLGbln;
- this.data = r.entity.orderRecords;
- for (var i in this.data) {
- this.data[i]['orderName'] = this.data[i].order.Name;
- this.data[i]['orderSummonsForDirction'] = this.data[i].order.SummonsForDirction__c;
- this.data[i]['orderOrderForCustomerText'] = this.data[i].order.Order_ForCustomerText__c;
- this.data[i]['orderOutboundDate'] = this.data[i].order.Outbound_Date__c;
- }
- this.showMyToast('瀵煎叆澶辫触', r.msg, 'Error')
- } else {
- console.log("r.msg = " + JSON.stringify(r.msg));
- this.showMyToast('瀵煎叆澶辫触', r.msg, 'Error')
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error.message));
- this.showMyToast('瀵煎叆閿欒', '瀵煎叆澶辫触', 'Error')
- });
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error.message));
+ this.showMyToast('瀵煎叆閿欒', '瀵煎叆澶辫触', 'Error');
+ });
}
dataImport() {
@@ -221,29 +243,31 @@
accountidLwc: this.accountid,
agencyProTypeLwc: this.agencyProType,
secondAgencyMapLwc: this.secondAgencyMap,
- hospitalSysMapLwc: this.hospitalSysMap,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success" && r.msg == "") {
- this.saveFLGbln = true;
- console.log("dataImport success");
- this.showMyToast('鎴愬姛', '淇濆瓨鎴愬姛', 'Success')
- } else if (r.msg != "") {
- console.log("r.msg = " + JSON.stringify(r.msg));
- this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error')
- } else {
- console.log("r.msg = " + JSON.stringify(r.msg));
- this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error')
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error.message));
- this.showMyToast('閿欒', '淇濆瓨澶辫触', 'Error')
- });
+ hospitalSysMapLwc: this.hospitalSysMap
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success' && r.msg == '') {
+ this.saveFLGbln = true;
+ console.log('dataImport success');
+ this.showMyToast('鎴愬姛', '淇濆瓨鎴愬姛', 'Success');
+ } else if (r.msg != '') {
+ console.log('r.msg = ' + JSON.stringify(r.msg));
+ this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
+ } else {
+ console.log('r.msg = ' + JSON.stringify(r.msg));
+ this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error.message));
+ this.showMyToast('閿欒', '淇濆瓨澶辫触', 'Error');
+ });
}
handleFilesChange(event) {
- console.log("handleFilesChange");
+ console.log('handleFilesChange');
if (event.target.files.length > 0) {
this.filesUploaded = event.target.files;
this.fileName = event.target.files[0].name;
@@ -261,10 +285,17 @@
iconName = 'utility:error';
}
if (message != '') {
- content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
} else {
content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.html b/force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.html
index 84a3ed8..bc0e117 100644
--- a/force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.html
+++ b/force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.html
@@ -1,22 +1,58 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;">
- <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:3px;">
- <div style="margin: 12px;">
- <p style="font-size: 18px;float:left"><strong>杩囨湡搴撳瓨閿�瀛�</strong></p>
+ <div style="border: 1px solid #d4d4d4; border-radius: 5px">
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <div style="margin: 12px">
+ <p style="font-size: 18px; float: left">
+ <strong>杩囨湡搴撳瓨閿�瀛�</strong>
+ </p>
</div>
- <div style="margin-left:400px;margin-bottom:12px;">
+ <div style="margin-left: 400px; margin-bottom: 12px">
<!-- <lightning-button variant="brand" class = 'lexstyle' label="閿�瀛樼‘璁�" title="閿�瀛樼‘璁�" onclick={saveConfirm}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="閿�瀛樼‘璁�" onclick={saveConfirm}>閿�瀛樼‘璁�</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="閿�瀛樼‘璁�"
+ onclick={saveConfirm}
+ >
+ 閿�瀛樼‘璁�
+ </button>
</div>
</div>
- <div style="padding:10px;">
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div style="padding: 10px">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<table>
<colgroup>
<col width="160px" />
@@ -37,15 +73,30 @@
<tbody>
<tr>
<td></td>
- <td align="right" class="searchName">BarCode</td>
- <td style="width:600px"><lightning-textarea class="inputFont" name="BarCode" label=""
- onchange={handleChange}></lightning-textarea></td>
+ <td align="right" class="searchName">
+ BarCode
+ </td>
+ <td style="width: 600px">
+ <lightning-textarea
+ class="inputFont"
+ name="BarCode"
+ label=""
+ onchange={handleChange}
+ ></lightning-textarea>
+ </td>
<td align="right"></td>
<td></td>
- <td style="width:200px">
- <button style="margin-top:14px;" class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="鑾峰彇鏄庣粏" onclick={barcodeEntrys}>鑾峰彇鏄庣粏</button>
+ <td style="width: 200px">
+ <button
+ style="margin-top: 14px"
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="鑾峰彇鏄庣粏"
+ onclick={barcodeEntrys}
+ >
+ 鑾峰彇鏄庣粏
+ </button>
<!-- <lightning-button class='lexstyle' label="BarCode褰曞叆" title="BarCode褰曞叆" onclick={barcodeEntrys}
- style="width: 150px;"></lightning-button> -->
+ style="width: 150px;"></lightning-button> -->
</td>
</tr>
</tbody>
@@ -53,15 +104,29 @@
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:5px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 5px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<!-- <p style="font-size: 16px;"><strong>杩囨湡搴撳瓨涓�瑙�</strong></p> -->
<table>
<tr>
<td>
<!-- <p style="font-size: 16px;"><strong>閿�瀛樻槑缁�</strong></p> -->
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
<strong>杩囨湡搴撳瓨涓�瑙�</strong>
</p>
@@ -71,65 +136,77 @@
</tr>
</table>
</div>
- <div style="padding:10px;">
-
+ <div style="padding: 10px">
<!-- <div style="height: 300px;"> -->
- <template if:true={showTable}>
- <c-lex-custom-lightning-datatable key-field="prodid" data={data} columns={columns}
+ <template if:true={showTable}>
+ <c-lex-custom-lightning-datatable
+ key-field="key"
+ data={data}
+ columns={columns}
onrowselection={getSelectedRows}
- selected-rows={selectedRows} class="wrapped-header-datatable">
- </c-lex-custom-lightning-datatable>
- </template>
- <!-- 鍔犺浇妗� -->
+ selected-rows={selectedRows}
+ class="wrapped-header-datatable"
+ >
+ </c-lex-custom-lightning-datatable>
+ </template>
+ <!-- 鍔犺浇妗� -->
- <!-- <div if:true={casesSpinner} class="slds-spinner_inline spinner-padding"
- style="margin-top:10px;">
- <lightning-spinner variant="brand" alternative-text="Loading Cases" size="medium">
- </lightning-spinner>
- </div> -->
+ <!-- <div if:true={casesSpinner} class="slds-spinner_inline spinner-padding"
+ style="margin-top:10px;">
+ <lightning-spinner variant="brand" alternative-text="Loading Cases" size="medium">
+ </lightning-spinner>
+ </div> -->
<!-- </div> -->
-
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:5px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
- <table>
- <tr>
- <td>
- <!-- <p style="font-size: 16px;"><strong>閿�瀛樻槑缁�</strong></p> -->
- <lightning-layout>
- <lightning-layout-item padding="around-small">
- <p style="font-size: 18px">
- <strong>閿�瀛樻槑缁�</strong>
- </p>
- </lightning-layout-item>
- </lightning-layout>
- </td>
- </tr>
- </table>
- </div>
-
- <div style="padding:10px;">
+
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 5px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <table>
+ <tr>
+ <td>
+ <!-- <p style="font-size: 16px;"><strong>閿�瀛樻槑缁�</strong></p> -->
+ <lightning-layout>
+ <lightning-layout-item
+ padding="around-small"
+ >
+ <p style="font-size: 18px">
+ <strong>閿�瀛樻槑缁�</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div style="padding: 10px">
<lightning-datatable
- key-field="id" data={overduePageRecords} columns={column}
- onrowselection={getSelectedRows} hide-checkbox-column="true"
- selected-rows={selectedRows} class="wrapped-header-datatable">
- </lightning-datatable>
- </div>
-
-
-
- <!-- <template if:true={showTables}>
- <c-lex-custom-lightning-datatable key-field="prodid" data={overduePageRecords} columns={column}
- onrowselection={getSelectedRows} hide-checkbox-column="true"
- selected-rows={selectedRows}>
- </c-lex-custom-lightning-datatable>
- </template> -->
-
-
+ key-field="id"
+ data={overduePageRecords}
+ columns={column}
+ onrowselection={getSelectedRows}
+ hide-checkbox-column="true"
+ selected-rows={selectedRows}
+ class="wrapped-header-datatable"
+ style="word-wrap: break-word; word-break: break-all"
+ >
+ </lightning-datatable>
+ </div>
</div>
</div>
</div>
-
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.js b/force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.js
index d81b24d..24ac990 100644
--- a/force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.js
+++ b/force-app/main/default/lwc/lexOverdueStock/lexOverdueStock.js
@@ -4,296 +4,397 @@
import save from '@salesforce/apex/LexOverdueStockController.save';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { NavigationMixin } from 'lightning/navigation';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
-
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
//杩囨湡搴撳瓨涓�瑙�
const columns = [
{
- label: '鏄惁閿�瀛�',
- fieldName: 'iscount',
- type: 'checkbox',
- hideDefaultActions: true,
- initialWidth: 80,
+ label: '鏄惁閿�瀛�',
+ fieldName: 'iscount',
+ type: 'checkbox',
+ hideDefaultActions: true,
+ initialWidth: 80
},
{
- label: '娑堣�楀搧鍚嶇О',
- fieldName: 'prodname',
- type: 'prodname',
- wrapText: true,
- initialWidth: 350,
-
- hideDefaultActions: true
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'prodname',
+ type: 'prodname',
+ wrapText: true,
+ initialWidth: 350,
+ hideDefaultActions: true
},
{
- label: '鍗曚綅',
- fieldName: 'boxPiece',
- hideDefaultActions: true,
- // initialWidth: 250,
-
+ label: '鍗曚綅',
+ fieldName: 'boxPiece',
+ hideDefaultActions: true
+ // initialWidth: 250,
},
{
- label: '杩囨湡鏁伴噺',
- fieldName: 'overlimitCount',
- hideDefaultActions: true,
- cellAttributes: { alignment: 'right' }
-
- // initialWidth: 250,
-
+ label: '杩囨湡鏁伴噺',
+ fieldName: 'overlimitCount',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'right' }
+
+ // initialWidth: 250,
},
{
- label: '閿�瀛樻暟閲�',
- fieldName: 'pandian',
- hideDefaultActions: true,
- cellAttributes: { alignment: 'right' }
- // initialWidth: 250,
- // cellAttributes: { alignment: 'center' }
+ label: '閿�瀛樻暟閲�',
+ fieldName: 'pandian',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'right' }
+ // initialWidth: 250,
+ // cellAttributes: { alignment: 'center' }
}
- ];
- //閿�瀛樻槑缁�
+];
+//閿�瀛樻槑缁�
const column = [
-
{
- label: '娑堣�楀搧鍚嶇О',
- fieldName: 'Name__c',
- type: 'Name',
- // initialWidth : 300,
- hideDefaultActions: true,
- cellAttributes: { alignment: 'left' }
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ type: 'Name',
+ wrapText: true,
+ // initialWidth : 300,
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'left' }
},
{
- label: '鍗曚綅',
- fieldName: 'Box_Piece__c',
- initialWidth : 80,
- hideDefaultActions: true
+ label: '鍗曚綅',
+ fieldName: 'Box_Piece__c',
+ initialWidth: 80,
+ hideDefaultActions: true
},
{
- label: 'BarCode',
- fieldName: 'Bar_Code__c',
- wrapText: true,
- hideDefaultActions: true,
- initialWidth : 500,
+ label: 'BarCode',
+ fieldName: 'Bar_Code__c',
+ wrapText: true,
+ hideDefaultActions: true
+ // initialWidth: 500,
},
{
- label: '浣跨敤鏈熼檺',
- fieldName: 'Sterilization_limit__c',
- hideDefaultActions: true,
- // initialWidth : 250
+ label: '浣跨敤鏈熼檺',
+ fieldName: 'Sterilization_limit__c',
+ hideDefaultActions: true
+ // initialWidth : 250
+ },
+ {
+ label: '閿�瀛樺師鍥�',
+ fieldName: 'diffReason',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 160
}
- ,
- {
- label: '閿�瀛樺師鍥�',
- fieldName: 'diffReason',
- hideDefaultActions: true,
- initialWidth: 160
- }
- ];
+];
-
-export default class LexOverdueStock extends NavigationMixin (LightningElement ){
- columns = columns
- column = column
- @track data =[];
+export default class LexOverdueStock extends NavigationMixin(LightningElement) {
+ columns = columns;
+ column = column;
+ @track data = [];
@track overduePageRecords = [];
- @track iSinventory = false
-
+ @track iSinventory = false;
//鍔犺浇妗�
// @track casesSpinner = true;
- @track showSpinner =true;
+ @track showSpinner = true;
//鏄剧ず鍙�
- @track showbutton = false
+ @track showbutton = false;
@track showTable = false;
@track showTables = false;
//閿�瀛樹竴瑙堟暟鎹�
@track accountName;
@track agencyProType;
@track userWorkLocation;
- @track barcode = ''
- @track orderDetZaiku
+ @track barcode = '';
+ @track orderDetZaiku;
@track selectedRows = [];
@track codPageRecordsLWC;
@track Id;
@track overdueList = [];
-
renderedCallback() {
- if (!this.stylesLoaded) {
- Promise.all([loadStyle(this, WrappedHeaderTable)])
- .then(() => {
- console.log("Custom styles loaded");
- this.stylesLoaded = true;
- })
- .catch((error) => {
- console.error("Error loading custom styles");
- });
- }
- }
-
+ if (!this.stylesLoaded) {
+ Promise.all([loadStyle(this, WrappedHeaderTable)])
+ .then(() => {
+ console.log('Custom styles loaded');
+ this.stylesLoaded = true;
+ })
+ .catch((error) => {
+ console.error('Error loading custom styles');
+ });
+ }
+ }
//鍒濆鍖�
connectedCallback() {
console.log('鍒濆鍖�');
this.showSpinner = true;
- init().then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log('result ='+JSON.stringify(result));
- console.log('result 1='+result.entity.codPageRecords);
- if(result.status = 'Success'){
- this.data = JSON.parse(result.entity.codPageRecords);
- this.codPageRecordsLWC = result.entity.codPageRecords;
- console.log('this.data'+this.data);
- this.accountName = result.entity.accountName;
- this.agencyProType = result.entity.agencyProType;
- this.userWorkLocation = result.entity.userWorkLocation;
- this.showTable = true;
- // this.casesSpinner = false;
+ init()
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result =' + JSON.stringify(result));
+ console.log('result 1=' + result.entity.codPageRecords);
+ if ((result.status = 'Success')) {
+ this.data = JSON.parse(result.entity.codPageRecords);
+ this.codPageRecordsLWC = result.entity.codPageRecords;
+ console.log('this.data' + this.data);
+ this.accountName = result.entity.accountName;
+ this.agencyProType = result.entity.agencyProType;
+ this.userWorkLocation = result.entity.userWorkLocation;
+ for (var i in this.data) {
+ this.data[i]['key'] =
+ this.data[i]['prodid'] + this.data[i]['boxPiece'];
+ }
+ this.showTable = true;
+ // this.casesSpinner = false;
+ this.showSpinner = false;
+ } else {
+ this.showMyToast('鍒濆鍖栧け璐�', result.msg, 'error');
+ this.showSpinner = false;
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
this.showSpinner = false;
- }else {
- this.showMyToast('鍒濆鍖栧け璐�',result.msg,'error');
- this.showSpinner = false;
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error));
- });
+ });
}
//barcode褰曞叆
- barcodeEntrys(){
+ barcodeEntrys() {
this.showSpinner = true;
this.showTable = false;
- console.log('code'+this.barcode);
- console.log(' this.accountName'+ this.accountName);
- console.log(' this.barcode'+ this.barcode);
-
- if(this.barcode == ''||this.barcode==null){
- this.showMyToast('鑾峰彇澶辫触','璇疯緭鍏arCode鍙�','error');
- this.showSpinner = false;
+ console.log('code' + this.barcode);
+ console.log(' this.accountName' + this.accountName);
+ console.log(' this.barcode' + this.barcode);
+ const selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
+ console.log('selectedRows========> ' + JSON.stringify(selectedRows));
+ for (var i in this.data) {
+ this.data[i]['check'] = false;
+ }
+ for (var i in this.data) {
+ for (var j in selectedRows) {
+ if (
+ this.data[i].prodid + this.data[i]['boxPiece'] ==
+ selectedRows[j].prodid + selectedRows[j]['boxPiece']
+ ) {
+ this.data[i]['check'] = true;
+ }
+ }
}
barcodeEntry({
accountNameLWC: this.accountName,
agencyProTypeLWC: this.agencyProType,
- userWorkLocationLWC:this.userWorkLocation,
- barcodeLWC:this.barcode,
- codPageRecordsLWC:this.codPageRecordsLWC
- }).then((result)=>{
- result = JSON.parse(JSON.stringify(result));
- if (result.status == 'Success') {
- this.overduePageRecords = JSON.parse(result.entity.overduePageRecords);
- this.overdueList = result.entity.overdueList;
- this.iSinventory = result.entity.iSinventory;
- console.log('result褰曞叆'+JSON.stringify( result));
- console.log('overdueList==>'+JSON.stringify( this.overdueList));
- for(let i in this.overduePageRecords){
- if(this.overduePageRecords[i].Prod!=null){
- this.overduePageRecords[i]['Name__c'] = this.overduePageRecords[i].Prod.Name__c;
+ userWorkLocationLWC: this.userWorkLocation,
+ barcodeLWC: this.barcode,
+ codPageRecordsLWC: JSON.stringify(this.data)
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ if (result.status == 'Success') {
+ this.overduePageRecords = JSON.parse(
+ result.entity.overduePageRecords
+ );
+ this.overdueList = result.entity.overdueList;
+ this.iSinventory = result.entity.iSinventory;
+ console.log('result褰曞叆' + JSON.stringify(result));
+ console.log(
+ 'overdueList==>' + JSON.stringify(this.overdueList)
+ );
+ for (let i in this.overduePageRecords) {
+ if (this.overduePageRecords[i].Prod != null) {
+ this.overduePageRecords[i]['Name__c'] =
+ this.overduePageRecords[i].Prod.Name__c;
+ }
+ this.overduePageRecords[i]['Bar_Code__c'] =
+ this.overduePageRecords[
+ i
+ ].orderdetails2.Bar_Code__c;
+ this.overduePageRecords[i]['Box_Piece__c'] =
+ this.overduePageRecords[
+ i
+ ].orderdetails2.Box_Piece__c;
+ this.overduePageRecords[i]['Sterilization_limit__c'] =
+ this.overduePageRecords[
+ i
+ ].orderdetails2.Sterilization_limit__c;
+ }
+ this.data = JSON.parse(result.entity.codPageRecords);
+ console.log(' this.data' + JSON.stringify(this.data));
+ for (var i in this.data) {
+ this.data[i]['key'] =
+ this.data[i]['prodid'] + this.data[i]['boxPiece'];
+ }
+ for (var i in this.data) {
+ if (this.data[i]['check']) {
+ this.selectedRows.push(
+ this.data[i].prodid + this.data[i]['boxPiece']
+ );
+ console.log('selectedRows:' + this.selectedRows);
+ }
+ }
+ this.showSpinner = false;
+ this.showTable = true;
+ } else {
+ if (result.status == 'Success1') {
+ this.overduePageRecords = JSON.parse(
+ result.entity.overduePageRecords
+ );
+ this.overdueList = result.entity.overdueList;
+ this.iSinventory = result.entity.iSinventory;
+ console.log('result褰曞叆' + JSON.stringify(result));
+ console.log(
+ 'overdueList==>' + JSON.stringify(this.overdueList)
+ );
+ for (let i in this.overduePageRecords) {
+ if (this.overduePageRecords[i].Prod != null) {
+ this.overduePageRecords[i]['Name__c'] =
+ this.overduePageRecords[i].Prod.Name__c;
+ }
+ this.overduePageRecords[i]['Bar_Code__c'] =
+ this.overduePageRecords[
+ i
+ ].orderdetails2.Bar_Code__c;
+ this.overduePageRecords[i]['Box_Piece__c'] =
+ this.overduePageRecords[
+ i
+ ].orderdetails2.Box_Piece__c;
+ this.overduePageRecords[i][
+ 'Sterilization_limit__c'
+ ] =
+ this.overduePageRecords[
+ i
+ ].orderdetails2.Sterilization_limit__c;
+ }
+ this.data = JSON.parse(result.entity.codPageRecords);
+ console.log(' this.data' + JSON.stringify(this.data));
+ for (var i in this.data) {
+ this.data[i]['key'] =
+ this.data[i]['prodid'] +
+ this.data[i]['boxPiece'];
+ }
+ for (var i in this.data) {
+ if (this.data[i]['check']) {
+ this.selectedRows.push(
+ this.data[i].prodid +
+ this.data[i]['boxPiece']
+ );
+ console.log(
+ 'selectedRows:' + this.selectedRows
+ );
+ }
+ }
+ this.showSpinner = false;
+ // this.showTables = true;
+ this.showTable = true;
+ } else {
+ console.log('Error:' + result.msg);
+ this.showMyToast(result.msg, '', 'error');
+ this.showSpinner = false;
+ this.showTable = true;
+ }
- }
- this.overduePageRecords[i]['Bar_Code__c'] = this.overduePageRecords[i].orderdetails2.Bar_Code__c;
- this.overduePageRecords[i]['Box_Piece__c'] = this.overduePageRecords[i].orderdetails2.Box_Piece__c;
- this.overduePageRecords[i]['Sterilization_limit__c'] = this.overduePageRecords[i].orderdetails2.Sterilization_limit__c;
- }
- this.data = JSON.parse(result.entity.codPageRecords);
- console.log(' this.data'+ JSON.stringify(this.data));
- for (var i in this.data) {
- if (this.data[i]['check']) {
- this.selectedRows.push(this.data[i].prodid);
- console.log('selectedRows:' + this.selectedRows);
- }
- }
- this.showSpinner = false;
- // this.showTables = true;
- this.showTable = true;
- }else{
- this.showMyToast('鑾峰彇澶辫触',result.msg,'error');
- this.showSpinner = false;
- }
-
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error));
- });
-
- }
- //鑾峰彇褰撳墠杈撳叆鍊�
- handleChange(event) {
- let value = event.detail.value;
- console.log('value' + value);
- this.barcode = value;
- console.log('this.barcode'+this.barcode);
- }
- getSelectedRows(event) {
- console.log('鎵撳嬀');
- const selectedRows = event.detail.selectedRows;
- console.log('this.selectedRows = ' + this.selectedRows);
- for (var i in this.data) {
- this.data[i]['check'] = false;
- }
- for (var i in this.data) {
- for (var j in selectedRows) {
- console.log('this.selectedRows111 = ' + selectedRows[j].prodid);
- console.log('this.selectedRows1112 = ' + this.data[i].prodid );
- if (this.data[i].prodid == selectedRows[j].prodid) {
- this.data[i]['check'] = true;
- }
- }
- }
- }
- //淇濆瓨
- saveConfirm() {
- console.log('杩涘叆閿�瀛樼‘璁�');
- this.showSpinner = true;
- var el = this.template.querySelector('c-lex-custom-lightning-datatable');
- var selected = el.getSelectedRows();
- this.selectedData = selected;
- console.log('閫変腑鏁版嵁' + JSON.stringify(this.selectedData));
- console.log('this.overdueList'+this.overdueList);
- save({
- iSinventory: this.iSinventory,
- saveCodPageRecords: JSON.stringify(this.selectedData),
- // saveoverdueList:JSON.stringify(this.overdueList)
- saveoverdueList:this.overdueList
- }).then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log('result淇濆瓨 = ' + JSON.stringify(result));
- if (result.status == 'Success') {
- this[NavigationMixin.Navigate]({
- type: 'standard__recordPage',
- attributes: {
- recordId:result.entity.Id,
- objectApiName: 'Consumable_order__c',
- actionName: 'view'
+ // this.showMyToast('鑾峰彇澶辫触', result.msg, 'error');
+ // this.showSpinner = false;
}
+ })
+ .catch((error) => {
+ this.showSpinner = false;
+ console.log('error = ' + JSON.stringify(error));
});
- this.showSpinner = false;
- } else {
- this.showMyToast('閿�瀛樺け璐�',result.msg,'error');
- this.showSpinner = false;
+ }
+ //鑾峰彇褰撳墠杈撳叆鍊�
+ handleChange(event) {
+ let value = event.detail.value;
+ console.log('value' + value);
+ this.barcode = value;
+ console.log('this.barcode' + this.barcode);
+ }
+ getSelectedRows(event) {
+ let selectedRowsEvent = event.detail.selectedRows;
+ this.selectedRows = [];
+ for (var i in selectedRowsEvent) {
+ this.selectedRows.push(
+ selectedRowsEvent[i].prodid + this.data[i]['boxPiece']
+ );
}
- })
- .catch((error) => {
- console.log('error = ' + JSON.stringify(error));
- this.showSpinner = false;
- });
- }
-
- showMyToast(title, message, variant) {
- console.log('show custom message');
- var iconName = '';
- var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
+ console.log('this.selectedRows==>' + this.selectedRows);
}
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
+ //淇濆瓨
+ saveConfirm() {
+ console.log('杩涘叆閿�瀛樼‘璁�');
+ this.showSpinner = true;
+ //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
+ const selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
+ console.log('selectedRows========> ' + JSON.stringify(selectedRows));
+ for (var i in this.data) {
+ this.data[i]['check'] = false;
+ }
+ for (var i in this.data) {
+ for (var j in selectedRows) {
+ if (
+ this.data[i].prodid + this.data[i]['boxPiece'] ==
+ selectedRows[j].prodid + selectedRows[j]['boxPiece']
+ ) {
+ this.data[i]['check'] = true;
+ }
+ }
+ }
+ save({
+ iSinventory: this.iSinventory,
+ saveCodPageRecords: JSON.stringify(this.data),
+ // saveoverdueList:JSON.stringify(this.overdueList)
+ saveoverdueList: this.overdueList
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result淇濆瓨 = ' + JSON.stringify(result));
+ if (result.status == 'Success') {
+ this[NavigationMixin.Navigate]({
+ type: 'standard__recordPage',
+ attributes: {
+ recordId: result.entity.Id,
+ objectApiName: 'Consumable_order__c',
+ actionName: 'view'
+ }
+ });
+ this.showSpinner = false;
+ } else {
+ this.showMyToast('閿�瀛樺け璐�', result.msg, 'error');
+ this.showSpinner = false;
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showSpinner = false;
+ });
}
- this.template.querySelector('c-common-toast').showToast(variant,content,iconName,10000);
- }
- }
\ No newline at end of file
+ showMyToast(title, message, variant) {
+ console.log('show custom message');
+ var iconName = '';
+ var content = '';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
+ }
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
+ }
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
+ }
+}
diff --git a/force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.html b/force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.html
index 3dc4676..42d89f8 100644
--- a/force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.html
+++ b/force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.html
@@ -2,9 +2,21 @@
<template if:true={showSpinner}>
<lightning-spinner size="medium" variant="brand"></lightning-spinner>
</template>
- <c-common-toast></c-common-toast>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <c-common-toast></c-common-toast>
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<!-- <p style="font-size: 18px;"><strong>缁忛攢鍟嗗簱瀛樹笂涓嬮檺缂栬緫</strong></p> -->
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -14,69 +26,142 @@
</lightning-layout-item>
</lightning-layout>
- <table class="slds-table slds-table_cell-buffer slds-table_bordered">
+ <table
+ class="slds-table slds-table_cell-buffer slds-table_bordered"
+ >
<thead>
<tr class="">
<!-- <th class="slds-size_3-of-10" scope="col">
<div class="slds-truncate" title="Name">S.No</div>
</th> -->
<th scope="col" align="center">
- <div class="slds-truncate" style="font-size:16px;" title="Name">浜у搧鍨嬪彿</div>
- </th>
- <th scope="col">
- <div class="slds-truncate" style="font-size:16px;" title="First Name">
- 搴撳瓨涓嬮檺
+ <div
+ class="slds-truncate"
+ style="font-size: 16px"
+ title="Name"
+ >
+ 浜у搧鍨嬪彿
</div>
</th>
<th scope="col">
- <div class="slds-truncate" style="font-size:16px;" title="Last Name">搴撳瓨涓婇檺</div>
+ <div
+ class="slds-truncate"
+ style="font-size: 16px"
+ title="First Name"
+ >
+ 搴撳瓨涓嬮檺
+ </div>
</th>
<th scope="col">
- <div class="slds-truncate" style="font-size:16px;" title="Last Name">鎿嶄綔</div>
+ <div
+ class="slds-truncate"
+ style="font-size: 16px"
+ title="Last Name"
+ >
+ 搴撳瓨涓婇檺
+ </div>
+ </th>
+ <th scope="col">
+ <div
+ class="slds-truncate"
+ style="font-size: 16px"
+ title="Last Name"
+ >
+ 鎿嶄綔
+ </div>
</th>
</tr>
</thead>
<tbody>
- <template for:each = {invRecords} for:item = "inv" for:index="indexVar">
+ <template
+ for:each={invRecords}
+ for:item="inv"
+ for:index="indexVar"
+ >
<tr key={inv.key} class="slds-hint-parent">
<td>
- <div title="Prospecting">
- <lightning-input key={inv.key} data-id={inv.key} data-index={indexVar} name="productNumber" label="productNumber" value={inv.productNumber} variant="label-hidden" onchange={handleProductChange}></lightning-input>
+ <div>
+ <lightning-input
+ key={inv.key}
+ data-id={inv.key}
+ data-index={indexVar}
+ name="productNumber"
+ label="productNumber"
+ value={inv.productNumber}
+ variant="label-hidden"
+ onchange={handleProductChange}
+ ></lightning-input>
</div>
</td>
<td>
- <div title="Prospecting">
- <lightning-input key={inv.key} data-id={inv.key} data-index={indexVar} name="inventory1" label="inventory1" value={inv.inventory1} variant="label-hidden" onchange={handleProductChange}></lightning-input>
+ <div>
+ <lightning-input
+ key={inv.key}
+ data-id={inv.key}
+ data-index={indexVar}
+ name="inventory1"
+ label="inventory1"
+ value={inv.inventory1}
+ variant="label-hidden"
+ onchange={handleProductChange}
+ ></lightning-input>
</div>
</td>
<td>
- <div title="Prospecting">
- <lightning-input key={inv.key} data-id={inv.key} data-index={indexVar} name="inventory2" label="inventory2" value={inv.inventory2} variant="label-hidden" onchange={handleProductChange}></lightning-input>
+ <div>
+ <lightning-input
+ key={inv.key}
+ data-id={inv.key}
+ data-index={indexVar}
+ name="inventory2"
+ label="inventory2"
+ value={inv.inventory2}
+ variant="label-hidden"
+ onchange={handleProductChange}
+ ></lightning-input>
</div>
</td>
<td>
- <a name={indexVar} data-id={inv.key} onclick={removeRow}>
- <lightning-icon icon-name="utility:delete" alternative-text="delete" size="small"></lightning-icon>
+ <a
+ name={indexVar}
+ data-id={inv.key}
+ onclick={removeRow}
+ >
+ <lightning-icon
+ icon-name="utility:delete"
+ alternative-text="delete"
+ size="small"
+ ></lightning-icon>
</a>
</td>
</tr>
</template>
- <tr>
+ <tr>
<td></td>
<td>
<!-- <lightning-button label="琛屽鍔�" onclick={addRow} class="slds-m-left_x-small lexBorder"></lightning-button> -->
- <button class="slds-m-left_x-small slds-button slds-button_neutral slds-button_stretch lexBorder" label="琛屽鍔�" onclick={addRow}>琛屽鍔�</button>
+ <button
+ class="slds-m-left_x-small slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="琛屽鍔�"
+ onclick={addRow}
+ >
+ 琛屽鍔�
+ </button>
</td>
- <td>
+ <td>
<!-- <lightning-button label="淇濆瓨" onclick={handleClick} class="slds-m-left_x-small lexBorder"></lightning-button> -->
- <button class="slds-m-left_x-small slds-button slds-button_neutral slds-button_stretch lexBorder" label="淇濆瓨" onclick={handleClick}>淇濆瓨</button>
+ <button
+ class="slds-m-left_x-small slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="淇濆瓨"
+ onclick={handleClick}
+ >
+ 淇濆瓨
+ </button>
</td>
<td></td>
-
</tr>
</tbody>
- </table>
-
+ </table>
</div>
- </div>
-</template>
\ No newline at end of file
+ </div>
+</template>
diff --git a/force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.js b/force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.js
index c6976a3..6c15970 100644
--- a/force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.js
+++ b/force-app/main/default/lwc/lexProductLimitEdit/lexProductLimitEdit.js
@@ -1,193 +1,233 @@
import { LightningElement, wire, api, track } from 'lwc';
-import oninit from "@salesforce/apex/LexProductLimitEditController.init";
-import save from "@salesforce/apex/LexUpAccountProLimit.upAccount";
+import oninit from '@salesforce/apex/LexProductLimitEditController.init';
+import save from '@salesforce/apex/LexUpAccountProLimit.upAccount';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-import { NavigationMixin } from "lightning/navigation";
-export default class InventoryEditingLWC extends NavigationMixin(LightningElement){
+import { NavigationMixin } from 'lightning/navigation';
+export default class LexProductLimitEdit extends NavigationMixin(
+ LightningElement
+) {
@track invRecords = [];
@track accountid;
@track upstring = '';
@track userPro_Type;
@track showSpinner = true;
//鑾峰彇閾炬帴鍙傛暟
- getQueryString(name) {
- console.log("getQueryString name " + name);
- let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
- let r = window.location.search.substr(1).match(reg);
- if (r != null) {
- return decodeURIComponent(r[2]);
- }
- return null;
- }
+ getQueryString(name) {
+ console.log('getQueryString name ' + name);
+ let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+ let r = window.location.search.substr(1).match(reg);
+ if (r != null) {
+ return decodeURIComponent(r[2]);
+ }
+ return null;
+ }
- connectedCallback(){
+ connectedCallback() {
this.showSpinner = true;
console.log(' === connectedCallback === ');
//鑾峰彇accountid userPro_Type
- this.accountid = this.getQueryString("accountid");
- this.accountid = this.accountid == null ? "" : this.accountid;
- this.userPro_Type = this.getQueryString("userPro_Type");
- this.userPro_Type = this.userPro_Type == null ? "" : this.userPro_Type;
- //鑾峰彇鏁版嵁
- oninit({
- accountid:this.accountid,
- userPro_Type:this.userPro_Type
-
- }).then((result) => {
+ this.accountid = this.getQueryString('accountid');
+ this.accountid = this.accountid == null ? '' : this.accountid;
+ this.userPro_Type = this.getQueryString('userPro_Type');
+ this.userPro_Type = this.userPro_Type == null ? '' : this.userPro_Type;
+ //鑾峰彇鏁版嵁
+ oninit({
+ accountid: this.accountid,
+ userPro_Type: this.userPro_Type
+ })
+ .then((result) => {
result = JSON.parse(JSON.stringify(result));
- console.log('result'+JSON.stringify(result));
- if(result.status == 'Success'){
- console.log('11===>'+result.entity.product_Limit);
- console.log('11===>'+typeof(result.entity.product_Limit));
- let str = result.entity.product_Limit;
- var arr = str.split(',');
- console.log('arr==>'+ arr);
- console.log('arr==>'+ arr.length);
- console.log('arr==>'+ typeof(arr));
- for(var i in arr){
+ console.log('result' + JSON.stringify(result));
+ if (result.status == 'Success') {
+ console.log('11===>' + result.entity.product_Limit);
+ console.log('11===>' + typeof result.entity.product_Limit);
+ let str = result.entity.product_Limit;
+ var arr = str.split(',');
+ console.log('arr==>' + arr);
+ console.log('arr==>' + arr.length);
+ console.log('arr==>' + typeof arr);
+ for (var i in arr) {
var arry = arr[i].split('|');
- this.invRecords.push({
+ this.invRecords.push({
productNumber: arry[0],
- inventory1:arry[1],
- inventory2:arry[2]
+ inventory1: arry[1],
+ inventory2: arry[2]
});
}
this.showSpinner = false;
- console.log('this.invRecords'+JSON.stringify(this.invRecords));
- }else{
+ console.log(
+ 'this.invRecords' + JSON.stringify(this.invRecords)
+ );
+ } else {
this.showSpinner = false;
- console.log("error = " + JSON.stringify(error));
-
+ console.log('error = ' + JSON.stringify(error));
}
- }).catch((error) => {
+ })
+ .catch((error) => {
this.showSpinner = false;
- console.log("error = " + JSON.stringify(error));
- });
+ console.log('error = ' + JSON.stringify(error));
+ });
// this.inventoryTempRecords();
-
}
- addRow(){
+ addRow() {
let objRow = {
productNumber: '',
inventory1: '',
inventory2: '',
id: ++this.keyIndex
- }
+ };
this.invRecords = [...this.invRecords, Object.create(objRow)];
}
- removeRow(event){
+ removeRow(event) {
const indexPos = event.currentTarget.name;
let remList = [];
remList = this.invRecords;
- remList.splice(indexPos,1);
+ remList.splice(indexPos, 1);
this.invRecords = remList;
}
- handleClick(){
+ handleClick() {
this.showSpinner = true;
console.log('淇濆瓨');
- console.log('this.invRecords'+JSON.stringify(this.invRecords));
- for(var i in this.invRecords){
- console.log('inven'+this.invRecords[i]["inventory1"]);
- console.log('鏁板瓧'+this.isNum(this.invRecords[i]["inventory1"]));
-
- if(this.isNum(this.invRecords[i]["inventory1"]) == false || this.isNum(this.invRecords[i]["inventory2"]==false)){
- // alert("杈撳叆鏍煎紡涓嶆纭�,璇疯緭鍏ユ暟瀛�!");
- this.showMyToast('淇濆瓨澶辫触','杈撳叆鏍煎紡涓嶆纭�,璇疯緭鍏ユ暟瀛�','error');
+ console.log('this.invRecords' + JSON.stringify(this.invRecords));
+ for (var i in this.invRecords) {
+ console.log('inven1' + this.invRecords[i]['inventory1']);
+ console.log('鏁板瓧1' + this.isNum(this.invRecords[i]['inventory1']));
+ console.log('inven2' + this.invRecords[i]['inventory2']);
+ console.log('鏁板瓧2' + this.isNum(this.invRecords[i]['inventory2']));
+ if (
+ this.invRecords[i]['inventory1'] == '' ||
+ this.invRecords[i]['inventory1'] == null ||
+ this.invRecords[i]['inventory2'] == null ||
+ this.invRecords[i]['inventory2'] == ''
+ ) {
+ this.showMyToast(
+ '淇濆瓨澶辫触',
+ '杈撳叆鏍煎紡涓嶆纭�,璇疯緭鍏ユ暟瀛�',
+ 'error'
+ );
this.showSpinner = false;
return;
}
- if(this.invRecords[i]["inventory1"] == ''||this.invRecords[i]["inventory1"] == null ||this.invRecords[i]["inventory2"] == null ||
- this.invRecords[i]["inventory2"] == ''){
- // alert('璇疯緭鍏�' +this.invRecords[i]["productNumber"] + '搴撳瓨涓婁笅闄愪俊鎭紒');
- this.showMyToast('淇濆瓨澶辫触','璇疯緭鍏�' +this.invRecords[i]["productNumber"] + '搴撳瓨涓婁笅闄愪俊鎭�','error');
+ if (
+ this.isNum(this.invRecords[i]['inventory1']) == false ||
+ this.isNum(this.invRecords[i]['inventory2']) == false
+ ) {
+ this.showMyToast(
+ '淇濆瓨澶辫触',
+ '杈撳叆鏍煎紡涓嶆纭�,璇疯緭鍏ユ暟瀛�',
+ 'error'
+ );
this.showSpinner = false;
return;
}
- if(Number(this.invRecords[i]["inventory1"])>Number(this.invRecords[i]["inventory2"])){
- // alert( this.invRecords[i]["productNumber"] + '搴撳瓨涓嬮檺澶т簬涓婇檺锛�');
- this.showMyToast('淇濆瓨澶辫触',this.invRecords[i]["productNumber"] + '搴撳瓨涓嬮檺澶т簬涓婇檺','error');
+ if (
+ Number(this.invRecords[i]['inventory1']) >
+ Number(this.invRecords[i]['inventory2'])
+ ) {
+ this.showMyToast(
+ '淇濆瓨澶辫触',
+ this.invRecords[i]['productNumber'] + '搴撳瓨涓嬮檺澶т簬涓婇檺',
+ 'error'
+ );
this.showSpinner = false;
return;
}
}
- let dataStr = ''
- for(var i in this.invRecords){
- dataStr = dataStr+this.invRecords[i]["productNumber"] +'|'+this.invRecords[i]["inventory1"]+'|'+this.invRecords[i]["inventory2"]+',';
- }
- console.log('dataStr==>'+dataStr);
- this.upstring = dataStr.substring(0, dataStr.lastIndexOf(','));
- console.log('upstring'+ this.upstring);
- save({
- accountId: this.accountid,
- productLimit: this.upstring,
- userPro_Type:this.userPro_Type
- }).then((result) => {
+ let dataStr = '';
+ for (var i in this.invRecords) {
+ dataStr =
+ dataStr +
+ this.invRecords[i]['productNumber'] +
+ '|' +
+ this.invRecords[i]['inventory1'] +
+ '|' +
+ this.invRecords[i]['inventory2'] +
+ ',';
+ }
+ console.log('dataStr==>' + dataStr);
+ this.upstring = dataStr.substring(0, dataStr.lastIndexOf(','));
+ console.log('upstring' + this.upstring);
+ save({
+ accountId: this.accountid,
+ productLimit: this.upstring,
+ userPro_Type: this.userPro_Type
+ })
+ .then((result) => {
result = JSON.parse(JSON.stringify(result));
- console.log('result===>'+JSON.stringify(result));
- if(result.status == 'Success'){
- this.showMyToast('淇濆瓨鎴愬姛','','success');
+ console.log('result===>' + JSON.stringify(result));
+ if (result.status == 'Success') {
+ this.showMyToast('淇濆瓨鎴愬姛', '', 'success');
this.showSpinner = false;
- // setTimeout(this.toLexToppage(),5000 );
+ // setTimeout(this.toLexToppage(),5000 );
setTimeout(() => {
this.toLexToppage();
}, 500);
-
- }else{
- this.showMyToast('淇濆瓨澶辫触',result.msg,'error');
+ } else {
+ this.showMyToast('淇濆瓨澶辫触', result.msg, 'error');
this.showSpinner = false;
-
}
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
this.showSpinner = false;
- });
-
+ });
+
this.inventoryTempRecords();
- console.log( 'Save ==> ' + JSON.stringify(toSaveList));
+ console.log('Save ==> ' + JSON.stringify(toSaveList));
}
- handleProductChange(event){
+ handleProductChange(event) {
if (event.target.name == 'productNumber') {
- this.invRecords[event.currentTarget.dataset.index].productNumber = event.target.value;
- console.log('===>invrecords'+JSON.stringify(this.invRecords));
- }
- else if (event.target.name == 'inventory1') {
- this.invRecords[event.currentTarget.dataset.index].inventory1 = event.target.value;
- }
- else if (event.target.name == 'inventory2') {
- this.invRecords[event.currentTarget.dataset.index].inventory2 = event.target.value;
+ this.invRecords[event.currentTarget.dataset.index].productNumber =
+ event.target.value;
+ console.log('===>invrecords' + JSON.stringify(this.invRecords));
+ } else if (event.target.name == 'inventory1') {
+ this.invRecords[event.currentTarget.dataset.index].inventory1 =
+ event.target.value;
+ console.log('===>invrecords' + JSON.stringify(this.invRecords));
+ } else if (event.target.name == 'inventory2') {
+ this.invRecords[event.currentTarget.dataset.index].inventory2 =
+ event.target.value;
+ console.log('===>invrecords' + JSON.stringify(this.invRecords));
}
}
-
-//鏁板瓧楠岃瘉
-isNum(num){
- var reNum =/^[0-9]+$/;
- return (reNum.test(num));
+
+ //鏁板瓧楠岃瘉
+ isNum(num) {
+ var reNum = /^[0-9]+$/;
+ return reNum.test(num);
}
showMyToast(title, message, variant) {
console.log('show custom message');
var iconName = '';
var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
}
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').showToast(variant,content,iconName,10000);
- }
- toLexToppage(){
- this[NavigationMixin.Navigate]({
- type: 'standard__webPage',
- attributes: {
- url: '/lextoppage'
- }
- });
- }
-}
\ No newline at end of file
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
+ }
+ toLexToppage() {
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: '/lextoppage'
+ }
+ });
+ }
+}
diff --git a/force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.html b/force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.html
index 9e190eb..a11966b 100644
--- a/force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.html
+++ b/force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.html
@@ -1,11 +1,26 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;">
-
- <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div style="border: 1px solid #d4d4d4; border-radius: 5px">
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<div>
<!-- <p style="font-size: 18px;"><strong>鎷嗙洅</strong></p> -->
<lightning-layout>
@@ -17,15 +32,51 @@
</lightning-layout>
</div>
</div>
- <div style="padding:10px;">
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
- <!-- <lightning-button variant="brand" class='lexstyle' style="margin-left:10px;" label="鎷嗙洅纭" title="鎷嗙洅纭" onclick={saveConfirm}></lightning-button>-->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin-left:10px;margin-top:12px;margin-bottom:12px;" label="鎷嗙洅纭" onclick={saveConfirm}>鎷嗙洅纭</button>
+ <div style="padding: 10px">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <!-- <lightning-button variant="brand" class='lexstyle' style="margin-left:10px;" label="鎷嗙洅纭" title="鎷嗙洅纭" onclick={saveConfirm}></lightning-button>-->
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="
+ margin-left: 10px;
+ margin-top: 12px;
+ margin-bottom: 12px;
+ "
+ label="鎷嗙洅纭"
+ onclick={saveConfirm}
+ >
+ 鎷嗙洅纭
+ </button>
+ </div>
</div>
- </div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:5px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ margin-top: 5px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 16px">
@@ -34,46 +85,72 @@
</lightning-layout-item>
</lightning-layout>
</div>
-
+
<!-- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> -->
- <table>
- <colgroup>
- <col width="160px" />
- <col width="100px" />
- <col width="10px" />
- <col width="70px" />
- <col width="100px" />
- <col width="10px" />
- <col width="90px" />
- <col width="100px" />
- <col width="10px" />
- <col width="85px" />
- <col width="100px" />
- <col width="10px" />
- <col width="70px" />
- <col width="100px" />
- </colgroup>
- <tbody>
- <tr>
- <td></td>
- <td align="right" class="searchName">BarCode</td>
- <td style="width:600px"><lightning-textarea class="inputFont" name="BarCode" label=""
- onchange={handleChange}></lightning-textarea></td>
- <td align="right"></td>
- <td></td>
- <td style="width: 200px;">
- <button style="margin-top:14px;" class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="鑾峰彇鏄庣粏" onclick={getDetails}>鑾峰彇鏄庣粏</button>
- <!-- <lightning-button variant="brand" class='lexstyle' label="鑾峰彇鏄庣粏" title="鑾峰彇鏄庣粏" onclick={getDetails}
- ></lightning-button> -->
- </td>
- </tr>
- </tbody>
- </table>
+ <table>
+ <colgroup>
+ <col width="160px" />
+ <col width="100px" />
+ <col width="10px" />
+ <col width="70px" />
+ <col width="100px" />
+ <col width="10px" />
+ <col width="90px" />
+ <col width="100px" />
+ <col width="10px" />
+ <col width="85px" />
+ <col width="100px" />
+ <col width="10px" />
+ <col width="70px" />
+ <col width="100px" />
+ </colgroup>
+ <tbody>
+ <tr>
+ <td></td>
+ <td align="right" class="searchName">BarCode</td>
+ <td style="width: 600px">
+ <lightning-textarea
+ class="inputFont"
+ name="BarCode"
+ label=""
+ onchange={handleChange}
+ ></lightning-textarea>
+ </td>
+ <td align="right"></td>
+ <td></td>
+ <td style="width: 200px">
+ <button
+ style="margin-top: 14px"
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="鑾峰彇鏄庣粏"
+ onclick={getDetails}
+ >
+ 鑾峰彇鏄庣粏
+ </button>
+ <!-- <lightning-button variant="brand" class='lexstyle' label="鑾峰彇鏄庣粏" title="鑾峰彇鏄庣粏" onclick={getDetails}
+ ></lightning-button> -->
+ </td>
+ </tr>
+ </tbody>
+ </table>
<!-- </div> -->
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:10px">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ margin-top: 10px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -82,31 +159,42 @@
</lightning-layout-item>
</lightning-layout>
</div>
- <div style="padding:10px;">
-
- <!-- <div style="height: 300px;"> -->
- <!-- <template if:true={showTable}> -->
- <!-- <c-lex-custom-lightning-datatable key-field="prodid" data={data} columns={columns}
- onrowselection={getSelectedRows} hide-checkbox-column="true"
- selected-rows={selectedRows}>
- </c-lex-custom-lightning-datatable> -->
- <lightning-datatable
- key-field="prodid" data={data} columns={columns}
- onrowselection={getSelectedRows} hide-checkbox-column="true"
- selected-rows={selectedRows} class="wrapped-header-datatable">
- </lightning-datatable>
- <!-- </template> -->
- <!-- </div> -->
-
+ <div style="padding: 10px">
+ <lightning-datatable
+ key-field="prodid"
+ data={data}
+ columns={columns}
+ onrowselection={getSelectedRows}
+ hide-checkbox-column="true"
+ selected-rows={selectedRows}
+ class="wrapped-header-datatable"
+ style="word-wrap: break-word; word-break: break-all"
+ >
+ </lightning-datatable>
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:10px">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ margin-top: 10px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<table>
<tr>
<td>
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
<strong>閿欒鏄庣粏</strong>
</p>
@@ -116,28 +204,28 @@
</tr>
</table>
</div>
-
- <div style="padding:10px;">
- <!-- <template if:true={showTables}> -->
-
+
+ <div style="padding: 10px">
+ <!-- <template if:true={showTables}> -->
+
<!-- <c-lex-custom-lightning-datatable key-field="id" data={errorDetail} columns={column}
- onrowselection={getSelectedRows} hide-checkbox-column="true"
- selected-rows={selectedRows}>
- </c-lex-custom-lightning-datatable> -->
- <lightning-datatable
- key-field="id" data={errorDetail} columns={column}
- onrowselection={getSelectedRows} hide-checkbox-column="true"
- selected-rows={selectedRows} class="wrapped-header-datatable">
- </lightning-datatable>
- <!-- </template> -->
-
-
+ onrowselection={getSelectedRows} hide-checkbox-column="true"
+ selected-rows={selectedRows}>
+ </c-lex-custom-lightning-datatable> -->
+ <lightning-datatable
+ key-field="id"
+ data={errorDetail}
+ columns={column}
+ onrowselection={getSelectedRows}
+ hide-checkbox-column="true"
+ selected-rows={selectedRows}
+ class="wrapped-header-datatable"
+ style="word-wrap: break-word; word-break: break-all"
+ >
+ </lightning-datatable>
+ <!-- </template> -->
+ </div>
</div>
</div>
- </div>
-
-
-
</div>
-
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.js b/force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.js
index 81ca3e2..156b5bf 100644
--- a/force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.js
+++ b/force-app/main/default/lwc/lexRemoveBox/lexRemoveBox.js
@@ -4,241 +4,253 @@
import saveconfirm from '@salesforce/apex/LexRemoveBoxController.removeBoxConfirm';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
// import { NavigationMixin } from 'lightning/navigation';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
const columns = [
- {
- label: '娑堣�楀搧鍚嶇О',
- fieldName: 'Name__c',
- wrapText:true,
- hideDefaultActions: true,
- initialWidth: 400,
-
- },
- {
- label: '瑙勬牸',
- fieldName: 'ProductPacking_list_manual__c',
- hideDefaultActions: true,
- initialWidth: 50,
- cellAttributes: { alignment: "right" },
-
-
- },
- {
- label: 'CFDA鐘舵��',
- fieldName: 'CFDA_Status__c',
- hideDefaultActions: true,
- initialWidth: 200,
-
- },
- {
- label: '娉ㄥ唽璇佺紪鐮佸彿',
- fieldName: 'Report_Product_Approbation__c',
- hideDefaultActions: true,
- initialWidth: 200,
- },
- {
- label: '娉ㄥ唽璇佹晥鏈�',
- fieldName: 'Report_Product_Expiration__c',
- hideDefaultActions: true,
- // initialWidth: 250,
- },
- {
- label: 'BarCode',
- fieldName: 'Bar_Code__c',
- hideDefaultActions: true,
- wrapText:true,
- initialWidth:400,
- }
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ wrapText: true,
+ hideDefaultActions: true
+ // initialWidth: 400,
+ },
+ {
+ label: '瑙勬牸',
+ fieldName: 'ProductPacking_list_manual__c',
+ hideDefaultActions: true,
+ initialWidth: 50,
+ cellAttributes: { alignment: 'right' }
+ },
+ {
+ label: 'CFDA鐘舵��',
+ fieldName: 'CFDA_Status__c',
+ hideDefaultActions: true,
+ initialWidth: 100,
+ wrapText: true
+ },
+ {
+ label: '娉ㄥ唽璇佺紪鐮佸彿',
+ fieldName: 'Report_Product_Approbation__c',
+ hideDefaultActions: true,
+ initialWidth: 200,
+ wrapText: true
+ },
+ {
+ label: '娉ㄥ唽璇佹晥鏈�',
+ fieldName: 'Report_Product_Expiration__c',
+ hideDefaultActions: true,
+ initialWidth: 110,
+ wrapText: true
+ },
+ {
+ label: 'BarCode',
+ fieldName: 'Bar_Code__c',
+ hideDefaultActions: true,
+ wrapText: true
+ // initialWidth:600,
+ }
];
const column = [
- {
- label: '娑堣�楀搧鍚嶇О',
- fieldName: 'Name__c',
- hideDefaultActions: true,
-
- },
- {
- label: 'BarCode',
- fieldName: 'Bar_Code__c',
- hideDefaultActions: true,
-
-
- }
- ,
- {
- label: '閿欒鍘熷洜',
- fieldName: 'ErrorReason',
- hideDefaultActions: true,
- }
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: 'BarCode',
+ fieldName: 'Bar_Code__c',
+ hideDefaultActions: true,
+ wrapText: true
+ // initialWidth:600,
+ },
+ {
+ label: '閿欒鍘熷洜',
+ fieldName: 'ErrorReason',
+ hideDefaultActions: true,
+ wrapText: true
+ }
];
-
-
-
export default class LexRemoveBox extends LightningElement {
- columns = columns;
- column = column;
- @track selectedRows = [];
- @track data = [];
- @track errorDetail = [];
+ columns = columns;
+ column = column;
+ @track selectedRows = [];
+ @track data = [];
+ @track errorDetail = [];
- // 鏄剧ず
- @track showTable = false
- @track accountName
- @track userWorkLocation
- @track agencyProType
- @track barcode = ''
- @track saveFLGbln = false
- @track dataSize = 0;
+ // 鏄剧ず
+ @track showTable = false;
+ @track accountName;
+ @track userWorkLocation;
+ @track agencyProType;
+ @track barcode = '';
+ @track saveFLGbln = false;
+ @track dataSize = 0;
- //鍔犺浇妗�
- @track showSpinner = false
+ //鍔犺浇妗�
+ @track showSpinner = false;
- renderedCallback() {
- if (!this.stylesLoaded) {
- Promise.all([loadStyle(this, WrappedHeaderTable)])
- .then(() => {
- console.log("Custom styles loaded");
- this.stylesLoaded = true;
+ renderedCallback() {
+ if (!this.stylesLoaded) {
+ Promise.all([loadStyle(this, WrappedHeaderTable)])
+ .then(() => {
+ console.log('Custom styles loaded');
+ this.stylesLoaded = true;
+ })
+ .catch((error) => {
+ console.error('Error loading custom styles');
+ });
+ }
+ }
+
+ //鍒濆鍖�
+ connectedCallback() {
+ console.log('鍒濆鍖�');
+ this.showTable = false;
+
+ init()
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result =' + JSON.stringify(result));
+ if ((result.status = 'Success')) {
+ console.log('result');
+ this.agencyProType = result.entity.agencyProType;
+ this.userWorkLocation = result.entity.userWorkLocation;
+ this.accountName = result.entity.accountName;
+ // this.data = JSON.parse(result.entity.codPageRecords);
+ // this.showTable = true;
+ } else {
+ this.showMyToast('鍒濆鍖栧け璐�', result.msg, 'error');
+ }
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.log('error = ' + JSON.stringify(error));
});
}
-}
-
- //鍒濆鍖�
- connectedCallback() {
- console.log('鍒濆鍖�');
- this.showTable = false;
-
- init().then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log('result =' + JSON.stringify(result));
- if (result.status = 'Success') {
- console.log('result');
- this.agencyProType = result.entity.agencyProType;
- this.userWorkLocation = result.entity.userWorkLocation;
- this.accountName = result.entity.accountName;
- // this.data = JSON.parse(result.entity.codPageRecords);
- // this.showTable = true;
- } else {
- this.showMyToast('鍒濆鍖栧け璐�',result.msg,'error');
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error));
- });
- }
- //褰曞叆
- getDetails() {
- searchDeatail({
- accountName: this.accountName,
- userWorkLocation: this.userWorkLocation,
- agencyProType: this.agencyProType,
- barcode: this.barcode
- }).then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log('result =' + JSON.stringify(result));
- if (result.status == 'Success') {
- console.log('鎴愬姛');
- this.data = JSON.parse(result.entity.ConsumableorderdetailsRecordsdummy);
- this.errorDetail = JSON.parse(result.entity.ConsumableorderdetailsRecordserror);
- this.dataSize = result.entity.dataSize;
- console.log('this.dataSize'+this.dataSize);
- for (let i in this.data) {
- this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
- this.data[i]['ProductPacking_list_manual__c'] = this.data[i].esd.ProductPacking_list_manual__c;
- this.data[i]['CFDA_Status__c'] = this.data[i].esd.CFDA_Status__c;
- this.data[i]['Report_Product_Approbation__c'] = this.data[i].esd.Report_Product_Approbation__c;
- this.data[i]['Report_Product_Expiration__c'] = this.data[i].esd.Report_Product_Expiration__c;
- this.data[i]['Bar_Code__c'] = this.data[i].esd.Bar_Code__c;
- }
- for (let i in this.errorDetail) {
- this.errorDetail[i]['Name__c'] = this.errorDetail[i].Prod.Name__c;
- this.errorDetail[i]['Bar_Code__c'] = this.errorDetail[i].esd.Bar_Code__c;
- this.errorDetail[i]['ErrorReason'] = this.errorDetail[i].ErrorReason;
- }
- this.showTables = true;
- this.showTable = true;
- } else{
- console.log('result.msg = ' + result.msg);
- this.showMyToast('鑾峰彇澶辫触',result.msg,'error');
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error));
- });
-
- }
- //鑾峰彇褰撳墠杈撳叆鍊�
- handleChange(event) {
- let value = event.detail.value;
- console.log('value' + value);
- this.barcode = value;
- console.log('this.barcode' + this.barcode);
- }
- saveConfirm() {
- console.log('杩涘叆纭');
- let msg = "纭鎷嗙洅鍚�";
- if (this.dataSize>0) {
- if (confirm(msg) == true) {
+ //褰曞叆
+ getDetails() {
+ searchDeatail({
+ accountName: this.accountName,
+ userWorkLocation: this.userWorkLocation,
+ agencyProType: this.agencyProType,
+ barcode: this.barcode
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result =' + JSON.stringify(result));
+ if (result.status == 'Success') {
+ console.log('鎴愬姛');
+ this.data = JSON.parse(
+ result.entity.ConsumableorderdetailsRecordsdummy
+ );
+ this.errorDetail = JSON.parse(
+ result.entity.ConsumableorderdetailsRecordserror
+ );
+ this.dataSize = result.entity.dataSize;
+ console.log('this.dataSize' + this.dataSize);
+ for (let i in this.data) {
+ this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
+ this.data[i]['ProductPacking_list_manual__c'] =
+ this.data[i].esd.ProductPacking_list_manual__c;
+ this.data[i]['CFDA_Status__c'] =
+ this.data[i].esd.CFDA_Status__c;
+ this.data[i]['Report_Product_Approbation__c'] =
+ this.data[i].esd.Report_Product_Approbation__c;
+ this.data[i]['Report_Product_Expiration__c'] =
+ this.data[i].esd.Report_Product_Expiration__c;
+ this.data[i]['Bar_Code__c'] =
+ this.data[i].esd.Bar_Code__c;
+ }
+ for (let i in this.errorDetail) {
+ this.errorDetail[i]['Name__c'] =
+ this.errorDetail[i].Prod.Name__c;
+ this.errorDetail[i]['Bar_Code__c'] =
+ this.errorDetail[i].esd.Bar_Code__c;
+ this.errorDetail[i]['ErrorReason'] =
+ this.errorDetail[i].ErrorReason;
+ }
+ this.showTables = true;
+ this.showTable = true;
+ } else {
+ console.log('result.msg = ' + result.msg);
+ this.showMyToast('鑾峰彇澶辫触', result.msg, 'error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
+ }
+ //鑾峰彇褰撳墠杈撳叆鍊�
+ handleChange(event) {
+ let value = event.detail.value;
+ console.log('value' + value);
+ this.barcode = value;
+ console.log('this.barcode' + this.barcode);
+ }
+ saveConfirm() {
+ console.log('杩涘叆纭');
+ let msg = '纭鎷嗙洅鍚�';
+ if (this.dataSize > 0) {
+ if (confirm(msg) == true) {
+ this.removeBox();
+ }
+ } else {
this.removeBox();
}
- } else {
- this.removeBox();
}
-
- }
- removeBox(){
- this.showSpinner = true;
- saveconfirm({
- saveConsumableorderdetailsRecordsdummy: JSON.stringify(this.data),
- accountName: this.accountName,
- userWorkLocation: this.userWorkLocation,
- agencyProType: this.agencyProType
- }).then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log('result淇濆瓨 = ' + JSON.stringify(result));
- if (result.status == 'Success') {
- this.saveFLGbln = result.entity.saveFLGbln;
- // this.showSpinner = false;
- if(this.saveFLGbln){
- this.showMyToast(result.msg,'','success');
- this.showSpinner = false;
- }
- } else {
- console.log('result.msg = ' + result.msg);
- this.showMyToast('鎷嗙洅澶辫触',result.msg,'error');
- this.showSpinner = false;
- }
- })
- .catch((error) => {
- console.log('error = ' + JSON.stringify(error));
- });
-
-
- }
- showMyToast(title, message, variant) {
- console.log('show custom message');
- var iconName = '';
- var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
+ removeBox() {
+ this.showSpinner = true;
+ saveconfirm({
+ saveConsumableorderdetailsRecordsdummy: JSON.stringify(this.data),
+ accountName: this.accountName,
+ userWorkLocation: this.userWorkLocation,
+ agencyProType: this.agencyProType
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result淇濆瓨 = ' + JSON.stringify(result));
+ if (result.status == 'Success') {
+ this.saveFLGbln = result.entity.saveFLGbln;
+ // this.showSpinner = false;
+ if (this.saveFLGbln) {
+ this.showMyToast(result.msg, '', 'success');
+ this.showSpinner = false;
+ }
+ } else {
+ console.log('result.msg = ' + result.msg);
+ this.showMyToast('鎷嗙洅澶辫触', result.msg, 'error');
+ this.showSpinner = false;
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
}
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
+ showMyToast(title, message, variant) {
+ console.log('show custom message');
+ var iconName = '';
+ var content = '';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
+ }
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
+ }
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
}
- this.template.querySelector('c-common-toast').showToast(variant,content,iconName,10000);
- }
-
-
-
-
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html b/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html
index 509cd8c..fd35ca3 100644
--- a/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html
+++ b/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html
@@ -28,22 +28,33 @@
<lightning-layout multiple-rows>
<lightning-layout-item size="6">
<div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth"
- onclick={neworderhead}>
+ onclick={neworderhead}
+ >
鏂板缓鍑哄簱鍗�
</button>
聽
- <div class="slds-form-element__label searchName" style="visibility: hidden">
+ <div
+ class="slds-form-element__label searchName"
+ style="visibility: hidden"
+ >
鍑哄簱鏃� 浠�
</div>
- <div class="slds-form-element__label searchName" style="visibility: hidden">
+ <div
+ class="slds-form-element__label searchName"
+ style="visibility: hidden"
+ >
 鍒�
</div>
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth"
- onclick={editProductLimit} style="margin-left: 4px;">
+ onclick={editProductLimit}
+ style="margin-left: 4px"
+ >
涓婁紶宸插嚭搴撲竴瑙�
</button>
</div>
@@ -71,165 +82,148 @@
<lightning-layout multiple-rows>
<lightning-layout-item size="6">
<div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label searchName">
- 鍑哄簱鏃� 浠�
- </div>
- <lightning-input type="date" variant="label-hidden" label="鍑哄簱鏃� 浠�"
- onchange={dataChange} data-field="deliveryFromDate" value={deliveryFromDate}
- style="min-width: 200px" class="inputFont"></lightning-input>
- <div class="slds-form-element__label searchName">
-  鍒�
- </div>
- <lightning-input type="date" variant="label-hidden" label="鍒�"
- onchange={dataChange} data-field="deliveryToDate" value={deliveryToDate}
- style="min-width: 200px" class="inputFont"></lightning-input>
- </div>
- </div>
- </lightning-layout-item>
+ <lightning-layout multiple-rows>
+ <lightning-layout-item size="6">
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label searchName"
+ >
+ 鍑哄簱鏃� 浠�
+ </div>
+ <lightning-input
+ type="date"
+ variant="label-hidden"
+ label="鍑哄簱鏃� 浠�"
+ onchange={dataChange}
+ data-field="deliveryFromDate"
+ value={deliveryFromDate}
+ class="inputFont"
+ style="max-width: 150px"
+ ></lightning-input>
+ </div>
+ </lightning-layout-item>
- <lightning-layout-item size="3" style="margin-left: -80px;">
- <div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label searchName">
- 鍑哄簱鍗曞彿
- </div>
- <lightning-input variant="label-hidden" label="鍑哄簱鍗曞彿" onchange={dataChange}
- data-field="deliveryOrderNo" value={deliveryOrderNo}
- style="min-width: 215px" class="inputFont"></lightning-input>
- </div>
+ <lightning-layout-item size="6">
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label searchName"
+ >
+ 鍒�
+ </div>
+ <lightning-input
+ type="date"
+ variant="label-hidden"
+ label="鍒�"
+ onchange={dataChange}
+ data-field="deliveryToDate"
+ value={deliveryToDate}
+ class="inputFont"
+ style="max-width: 150px"
+ ></lightning-input>
+ </div>
+ </lightning-layout-item>
+ </lightning-layout>
</div>
</lightning-layout-item>
<lightning-layout-item size="3">
<div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label searchName">
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label searchName"
+ >
+ 鍑哄簱鍗曞彿
+ </div>
+ <lightning-input
+ variant="label-hidden"
+ label="鍑哄簱鍗曞彿"
+ onchange={dataChange}
+ data-field="deliveryOrderNo"
+ value={deliveryOrderNo}
+ class="inputFont"
+ style="max-width: 150px"
+ ></lightning-input>
+ </div>
+ </div>
+ </lightning-layout-item>
+
+ <lightning-layout-item>
+ <div class="slds-text-align_center">
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label searchName"
+ >
瀹㈡埛鍚�
</div>
- <lightning-input variant="label-hidden" label="瀹㈡埛鍚�" onchange={dataChange}
- data-field="contactName" value={contactName} style="min-width: 215px"
- class="inputFont"></lightning-input>
+ <lightning-input
+ variant="label-hidden"
+ label="瀹㈡埛鍚�"
+ onchange={dataChange}
+ data-field="contactName"
+ value={contactName}
+ class="inputFont"
+ style="max-width: 150px"
+ ></lightning-input>
</div>
</div>
</lightning-layout-item>
</lightning-layout>
- <lightning-layout multiple-rows style="margin-top: 20px">
+ <lightning-layout
+ multiple-rows
+ style="margin-top: 20px"
+ >
<lightning-layout-item size="6">
- <div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <!-- <div class="slds-form-element__label searchName" style="visibility: hidden;">
- 鍑哄簱鏃� 浠�</div> -->
+ <lightning-layout multiple-rows>
+ <lightning-layout-item size="6">
<button
- class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
- onclick={searchConsumableorderdetailsJs} style="width: 200px;">
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ onclick={searchConsumableorderdetailsJs}
+ style="min-width: 180px"
+ >
杩樻病鍑哄簱鐨勫嚭搴撳崟
</button>
+ </lightning-layout-item>
- <div class="slds-form-element__label searchName" style="visibility: hidden">
- 鍑哄簱鏃� 浠�
- </div>
- <div class="slds-form-element__label searchName" style="visibility: hidden">
-  鍒�
- </div>
+ <lightning-layout-item size="6">
<button
- class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
- onclick={searchOrderInstatusJs} style="width: 215px;margin-left: 4px;">
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ onclick={searchOrderInstatusJs}
+ style="min-width: 215px"
+ >
宸插嚭搴撴湭寮�绁ㄧ殑鍑哄簱鍗�
</button>
- </div>
- </div>
- </lightning-layout-item>
-
- <lightning-layout-item size="3" style="margin-left: -80px;">
- <div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label searchName" style="visibility: hidden">
- 鍑哄簱鍗曞彿
- </div>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
- onclick={searchConsumableorFinishJs} style="width: 215px">
- 宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗�
- </button>
- </div>
- </div>
+ </lightning-layout-item>
+ </lightning-layout>
</lightning-layout-item>
<lightning-layout-item size="3">
- <div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label searchName" style="visibility: hidden">
- 瀹㈡埛鍚�
- </div>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
- onclick={clearJs} style="width: 215px">
- 娓呯┖
- </button>
- </div>
- </div>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ onclick={searchConsumableorFinishJs}
+ style="min-width: 225px"
+ >
+ 宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗�
+ </button>
</lightning-layout-item>
- <!-- <lightning-layout-item size="5">
- <div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label searchName" style="visibility: hidden;">
- 鍑哄簱鏃� 浠�</div>
- <lightning-input type="date" variant="label-hidden" label="鍑哄簱鏃� 浠�"
- onchange={dataChange} data-field="deliveryFromDate" value={deliveryFromDate}
- style="min-width: 200px;visibility: hidden;"></lightning-input>
-
- <div class="slds-form-element__label searchName" style="visibility: hidden;">
-  鍒�
- </div>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorderWidth"
- onclick={searchConsumableorderdetailsJs}>杩樻病鍑哄簱鐨勫嚭搴撳崟</button>
- </div>
- </div>
+ <lightning-layout-item>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ onclick={clearJs}
+ style="width: 206px"
+ >
+ 娓呯┖
+ </button>
</lightning-layout-item>
- <lightning-layout-item size="3">
- <div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label searchName" style="visibility: hidden;">
- 鍑哄簱鍗曞彿</div>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorderWidth"
- onclick={searchOrderInstatusJs} style="width: 215px;">宸插嚭搴撴湭寮�绁ㄧ殑鍑哄簱鍗�</button>
- </div>
- </div>
- </lightning-layout-item>
- <lightning-layout-item size="3">
- <div class="slds-text-align_center">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label searchName" style="visibility: hidden;">瀹㈡埛鍚�
- </div>
- <button
- class="slds-button slds-button_neutral slds-button_stretch lexBorderWidth"
- onclick={searchConsumableorFinishJs}
- style="width: 215px;">宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗�</button>
- </div>
- </div>
- </lightning-layout-item>
- <lightning-layout-item size="1">
- <div class="slds-grid slds-grid_vertical-align-center">
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorderWidth"
- onclick={clearJs} style="width: 80px;">娓呯┖</button>
- </div>
- </lightning-layout-item> -->
-
- <!-- <div class="slds-m-top_small slds-m-bottom_medium">
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorderWidth lexBorder"
- onclick={searchConsumableorderdetailsJs}>杩樻病鍑哄簱鐨勫嚭搴撳崟</button>
- 聽 <button class="slds-button slds-button_neutral slds-button_stretch lexBorderWidth lexBorder buttonMarginLeft"
- onclick={searchOrderInstatusJs} style="width: 215px;">宸插嚭搴撴湭寮�绁ㄧ殑鍑哄簱鍗�</button>
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorderWidth lexBorder buttonMarginLeft"
- onclick={searchConsumableorFinishJs} style="width: 215px;">宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗�</button>
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorderWidth lexBorder buttonMarginLeft"
- onclick={clearJs} >娓呯┖</button>
- </div> -->
</lightning-layout>
</div>
</div>
@@ -237,7 +231,22 @@
<div class="borderCss">
<template if:true={isShowSpinner}>
- <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
+ <div class="slds-spinner_container">
+ 聽 聽 聽 聽 聽 聽
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ 聽 聽 聽 聽 聽 聽 聽 聽
+ <span class="slds-assistive-text">Loading</span> 聽 聽
+ 聽 聽 聽 聽 聽 聽
+ <div class="slds-spinner__dot-a"></div>
+ 聽 聽 聽 聽 聽 聽 聽 聽
+ <div class="slds-spinner__dot-b"></div>
+ 聽 聽 聽 聽
+ </div>
+ 聽 聽 聽 聽
+ </div>
</template>
<div class="headerDorderCss">
<lightning-layout>
@@ -250,13 +259,21 @@
</div>
<template if:true={showTable}>
<div style="padding: 7px; height: 500px">
- <lightning-datatable key-field="id" data={data} columns={columns} hide-checkbox-column
- default-sort-direction={defaultSortDirection} sorted-direction={sortDirection}
- sorted-by={sortedBy} onsort={onHandleSort} class="wrapped-header-datatable">
+ <lightning-datatable
+ key-field="id"
+ data={data}
+ columns={columns}
+ hide-checkbox-column
+ default-sort-direction={defaultSortDirection}
+ sorted-direction={sortDirection}
+ sorted-by={sortedBy}
+ onsort={onHandleSort}
+ class="wrapped-header-datatable"
+ >
</lightning-datatable>
</div>
</template>
</div>
</div>
</div>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js b/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js
index 0d98bf7..80abe62 100644
--- a/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js
+++ b/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js
@@ -1,29 +1,29 @@
import { LightningElement, wire, api, track } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
-import init from '@salesforce/apex/LexSaleAndDeliveryController.init';//cleanUp
+import init from '@salesforce/apex/LexSaleAndDeliveryController.init'; //cleanUp
import cleanUp from '@salesforce/apex/LexSaleAndDeliveryController.cleanUp';
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import searchOrderInstatus from '@salesforce/apex/LexSaleAndDeliveryController.searchOrderInstatus';
import searchConsumableorderdetails from '@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorderdetails';
import searchConsumableorFinish from '@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorFinish';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
const columns = [
{
label: '鍑哄簱鏃�',
fieldName: 'Outbound_Date__c',
type: 'date',
- initialWidth: 130,
hideDefaultActions: true,
- sortable: true
+ sortable: true,
+ initialWidth: 180,
+ wrapText: true
},
{
label: '鍑哄簱鍗曞彿',
fieldName: 'url',
type: 'url',
- initialWidth: 175,
typeAttributes: {
label: {
fieldName: 'Name'
@@ -31,8 +31,8 @@
target: '_blank'
},
hideDefaultActions: true,
- initialWidth: 225,
- sortable: true
+ sortable: true,
+ wrapText: true
},
{
label: '瀹㈡埛鍚�',
@@ -45,50 +45,57 @@
label: '绉戝',
fieldName: 'Order_ForCustomerText__c',
hideDefaultActions: true,
- initialWidth: 120
+ initialWidth: 100,
+ wrapText: true
},
{
label: '鍑哄簱鍗曠姸鎬�',
fieldName: 'SummonsStatus_c__c',
hideDefaultActions: true,
+ initialWidth: 100,
sortable: true,
- initialWidth: 100
+ wrapText: true
},
{
label: '寮�绁ㄧ姸鎬�',
fieldName: 'Billed_Status__c',
hideDefaultActions: true,
+ initialWidth: 100,
sortable: true,
- initialWidth: 100
+ wrapText: true
},
{
label: '鏈彂绁ㄩ噾棰�(鍏�)',
fieldName: 'InvoiceNotPro_money__c',
hideDefaultActions: true,
- type: "number",
+ initialWidth: 125,
+ type: 'number',
typeAttributes: {
- minimumFractionDigits: 2,
+ minimumFractionDigits: 2
},
- initialWidth: 150
+ wrapText: true
},
{
label: '鍒涘缓鏃ユ湡',
fieldName: 'CreatedDate',
hideDefaultActions: true,
sortable: true,
- type: "date",
+ wrapText: true,
+ initialWidth: 180,
+ type: 'date',
typeAttributes: {
- timeZone: "Asia/Shanghai",
- day: "numeric",
- month: "numeric",
- year: "numeric",
- hour: "2-digit",
- minute: "2-digit"
- },
- initialWidth: 200
+ timeZone: 'Asia/Shanghai',
+ day: 'numeric',
+ month: 'numeric',
+ year: 'numeric',
+ hour: '2-digit',
+ minute: '2-digit'
+ }
}
];
-export default class LexSaleAndDelivery extends NavigationMixin(LightningElement) {
+export default class LexSaleAndDelivery extends NavigationMixin(
+ LightningElement
+) {
columns = columns;
@track isShowSpinner = true;
@track message = '';
@@ -109,49 +116,48 @@
sortDirection = 'asc';
sortedBy;
-
stylesLoaded = false;
renderedCallback() {
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
connectedCallback() {
- init().then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log('r = ' + JSON.stringify(r));
- if (r.status == 'Success') {
- this.userinfoId = r.entity.userinfoId;
- this.accountid = r.entity.accountid;
- this.agencyProType = r.entity.agencyProType;
- this.userWorkLocation = r.entity.userWorkLocation;
- this.data = r.entity.raesList;
- for (var i in this.data) {
- this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
+ init()
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.userinfoId = r.entity.userinfoId;
+ this.accountid = r.entity.accountid;
+ this.agencyProType = r.entity.agencyProType;
+ this.userWorkLocation = r.entity.userWorkLocation;
+ this.data = r.entity.raesList;
+ for (var i in this.data) {
+ this.data[i]['url'] =
+ '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
+ }
+ console.log('this.data = ' + JSON.stringify(this.data));
+ this.isShowSpinner = false;
+ this.showTable = true;
+ } else {
+ console.log('r = ' + JSON.stringify(r));
+ this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
}
- console.log('this.data = ' + JSON.stringify(this.data));
- this.isShowSpinner = false;
- this.showTable = true;
-
- } else {
- console.log('r = ' + JSON.stringify(r))
- this.showMyToast('鍒濆鍖栧け璐�', r.msg,'Error');
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error))
- this.showMyToast('閿欒', '鍒濆鍖栧け璐�','Error');
- })
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error');
+ });
}
-
-
//鏂板缓鍑哄簱鍗�
neworderhead() {
@@ -176,29 +182,32 @@
userWorkLocation: this.userWorkLocation,
category1: this.deliveryOrderNo,
category2: this.contactName
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log('r = ' + JSON.stringify(r));
- if (r.status == 'Success') {
- this.data = r.entity.raesList;
- for (var i in this.data) {
- this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
- }
- this.message = r.msg;
- if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
- this.showMyToast('鎼滅储澶辫触', this.message,'Error');
- } else {
- this.showMyToast('鎼滅储鎴愬姛', this.message,'Success');
- }
- this.isShowSpinner = false;
- //this.isCssLoaded = true
- this.showTable = true;
- } else {
- this.showMyToast('閿欒', r.msg,'Error');
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error))
})
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.data = r.entity.raesList;
+ for (var i in this.data) {
+ this.data[i]['url'] =
+ '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
+ }
+ this.message = r.msg;
+ if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
+ this.showMyToast('鎼滅储澶辫触', this.message, 'Error');
+ } else {
+ this.showMyToast('鎼滅储鎴愬姛', this.message, 'Success');
+ }
+ this.isShowSpinner = false;
+ //this.isCssLoaded = true
+ this.showTable = true;
+ } else {
+ this.showMyToast('閿欒', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
}
//杩樻病鍑哄簱鐨勫嚭搴撳崟
@@ -216,29 +225,36 @@
userWorkLocation: this.userWorkLocation,
category1: this.deliveryOrderNo,
category2: this.contactName
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log('r = ' + JSON.stringify(r));
- if (r.status == 'Success') {
- this.data = r.entity.raesList;
- for (var i in this.data) {
- this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
- }
- this.message = r.msg;
- if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
- this.showMyToast('鎼滅储澶辫触', this.message,'Error');
- } else {
- this.showMyToast('鎼滅储鎴愬姛', this.message,'Success');
- }
- this.isShowSpinner = false;
- this.showTable = true;
- } else {
- this.showMyToast('鎼滅储澶辫触', r.msg,'Error');
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error))
- this.showMyToast('鎼滅储澶辫触', '鎼滅储杩樻病鍑哄簱鐨勫嚭搴撳崟鍑洪敊','Error');
})
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.data = r.entity.raesList;
+ for (var i in this.data) {
+ this.data[i]['url'] =
+ '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
+ }
+ this.message = r.msg;
+ if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
+ this.showMyToast('鎼滅储澶辫触', this.message, 'Error');
+ } else {
+ this.showMyToast('鎼滅储鎴愬姛', this.message, 'Success');
+ }
+ this.isShowSpinner = false;
+ this.showTable = true;
+ } else {
+ this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showMyToast(
+ '鎼滅储澶辫触',
+ '鎼滅储杩樻病鍑哄簱鐨勫嚭搴撳崟鍑洪敊',
+ 'Error'
+ );
+ });
}
//宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗�
@@ -254,29 +270,36 @@
userWorkLocation: this.userWorkLocation,
category1: this.deliveryOrderNo,
category2: this.contactName
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log('r = ' + JSON.stringify(r));
- if (r.status == 'Success') {
- this.data = r.entity.raesList;
- for (var i in this.data) {
- this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
- }
- this.message = r.msg;
- if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
- this.showMyToast('鎼滅储澶辫触', this.message,'Error');
- } else {
- this.showMyToast('鎼滅储鎴愬姛', this.message,'Success');
- }
- this.isShowSpinner = false;
- this.showTable = true;
- } else {
- this.showMyToast('鎼滅储澶辫触', r.msg,'Error');
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error))
- this.showMyToast('鎼滅储澶辫触', '鎼滅储宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗曞嚭閿�','Error');
})
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.data = r.entity.raesList;
+ for (var i in this.data) {
+ this.data[i]['url'] =
+ '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
+ }
+ this.message = r.msg;
+ if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
+ this.showMyToast('鎼滅储澶辫触', this.message, 'Error');
+ } else {
+ this.showMyToast('鎼滅储鎴愬姛', this.message, 'Success');
+ }
+ this.isShowSpinner = false;
+ this.showTable = true;
+ } else {
+ this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showMyToast(
+ '鎼滅储澶辫触',
+ '鎼滅储宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗曞嚭閿�',
+ 'Error'
+ );
+ });
}
//娓呯┖
@@ -290,30 +313,33 @@
cleanUp({
accountid: this.accountid,
agencyProType: this.agencyProType,
- userWorkLocation: this.userWorkLocation,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log('r = ' + JSON.stringify(r));
- if (r.status == 'Success') {
- this.data = r.entity.raesList;
- for (var i in this.data) {
- this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
- }
- this.message = r.msg;
- if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
- this.showMyToast('鎼滅储澶辫触', this.message,'Error');
- } else {
- this.showMyToast('鎼滅储鎴愬姛', this.message,'Success');
- }
- this.isShowSpinner = false;
- this.showTable = true;
- } else {
- this.showMyToast('鎼滅储澶辫触', r.msg,'Error');
- }
- }).catch((error) => {
- console.log('error = ' + JSON.stringify(error))
- this.showMyToast('鎼滅储澶辫触', '鎼滅储澶辫触','Error');
+ userWorkLocation: this.userWorkLocation
})
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.data = r.entity.raesList;
+ for (var i in this.data) {
+ this.data[i]['url'] =
+ '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
+ }
+ this.message = r.msg;
+ if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
+ this.showMyToast('鎼滅储澶辫触', this.message, 'Error');
+ } else {
+ this.showMyToast('鎼滅储鎴愬姛', this.message, 'Success');
+ }
+ this.isShowSpinner = false;
+ this.showTable = true;
+ } else {
+ this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showMyToast('鎼滅储澶辫触', '鎼滅储澶辫触', 'Error');
+ });
}
//Capture the event fired from the paginator component
@@ -340,11 +366,11 @@
sortBy(field, reverse, primer) {
const key = primer
? function (x) {
- return primer(x[field]);
- }
+ return primer(x[field]);
+ }
: function (x) {
- return x[field];
- };
+ return x[field];
+ };
return function (a, b) {
a = key(a);
@@ -353,27 +379,25 @@
};
}
-
dataChange(event) {
- let fieldName = event.target.getAttribute("data-field");
+ let fieldName = event.target.getAttribute('data-field');
let value = event.detail.value;
switch (fieldName) {
case 'deliveryFromDate':
this.deliveryFromDate = value;
- break
+ break;
case 'deliveryToDate':
this.deliveryToDate = value;
- break
+ break;
case 'deliveryOrderNo':
this.deliveryOrderNo = value;
- break
+ break;
case 'contactName':
this.contactName = value;
- break
+ break;
default:
console.log('no data');
}
-
}
editProductLimit() {
@@ -396,15 +420,22 @@
iconName = 'utility:error';
}
if (message != '') {
- content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
} else {
content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
}
@track isModalOpen = false;
openModal() {
this.isModalOpen = true;
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css
index 3e12bf1..c28189d 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css
@@ -1,24 +1,24 @@
@import 'c/lexCssUtility';
-.outerBorderCss{
- border: 1px solid #D4D4D4;
- border-radius : 5px;
- border-top : 3px solid #565959;
+.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;
+.borderCss {
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ border-top: 3px solid #565959;
}
-.headerDorderCss{
+.headerDorderCss {
border-top: 1px solid #565959;
- border-bottom: 1px solid #D4D4D4;
- padding:3px;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
}
-.centerCss{
+.centerCss {
text-align: center;
}
-.centerCss .left{
+.centerCss .left {
margin-left: 100px;
}
.datatable {
@@ -31,4 +31,13 @@
:host {
--lwc-inputStaticFontSize: 16px;
--lwc-formLabelFontSize: 16px;
-}
\ No newline at end of file
+}
+
+.fileUpload {
+ font-size: 16px;
+ --lwc-formLabelFontSize: 16px;
+}
+
+.disable-row-selection .slds-is-selected {
+ outline: none !important;
+}
diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
index 8e43278..75d6814 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
@@ -3,57 +3,151 @@
<template>
<c-common-toast></c-common-toast>
<template if:true={isShowSpinner}>
- <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
+ <div class="slds-spinner_container">
+ 聽 聽 聽 聽 聽 聽
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ 聽 聽 聽 聽 聽 聽 聽 聽
+ <span class="slds-assistive-text">Loading</span> 聽 聽 聽 聽 聽 聽 聽 聽
+ <div class="slds-spinner__dot-a"></div>
+ 聽 聽 聽 聽 聽 聽 聽 聽
+ <div class="slds-spinner__dot-b"></div>
+ 聽 聽 聽 聽
+ </div>
+ 聽 聽 聽 聽
+ </div>
</template>
<!-- 鎼滅储瀹㈡埛鍚� -->
<template if:true={isModalOpen}>
- <!-- Modal/Popup Box LWC starts here -->
- <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true"
- aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open">
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-01"
+ aria-modal="true"
+ aria-describedby="modal-content-id-1"
+ class="slds-modal slds-fade-in-open slds-modal_medium"
+ style="border: 1px solid #d4d4d4"
+ >
<div class="slds-modal__container">
- <!-- Modal/Popup Box LWC header here -->
- <header class="slds-modal__header">
- <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
- title="Close" onclick={closeModal}>
- <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse"
- size="small"></lightning-icon>
+ <header
+ class="slds-modal__header"
+ style="background-color: #f3f3f3"
+ >
+ <button
+ style=""
+ class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+ title="Close"
+ onclick={closeModal}
+ >
+ <lightning-icon
+ icon-name="utility:close"
+ alternative-text="close"
+ variant="inverse"
+ size="small"
+ ></lightning-icon>
<span class="slds-assistive-text">Close</span>
</button>
- <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">
+ <h2
+ id="modal-heading-01"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
缁忛攢鍟嗗尰闄㈡绱�
</h2>
</header>
- <!-- Modal/Popup Box LWC body starts here -->
- <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
- <lightning-layout>
- <lightning-layout-item flexibility="auto" padding="around-small">
- <lightning-input type="text" label="鍖婚櫌鍚嶇О" onchange={dataChange}
- data-field="searchHospitalName" value={searchHospitalName} variant="label-inline"
- class="inputFont"></lightning-input>
- </lightning-layout-item>
- <lightning-layout-item flexibility="auto" padding="around-small" style="padding-top: 16px;">
- <!-- <lightning-button label="妫�绱�" onclick={searchHospital}></lightning-button> -->
- <button class="slds-button slds-button_neutral" onclick={searchHospital}
- title="searchHospital" style="font-size: 16px;">
- 妫�绱�
- </button>
- </lightning-layout-item>
- </lightning-layout>
-
- <div class="tableColumn">
- <lightning-layout class="datatable" style="height: 250px;">
- <lightning-datatable class="datatabel slds-border_top wrapped-header-datatable"
- key-field="id" data={hospitalList} columns={hospitalColumns} hide-checkbox-column="true"
- onrowaction={searchHandleRowAction}>
+ <div
+ class="slds-modal__content slds-p-around_medium"
+ id="modal-content-id-1"
+ style="border: 1px solid #f3f3f3"
+ >
+ <table style="width: 100%">
+ <tbody>
+ <tr>
+ <td style="width: 74px">
+ <div
+ style="
+ color: #696969;
+ font-size: 16px;
+ text-align: left;
+ "
+ >
+ 鍖婚櫌鍚嶇О
+ </div>
+ </td>
+ <td style="width: 60%">
+ <lightning-input
+ class="inputFont"
+ label="鍖婚櫌鍚嶇О"
+ variant="label-hidden"
+ placeholder="璇疯緭鍏ュ尰闄㈠悕绉�"
+ value={searchHospitalName}
+ data-field="searchHospitalName"
+ onchange={dataChange}
+ ></lightning-input>
+ </td>
+ <td style="width: 10px"></td>
+ <td>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="height: 32px"
+ label="鎼滅储"
+ onclick={searchHospital}
+ >
+ 鎼滅储
+ </button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <p style="height: 20px"></p>
+ <!-- <p>宸查�夋嫨鍖婚櫌锛歿chooseHospital}</p> -->
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
+ <lightning-layout>
+ <lightning-layout-item padding="around-small">
+ <p style="font-size: 18px">
+ <strong>鎼滅储缁撴灉</strong>
+ </p>
+ </lightning-layout-item>
+ </lightning-layout>
+ <!-- <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p> -->
+ </div>
+ <div class="myTable" style="padding: 10px">
+ <!-- <lightning-datatable class="wrapped-header-datatable" key-field="id"
+ hide-checkbox-column="true" data={hospitalList} columns={hosCols}
+ onrowaction={chooseHos}></lightning-datatable> -->
+ <lightning-datatable
+ class="datatabel slds-border_top wrapped-header-datatable"
+ key-field="id"
+ data={hospitalList}
+ columns={hospitalColumns}
+ hide-checkbox-column="true"
+ onrowaction={searchHandleRowAction}
+ >
</lightning-datatable>
- </lightning-layout>
+ </div>
</div>
</div>
- <!-- Modal/Popup Box LWC footer starts here -->
<footer class="slds-modal__footer">
- <button class="slds-button slds-button_neutral" onclick={closeModal} title="Cancel"
- style="font-size: 16px;">
- 鍏抽棴
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ label="鍙栨秷"
+ onclick={closeModal}
+ >
+ 鍙栨秷
</button>
</footer>
</div>
@@ -63,31 +157,65 @@
<!-- 涓婁紶闄勪欢寮圭獥 -->
<template if:true={showAttPop}>
- <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true"
- aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small"
- style="border: 1px solid #D4D4D4;">
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-01"
+ aria-modal="true"
+ aria-describedby="modal-content-id-1"
+ class="slds-modal slds-fade-in-open slds-modal_small"
+ style="border: 1px solid #d4d4d4"
+ >
<template if:true={showPopSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <lightning-spinner
+ size="medium"
+ variant="brand"
+ ></lightning-spinner>
</template>
<div class="slds-modal__container">
- <header class="slds-modal__header" style="background-color: #F3F3F3;">
- <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
- title="Close" onclick={closePop}>
- <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse"
- size="small"></lightning-icon>
+ <header
+ class="slds-modal__header"
+ style="background-color: #f3f3f3"
+ >
+ <button
+ style=""
+ class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+ title="Close"
+ onclick={closePop}
+ >
+ <lightning-icon
+ icon-name="utility:close"
+ alternative-text="close"
+ variant="inverse"
+ size="small"
+ ></lightning-icon>
<span class="slds-assistive-text">Close</span>
</button>
- <h2 id="modal-heading-02" class="slds-text-heading_medium slds-hyphenate">涓婁紶闄勪欢</h2>
+ <h2
+ id="modal-heading-02"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
+ 涓婁紶闄勪欢
+ </h2>
</header>
- <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-2"
- style="border: 1px solid #F3F3F3;">
+ <div
+ class="slds-modal__content slds-p-around_medium"
+ id="modal-content-id-2"
+ style="border: 1px solid #f3f3f3"
+ >
<div class="slds-m-top_medium slds-m-bottom_x-large">
<div class="slds-p-around_medium lgc-bg">
- <lightning-input type="file" label="闄勪欢涓婁紶"
+ <lightning-input
+ class="fileUpload"
+ type="file"
+ label="闄勪欢涓婁紶"
accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf"
- onchange={attChange}></lightning-input>
+ onchange={attChange}
+ ></lightning-input>
</div>
- <p>宸查�夋嫨鏂囦欢锛歿fileName}
+ <p style="font-size: 16px">
+ 宸查�夋嫨鏂囦欢锛歿fileName}
+
<template if:true={attDelBtn}>
<a onclick={removeAtt}>绉婚櫎</a>
</template>
@@ -95,10 +223,26 @@
</div>
</div>
<footer class="slds-modal__footer">
- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷"
+ <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷"
onclick={closePop}></lightning-button>
<lightning-button style="margin-left: 10px;" variant="neutral" label="涓婁紶"
- onclick={handleSave}></lightning-button>
+ onclick={handleSave}></lightning-button> -->
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ style="margin-left: 10px"
+ label="鍙栨秷"
+ onclick={closePop}
+ >
+ 鍙栨秷
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ style="margin-left: 10px"
+ label="涓婁紶"
+ onclick={handleSave}
+ >
+ 涓婁紶
+ </button>
</footer>
</div>
</section>
@@ -137,7 +281,10 @@
style="width: 150px"></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={saveConfirmJs}>淇濆瓨</button>
+ onclick={saveConfirmJs}
+ >
+ 淇濆瓨
+ </button>
</template>
</td>
<td colspan="4">
@@ -155,7 +302,11 @@
style="width: 150px" disabled={isEditDisabled}></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={EditConsumable} disabled={isEditDisabled}>缂栬緫鍑哄簱鍗�</button>
+ onclick={EditConsumable}
+ disabled={isEditDisabled}
+ >
+ 缂栬緫鍑哄簱鍗�
+ </button>
</template>
</td>
@@ -165,7 +316,11 @@
style="width: 150px;" disabled={isDeliveryDisabled}></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={GoodsDeliveryJs} disabled={isDeliveryDisabled}>鍑鸿揣/閿�鍞�</button>
+ onclick={GoodsDeliveryJs}
+ disabled={isDeliveryDisabled}
+ >
+ 鍑鸿揣/閿�鍞�
+ </button>
</template>
</td>
@@ -175,7 +330,11 @@
disabled={isOpenToInvoiceDisabled}></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={openToInvoiceJs} disabled={isOpenToInvoiceDisabled}>寮�绁�</button>
+ onclick={openToInvoiceJs}
+ disabled={isOpenToInvoiceDisabled}
+ >
+ 寮�绁�
+ </button>
</template>
</td>
@@ -183,11 +342,14 @@
<template if:false={EditAble}>
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={uploadOrder}>涓婁紶闄勪欢</button>
+ onclick={uploadOrder}
+ >
+ 涓婁紶闄勪欢
+ </button>
</template>
</td>
</tr>
- <tr style="height: 5px;"></tr>
+ <tr style="height: 5px"></tr>
<tr>
<td></td>
<td>
@@ -196,28 +358,38 @@
disabled={isPraseToPDFDisabled}></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={PraseToPDFJs} disabled={isPraseToPDFDisabled}>鎵撳嵃鎸囩ず鍗�</button>
+ onclick={PraseToPDFJs}
+ disabled={isPraseToPDFDisabled}
+ >
+ 鎵撳嵃鎸囩ず鍗�
+ </button>
</template>
</td>
<td>
-
<template if:true={isOpenReportShow}>
<!-- <lightning-button label="鏄剧ず鏄庣粏 " onclick={openReportJs}
style="width: 150px" disabled={isOpenReportDisabled}></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={openReportJs} disabled={isOpenReportDisabled}>鏄剧ず鏄庣粏</button>
+ onclick={openReportJs}
+ disabled={isOpenReportDisabled}
+ >
+ 鏄剧ず鏄庣粏
+ </button>
</template>
</td>
<td>
-
<template if:true={isDeleteShow}>
<!-- <lightning-button label="鍒犻櫎" onclick={DeleteConsumable} style="width: 150px"
disabled={isDeleteDisabled}></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={DeleteConsumable} disabled={isDeleteDisabled}>鍒犻櫎</button>
+ onclick={DeleteConsumable}
+ disabled={isDeleteDisabled}
+ >
+ 鍒犻櫎
+ </button>
</template>
</td>
<td></td>
@@ -243,219 +415,402 @@
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
<!-- SummonsStatus_c__c == '浠锋牸鏈畾' -->
- <template if:true={summonsStatusPriceNotDetermined}>
- <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
- onload={handleLoad}>
+ <template
+ if:true={summonsStatusPriceNotDetermined}
+ >
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={cocId}
+ onload={handleLoad}
+ >
<!-- 鍑哄簱鍗曞彿 鍑哄簱鍗曠姸鎬� -->
<lightning-layout multiple-rows="true">
<template if:true={isSummonsFlag}>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-output-field field-name="Name"
- class="hehe-layoutItem"></lightning-output-field>
- </lightning-layout-item>
-
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item size="5">
<lightning-output-field
- field-name="SummonsStatus_c__c"></lightning-output-field>
+ field-name="Name"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-output-field
+ field-name="SummonsStatus_c__c"
+ ></lightning-output-field>
+ </lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</template>
</lightning-layout>
<!-- 鐩殑 寮�绁ㄧ姸鎬� -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-output-field field-name="SummonsForDirction__c"
- class="searchName"></lightning-output-field>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-output-field
+ field-name="SummonsForDirction__c"
+ class="searchName"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-output-field field-name="Billed_Status__c"
- class="searchName"></lightning-output-field>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-output-field
+ field-name="Billed_Status__c"
+ class="searchName"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 浜岀骇缁忛攢鍟� -->
- <template if:true={isSummonsForDirctionTwoShow}>
- <lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <template
+ if:true={isSummonsForDirctionTwoShow}
+ >
+ <lightning-layout
+ multiple-rows="true"
+ >
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="Order_Dealer_Info__c"></lightning-output-field>
+ field-name="Order_Dealer_Info__c"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
</template>
<!-- 瀹㈡埛鍚� 鍙戠エ-->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-output-field class="hideHelpText"
- field-name="ShipmentAccount__c"></lightning-output-field>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-output-field
+ class="hideHelpText"
+ field-name="ShipmentAccount__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-input-field data-field={ConInvoice_Code__c}
- onchange={invoiceChange} field-name="ConInvoice_Code__c"
- class="inputFont"></lightning-input-field>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-input-field
+ data-field={ConInvoice_Code__c}
+ onchange={invoiceChange}
+ field-name="ConInvoice_Code__c"
+ class="inputFont"
+ ></lightning-input-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 绉戝 鍑哄簱閲戦 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="Order_ForCustomerText__c"></lightning-output-field>
+ field-name="Order_ForCustomerText__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
<lightning-output-field
- field-name="Shipment_total_amount__c"></lightning-output-field>
+ field-name="Shipment_total_amount__c"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 娌℃湁纭畾浠锋牸 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="NoConfirmedPrice__c"></lightning-output-field>
+ field-name="NoConfirmedPrice__c"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
</lightning-record-edit-form>
</template>
<!-- SummonsStatus_c__c != '浠锋牸鏈畾' -->
- <template if:false={summonsStatusPriceNotDetermined}>
- <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
- onsubmit={handleSubmit} onload={handleLoad}>
+ <template
+ if:false={summonsStatusPriceNotDetermined}
+ >
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={cocId}
+ onsubmit={handleSubmit}
+ onload={handleLoad}
+ >
<!-- 鍑哄簱鍗曞彿 鍑哄簱鍗曠姸鎬� -->
<lightning-layout multiple-rows="true">
<template if:true={isSummonsFlag}>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-output-field field-name="Name"></lightning-output-field>
- </lightning-layout-item>
-
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<lightning-output-field
- field-name="SummonsStatus_c__c"></lightning-output-field>
+ field-name="Name"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-output-field
+ field-name="SummonsStatus_c__c"
+ ></lightning-output-field>
+ </lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</template>
</lightning-layout>
<!-- 鐩殑 浜岀骇缁忛攢鍟� -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-input-field data-field="summonsForDirction"
- value={summonsForDirction} field-name="SummonsForDirction__c"
- required="true" onchange={ChangeDirction}
- class="inputFont"></lightning-input-field>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-input-field
+ data-field="summonsForDirction"
+ value={summonsForDirction}
+ field-name="SummonsForDirction__c"
+ required="true"
+ onchange={ChangeDirction}
+ class="inputFont"
+ ></lightning-input-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-combobox data-field="secondaryDistributor"
- name="secondaryDistributor" label="浜岀骇缁忛攢鍟�"
- value={secondaryDistributor} placeholder="璇烽�夋嫨..."
- options={secondaryDistributorOptions} variant="label-inline"
- onchange={dataChange} disabled={isDisabledSecondaryDistributor}
- class="inputFont"></lightning-combobox>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-combobox
+ data-field="secondaryDistributor"
+ name="secondaryDistributor"
+ label="浜岀骇缁忛攢鍟�"
+ value={secondaryDistributor}
+ placeholder="璇烽�夋嫨..."
+ options={secondaryDistributorOptions}
+ variant="label-inline"
+ onchange={dataChange}
+ disabled={isDisabledSecondaryDistributor}
+ class="inputFont"
+ ></lightning-combobox>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 瀹㈡埛鍚� 缁忛攢鍟嗗綍鍏� -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
<div
- class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
- <lightning-icon size="x-small"
+ class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"
+ >
+ <lightning-icon
+ size="x-small"
class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default"
- icon-name="utility:search"></lightning-icon>
- <lightning-input type="text" name="HospitalName" label="瀹㈡埛鍚�"
- value={HospitalName} variant="label-inline"
- onclick={searchHospitalNameModal} data-field="HospitalName"
- disabled={isDisabledHospitalName} onchange={clearAgencyI}
- class="inputFont"></lightning-input>
+ icon-name="utility:search"
+ ></lightning-icon>
+ <lightning-input
+ type="text"
+ name="HospitalName"
+ label="瀹㈡埛鍚�"
+ value={HospitalName}
+ variant="label-inline"
+ onclick={searchHospitalNameModal}
+ data-field="HospitalName"
+ disabled={isDisabledHospitalName}
+ onchange={clearAgencyI}
+ class="inputFont"
+ ></lightning-input>
</div>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <template if:true={isMutualTransferGoods}>
- <c-lex-lookup onsearch={handleSearch}
- onselectionchange={handleSelectionChange} label="缁忛攢鍟�(褰曞叆)"
- variant="label-inline" placeholder="鎼滅储缁忛攢鍟�"
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
+ <template
+ if:true={isMutualTransferGoods}
+ >
+ <c-lex-lookup
+ onsearch={handleSearch}
+ onselectionchange={handleSelectionChange}
+ label="缁忛攢鍟�(褰曞叆)"
+ variant="label-inline"
+ placeholder="鎼滅储缁忛攢鍟�"
onisdisabledfordealertext={isDisabledForDealerText}
- account-value={accountValue} onblur={vpClear2Delay}
- disabled={isDisabledForDealerText} class="inputFont">
+ account-value={accountValue}
+ onblur={vpClear2Delay}
+ disabled={isDisabledForDealerText}
+ class="inputFont"
+ >
</c-lex-lookup>
</template>
- <template if:false={isMutualTransferGoods}>
- <lightning-input type="text" name="Order_ForDealerText__c"
- label="缁忛攢鍟�(褰曞叆)" value={ForDealerText} onchange={dataChange}
+ <template
+ if:false={isMutualTransferGoods}
+ >
+ <lightning-input
+ type="text"
+ name="Order_ForDealerText__c"
+ label="缁忛攢鍟�(褰曞叆)"
+ value={ForDealerText}
+ onchange={dataChange}
data-field="Order_ForDealerText__c"
- disabled={isDisabledForDealerText} variant="label-inline"
- class="inputFont">
+ disabled={isDisabledForDealerText}
+ variant="label-inline"
+ class="inputFont"
+ >
</lightning-input>
</template>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 绉戝 鎬婚噾棰� -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-input-field onchange={dataChange}
- data-field="ForCustomerText" value={ForCustomerText}
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-input-field
+ onchange={dataChange}
+ data-field="ForCustomerText"
+ value={ForCustomerText}
field-name="Order_ForCustomerText__c"
disabled={isDisabledForCustomerText}
- class="inputFont"></lightning-input-field>
+ class="inputFont"
+ ></lightning-input-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-input type="text" name="sumPrice" label="鎬婚噾棰�"
- value={sumPrice} variant="label-inline" onchange={dataChange}
- data-field="sumPrice" readonly></lightning-input>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-input
+ type="text"
+ name="sumPrice"
+ label="鎬婚噾棰�"
+ value={sumPrice}
+ variant="label-inline"
+ onchange={dataChange}
+ data-field="sumPrice"
+ readonly
+ ></lightning-input>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 娌℃湁纭畾浠锋牸 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item class="hehe-layoutItem" size="4">
- <lightning-input-field value={NoConfirmedPrice}
- field-name="NoConfirmedPrice__c" data-field="NoConfirmedPrice"
- onchange={dataChange}></lightning-input-field>
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="5"
+ >
+ <lightning-input-field
+ value={NoConfirmedPrice}
+ field-name="NoConfirmedPrice__c"
+ data-field="NoConfirmedPrice"
+ onchange={dataChange}
+ ></lightning-input-field>
</lightning-layout-item>
</lightning-layout>
</lightning-record-edit-form>
@@ -480,100 +835,161 @@
<div style="padding: 7px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
- <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
- onload={handleLoad2}>
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={cocId}
+ onload={handleLoad2}
+ >
<!-- 鍑哄簱鍗曞彿 鍑哄簱鍗曠姸鎬� -->
<lightning-layout multiple-rows="true">
<template if:true={isSummonsFlag}>
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-output-field field-name="Name"
- class="hehe-layoutItem"></lightning-output-field>
+ <lightning-layout-item size="5">
+ <lightning-output-field
+ field-name="Name"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item size="4">
- <lightning-output-field field-name="SummonsStatus_c__c"
- class="hehe-layoutItem"></lightning-output-field>
+ <lightning-layout-item
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-output-field
+ field-name="SummonsStatus_c__c"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</template>
</lightning-layout>
<!-- 鐩殑 寮�绁ㄧ姸鎬� -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-output-field field-name="SummonsForDirction__c"
- class="hehe-layoutItem"></lightning-output-field>
+ <lightning-layout-item size="5">
+ <lightning-output-field
+ field-name="SummonsForDirction__c"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item size="4">
- <lightning-output-field field-name="Billed_Status__c"
- class="hehe-layoutItem"></lightning-output-field>
+ <lightning-layout-item
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-output-field
+ field-name="Billed_Status__c"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 浜岀骇缁忛攢鍟� -->
- <template if:true={isSummonsForDirctionTwoShow}>
+ <template
+ if:true={isSummonsForDirctionTwoShow}
+ >
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-output-field field-name="Order_Dealer_Info__c"
- class="hehe-layoutItem"></lightning-output-field>
+ <lightning-layout-item size="5">
+ <lightning-output-field
+ field-name="Order_Dealer_Info__c"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
</template>
<!-- 瀹㈡埛鍚� 鍙戠エ-->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item size="4" class="hehe-layoutItem">
- <lightning-output-field class="hideHelpText"
- field-name="ShipmentAccount__c"></lightning-output-field>
+ <lightning-layout-item
+ size="5"
+ class="hehe-layoutItem"
+ >
+ <lightning-output-field
+ class="hideHelpText"
+ field-name="ShipmentAccount__c"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
<template if:true={isConInvoiceShow}>
- <lightning-layout-item size="4">
- <lightning-input-field data-field={ConInvoice_Code__c}
- onchange={invoiceChange} field-name="ConInvoice_Code__c"
- class="hehe-layoutItem inputFont"></lightning-input-field>
+ <lightning-layout-item
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-input-field
+ data-field={ConInvoice_Code__c}
+ onchange={invoiceChange}
+ field-name="ConInvoice_Code__c"
+ class="hehe-layoutItem inputFont"
+ ></lightning-input-field>
</lightning-layout-item>
</template>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 绉戝 鍑哄簱閲戦 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-output-field field-name="Order_ForCustomerText__c"
- class="hehe-layoutItem"></lightning-output-field>
+ <lightning-layout-item size="5">
+ <lightning-output-field
+ field-name="Order_ForCustomerText__c"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</lightning-layout-item>
- <lightning-layout-item size="1"></lightning-layout-item>
-
- <lightning-layout-item size="4">
- <lightning-output-field field-name="Shipment_total_amount__c"
- class="hehe-layoutItem"></lightning-output-field>
+ <lightning-layout-item
+ size="5"
+ style="padding-left: 100px"
+ >
+ <lightning-output-field
+ field-name="Shipment_total_amount__c"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</lightning-layout-item>
+
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
</lightning-layout>
<!-- 娌℃湁纭畾浠锋牸 -->
<lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
- <lightning-layout-item size="4">
- <lightning-output-field field-name="NoConfirmedPrice__c"
- class="hehe-layoutItem"></lightning-output-field>
+ <lightning-layout-item size="5">
+ <lightning-output-field
+ field-name="NoConfirmedPrice__c"
+ class="hehe-layoutItem"
+ ></lightning-output-field>
</lightning-layout-item>
</lightning-layout>
@@ -582,31 +998,71 @@
<lightning-layout multiple-rows="true">
<lightning-layout-item size="1">
</lightning-layout-item>
- <lightning-layout-item size="11">
- <lightning-card class="attListTitle" variant="Narrow" title="闄勪欢鍒楄〃"
- icon-name="utility:attach">
-
- <lightning-layout slot="footer" multiple-rows="true">
- <template for:each={fileData} for:item="item" for:index="index">
- <lightning-layout-item padding="around-none" size="2"
+ <lightning-layout-item size="10">
+ <lightning-card
+ class="attListTitle"
+ variant="Narrow"
+ title="闄勪欢鍒楄〃"
+ icon-name="utility:attach"
+ >
+ <lightning-layout
+ slot="footer"
+ multiple-rows="true"
+ >
+ <template
+ for:each={fileData}
+ for:item="item"
+ for:index="index"
+ >
+ <lightning-layout-item
+ padding="around-none"
+ size="2"
key={item.recordId}
- style="text-align: left;padding:5px">
- <lightning-icon title={item.Title}
- style="margin-left: 20px;" icon-name="doctype:gform"
+ style="
+ text-align: left;
+ padding: 5px;
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ >
+ <lightning-icon
+ title={item.Title}
+ style="
+ margin-left: 20px;
+ "
+ icon-name="doctype:gform"
alternative-text={item.Title}
- size="large"></lightning-icon><br />
- <span title={item.Title}>
- {item.fileName}
- </span>
+ size="large"
+ ></lightning-icon
+ ><br />
+ <div
+ title={item.Title}
+ style="
+ width: 100px;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ "
+ >
+ {item.Title}
+ </div>
<p>
<!-- <a data-fileid ={item.documentId} onclick={previweAtt}> -->
- <a href={item.attUrl} target="_blank">
- 棰勮
- </a> 路
- <a href={item.downloadUrl}>
- 涓嬭浇
- </a> 路
- <a data-fileid={item.recordId} onclick={deleteAtt}>
+ <a
+ href={item.attUrl}
+ target="_blank"
+ >
+ 棰勮 </a
+ > 路
+ <a
+ href={item.downloadUrl}
+ >
+ 涓嬭浇 </a
+ > 路
+ <a
+ data-fileid={item.Id}
+ onclick={deleteAtt}
+ >
鍒犻櫎
</a>
</p>
@@ -618,7 +1074,6 @@
</lightning-layout-item>
</lightning-layout>
</template>
-
</lightning-record-edit-form>
</div>
</div>
@@ -628,72 +1083,308 @@
<!-- 妫�绱� -->
<template if:true={isSearchShow}>
<div class="borderCss">
- <div style="padding: 3px;height:110px;">
+ <div style="padding: 3px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
- <lightning-layout multiple-rows>
- <lightning-layout-item style="padding: 10px;" flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label">娑堣�楀搧鍚嶇О</div>
- <lightning-input type="text" name="consumableName" label="娑堣�楀搧鍚嶇О"
- value={consumableName} variant="label-hidden" onchange={dataChange}
- data-field="consumableName" class="inputFont"></lightning-input>
- </div>
-
- </lightning-layout-item>
- <lightning-layout-item style="padding: 10px;" flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label" style="width:80px">绗�3鍒嗙被</div>
- <lightning-combobox name="progress" label="绗�3鍒嗙被" value={Category3}
- variant="label-hidden" options={category3Options} onchange={dataChange}
- data-field="Category3" style="min-width: 160px;"
- class="inputFont"></lightning-combobox>
+ <lightning-layout
+ multiple-rows
+ style="margin-top: 10px"
+ >
+ <lightning-layout-item
+ style="padding-left: 10px"
+ flexibility="auto"
+ >
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ >
+ 娑堣�楀搧鍚嶇О
+ </div>
+ <lightning-input
+ type="text"
+ name="consumableName"
+ label="娑堣�楀搧鍚嶇О"
+ value={consumableName}
+ variant="label-hidden"
+ onchange={dataChange}
+ data-field="consumableName"
+ class="inputFont"
+ style="width: 150px"
+ ></lightning-input>
</div>
</lightning-layout-item>
- <lightning-layout-item style="padding: 10px;" flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label" style="width:80px">绗�4鍒嗙被</div>
- <lightning-combobox name="progress" label="绗�4鍒嗙被" value={Category4}
- variant="label-hidden" options={category4Options} onchange={dataChange}
- data-field="Category4" style="min-width: 160px;"
- class="inputFont"></lightning-combobox>
+ <lightning-layout-item flexibility="auto">
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ style="width: 80px"
+ >
+ 绗�3鍒嗙被
+ </div>
+ <lightning-combobox
+ name="progress"
+ label="绗�3鍒嗙被"
+ value={Category3}
+ variant="label-hidden"
+ options={category3Options}
+ onchange={dataChange}
+ data-field="Category3"
+ style="min-width: 120px"
+ class="inputFont"
+ ></lightning-combobox>
</div>
-
</lightning-layout-item>
- <lightning-layout-item style="padding: 10px;" flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label" style="width:80px">绗�5鍒嗙被</div>
- <lightning-combobox name="progress" label="绗�5鍒嗙被" value={Category5}
- variant="label-hidden" onchange={dataChange} data-field="Category5"
- options={category5Options} style="min-width: 160px;"
- class="inputFont"></lightning-combobox>
+ <lightning-layout-item flexibility="auto">
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ style="width: 80px"
+ >
+ 绗�4鍒嗙被
+ </div>
+ <lightning-combobox
+ name="progress"
+ label="绗�4鍒嗙被"
+ value={Category4}
+ variant="label-hidden"
+ options={category4Options}
+ onchange={dataChange}
+ data-field="Category4"
+ style="min-width: 120px"
+ class="inputFont"
+ ></lightning-combobox>
</div>
-
+ </lightning-layout-item>
+ <lightning-layout-item flexibility="auto">
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ style="width: 80px"
+ >
+ 绗�5鍒嗙被
+ </div>
+ <lightning-combobox
+ name="progress"
+ label="绗�5鍒嗙被"
+ value={Category5}
+ variant="label-hidden"
+ onchange={dataChange}
+ data-field="Category5"
+ options={category5Options}
+ style="min-width: 120px"
+ class="inputFont"
+ ></lightning-combobox>
+ </div>
</lightning-layout-item>
<template if:true={hasHosPro}>
- <lightning-layout-item style="padding: 10px;" flexibility="auto">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label">鍖婚櫌鐗逛环</div>
- <lightning-combobox name="progress" label="鍖婚櫌鐗逛环" value={outOutPattern}
- variant="label-hidden" options={outOutPatternOptionList}
- onchange={dataChange} data-field="outOutPattern"
- style="min-width: 140px;" class="inputFont"></lightning-combobox>
+ <lightning-layout-item
+ flexibility="auto"
+ >
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ >
+ 鍖婚櫌鐗逛环
+ </div>
+ <lightning-combobox
+ name="progress"
+ label="鍖婚櫌鐗逛环"
+ value={outOutPattern}
+ variant="label-hidden"
+ options={outOutPatternOptionList}
+ onchange={dataChange}
+ data-field="outOutPattern"
+ style="min-width: 120px"
+ class="inputFont"
+ ></lightning-combobox>
</div>
</lightning-layout-item>
</template>
</lightning-layout>
- <div style="float:right;margin-right:50px;">
- <!-- <lightning-button label="妫�绱�" onclick={searchProductJs}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder lexsearchStyle"
- onclick={searchProductJs}>妫�绱�</button>
-
- <!-- <lightning-button label="娓呯┖" onclick={ClearJs}></lightning-button> -->
- <button style="margin-left:10px;"
- class="slds-button slds-button_neutral slds-button_stretch lexBorder lexclearStyle"
- onclick={ClearJs}>娓呯┖</button>
- </div>
-
+ <lightning-layout
+ multiple-rows
+ style="margin-top: 10px"
+ >
+ <lightning-layout-item
+ style="
+ padding-left: 10px;
+ visibility: hidden;
+ "
+ flexibility="auto"
+ >
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ >
+ 娑堣�楀搧鍚嶇О
+ </div>
+ <lightning-input
+ type="text"
+ name="consumableName"
+ label="娑堣�楀搧鍚嶇О"
+ value={consumableName}
+ variant="label-hidden"
+ onchange={dataChange}
+ data-field="consumableName"
+ class="inputFont"
+ style="width: 150px"
+ ></lightning-input>
+ </div>
+ </lightning-layout-item>
+ <lightning-layout-item
+ flexibility="auto"
+ style="visibility: hidden"
+ >
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ style="width: 80px"
+ >
+ 绗�3鍒嗙被
+ </div>
+ <lightning-combobox
+ name="progress"
+ label="绗�3鍒嗙被"
+ value={Category3}
+ variant="label-hidden"
+ options={category3Options}
+ onchange={dataChange}
+ data-field="Category3"
+ style="min-width: 120px"
+ class="inputFont"
+ ></lightning-combobox>
+ </div>
+ </lightning-layout-item>
+ <lightning-layout-item
+ flexibility="auto"
+ style="visibility: hidden"
+ >
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ style="width: 80px"
+ >
+ 绗�4鍒嗙被
+ </div>
+ <lightning-combobox
+ name="progress"
+ label="绗�4鍒嗙被"
+ value={Category4}
+ variant="label-hidden"
+ options={category4Options}
+ onchange={dataChange}
+ data-field="Category4"
+ style="min-width: 120px"
+ class="inputFont"
+ ></lightning-combobox>
+ </div>
+ </lightning-layout-item>
+ <template if:false={hasHosPro}>
+ <lightning-layout-item
+ flexibility="auto"
+ >
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder lexsearchStyle"
+ onclick={searchProductJs}
+ style="
+ min-width: 80px;
+ max-width: 100px;
+ "
+ >
+ 妫�绱�
+ </button>
+ <button
+ style="
+ margin-left: 10px;
+ min-width: 80px;
+ max-width: 100px;
+ "
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder lexclearStyle"
+ onclick={ClearJs}
+ >
+ 娓呯┖
+ </button>
+ </div>
+ </lightning-layout-item>
+ </template>
+ <template if:true={hasHosPro}>
+ <lightning-layout-item
+ flexibility="auto"
+ style="visibility: hidden"
+ >
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ style="width: 80px"
+ >
+ 绗�5鍒嗙被
+ </div>
+ <lightning-combobox
+ name="progress"
+ label="绗�5鍒嗙被"
+ value={Category5}
+ variant="label-hidden"
+ onchange={dataChange}
+ data-field="Category5"
+ options={category5Options}
+ style="min-width: 120px"
+ class="inputFont"
+ ></lightning-combobox>
+ </div>
+ </lightning-layout-item>
+ <lightning-layout-item
+ flexibility="auto"
+ >
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder lexsearchStyle"
+ onclick={searchProductJs}
+ style="
+ min-width: 80px;
+ max-width: 110px;
+ "
+ >
+ 妫�绱�
+ </button>
+ <button
+ style="
+ margin-left: 10px;
+ min-width: 80px;
+ max-width: 110px;
+ "
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder lexclearStyle"
+ onclick={ClearJs}
+ >
+ 娓呯┖
+ </button>
+ </div>
+ </lightning-layout-item>
+ </template>
+ </lightning-layout>
</div>
</div>
</div>
@@ -713,44 +1404,86 @@
<div style="padding: 7px">
<template if:true={EditAble}>
<template if:true={showTable}>
- <c-lex-custom-lightning-datatable key-field="Id" data={data} columns={columns}
- onunitchange={handleUnitChange} onshipmentnumber={handleShipmentNumber}
- onshipmentunitprice={handleShipmentUnitPrice} onrowselection={getSelectedRows}
- selected-rows={selectedRows} default-sort-direction={defaultSortDirection}
- sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort}
- style="word-wrap:break-word; word-break:break-all; "
- class="wrapped-header-datatable">
+ <c-lex-custom-lightning-datatable
+ key-field="Id"
+ data={data}
+ columns={columns}
+ hide-checkbox-column={hideCheckboxColumn}
+ onunitchange={handleUnitChange}
+ onshipmentnumber={handleShipmentNumber}
+ onshipmentunitprice={handleShipmentUnitPrice}
+ onrowselection={getSelectedRows}
+ selected-rows={selectedRows}
+ default-sort-direction={defaultSortDirection}
+ sorted-direction={sortDirection}
+ sorted-by={sortedBy}
+ onsort={onHandleSort}
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ class="wrapped-header-datatable slds-is-selected"
+ >
</c-lex-custom-lightning-datatable>
</template>
- <c-paginator onprevious={handlePrevious} onnext={handleNext}
- onpageschange={handlePageschange} onfirst={handleFirst} onlast={handleLast}
- page-size-options={pageSizeOptions} previous-button-disabled={previousButtonDisabled}
- next-button-disabled={nextButtonDisabled} record-start={recordStart}
- record-end={recordEnd} total-records={totalRecords}></c-paginator>
+ <c-paginator
+ onprevious={handlePrevious}
+ onnext={handleNext}
+ onpageschange={handlePageschange}
+ onfirst={handleFirst}
+ onlast={handleLast}
+ page-size-options={pageSizeOptions}
+ previous-button-disabled={previousButtonDisabled}
+ next-button-disabled={nextButtonDisabled}
+ record-start={recordStart}
+ record-end={recordEnd}
+ total-records={totalRecords}
+ ></c-paginator>
</template>
<template if:false={EditAble}>
<template if:true={showTable}>
- <c-lex-custom-lightning-datatable hide-checkbox-column key-field="Id" data={editData}
- columns={editColumns} onunitchange={handleUnitChange}
+ <c-lex-custom-lightning-datatable
+ hide-checkbox-column
+ key-field="Id"
+ data={editData}
+ columns={editColumns}
+ onunitchange={handleUnitChange}
onshipmentnumber={handleShipmentNumber}
- onshipmentunitprice={handleShipmentUnitPrice} onrowselection={getSelectedRows}
- selected-rows={selectedRows} default-sort-direction={defaultSortDirection}
- sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort}
- style="word-wrap:break-word; word-break:break-all; "
- class="wrapped-header-datatable">
+ onshipmentunitprice={handleShipmentUnitPrice}
+ onrowselection={getSelectedRows}
+ selected-rows={selectedRows}
+ default-sort-direction={defaultSortDirection}
+ sorted-direction={sortDirection}
+ sorted-by={sortedBy}
+ onsort={onHandleSort}
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ class="wrapped-header-datatable slds-is-selected"
+ >
</c-lex-custom-lightning-datatable>
- <c-paginator onprevious={editHandlePrevious} onnext={editHandleNext}
- onpageschange={editHandlePageschange} onfirst={editHandleFirst}
- onlast={editHandleLast} page-size-options={pageSizeOptions}
+ <c-paginator
+ onprevious={editHandlePrevious}
+ onnext={editHandleNext}
+ onpageschange={editHandlePageschange}
+ onfirst={editHandleFirst}
+ onlast={editHandleLast}
+ page-size-options={pageSizeOptions}
previous-button-disabled={previousButtonDisabled}
- next-button-disabled={nextButtonDisabled} record-start={recordStart}
- record-end={recordEnd} total-records={totalRecords}></c-paginator>
+ next-button-disabled={nextButtonDisabled}
+ record-start={recordStart}
+ record-end={recordEnd}
+ total-records={totalRecords}
+ ></c-paginator>
</template>
</template>
<template if:true={isEditShowSpinner}>
- <lightning-spinner alternative-text="Uploading now"></lightning-spinner>
+ <lightning-spinner
+ alternative-text="Uploading now"
+ ></lightning-spinner>
</template>
</div>
</div>
@@ -768,9 +1501,13 @@
</lightning-layout>
</div>
<div style="padding: 7px">
- <lightning-datatable key-field="id" data={consumableorderdetails2Records}
- columns={consumableorderdetails2RecordsColumns} hide-checkbox-column
- class="wrapped-header-datatable">
+ <lightning-datatable
+ key-field="id"
+ data={consumableorderdetails2Records}
+ columns={consumableorderdetails2RecordsColumns}
+ hide-checkbox-column
+ class="wrapped-header-datatable"
+ >
</lightning-datatable>
</div>
</div>
@@ -827,36 +1564,61 @@
</lightning-layout-item>
</lightning-layout>
</div>
- <div style="padding: 7px;">
+ <div style="padding: 7px">
<div lwc:dom="manual" class="resultDiv"></div>
<div draggable="false">
- <lightning-layout multiple-rows="true" style="height:50px">
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout
+ multiple-rows="true"
+ style="height: 50px"
+ >
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="4"
+ >
</lightning-layout-item>
<template if:true={isSales}>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="4"
+ >
<!-- <lightning-button label="閿�鍞�" onclick={SaveP}
style="margin-top:-10px"></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={SaveP}>閿�鍞�</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ onclick={SaveP}
+ >
+ 閿�鍞�
+ </button>
</lightning-layout-item>
</template>
<template if:false={isSales}>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="4"
+ >
<!-- <lightning-button label="鍑鸿揣" onclick={SaveE}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={SaveE}>鍑鸿揣</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ onclick={SaveE}
+ >
+ 鍑鸿揣
+ </button>
</lightning-layout-item>
</template>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="4"
+ >
</lightning-layout-item>
</lightning-layout>
<template if:true={isShowInformation}>
- <div class="borderCss" style="margin-top: 5px;">
+ <div class="borderCss" style="margin-top: 5px">
<div class="headerDorderCss">
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
<strong>鍑哄簱鍗曚俊鎭�</strong>
</p>
@@ -864,50 +1626,108 @@
</lightning-layout>
</div>
<div style="padding: 7px">
- <div lwc:dom="manual" class="resultDiv"></div>
+ <div
+ lwc:dom="manual"
+ class="resultDiv"
+ ></div>
<div draggable="false">
- <lightning-record-edit-form object-api-name="Consumable_order__c"
- record-id={cocId} onload={handleLoad2}>
- <lightning-layout multiple-rows="true">
- <lightning-layout-item size="3" padding="around-small">
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={cocId}
+ onload={handleLoad2}
+ >
+ <lightning-layout
+ multiple-rows="true"
+ >
+ <lightning-layout-item
+ size="3"
+ padding="around-small"
+ >
<!-- <lightning-output-field field-name="Name"></lightning-output-field> -->
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label" style="padding: 0px;">
- 鍑哄簱鍗曞彿锛�</div>
- <lightning-output-field field-name="Name"
- variant="label-hidden"></lightning-output-field>
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ style="
+ padding: 0px;
+ "
+ >
+ 鍑哄簱鍗曞彿锛�
+ </div>
+ <lightning-output-field
+ field-name="Name"
+ variant="label-hidden"
+ ></lightning-output-field>
</div>
</lightning-layout-item>
- <lightning-layout-item size="4" padding="around-small">
+ <lightning-layout-item
+ size="4"
+ padding="around-small"
+ >
<!-- <lightning-output-field
field-name="ShipmentAccount__c" class="hideHelpText"></lightning-output-field> -->
<div
- class="slds-grid slds-grid_vertical-align-center hehe-layoutItem">
- <div class="slds-form-element__label" style="padding: 0px;">
- 瀹㈡埛鍚嶏細</div>
- <lightning-output-field field-name="ShipmentAccount__c"
- variant="label-hidden"></lightning-output-field>
+ class="slds-grid slds-grid_vertical-align-center hehe-layoutItem"
+ >
+ <div
+ class="slds-form-element__label"
+ style="
+ padding: 0px;
+ "
+ >
+ 瀹㈡埛鍚嶏細
+ </div>
+ <lightning-output-field
+ field-name="ShipmentAccount__c"
+ variant="label-hidden"
+ ></lightning-output-field>
</div>
</lightning-layout-item>
- <lightning-layout-item size="2" padding="around-small">
+ <lightning-layout-item
+ size="2"
+ padding="around-small"
+ >
<!-- <lightning-output-field
field-name="Order_ForCustomerText__c"></lightning-output-field> -->
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label" style="padding: 0px;">
- 绉戝锛�</div>
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ style="
+ padding: 0px;
+ "
+ >
+ 绉戝锛�
+ </div>
<lightning-output-field
field-name="Order_ForCustomerText__c"
- variant="label-hidden"></lightning-output-field>
+ variant="label-hidden"
+ ></lightning-output-field>
</div>
</lightning-layout-item>
- <lightning-layout-item size="2" padding="around-small">
+ <lightning-layout-item
+ size="2"
+ padding="around-small"
+ >
<!-- <lightning-output-field
field-name="SummonsForDirction__c"></lightning-output-field> -->
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label" style="padding: 0px;">
- 鐩殑锛�</div>
- <lightning-output-field field-name="SummonsForDirction__c"
- variant="label-hidden"></lightning-output-field>
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ style="
+ padding: 0px;
+ "
+ >
+ 鐩殑锛�
+ </div>
+ <lightning-output-field
+ field-name="SummonsForDirction__c"
+ variant="label-hidden"
+ ></lightning-output-field>
</div>
</lightning-layout-item>
</lightning-layout>
@@ -920,42 +1740,79 @@
<div class="borderCss">
<div class="headerDorderCss">
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
- <strong>BarCode褰曞叆</strong>
+ <strong
+ >BarCode褰曞叆</strong
+ >
</p>
</lightning-layout-item>
</lightning-layout>
</div>
<div style="padding: 7px">
- <div lwc:dom="manual" class="resultDiv"></div>
+ <div
+ lwc:dom="manual"
+ class="resultDiv"
+ ></div>
<div draggable="false">
- <lightning-record-edit-form object-api-name="Consumable_order__c"
- record-id={cocId}>
- <lightning-layout multiple-rows="true">
- <lightning-layout-item size="1"></lightning-layout-item>
- <lightning-layout-item padding="around-small">
+ <lightning-record-edit-form
+ object-api-name="Consumable_order__c"
+ record-id={cocId}
+ >
+ <lightning-layout
+ multiple-rows="true"
+ >
+ <lightning-layout-item
+ size="1"
+ ></lightning-layout-item>
+ <lightning-layout-item
+ padding="around-small"
+ >
<!-- <lightning-textarea name="Barcode" label="BarCode鍙�"
onchange={dataChange} variant="label-inline"
data-field="Barcode"
value={Barcode}></lightning-textarea> -->
- <div class="slds-grid">
- <div class="slds-form-element__label">BarCode鍙�</div>
- <lightning-textarea name="Barcode" label="BarCode鍙�"
- onchange={dataChange} variant="label-hidden"
- data-field="Barcode" value={Barcode}
- style="min-width: 400px;"></lightning-textarea>
+ <div
+ class="slds-grid"
+ >
+ <div
+ class="slds-form-element__label"
+ >
+ BarCode鍙�
+ </div>
+ <lightning-textarea
+ name="Barcode"
+ label="BarCode鍙�"
+ onchange={dataChange}
+ variant="label-hidden"
+ data-field="Barcode"
+ value={Barcode}
+ style="
+ min-width: 400px;
+ "
+ ></lightning-textarea>
</div>
</lightning-layout-item>
- <lightning-layout-item padding="around-small">
- <div class="slds-grid slds-grid_vertical-align-center">
- <div class="slds-form-element__label">
+ <lightning-layout-item
+ padding="around-small"
+ >
+ <div
+ class="slds-grid slds-grid_vertical-align-center"
+ >
+ <div
+ class="slds-form-element__label"
+ >
<!-- <lightning-button label="纭"
onclick={SalesearchProductJs}></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={SalesearchProductJs}>鑾峰彇鏄庣粏</button>
+ onclick={SalesearchProductJs}
+ >
+ 鑾峰彇鏄庣粏
+ </button>
</div>
</div>
</lightning-layout-item>
@@ -969,7 +1826,9 @@
<div class="borderCss">
<div class="headerDorderCss">
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
<strong>鍑鸿揣鏄庣粏</strong>
</p>
@@ -977,18 +1836,28 @@
</lightning-layout>
</div>
<div style="padding: 7px">
- <div lwc:dom="manual" class="resultDiv"></div>
+ <div
+ lwc:dom="manual"
+ class="resultDiv"
+ ></div>
<div draggable="false">
<!-- <lightning-datatable key-field="id" data={salesData} columns={salesColumns}
hide-checkbox-column
style="word-wrap:break-word; word-break:break-all; "
class="wrapped-header-datatable">
</lightning-datatable> -->
- <c-lex-custom-lightning-datatable key-field="Id" data={salesData}
- columns={salesColumns} onoutboundcount={handleOutboundCount}
+ <c-lex-custom-lightning-datatable
+ key-field="Id"
+ data={salesData}
+ columns={salesColumns}
+ onoutboundcount={handleOutboundCount}
hide-checkbox-column
- style="word-wrap:break-word; word-break:break-all; "
- class="wrapped-header-datatable">
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ class="wrapped-header-datatable"
+ >
</c-lex-custom-lightning-datatable>
</div>
</div>
@@ -997,45 +1866,77 @@
<div class="borderCss">
<div class="headerDorderCss">
<lightning-layout>
- <lightning-layout-item padding="around-small">
+ <lightning-layout-item
+ padding="around-small"
+ >
<p style="font-size: 18px">
- <strong>鍑鸿揣閿欒鏄庣粏</strong>
+ <strong
+ >鍑鸿揣閿欒鏄庣粏</strong
+ >
</p>
</lightning-layout-item>
</lightning-layout>
</div>
<div style="padding: 7px">
- <div lwc:dom="manual" class="resultDiv"></div>
+ <div
+ lwc:dom="manual"
+ class="resultDiv"
+ ></div>
<div draggable="false">
- <lightning-datatable key-field="id" data={salesErrorData}
- columns={salesErrorColumns} hide-checkbox-column
- style="word-wrap:break-word; word-break:break-all; "
- class="wrapped-header-datatable">
+ <lightning-datatable
+ key-field="id"
+ data={salesErrorData}
+ columns={salesErrorColumns}
+ hide-checkbox-column
+ style="
+ word-wrap: break-word;
+ word-break: break-all;
+ "
+ class="wrapped-header-datatable"
+ >
</lightning-datatable>
</div>
</div>
</div>
<lightning-layout multiple-rows="true">
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="4"
+ >
</lightning-layout-item>
<template if:true={isSales}>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="4"
+ >
<!-- <lightning-button label="閿�鍞�" onclick={SaveP}></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={SaveP}>閿�鍞�</button>
+ onclick={SaveP}
+ >
+ 閿�鍞�
+ </button>
</lightning-layout-item>
</template>
<template if:false={isSales}>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="4"
+ >
<!-- <lightning-button label="鍑鸿揣" onclick={SaveE}></lightning-button> -->
<button
class="slds-button slds-button_neutral slds-button_stretch lexBorder"
- onclick={SaveE}>鍑鸿揣</button>
+ onclick={SaveE}
+ >
+ 鍑鸿揣
+ </button>
</lightning-layout-item>
</template>
- <lightning-layout-item class="hehe-layoutItem" size="4">
+ <lightning-layout-item
+ class="hehe-layoutItem"
+ size="4"
+ >
</lightning-layout-item>
</lightning-layout>
</template>
@@ -1045,4 +1946,4 @@
</template>
</div>
</div>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
index 74a0853..464a3f1 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
@@ -1,34 +1,34 @@
-import { LightningElement, wire, api, track } from "lwc"; save
-import init from "@salesforce/apex/LexSummonsCreatController.init";
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import searchConsumableorderdetails from "@salesforce/apex/LexSummonsCreatController.searchConsumableorderdetails";
-import PraseToPDF from "@salesforce/apex/LexSummonsCreatController.PraseToPDF";
-import apexSearch from "@salesforce/apex/LexSummonsCreatController.search";
-import saveFile from "@salesforce/apex/LexSummonsCreatController.saveFile";
-import getFiles from "@salesforce/apex/LexSummonsCreatController.getFiles";
-import GoodsDelivery from "@salesforce/apex/LexSummonsCreatController.GoodsDelivery";
-import DelConsumable from "@salesforce/apex/LexSummonsCreatController.DelConsumable";
-import categoryAllload from "@salesforce/apex/LexSummonsCreatController.categoryAllload";
-import categoryload from "@salesforce/apex/LexSummonsCreatController.categoryload";
-import GoodsDeliveryInit from "@salesforce/apex/LexSaleOrderController.GoodsDeliveryInit";
-import SearchPro from "@salesforce/apex/LexSaleOrderController.SearchPro";
-import ProdElivery from "@salesforce/apex/LexSaleOrderController.ProdElivery";
-import ProSale from "@salesforce/apex/LexSaleOrderController.ProSale";
-import save from "@salesforce/apex/LexSummonsCreatController.save";
-import OPPORTUNITY_OBJECT from "@salesforce/schema/Consumable_Orderdetails__c";
-import { getObjectInfo } from "lightning/uiObjectInfoApi";
-import hospitalInit from "@salesforce/apex/lexSearchAgencyHospitalController.init";
-import serContact from "@salesforce/apex/lexSearchAgencyHospitalController.serContact";
-import deleteAtt from '@salesforce/apex/LexConsumableController.deleteAtt';
-import { NavigationMixin } from "lightning/navigation";
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+import { LightningElement, wire, api, track } from 'lwc';
+import init from '@salesforce/apex/LexSummonsCreatController.init';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import searchConsumableorderdetails from '@salesforce/apex/LexSummonsCreatController.searchConsumableorderdetails';
+import PraseToPDF from '@salesforce/apex/LexSummonsCreatController.PraseToPDF';
+import apexSearch from '@salesforce/apex/LexSummonsCreatController.search';
+import saveFile from '@salesforce/apex/LexSummonsCreatController.saveFile';
+import getFiles from '@salesforce/apex/LexSummonsCreatController.getFiles';
+import GoodsDelivery from '@salesforce/apex/LexSummonsCreatController.GoodsDelivery';
+import DelConsumable from '@salesforce/apex/LexSummonsCreatController.DelConsumable';
+import categoryAllload from '@salesforce/apex/LexSummonsCreatController.categoryAllload';
+import categoryload from '@salesforce/apex/LexSummonsCreatController.categoryload';
+import GoodsDeliveryInit from '@salesforce/apex/LexSaleOrderController.GoodsDeliveryInit';
+import SearchPro from '@salesforce/apex/LexSaleOrderController.SearchPro';
+import ProdElivery from '@salesforce/apex/LexSaleOrderController.ProdElivery';
+import ProSale from '@salesforce/apex/LexSaleOrderController.ProSale';
+import save from '@salesforce/apex/LexSummonsCreatController.save';
+import OPPORTUNITY_OBJECT from '@salesforce/schema/Consumable_Orderdetails__c';
+import { getObjectInfo } from 'lightning/uiObjectInfoApi';
+import hospitalInit from '@salesforce/apex/lexSearchAgencyHospitalController.init';
+import serContact from '@salesforce/apex/lexSearchAgencyHospitalController.serContact';
+import deleteAtt from '@salesforce/apex/LexSummonsCreatController.deleteAtt';
+import { NavigationMixin } from 'lightning/navigation';
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
import ConsumableOutboundReportId from '@salesforce/label/c.ConsumableOutboundReportId';
const customLabel = {
ConsumableOutboundReportId
-}
+};
export default class LexSummonsCreat extends NavigationMixin(LightningElement) {
@track label = customLabel;
@@ -37,423 +37,424 @@
@track showResults = true;
@track results = [
{
- Id: "1",
- Name: "z",
+ Id: '1',
+ Name: 'z'
},
{
- Id: "2",
- Name: "h",
+ Id: '2',
+ Name: 'h'
},
{
- Id: "3",
- Name: "j",
- },
+ Id: '3',
+ Name: 'j'
+ }
];
@track COLS = [
{
- label: "Account Name",
- type: "customName",
+ label: 'Account Name',
+ type: 'customName',
typeAttributes: {
- accountName: { fieldName: "Name" },
- },
- },
+ accountName: { fieldName: 'Name' }
+ }
+ }
];
@track columns = [
{
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "Name__c",
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
hideDefaultActions: true,
wrapText: true,
initialWidth: 175,
sortable: true
},
{
- label: "瑙勬牸",
- fieldName: "packinglist",
- cellAttributes: { alignment: "right" },
+ label: '瑙勬牸',
+ fieldName: 'packinglist',
+ cellAttributes: { alignment: 'right' },
wrapText: true,
initialWidth: 50,
- hideDefaultActions: true,
+ hideDefaultActions: true
},
{
- label: "CFDA鐘舵��",
- fieldName: "SFDA_Status__c",
+ label: 'CFDA鐘舵��',
+ fieldName: 'SFDA_Status__c',
initialWidth: 105,
wrapText: true,
- hideDefaultActions: true,
+ hideDefaultActions: true
},
{
- label: "娉ㄥ唽璇佺紪鐮佸彿",
- fieldName: "approbation_No",
+ label: '娉ㄥ唽璇佺紪鐮佸彿',
+ fieldName: 'approbation_No',
+ wrapText: true,
+ initialWidth: 105,
+ hideDefaultActions: true
+ },
+ {
+ label: '娉ㄥ唽璇佹晥鏈�',
+ wrapText: true,
+ initialWidth: 115,
+ fieldName: 'expiration_Date',
+ hideDefaultActions: true
+ },
+ {
+ label: '绗�3鍒嗙被',
+ fieldName: 'Category3__c',
wrapText: true,
initialWidth: 115,
hideDefaultActions: true,
+ sortable: true
},
{
- label: "娉ㄥ唽璇佹晥鏈�",
- wrapText: true,
- initialWidth: 115,
- fieldName: "expiration_Date",
- hideDefaultActions: true,
- },
- {
- label: "绗�3鍒嗙被",
- fieldName: "Category3__c",
+ label: '绗�4鍒嗙被',
+ fieldName: 'Category4__c',
wrapText: true,
initialWidth: 115,
hideDefaultActions: true,
- sortable: true,
+ sortable: true
},
{
- label: "绗�4鍒嗙被",
- fieldName: "Category4__c",
+ label: '绗�5鍒嗙被',
+ fieldName: 'Category5__c',
wrapText: true,
initialWidth: 115,
hideDefaultActions: true,
- sortable: true,
+ sortable: true
},
{
- label: "绗�5鍒嗙被",
- fieldName: "Category5__c",
- wrapText: true,
- initialWidth: 115,
- hideDefaultActions: true,
- sortable: true,
- },
- {
- label: "鍗曚綅",
- type: "customUnit",
+ label: '鍗曚綅',
+ type: 'customUnit',
initialWidth: 100,
hideDefaultActions: true,
typeAttributes: {
- unitValue: { fieldName: "unitValue" },
- unitOptions: { fieldName: "unitOptions" },
- recordId: { fieldName: "Id" },
- },
+ unitValue: { fieldName: 'unitValue' },
+ unitOptions: { fieldName: 'unitOptions' },
+ recordId: { fieldName: 'Id' }
+ }
},
{
- label: "鍑鸿揣鏁伴噺",
- type: "customShipment",
+ label: '鍑鸿揣鏁伴噺',
+ type: 'customShipment',
initialWidth: 100,
hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
+ cellAttributes: { alignment: 'right' },
typeAttributes: {
- recordId: { fieldName: "Id" },
- shipmentNumber: { fieldName: "shipmentNumber" },
- },
+ recordId: { fieldName: 'Id' },
+ shipmentNumber: { fieldName: 'shipmentNumber' }
+ }
},
{
- label: "鍑鸿揣鍗曚环(鍏�)",
- type: "customShipmentUnitPrice",
+ label: '鍑鸿揣鍗曚环(鍏�)',
+ type: 'customShipmentUnitPrice',
hideDefaultActions: true,
initialWidth: 120,
typeAttributes: {
- recordId: { fieldName: "Id" },
- shippingUnitPrice: { fieldName: "shippingUnitPrice" },
- },
+ recordId: { fieldName: 'Id' },
+ shippingUnitPrice: { fieldName: 'shippingUnitPrice' }
+ }
},
{
- label: "鍑鸿揣閲戦(鍏�)",
- type: "customShipmentAmount",
+ label: '鍑鸿揣閲戦(鍏�)',
+ type: 'customShipmentAmount',
initialWidth: 120,
- cellAttributes: { alignment: "right" },
+ cellAttributes: { alignment: 'right' },
hideDefaultActions: true,
typeAttributes: {
- shipmentAmount: { fieldName: "shipmentAmount" },
- },
+ shipmentAmount: { fieldName: 'shipmentAmount' }
+ }
},
{
- label: "鏈夋晥鏈熷唴搴撳瓨(鐩�)",
- fieldName: "Boxnumber",
- cellAttributes: { alignment: "right" },
+ label: '鏈夋晥鏈熷唴搴撳瓨(鐩�)',
+ fieldName: 'Boxnumber',
+ cellAttributes: { alignment: 'right' },
wrapText: true,
initialWidth: 160,
- hideDefaultActions: true,
+ hideDefaultActions: true
},
{
- label: "鏈夋晥鏈熷唴搴撳瓨(涓�)",
- fieldName: "Piecenumber",
- cellAttributes: { alignment: "right" },
+ label: '鏈夋晥鏈熷唴搴撳瓨(涓�)',
+ fieldName: 'Piecenumber',
+ cellAttributes: { alignment: 'right' },
wrapText: true,
initialWidth: 160,
- hideDefaultActions: true,
- },
+ hideDefaultActions: true
+ }
];
@track editColumns = [
{
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "Name__c",
- hideDefaultActions: true,
- initialWidth: 320,
- wrapText: true,
- sortable: true,
- },
- {
- label: "瑙勬牸",
- fieldName: "packinglist",
- initialWidth: 80,
- cellAttributes: { alignment: "right" },
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
hideDefaultActions: true,
wrapText: true,
+ sortable: true
},
{
- label: "CFDA鐘舵��",
- fieldName: "SFDA_Status__c",
+ label: '瑙勬牸',
+ fieldName: 'packinglist',
+ initialWidth: 50,
+ cellAttributes: { alignment: 'right' },
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "娉ㄥ唽璇佺紪鐮佸彿",
- fieldName: "approbation_No",
+ label: 'CFDA鐘舵��',
+ fieldName: 'SFDA_Status__c',
hideDefaultActions: true,
- wrapText: true,
- },
- {
- label: "娉ㄥ唽璇佹晥鏈�",
- fieldName: "expiration_Date",
- hideDefaultActions: true,
- wrapText: true,
- },
- {
- label: "绗�3鍒嗙被",
- fieldName: "Category3__c",
initialWidth: 100,
- hideDefaultActions: true,
- sortable: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "绗�4鍒嗙被",
- fieldName: "Category4__c",
+ label: '娉ㄥ唽璇佺紪鐮佸彿',
+ fieldName: 'approbation_No',
+ hideDefaultActions: true,
+ initialWidth: 170,
+ wrapText: true
+ },
+ {
+ label: '娉ㄥ唽璇佹晥鏈�',
+ fieldName: 'expiration_Date',
+ hideDefaultActions: true,
initialWidth: 100,
- hideDefaultActions: true,
- sortable: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "绗�5鍒嗙被",
- fieldName: "Category5__c",
- initialWidth: 100,
+ label: '绗�3鍒嗙被',
+ fieldName: 'Category3__c',
hideDefaultActions: true,
sortable: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "鍗曚綅",
- fieldName: "Box_Piece__c",
+ label: '绗�4鍒嗙被',
+ fieldName: 'Category4__c',
+ hideDefaultActions: true,
+ sortable: true,
+ wrapText: true
+ },
+ {
+ label: '绗�5鍒嗙被',
+ fieldName: 'Category5__c',
+ hideDefaultActions: true,
+ sortable: true,
+ wrapText: true
+ },
+ {
+ label: '鍗曚綅',
+ fieldName: 'Box_Piece__c',
initialWidth: 50,
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "鍑鸿揣鏁伴噺",
- fieldName: "Shipment_Count__c",
- cellAttributes: { alignment: "right" },
+ label: '鍑鸿揣鏁伴噺',
+ fieldName: 'Shipment_Count__c',
+ initialWidth: 90,
+ cellAttributes: { alignment: 'right' },
hideDefaultActions: true,
- initialWidth: 100,
- wrapText: true,
+ wrapText: true
},
{
- label: "鍑鸿揣鍗曚环(鍏�)",
- fieldName: "shippingUnitPrice",
- type: "number",
+ label: '鍑鸿揣鍗曚环(鍏�)',
+ fieldName: 'shippingUnitPrice',
+ type: 'number',
+ initialWidth: 100,
typeAttributes: {
- minimumFractionDigits: 2,
+ minimumFractionDigits: 2
},
hideDefaultActions: true,
- wrapText: true,
- },
+ wrapText: true
+ }
];
@track editData = [];
@track hospitalList = [];
@track hospitalColumns = [
{
- label: "鍖婚櫌鍚嶇О",
- fieldName: "Name",
- initialWidth: 400,
+ label: '',
+ fieldName: 'Id1',
+ type: 'button',
hideDefaultActions: true,
- wrapText: true,
- },
- {
- label: "鐪佷唤",
- fieldName: "stateMasterName",
- hideDefaultActions: true,
- },
- {
- label: "閫夋嫨",
- fieldName: "Id1",
- type: "button",
- hideDefaultActions: true,
+ initialWidth: 90,
typeAttributes: {
- label: "閫夋嫨",
- name: "Id2",
- size: 1,
- },
+ label: '閫夋嫨',
+ name: 'Id2',
+ size: 1
+ }
},
+ {
+ label: '鍖婚櫌鍚嶇О',
+ fieldName: 'Name',
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '鐪佷唤',
+ fieldName: 'stateMasterName',
+ hideDefaultActions: true
+ }
];
- @track accountid = "";
+ @track accountid = '';
@track consumableproductdetailsRecords = [];
- @track SummonsStatus = "";
- @track ESetid = "";
- @track statusEdit = "";
+ @track SummonsStatus = '';
+ @track ESetid = '';
+ @track statusEdit = '';
@track cocLwc = {};
@track selectedRows = [];
- @track ConsumableOut_report = "";
+ @track ConsumableOut_report = '';
@track isMutualTransferGoods = false;
- @track Barcode = "";
+ @track Barcode = '';
@track summonsForDirction = '';
@track accountValue = '';
@track consumableorderdetails2RecordsColumns = [
{
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "ProdName",
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'ProdName',
hideDefaultActions: true,
+ wrapText: true
},
{
- label: "鎵规鍙�",
- fieldName: "orderdetails2SerialLotNo__c",
- hideDefaultActions: true,
+ label: '鎵规鍙�',
+ fieldName: 'orderdetails2SerialLotNo__c',
+ hideDefaultActions: true
},
{
- label: "绠$悊缂栫爜",
- fieldName: "orderdetails2TracingCode__c",
- hideDefaultActions: true,
+ label: '绠$悊缂栫爜',
+ fieldName: 'orderdetails2TracingCode__c',
+ hideDefaultActions: true
},
{
- label: "浣跨敤鏈熼檺",
- fieldName: "orderdetails2Sterilization_limit__c",
- hideDefaultActions: true,
- },
+ label: '浣跨敤鏈熼檺',
+ fieldName: 'orderdetails2Sterilization_limit__c',
+ hideDefaultActions: true
+ }
];
@track consumableorderdetails2Records = [];
//鍑鸿揣/閿�鍞�
@track salesColumns = [
{
- label: "娑堣�楀搧璁㈠崟",
- fieldName: "ConsumableorderminorUrl",
+ label: '娑堣�楀搧璁㈠崟',
+ fieldName: 'ConsumableorderminorUrl',
hideDefaultActions: true,
- type: "url",
+ type: 'url',
typeAttributes: {
- label: { fieldName: "Consumable_order_minor__c" },
- target: "_blank",
+ label: { fieldName: 'Consumable_order_minor__c' },
+ target: '_blank'
},
- wrapText: true,
+ wrapText: true
},
{
- label: "娑堣�楀搧鏄庣粏2鍚嶇О",
- fieldName: "orderdetails2NameUrl",
- type: "url",
+ label: '娑堣�楀搧鏄庣粏2鍚嶇О',
+ fieldName: 'orderdetails2NameUrl',
+ type: 'url',
+ initialWidth: 150,
typeAttributes: {
- label: { fieldName: "orderdetails2Name" },
- target: "_blank",
+ label: { fieldName: 'orderdetails2Name' },
+ target: '_blank'
},
hideDefaultActions: true,
- wrapText: true,
- initialWidth: 240
+ wrapText: true
},
{
- label: "鍗曚綅",
- fieldName: "Box_Piece__c",
+ label: '鍗曚綅',
+ fieldName: 'Box_Piece__c',
hideDefaultActions: true,
wrapText: true,
initialWidth: 50
},
{
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "ProdName",
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'ProdName',
+ initialWidth: 100,
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "鍙戣揣鏃ユ湡",
- fieldName: "Deliver_date__c",
+ label: '鍙戣揣鏃ユ湡',
+ fieldName: 'Deliver_date__c',
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "BarCode",
- fieldName: "Bar_Code__c",
+ label: 'BarCode',
+ fieldName: 'Bar_Code__c',
hideDefaultActions: true,
wrapText: true,
- initialWidth: 400
+ initialWidth: 380
},
{
- label: "浣跨敤鏈熼檺",
- fieldName: "Sterilization_limit__c",
+ label: '浣跨敤鏈熼檺',
+ fieldName: 'Sterilization_limit__c',
hideDefaultActions: true,
- wrapText: true,
- initialWidth: 120
+ wrapText: true
},
{
- label: "鍑鸿揣鏁伴噺",
+ label: '鍑鸿揣鏁伴噺',
fieldName: 'outboundCount',
hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
+ cellAttributes: { alignment: 'right' }
}
];
@track salesData = [];
@track salesErrorColumns = [
{
- label: "娑堣�楀搧璁㈠崟",
- fieldName: "ConsumableorderminorUrl",
+ label: '娑堣�楀搧璁㈠崟',
+ fieldName: 'ConsumableorderminorUrl',
hideDefaultActions: true,
- type: "url",
+ type: 'url',
typeAttributes: {
- label: { fieldName: "Consumable_order_minor__c" },
- target: "_blank",
+ label: { fieldName: 'Consumable_order_minor__c' },
+ target: '_blank'
},
- wrapText: true,
+ wrapText: true
},
{
- label: "娑堣�楀搧鏄庣粏2鍚嶇О",
- fieldName: "orderdetails2Name",
+ label: '娑堣�楀搧鏄庣粏2鍚嶇О',
+ fieldName: 'orderdetails2Name',
hideDefaultActions: true,
- wrapText: true,
- initialWidth: 240
+ initialWidth: 150,
+ wrapText: true
},
{
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "ProdName",
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'ProdName',
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "鍗曚綅",
- fieldName: "Box_Piece__c",
+ label: '鍗曚綅',
+ fieldName: 'Box_Piece__c',
hideDefaultActions: true,
wrapText: true,
initialWidth: 50
},
{
- label: "BarCode",
- fieldName: "Bar_Code__c",
- hideDefaultActions: true,
- initialWidth: 400
- },
- {
- label: "浣跨敤鏈熼檺",
- fieldName: "Sterilization_limit__c",
+ label: 'BarCode',
+ fieldName: 'Bar_Code__c',
hideDefaultActions: true,
wrapText: true,
- initialWidth: 120
+ initialWidth: 380
},
{
- label: "閿欒鍘熷洜",
- fieldName: "ErrorReason",
+ label: '浣跨敤鏈熼檺',
+ fieldName: 'Sterilization_limit__c',
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
+ {
+ label: '閿欒鍘熷洜',
+ fieldName: 'ErrorReason',
+ hideDefaultActions: true,
+ wrapText: true
+ }
];
@track salesErrorData = [];
- @track salesAccountName = "";
- @track salesUserWorkLocation = "";
- @track salesAccountid = "";
+ @track salesAccountName = '';
+ @track salesUserWorkLocation = '';
+ @track salesAccountid = '';
@track salesOrderdetails = [];
@track salesCoc = {};
@track salesOrderpieceorboxMap;
@@ -486,55 +487,55 @@
@track isDeleteDisabled = false;
//鍑哄簱鍗曚俊鎭�
- @track cocId = "";
+ @track cocId = '';
@track EditAble = false;
@track summonsStatusPriceNotDetermined = false;
@track isSummonsForDirctionTwoShow = false;
@track isSummonsFlag = false;
@track isConInvoiceShow = false;
- @track sumPrice = "";
+ @track sumPrice = '';
@track isSearchShow = false;
@track Existarrive = false;
- @track Category3 = "";
+ @track Category3 = '';
@track category3Options = [];
- @track Category4 = "";
+ @track Category4 = '';
@track category4Options = [];
- @track Category5 = "";
+ @track Category5 = '';
@track category5Options = [];
//鍙戠エid
@track invoiceId = '';
//浜岀骇缁忛攢鍟�
- @track secondaryDistributor = "";
+ @track secondaryDistributor = '';
@track secondaryDistributorOptions = [];
@track isDisabledSecondaryDistributor = false;
//缁忛攢鍟嗗綍鍏�
- @track ForDealerText = "";
+ @track ForDealerText = '';
@track isDisabledForDealerText = false;
//瀹㈡埛鍚�
@track isModalOpen = false;
- @track HospitalName = "";
- @track searchHospitalName = "";
- @track OECId = "";
+ @track HospitalName = '';
+ @track searchHospitalName = '';
+ @track OECId = '';
@track isDisabledHospitalName = false;
//绉戝
- @track ForCustomerText = "";
+ @track ForCustomerText = '';
@track isDisabledForCustomerText = false;
//娌℃湁纭畾浠锋牸
@track NoConfirmedPrice = false;
//娑堣�楀搧鍚嶇О
- @track consumableName = "";
+ @track consumableName = '';
- @track agencyProType = "";
- @track accountName = "";
- @track userWorkLocation = "";
+ @track agencyProType = '';
+ @track accountName = '';
+ @track userWorkLocation = '';
@track OutPattern__c = false;
- @track outOutPattern = "";
+ @track outOutPattern = '';
//鍑哄簱鍗曟槑缁�
@track showTable = false;
@@ -542,30 +543,30 @@
@track isSelectShow = false;
@track hidecheckboxcolumn = false;
@track is345Show = false;
- @track arriveorder = "";
+ @track arriveorder = '';
@track hasHosPro = false;
- @track InvoiceProNotLabel = "";
- @track RrturnProLabel = "";
- @track InvoicedLabel = "";
+ @track InvoiceProNotLabel = '';
+ @track RrturnProLabel = '';
+ @track InvoicedLabel = '';
@track outOutPatternOptionList = [];
//鏂囦欢涓婁紶
@track showLoadingSpinner = false;
- @track UploadFile = "Upload File";
- @track fileName = "";
+ @track UploadFile = 'Upload File';
+ @track fileName = '';
@track fileData = [];
@track fileColumns = [
{
- label: "鏍囬",
- fieldName: "url",
- type: "url",
- typeAttributes: { label: { fieldName: "Title" }, target: "_blank" },
- hideDefaultActions: true,
+ label: '鏍囬',
+ fieldName: 'url',
+ type: 'url',
+ typeAttributes: { label: { fieldName: 'Title' }, target: '_blank' },
+ hideDefaultActions: true
},
{
- label: "鍒涘缓浜�",
- fieldName: "CreatedByName",
- hideDefaultActions: true,
+ label: '鍒涘缓浜�',
+ fieldName: 'CreatedByName',
+ hideDefaultActions: true
},
{
label: '',
@@ -578,7 +579,7 @@
},
initialWidth: 50,
hideDefaultActions: true
- },
+ }
];
filesUploaded = [];
fileContents;
@@ -607,17 +608,18 @@
@track recordEnd = 0;
//end
@track SearchDone = '';
+ @track hideCheckboxColumn = false;
stylesLoaded = false;
renderedCallback() {
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
@@ -629,16 +631,16 @@
this.InvoiceProNotLabel = data.fields.InvoiceProNot_count__c.label;
this.RrturnProLabel = data.fields.RrturnPro_count__c.label;
this.InvoicedLabel = data.fields.Invoiced_Procount__c.label;
- console.log("this.InvoiceProNotLabel = " + this.InvoiceProNotLabel);
- console.log("this.RrturnProLabel = " + this.RrturnProLabel);
- console.log("this.InvoicedLabel = " + this.InvoicedLabel);
+ console.log('this.InvoiceProNotLabel = ' + this.InvoiceProNotLabel);
+ console.log('this.RrturnProLabel = ' + this.RrturnProLabel);
+ console.log('this.InvoicedLabel = ' + this.InvoicedLabel);
}
}
//鑾峰彇閾炬帴鍙傛暟
getQueryString(name) {
- console.log("getQueryString name " + name);
- let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+ console.log('getQueryString name ' + name);
+ let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]);
@@ -646,464 +648,686 @@
return null;
}
connectedCallback() {
- console.log("connectedCallback LexSummonsCreat");
- this.ESetid = this.getQueryString("ESetid");
- this.ESetid = this.ESetid == null ? "" : this.ESetid;
+ console.log('connectedCallback LexSummonsCreat');
+ this.ESetid = this.getQueryString('ESetid');
+ this.ESetid = this.ESetid == null ? '' : this.ESetid;
//statusEdit
- this.statusEdit = this.getQueryString("KeyWords");
- this.statusEdit = this.statusEdit == null ? "" : this.statusEdit;
- console.log("this.ESetid = " + this.ESetid);
- console.log("this.statusEdit = " + this.statusEdit);
- if (this.ESetid == "") {
+ this.statusEdit = this.getQueryString('KeyWords');
+ this.statusEdit = this.statusEdit == null ? '' : this.statusEdit;
+ //arriveorder
+ this.arriveorder = this.getQueryString('arriveorder');
+ this.arriveorder = this.arriveorder == null ? '' : this.arriveorder;
+ console.log('this.ESetid = ' + this.ESetid);
+ console.log('this.statusEdit = ' + this.statusEdit);
+ console.log('this.arriveorder = ' + this.arriveorder);
+ if (this.ESetid == '') {
this.isShowInformation = false;
}
- console.log("init LexSummonsCreat");
+ console.log('init LexSummonsCreat');
init({
ESetidJs: this.ESetid,
statusEdit: this.statusEdit,
pageSizeLWC: this.pageSize,
- pageTokenLWC: this.currentPageToken
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
+ pageTokenLWC: this.currentPageToken,
+ arriveorderLWC: this.arriveorder
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
- if (r.status == "Success") {
+ if (r.status == 'Success') {
+ //鍒嗛〉
+ console.log(
+ 'r.entity.paginatedAccounts = ' +
+ JSON.stringify(r.entity.paginatedAccounts)
+ );
+ this.nextPageToken =
+ r.entity.paginatedAccounts.nextPageToken;
+ this.totalRecords = r.entity.paginatedAccounts.totalRecords;
+ this.recordStart = r.entity.paginatedAccounts.recordStart;
+ this.recordEnd = r.entity.paginatedAccounts.recordEnd;
+ this.totalPages = Math.ceil(
+ r.entity.paginatedAccounts.totalRecords / this.pageSize
+ );
+ console.log('this.totalPages = ' + this.totalPages);
- //鍒嗛〉
- console.log('r.entity.paginatedAccounts = ' + JSON.stringify(r.entity.paginatedAccounts));
- this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
- this.totalRecords = r.entity.paginatedAccounts.totalRecords;
- this.recordStart = r.entity.paginatedAccounts.recordStart;
- this.recordEnd = r.entity.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(r.entity.paginatedAccounts.totalRecords / this.pageSize);
- console.log('this.totalPages = ' + this.totalPages);
-
-
- this.OECId = r.entity.HospitalInfo == null ? '' : r.entity.HospitalInfo;
- console.log("this.OECId = " + this.OECId);
- this.ConsumableOut_report = r.entity.ConsumableOut_report;
- console.log("this.ConsumableOut_report = " + this.ConsumableOut_report);
- this.accountid = r.entity.accountid;
- this.consumableproductdetailsRecords =
- r.entity.consumableproductdetailsRecords;
- this.accountName = r.entity.accountName;
- this.agencyProType = r.entity.agencyProType;
- this.accountName = r.entity.accountName;
- this.userWorkLocation = r.entity.userWorkLocation;
- this.EditAble = r.entity.EditAble;
- this.consumableorderdetails2Records = r.entity.consumableorderdetails2Records;
- for (var i in this.consumableorderdetails2Records) {
- this.consumableorderdetails2Records[i]["ProdName"] = this.consumableorderdetails2Records[i].Prod.Name;
- this.consumableorderdetails2Records[i]["orderdetails2SerialLotNo__c"] = this.consumableorderdetails2Records[i].orderdetails2.SerialLotNo__c;
- this.consumableorderdetails2Records[i]["orderdetails2TracingCode__c"] = this.consumableorderdetails2Records[i].orderdetails2.TracingCode__c;
- this.consumableorderdetails2Records[i]["orderdetails2Sterilization_limit__c"] = this.consumableorderdetails2Records[i].orderdetails2.Sterilization_limit__c;
- }
- this.isShowOutboundProductDetails = r.entity.consumableorderdetails2Count > 0 ? true : false;
- console.log("this.agencyProType = " + this.agencyProType);
- console.log("this.EditAble = " + this.EditAble);
- //鏌ヨ闄勪欢
- if (!this.EditAble) this.getFiles();
- //绗�3鍒嗙被
- for (var key in r.entity.categoryOptionMap) {
- let object = {};
- object["label"] = r.entity.categoryOptionMap[key];
- object["value"] = key;
- this.category3Options.push(object);
- }
- console.log("this.category3Options = " + JSON.stringify(this.category3Options));
- //绗�4鍒嗙被
- for (var key in r.entity.category4OptionMap) {
- let object = {};
- object["label"] = r.entity.category4OptionMap[key];
- object["value"] = key;
- this.category4Options.push(object);
- }
- console.log("this.category4Options = " + this.category4Options);
- //绗�5鍒嗙被
- for (var key in r.entity.category5OptionMap) {
- let object = {};
- object["label"] = r.entity.category5OptionMap[key];
- object["value"] = key;
- this.category5Options.push(object);
- }
- console.log("this.category5Options = " + this.category5Options);
-
- this.data = r.entity.pageRecords;
- this.editData = r.entity.pageRecords;
- console.log("this.data start = " + JSON.stringify(this.data));
- this.hasHosPro = r.entity.hasHosPro;
- console.log("this.hasHosPro = " + this.hasHosPro);
- if (this.EditAble) {
- for (var i in this.data) {
- let unitOptions = [];
- for (var key in this.data[i].boxorpieceMap) {
- let unitOption = {};
- unitOption["label"] = this.data[i].boxorpieceMap[key];
- unitOption["value"] = key;
- unitOptions.push(unitOption);
- }
- this.data[i]["unitOptions"] = unitOptions;
- this.data[i]["unitValue"] = this.data[i]["unitValue"] == null ? unitOptions[0].value : this.data[i]["unitValue"];
- if (this.EditAble) {
- this.data[i].orderdetails1["Box_Piece__c"] = this.data[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : this.data[i].orderdetails1["Box_Piece__c"];
- this.data[i]["unitValue"] = this.data[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : this.data[i].orderdetails1["Box_Piece__c"];
- console.log('this.data[i].orderdetails1["Box_Piece__c"] = ' + this.data[i].orderdetails1["Box_Piece__c"]);
- this.data[i].orderdetails1["Shipment_Count__c"] = this.data[i].orderdetails1["Shipment_Count__c"] == null ? 0 : this.data[i].orderdetails1["Shipment_Count__c"];
- this.data[i].orderdetails1["Delivery_List_RMB__c"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : this.data[i].orderdetails1["Delivery_List_RMB__c"];
- } else {
- this.data[i]["InvoiceProNot_count__c"] = this.data[i].orderdetails1.InvoiceProNot_count__c;
- this.data[i]["RrturnPro_count__c"] = this.data[i].orderdetails1.RrturnPro_count__c;
- this.data[i]["Invoiced_Procount__c"] = this.data[i].orderdetails1.Invoiced_Procount__c;
- }
- // this.data[i]["shipmentNumber"] = 0;
- // this.data[i]["shippingUnitPrice"] = 0.0;
- //this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"] == 0 ? '' : this.data[i].orderdetails1["Shipment_Count__c"];
- //this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == 0 ? '' : this.data[i].orderdetails1["Delivery_List_RMB__c"];
- this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"];
- this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"];
-
-
-
- this.data[i]["Id"] = this.data[i].Prod.Id;
-
- if (this.hasHosPro) {
- if (this.data[i]["hospitalSpecialOffer"]) {
- this.data[i]["Id"] = this.data[i].Prod.Id + 'ishos';
- } else {
- this.data[i]["Id"] = this.data[i].Prod.Id + 'nothos';
- }
- }
- this.data[i]["recordId"] = this.data[i].Prod.Id;
- this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
- this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
- this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["Category4__c"] = this.data[i].Prod.Category4__c;
- this.data[i]["Category5__c"] = this.data[i].Prod.Category5__c;
- this.data[i]["Box_Piece__c"] = this.data[i].orderdetails1.Box_Piece__c;
- this.data[i]["shipmentAmount"] = this.data[i].orderdetails1.Shipment_amount__c;
- this.data[i]["Shipment_amount__c"] = this.data[i].orderdetails1.Shipment_amount__c;
- this.data[i]["Shipment_Count__c"] = this.data[i].orderdetails1.Shipment_Count__c;
-
- if (this.data[i]['check']) {
- this.selectedRows.push(this.data[i].Id);
- }
+ this.OECId =
+ r.entity.HospitalInfo == null
+ ? ''
+ : r.entity.HospitalInfo;
+ console.log('this.OECId = ' + this.OECId);
+ this.ConsumableOut_report = r.entity.ConsumableOut_report;
+ console.log(
+ 'this.ConsumableOut_report = ' +
+ this.ConsumableOut_report
+ );
+ this.accountid = r.entity.accountid;
+ this.consumableproductdetailsRecords =
+ r.entity.consumableproductdetailsRecords;
+ this.accountName = r.entity.accountName;
+ this.agencyProType = r.entity.agencyProType;
+ this.accountName = r.entity.accountName;
+ this.userWorkLocation = r.entity.userWorkLocation;
+ this.EditAble = r.entity.EditAble;
+ this.consumableorderdetails2Records =
+ r.entity.consumableorderdetails2Records;
+ for (var i in this.consumableorderdetails2Records) {
+ this.consumableorderdetails2Records[i]['ProdName'] =
+ this.consumableorderdetails2Records[i].Prod.Name;
+ this.consumableorderdetails2Records[i][
+ 'orderdetails2SerialLotNo__c'
+ ] =
+ this.consumableorderdetails2Records[
+ i
+ ].orderdetails2.SerialLotNo__c;
+ this.consumableorderdetails2Records[i][
+ 'orderdetails2TracingCode__c'
+ ] =
+ this.consumableorderdetails2Records[
+ i
+ ].orderdetails2.TracingCode__c;
+ this.consumableorderdetails2Records[i][
+ 'orderdetails2Sterilization_limit__c'
+ ] =
+ this.consumableorderdetails2Records[
+ i
+ ].orderdetails2.Sterilization_limit__c;
}
- console.log('EditAble this.data = ' + JSON.stringify(this.data))
- } else {
- for (var i in this.editData) {
- this.editData[i]["unitValue"] = this.editData[i]["unitValue"];
- this.editData[i]["InvoiceProNot_count__c"] = this.editData[i].orderdetails1.InvoiceProNot_count__c;
- this.editData[i]["RrturnPro_count__c"] = this.editData[i].orderdetails1.RrturnPro_count__c;
- this.editData[i]["Invoiced_Procount__c"] = this.editData[i].orderdetails1.Invoiced_Procount__c;
- this.editData[i]["shipmentNumber"] = this.editData[i].orderdetails1["Shipment_Count__c"];
- this.editData[i]["shippingUnitPrice"] = this.editData[i].orderdetails1["Delivery_List_RMB__c"];
-
- this.editData[i]["recordId"] = this.editData[i].Prod.Id;
- this.editData[i]["Id"] = this.editData[i].Prod.Id;
- this.editData[i]["Name__c"] = this.editData[i].Prod.Name__c;
- this.editData[i]["SFDA_Status__c"] = this.editData[i].Prod.SFDA_Status__c;
- this.editData[i]["Category3__c"] = this.editData[i].Prod.Category3__c;
- this.editData[i]["Category4__c"] = this.editData[i].Prod.Category4__c;
- this.editData[i]["Category5__c"] = this.editData[i].Prod.Category5__c;
- this.editData[i]["Box_Piece__c"] = this.editData[i].orderdetails1.Box_Piece__c;
- this.editData[i]["shipmentAmount"] = this.editData[i].orderdetails1.Shipment_amount__c;
- //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
- this.editData[i]["Delivery_List_RMB__c"] = this.editData[i].orderdetails1.Delivery_List_RMB__c;
- this.editData[i]["Shipment_Count__c"] = this.editData[i].orderdetails1.Shipment_Count__c;
- }
- console.log('end this.editData = ' + JSON.stringify(this.editData));
- }
-
- console.log("this.data = " + JSON.stringify(this.data));
- //show
- if (r.entity.EditDelCommitBtnDisabled || r.entity.EditAble) {
- this.isSaveShow = true;
- } else {
- this.isEditShow = true;
- this.isDeliveryShow = true;
- this.isOpenToInvoiceShow = true;
- this.isPraseToPDFShow = true;
- this.isOpenReportShow = true;
- this.isDeleteShow = true;
- }
-
- this.Existarrive = r.entity.Existarrive;
-
- console.log("this.EditAble = " + this.EditAble);
-
- //disable
-
- if (Object.values(r.entity.coc).length > 0) {
- this.cocLwc = r.entity.coc;
- console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
- var coc = r.entity.coc;
- this.accountValue = coc.Order_ForDealerText__c;
- this.ForDealerText = coc.Order_ForDealerText__c;
- console.log('this.accountValue = ' + this.accountValue);
- this.cocId = coc.Id;
- console.log('cocId = ' + this.cocId);
- coc.SummonsStatus = coc.SummonsStatus_c__c;
- if (coc.SummonsStatus_c__c == "宸插畬鎴�") {
- this.isEditDisabled = true;
- }
- if (
- coc.SummonsStatus_c__c == "鎵瑰噯" ||
- coc.SummonsStatus_c__c == "宸查攢鍞緟涓婁紶绾冲搧涔�" ||
- coc.SummonsStatus_c__c == "鍑哄簱鍗曞凡鎵撳嵃" ||
- coc.SummonsStatus_c__c == "宸插畬鎴�"
- ) {
- this.isDeliveryDisabled = true;
- }
- if (
- ((coc.Billed_Status__c != "鍏ㄩ儴寮�绁�" &&
- coc.SummonsStatus_c__c == "宸插畬鎴�") ||
- coc.Onchange_order__c == true) &&
- coc.SummonsForDirction__c != "浜掔浉璋冭揣"
- ) {
- this.isOpenToInvoiceDisabled = false;
- }
- if (
- coc.SummonsStatus_c__c == "宸查攢鍞緟涓婁紶绾冲搧涔�" ||
- coc.SummonsStatus_c__c == "鎵瑰噯" ||
- coc.SummonsStatus_c__c == "鍑哄簱鍗曞凡鎵撳嵃" ||
- coc.SummonsStatus_c__c == "鑽夋涓�"
- ) {
- this.isPraseToPDFDisabled = false;
- }
- if ((coc.Billed_Status__c != "杩樻病寮�绁�" || coc.SummonsStatus_c__c == "宸插畬鎴�") && this.agencyProType != 'ET') {
- this.isOpenReportDisabled = false;
- }
- if (
- coc.SummonsStatus_c__c == "宸查攢鍞緟涓婁紶绾冲搧涔�" ||
- coc.SummonsStatus_c__c == "浠锋牸鏈畾" ||
- coc.SummonsStatus_c__c == "鎵瑰噯" ||
- coc.SummonsStatus_c__c == "鍑哄簱鍗曞凡鎵撳嵃" ||
- coc.SummonsStatus_c__c == "宸插畬鎴�"
- ) {
- this.isDeleteDisabled = true;
- }
- this.isConInvoiceShow =
- coc.SummonsStatus_c__c == "宸插畬鎴�" &&
- coc.SummonsForDirction__c != "浜掔浉璋冭揣"
+ this.isShowOutboundProductDetails =
+ r.entity.consumableorderdetails2Count > 0
? true
: false;
- this.summonsStatusPriceNotDetermined =
- coc.SummonsStatus_c__c == "浠锋牸鏈畾" ? true : false;
- this.isSummonsForDirctionTwoShow =
- coc.SummonsForDirction__c == "閿�鍞粰浜岀骇缁忛攢鍟�" ? true : false;
- }
- this.isSearchShow =
- !this.Existarrive &&
- r.entity.coc.SummonsStatus_c__c != "浠锋牸鏈畾" &&
- r.entity.EditAble
- ? true
- : false;
- this.hidecheckboxcolumn = !this.isSearchShow;
- this.arriveorder = r.entity.arriveorder;
- this.is345Show =
- this.arriveorder == "" && this.Existarrive == false && this.EditAble
- ? true
- : false;
- //濡傛灉涓嶆樉绀�345鍒嗙被锛宑olumns閲岄潰鍒犻櫎3锛�4锛�5鍒嗙被
- if (!this.is345Show) {
- for (var i = 0; i < this.columns.length; i++) {
- if (this.columns[i].label == "绗�3鍒嗙被") {
- this.columns.splice(i, 1);
- }
+ console.log('this.agencyProType = ' + this.agencyProType);
+ console.log('this.EditAble = ' + this.EditAble);
+ //鏌ヨ闄勪欢
+ if (!this.EditAble) this.getFiles();
+ //绗�3鍒嗙被
+ for (var key in r.entity.categoryOptionMap) {
+ let object = {};
+ object['label'] = r.entity.categoryOptionMap[key];
+ object['value'] = key;
+ this.category3Options.push(object);
}
- for (var i = 0; i < this.columns.length; i++) {
- if (this.columns[i].label == "绗�4鍒嗙被") {
- this.columns.splice(i, 1);
- }
+ console.log(
+ 'this.category3Options = ' +
+ JSON.stringify(this.category3Options)
+ );
+ //绗�4鍒嗙被
+ for (var key in r.entity.category4OptionMap) {
+ let object = {};
+ object['label'] = r.entity.category4OptionMap[key];
+ object['value'] = key;
+ this.category4Options.push(object);
}
- for (var i = 0; i < this.columns.length; i++) {
- if (this.columns[i].label == "绗�5鍒嗙被") {
- this.columns.splice(i, 1);
- }
+ console.log(
+ 'this.category4Options = ' + this.category4Options
+ );
+ //绗�5鍒嗙被
+ for (var key in r.entity.category5OptionMap) {
+ let object = {};
+ object['label'] = r.entity.category5OptionMap[key];
+ object['value'] = key;
+ this.category5Options.push(object);
}
- for (var i = 0; i < this.editColumns.length; i++) {
- if (this.editColumns[i].label == "绗�3鍒嗙被") {
- this.editColumns.splice(i, 1);
- }
- }
- for (var i = 0; i < this.editColumns.length; i++) {
- if (this.editColumns[i].label == "绗�4鍒嗙被") {
- this.editColumns.splice(i, 1);
- }
- }
- for (var i = 0; i < this.editColumns.length; i++) {
- if (this.editColumns[i].label == "绗�5鍒嗙被") {
- this.editColumns.splice(i, 1);
- }
- }
- }
- //濡傛灉EditAble==false锛屽垹闄� 鍑鸿揣閲戦(鍏�) 鏈夋晥鏈熷唴搴撳瓨(鐩�) 鏈夋晥鏈熷唴搴撳瓨(涓�) 3鍒� 灞曠ず 杩樻病鍙戠エ鏁伴噺 杩斿搧鏁伴噺 宸插彂绁ㄦ暟閲�
- //type : "number",
- // typeAttributes:{
- // minimumFractionDigits:2,
- // },
- if (!this.EditAble) {
- let object1 = {
- label: this.InvoiceProNotLabel,
- fieldName: "InvoiceProNot_count__c",
- type: "number",
- initialWidth: 120,
- typeAttributes: {
- minimumFractionDigits: 2,
- },
- hideDefaultActions: true,
- };
- let object2 = {
- label: this.RrturnProLabel,
- fieldName: "RrturnPro_count__c",
- initialWidth: 100,
- cellAttributes: { alignment: "right" },
- hideDefaultActions: true,
- };
- let object3 = {
- label: this.InvoicedLabel,
- fieldName: "Invoiced_Procount__c",
- initialWidth: 100,
- type: "number",
- typeAttributes: {
- minimumFractionDigits: 2,
- },
- hideDefaultActions: true,
- };
- this.editColumns.push(object1);
- this.editColumns.push(object2);
- this.editColumns.push(object3);
- } else {
- this.ForCustomerText = this.cocLwc.Order_ForCustomerText__c;
- console.log('EditAble = true this.ForCustomerText = ' + this.ForCustomerText);
- this.summonsForDirction = this.cocLwc.SummonsForDirction__c;
- console.log('EditAble = true this.summonsForDirction = ' + this.summonsForDirction);
- let value = this.summonsForDirction;
- switch (value) {
- case "鐩存帴閿�鍞粰鍖婚櫌":
- this.isDisabledHospitalName = false;
- this.isDisabledForCustomerText = false;
- this.secondaryDistributor = "";
- this.ForDealerText = "";
- this.accountValue = "";
- this.isDisabledForDealerText = true;
- this.isDisabledSecondaryDistributor = true;
- break;
- case "鍖婚櫌璇曠敤":
- this.isDisabledHospitalName = false;
- this.isDisabledForCustomerText = false;
- this.isDisabledForDealerText = false;
- this.isDisabledSecondaryDistributor = false;
- this.isMutualTransferGoods = false;
- break;
- case "閿�鍞粰浜岀骇缁忛攢鍟�":
- this.isDisabledHospitalName = false;
- this.isDisabledForCustomerText = false;
- this.isDisabledForDealerText = false;
- this.isDisabledSecondaryDistributor = false;
- this.isMutualTransferGoods = false;
- break;
- case "浜掔浉璋冭揣":
- this.isDisabledHospitalName = true;
- this.HospitalName = "";
- this.OECId = "";
- this.isDisabledForCustomerText = true;
- this.ForCustomerText = "";
- this.cocLwc["Order_ForCustomerText__c"] = "";
- this.isDisabledForDealerText = false;
- this.isDisabledSecondaryDistributor = false;
- this.isMutualTransferGoods = true;
- break;
- default:
- this.isDisabledHospitalName = false;
- this.isDisabledForCustomerText = false;
- this.isDisabledForDealerText = false;
- this.isDisabledSecondaryDistributor = false;
- }
- }
+ console.log(
+ 'this.category5Options = ' + this.category5Options
+ );
- //濡傛灉hasHosPro = true 鍖婚櫌鐗逛环
- if (this.hasHosPro) {
- let object1 = {
- label: "鍖婚櫌鐗逛环",
- fieldName: "hospitalSpecialOffer",
- type: 'boolean',
- initialWidth: 100,
- hideDefaultActions: true,
- };
- this.columns.push(object1);
- this.editColumns.push(object1);
+ this.data = r.entity.pageRecords;
+ this.editData = r.entity.pageRecords;
+ console.log(
+ 'this.data start = ' + JSON.stringify(this.data)
+ );
+ this.hasHosPro = r.entity.hasHosPro;
+ console.log('this.hasHosPro = ' + this.hasHosPro);
+ if (this.EditAble) {
+ for (var i in this.data) {
+ let unitOptions = [];
+ for (var key in this.data[i].boxorpieceMap) {
+ let unitOption = {};
+ unitOption['label'] =
+ this.data[i].boxorpieceMap[key];
+ unitOption['value'] = key;
+ unitOptions.push(unitOption);
+ }
+ this.data[i]['unitOptions'] = unitOptions;
+ this.data[i]['unitValue'] =
+ this.data[i]['unitValue'] == null
+ ? unitOptions[0].value
+ : this.data[i]['unitValue'];
+ if (this.EditAble) {
+ this.data[i].orderdetails1['Box_Piece__c'] =
+ this.data[i].orderdetails1[
+ 'Box_Piece__c'
+ ] == null
+ ? unitOptions[0].value
+ : this.data[i].orderdetails1[
+ 'Box_Piece__c'
+ ];
+ this.data[i]['unitValue'] =
+ this.data[i].orderdetails1[
+ 'Box_Piece__c'
+ ] == null
+ ? unitOptions[0].value
+ : this.data[i].orderdetails1[
+ 'Box_Piece__c'
+ ];
+ console.log(
+ 'this.data[i].orderdetails1["Box_Piece__c"] = ' +
+ this.data[i].orderdetails1[
+ 'Box_Piece__c'
+ ]
+ );
+ this.data[i].orderdetails1[
+ 'Shipment_Count__c'
+ ] =
+ this.data[i].orderdetails1[
+ 'Shipment_Count__c'
+ ] == null
+ ? 0
+ : this.data[i].orderdetails1[
+ 'Shipment_Count__c'
+ ];
+ this.data[i].orderdetails1[
+ 'Delivery_List_RMB__c'
+ ] =
+ this.data[i].orderdetails1[
+ 'Delivery_List_RMB__c'
+ ] == null
+ ? 0.0
+ : this.data[i].orderdetails1[
+ 'Delivery_List_RMB__c'
+ ];
+ } else {
+ this.data[i]['InvoiceProNot_count__c'] =
+ this.data[
+ i
+ ].orderdetails1.InvoiceProNot_count__c;
+ this.data[i]['RrturnPro_count__c'] =
+ this.data[
+ i
+ ].orderdetails1.RrturnPro_count__c;
+ this.data[i]['Invoiced_Procount__c'] =
+ this.data[
+ i
+ ].orderdetails1.Invoiced_Procount__c;
+ }
+ // this.data[i]["shipmentNumber"] = 0;
+ // this.data[i]["shippingUnitPrice"] = 0.0;
+ //this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"] == 0 ? '' : this.data[i].orderdetails1["Shipment_Count__c"];
+ //this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == 0 ? '' : this.data[i].orderdetails1["Delivery_List_RMB__c"];
+ this.data[i]['shipmentNumber'] =
+ this.data[i].orderdetails1['Shipment_Count__c'];
+ this.data[i]['shippingUnitPrice'] =
+ this.data[i].orderdetails1[
+ 'Delivery_List_RMB__c'
+ ];
+
+ this.data[i]['Id'] = this.data[i].Prod.Id;
+
+ if (this.hasHosPro) {
+ if (this.data[i]['hospitalSpecialOffer']) {
+ this.data[i]['Id'] =
+ this.data[i].Prod.Id + 'ishos';
+ } else {
+ this.data[i]['Id'] =
+ this.data[i].Prod.Id + 'nothos';
+ }
+ }
+ this.data[i]['recordId'] = this.data[i].Prod.Id;
+ this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
+ this.data[i]['SFDA_Status__c'] =
+ this.data[i].Prod.SFDA_Status__c;
+ this.data[i]['Category3__c'] =
+ this.data[i].Prod.Category3__c;
+ this.data[i]['Category4__c'] =
+ this.data[i].Prod.Category4__c;
+ this.data[i]['Category5__c'] =
+ this.data[i].Prod.Category5__c;
+ this.data[i]['Box_Piece__c'] =
+ this.data[i].orderdetails1.Box_Piece__c;
+ this.data[i]['shipmentAmount'] =
+ this.data[i].orderdetails1.Shipment_amount__c;
+ this.data[i]['Shipment_amount__c'] =
+ this.data[i].orderdetails1.Shipment_amount__c;
+ this.data[i]['Shipment_Count__c'] =
+ this.data[i].orderdetails1.Shipment_Count__c;
+
+ if (this.data[i]['check']) {
+ this.selectedRows.push(this.data[i].Id);
+ }
+ }
+ console.log(
+ 'EditAble this.data = ' + JSON.stringify(this.data)
+ );
+ } else {
+ for (var i in this.editData) {
+ this.editData[i]['unitValue'] =
+ this.editData[i]['unitValue'];
+ this.editData[i]['InvoiceProNot_count__c'] =
+ this.editData[
+ i
+ ].orderdetails1.InvoiceProNot_count__c;
+ this.editData[i]['RrturnPro_count__c'] =
+ this.editData[
+ i
+ ].orderdetails1.RrturnPro_count__c;
+ this.editData[i]['Invoiced_Procount__c'] =
+ this.editData[
+ i
+ ].orderdetails1.Invoiced_Procount__c;
+ this.editData[i]['shipmentNumber'] =
+ this.editData[i].orderdetails1[
+ 'Shipment_Count__c'
+ ];
+ this.editData[i]['shippingUnitPrice'] =
+ this.editData[i].orderdetails1[
+ 'Delivery_List_RMB__c'
+ ];
+
+ this.editData[i]['recordId'] =
+ this.editData[i].Prod.Id;
+ this.editData[i]['Id'] = this.editData[i].Prod.Id;
+ this.editData[i]['Name__c'] =
+ this.editData[i].Prod.Name__c;
+ this.editData[i]['SFDA_Status__c'] =
+ this.editData[i].Prod.SFDA_Status__c;
+ this.editData[i]['Category3__c'] =
+ this.editData[i].Prod.Category3__c;
+ this.editData[i]['Category4__c'] =
+ this.editData[i].Prod.Category4__c;
+ this.editData[i]['Category5__c'] =
+ this.editData[i].Prod.Category5__c;
+ this.editData[i]['Box_Piece__c'] =
+ this.editData[i].orderdetails1.Box_Piece__c;
+ this.editData[i]['shipmentAmount'] =
+ this.editData[
+ i
+ ].orderdetails1.Shipment_amount__c;
+ //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
+ this.editData[i]['Delivery_List_RMB__c'] =
+ this.editData[
+ i
+ ].orderdetails1.Delivery_List_RMB__c;
+ this.editData[i]['Shipment_Count__c'] =
+ this.editData[
+ i
+ ].orderdetails1.Shipment_Count__c;
+ }
+ console.log(
+ 'end this.editData = ' +
+ JSON.stringify(this.editData)
+ );
+ }
+
+ console.log('this.data = ' + JSON.stringify(this.data));
+ //show
+ if (
+ r.entity.EditDelCommitBtnDisabled ||
+ r.entity.EditAble
+ ) {
+ this.isSaveShow = true;
+ } else {
+ this.isEditShow = true;
+ this.isDeliveryShow = true;
+ this.isOpenToInvoiceShow = true;
+ this.isPraseToPDFShow = true;
+ this.isOpenReportShow = true;
+ this.isDeleteShow = true;
+ }
+
+ this.Existarrive = r.entity.Existarrive;
+
+ console.log('this.EditAble = ' + this.EditAble);
+
+ //disable
+
+ debugger;
+ if (Object.values(r.entity.coc).length > 0) {
+ this.cocLwc = r.entity.coc;
+ console.log(
+ 'this.cocLwc = ' + JSON.stringify(this.cocLwc)
+ );
+ var coc = r.entity.coc;
+ this.accountValue =
+ coc.Order_ForDealerText__c == null
+ ? ''
+ : coc.Order_ForDealerText__c;
+ this.ForDealerText =
+ coc.Order_ForDealerText__c == null
+ ? ''
+ : coc.Order_ForDealerText__c;
+ console.log('this.accountValue = ' + this.accountValue);
+ this.cocId = coc.Id;
+ console.log('cocId = ' + this.cocId);
+ coc.SummonsStatus = coc.SummonsStatus_c__c;
+ console.log(
+ 'this.cocLwc.Arrive_Order__c = ' +
+ this.cocLwc.Arrive_Order__c
+ );
+ if (this.cocLwc.Arrive_Order__c == null) {
+ this.isBarcode = true;
+ } else {
+ this.isBarcode = false;
+ }
+ if (coc.SummonsStatus_c__c == '宸插畬鎴�') {
+ this.isEditDisabled = true;
+ }
+ if (
+ coc.SummonsStatus_c__c == '鎵瑰噯' ||
+ coc.SummonsStatus_c__c == '宸查攢鍞緟涓婁紶绾冲搧涔�' ||
+ coc.SummonsStatus_c__c == '鍑哄簱鍗曞凡鎵撳嵃' ||
+ coc.SummonsStatus_c__c == '宸插畬鎴�'
+ ) {
+ this.isDeliveryDisabled = true;
+ }
+ if (
+ ((coc.Billed_Status__c != '鍏ㄩ儴寮�绁�' &&
+ coc.SummonsStatus_c__c == '宸插畬鎴�') ||
+ coc.Onchange_order__c == true) &&
+ coc.SummonsForDirction__c != '浜掔浉璋冭揣'
+ ) {
+ this.isOpenToInvoiceDisabled = false;
+ }
+ if (
+ coc.SummonsStatus_c__c == '宸查攢鍞緟涓婁紶绾冲搧涔�' ||
+ coc.SummonsStatus_c__c == '鎵瑰噯' ||
+ coc.SummonsStatus_c__c == '鍑哄簱鍗曞凡鎵撳嵃' ||
+ coc.SummonsStatus_c__c == '鑽夋涓�'
+ ) {
+ this.isPraseToPDFDisabled = false;
+ }
+ if (
+ coc.Billed_Status__c != '杩樻病寮�绁�' ||
+ coc.SummonsStatus_c__c == '宸插畬鎴�'
+ ) {
+ this.isOpenReportDisabled = false;
+ }
+ if (
+ coc.SummonsStatus_c__c == '宸查攢鍞緟涓婁紶绾冲搧涔�' ||
+ coc.SummonsStatus_c__c == '浠锋牸鏈畾' ||
+ coc.SummonsStatus_c__c == '鎵瑰噯' ||
+ coc.SummonsStatus_c__c == '鍑哄簱鍗曞凡鎵撳嵃' ||
+ coc.SummonsStatus_c__c == '宸插畬鎴�'
+ ) {
+ this.isDeleteDisabled = true;
+ }
+ this.isConInvoiceShow =
+ coc.SummonsStatus_c__c == '宸插畬鎴�' &&
+ coc.SummonsForDirction__c != '浜掔浉璋冭揣'
+ ? true
+ : false;
+ this.summonsStatusPriceNotDetermined =
+ coc.SummonsStatus_c__c == '浠锋牸鏈畾' ? true : false;
+ this.isSummonsForDirctionTwoShow =
+ coc.SummonsForDirction__c == '閿�鍞粰浜岀骇缁忛攢鍟�'
+ ? true
+ : false;
+ }
+ this.isSearchShow =
+ !this.Existarrive &&
+ r.entity.coc.SummonsStatus_c__c != '浠锋牸鏈畾' &&
+ r.entity.EditAble
+ ? true
+ : false;
+ this.hidecheckboxcolumn = !this.isSearchShow;
+ this.arriveorder = r.entity.arriveorder;
+ this.is345Show =
+ this.arriveorder == '' &&
+ this.Existarrive == false &&
+ this.EditAble
+ ? true
+ : false;
+ //濡傛灉涓嶆樉绀�345鍒嗙被锛宑olumns閲岄潰鍒犻櫎3锛�4锛�5鍒嗙被
+ if (!this.is345Show) {
+ for (var i = 0; i < this.columns.length; i++) {
+ if (this.columns[i].label == '绗�3鍒嗙被') {
+ this.columns.splice(i, 1);
+ }
+ }
+ for (var i = 0; i < this.columns.length; i++) {
+ if (this.columns[i].label == '绗�4鍒嗙被') {
+ this.columns.splice(i, 1);
+ }
+ }
+ for (var i = 0; i < this.columns.length; i++) {
+ if (this.columns[i].label == '绗�5鍒嗙被') {
+ this.columns.splice(i, 1);
+ }
+ }
+ for (var i = 0; i < this.editColumns.length; i++) {
+ if (this.editColumns[i].label == '绗�3鍒嗙被') {
+ this.editColumns.splice(i, 1);
+ }
+ }
+ for (var i = 0; i < this.editColumns.length; i++) {
+ if (this.editColumns[i].label == '绗�4鍒嗙被') {
+ this.editColumns.splice(i, 1);
+ }
+ }
+ for (var i = 0; i < this.editColumns.length; i++) {
+ if (this.editColumns[i].label == '绗�5鍒嗙被') {
+ this.editColumns.splice(i, 1);
+ }
+ }
+ }
+ //濡傛灉EditAble==false锛屽垹闄� 鍑鸿揣閲戦(鍏�) 鏈夋晥鏈熷唴搴撳瓨(鐩�) 鏈夋晥鏈熷唴搴撳瓨(涓�) 3鍒� 灞曠ず 杩樻病鍙戠エ鏁伴噺 杩斿搧鏁伴噺 宸插彂绁ㄦ暟閲�
+ //type : "number",
+ // typeAttributes:{
+ // minimumFractionDigits:2,
+ // },
+ if (!this.EditAble) {
+ let object1 = {
+ label: this.InvoiceProNotLabel,
+ fieldName: 'InvoiceProNot_count__c',
+ type: 'number',
+ initialWidth: 105,
+ typeAttributes: {
+ minimumFractionDigits: 2
+ },
+ hideDefaultActions: true
+ };
+ let object2 = {
+ label: this.RrturnProLabel,
+ fieldName: 'RrturnPro_count__c',
+ cellAttributes: { alignment: 'right' },
+ initialWidth: 100,
+ hideDefaultActions: true
+ };
+ let object3 = {
+ label: this.InvoicedLabel,
+ fieldName: 'Invoiced_Procount__c',
+ type: 'number',
+ initialWidth: 100,
+ typeAttributes: {
+ minimumFractionDigits: 2
+ },
+ hideDefaultActions: true
+ };
+ this.editColumns.push(object1);
+ this.editColumns.push(object2);
+ this.editColumns.push(object3);
+ } else {
+ this.ForCustomerText =
+ this.cocLwc.Order_ForCustomerText__c;
+ console.log(
+ 'EditAble = true this.ForCustomerText = ' +
+ this.ForCustomerText
+ );
+ this.summonsForDirction =
+ this.cocLwc.SummonsForDirction__c;
+ console.log(
+ 'EditAble = true this.summonsForDirction = ' +
+ this.summonsForDirction
+ );
+ let value = this.summonsForDirction;
+ switch (value) {
+ case '鐩存帴閿�鍞粰鍖婚櫌':
+ this.isDisabledHospitalName = false;
+ this.isDisabledForCustomerText = false;
+ this.secondaryDistributor = '';
+ this.ForDealerText = '';
+ this.accountValue = '';
+ this.cocLwc['Order_ForDealerText__c'] = '';
+ this.isDisabledForDealerText = true;
+ this.isDisabledSecondaryDistributor = true;
+ break;
+ case '鍖婚櫌璇曠敤':
+ this.isDisabledHospitalName = false;
+ this.isDisabledForCustomerText = false;
+ this.isDisabledForDealerText = false;
+ this.isDisabledSecondaryDistributor = false;
+ this.isMutualTransferGoods = false;
+ break;
+ case '閿�鍞粰浜岀骇缁忛攢鍟�':
+ this.isDisabledHospitalName = false;
+ this.isDisabledForCustomerText = false;
+ this.isDisabledForDealerText = false;
+ this.isDisabledSecondaryDistributor = false;
+ this.isMutualTransferGoods = false;
+ break;
+ case '浜掔浉璋冭揣':
+ this.isDisabledHospitalName = true;
+ this.HospitalName = '';
+ this.OECId = '';
+ this.isDisabledForCustomerText = true;
+ this.ForCustomerText = '';
+ this.cocLwc['Order_ForCustomerText__c'] = '';
+ this.isDisabledForDealerText = false;
+ this.isDisabledSecondaryDistributor = false;
+ this.isMutualTransferGoods = true;
+ break;
+ default:
+ this.isDisabledHospitalName = false;
+ this.isDisabledForCustomerText = false;
+ this.isDisabledForDealerText = false;
+ this.isDisabledSecondaryDistributor = false;
+ }
+ }
+
+ //濡傛灉hasHosPro = true 鍖婚櫌鐗逛环
+ if (this.hasHosPro) {
+ let object1 = {
+ label: '鍖婚櫌鐗逛环',
+ initialWidth: 80,
+ fieldName: 'hospitalSpecialOffer',
+ type: 'boolean',
+ hideDefaultActions: true
+ };
+ this.columns.push(object1);
+ this.editColumns.push(object1);
+ }
+ //鍑哄簱鍗曚俊鎭�
+ this.isSummonsFlag =
+ r.entity.SummonsFlag == 'visible' ? true : false;
+ console.log(
+ 'r.entity.provinceOptsMap = ' + r.entity.provinceOptsMap
+ );
+ for (var key in r.entity.provinceOptsMap) {
+ let object = {};
+ object['label'] = r.entity.provinceOptsMap[key];
+ object['value'] = key;
+ this.secondaryDistributorOptions.push(object);
+ }
+ for (var key in r.entity.outOutPatternOptionMap) {
+ let object = {};
+ object['label'] = r.entity.outOutPatternOptionMap[key];
+ object['value'] = key;
+ this.outOutPatternOptionList.push(object);
+ }
+ console.log(
+ 'this.secondaryDistributorOptions = ' +
+ JSON.stringify(this.secondaryDistributorOptions)
+ );
+ this.HospitalName = r.entity.HospitalName;
+ this.sumPrice = r.entity.sumPrice.toFixed(2) + '鍏�';
+ debugger;
+ console.log('this.Existarrive = ' + this.Existarrive);
+ console.log('this.EditAble = ' + this.EditAble);
+ console.log(
+ 'r.entity.coc.SummonsStatus_c__c = ' +
+ r.entity.coc.SummonsStatus_c__c
+ );
+ if (
+ !this.Existarrive &&
+ this.EditAble &&
+ r.entity.coc.SummonsStatus_c__c != '浠锋牸鏈畾'
+ ) {
+ this.hideCheckboxColumn = false;
+ } else {
+ this.hideCheckboxColumn = true;
+ }
+ if (
+ !(
+ this.arriveorder == '' &&
+ this.Existarrive == false &&
+ this.EditAble &&
+ this.cocLwc.SummonsStatus_c__c != '浠锋牸鏈畾'
+ )
+ ) {
+ //璁╁崟浣嶏紝鍑鸿揣鏁伴噺 鍙樹负涓嶅彲閫夌殑text绫诲瀷
+ for (var i in this.columns) {
+ if (this.columns[i].label == '鍗曚綅') {
+ this.columns[i].type = 'text';
+ this.columns[i].fieldName = 'unitValue';
+ }
+ if (this.columns[i].label == '鍑鸿揣鏁伴噺') {
+ this.columns[i].type = 'text';
+ this.columns[i].fieldName = 'shipmentNumber';
+ }
+ }
+ }
+ this.isShowSpinner = false;
+ this.showTable = true;
+ console.log('ESetid = ' + this.ESetid);
+ } else {
+ console.log('r = ' + JSON.stringify(r));
+ this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
}
- //鍑哄簱鍗曚俊鎭�
- this.isSummonsFlag = r.entity.SummonsFlag == "visible" ? true : false;
- console.log("r.entity.provinceOptsMap = " + r.entity.provinceOptsMap);
- for (var key in r.entity.provinceOptsMap) {
- let object = {};
- object["label"] = r.entity.provinceOptsMap[key];
- object["value"] = key;
- this.secondaryDistributorOptions.push(object);
- }
- for (var key in r.entity.outOutPatternOptionMap) {
- let object = {};
- object["label"] = r.entity.outOutPatternOptionMap[key];
- object["value"] = key;
- this.outOutPatternOptionList.push(object);
- }
- console.log(
- "this.secondaryDistributorOptions = " +
- JSON.stringify(this.secondaryDistributorOptions)
- );
- this.HospitalName = r.entity.HospitalName;
- this.sumPrice = r.entity.sumPrice.toFixed(2) + "鍏�";
- this.isShowSpinner = false;
- this.showTable = true;
- console.log("ESetid = " + this.ESetid);
- } else {
- console.log("r = " + JSON.stringify(r));
- this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error');
- });
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error');
+ });
}
ChangeDirction(event) {
let value = event.target.value;
this.summonsForDirction = value;
- this.cocLwc["SummonsForDirction__c"] = value;
- console.log("閫夋嫨浜� = " + value);
+ this.cocLwc['SummonsForDirction__c'] = value;
+ console.log('閫夋嫨浜� = ' + value);
switch (value) {
- case "鐩存帴閿�鍞粰鍖婚櫌":
+ case '鐩存帴閿�鍞粰鍖婚櫌':
this.isDisabledHospitalName = false;
this.isDisabledForCustomerText = false;
- this.secondaryDistributor = "";
- this.ForDealerText = "";
+ this.secondaryDistributor = '';
+ this.ForDealerText = '';
+ this.cocLwc['Order_ForDealerText__c'] = '';
this.isDisabledForDealerText = true;
this.isDisabledSecondaryDistributor = true;
this.isMutualTransferGoods = false;
break;
- case "鍖婚櫌璇曠敤":
+ case '鍖婚櫌璇曠敤':
this.isDisabledHospitalName = false;
this.isDisabledForCustomerText = false;
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
this.isMutualTransferGoods = false;
break;
- case "閿�鍞粰浜岀骇缁忛攢鍟�":
+ case '閿�鍞粰浜岀骇缁忛攢鍟�':
this.isDisabledHospitalName = false;
this.isDisabledForCustomerText = false;
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
this.isMutualTransferGoods = false;
break;
- case "浜掔浉璋冭揣":
+ case '浜掔浉璋冭揣':
this.isDisabledHospitalName = true;
- this.HospitalName = "";
- this.OECId = "";
+ this.HospitalName = '';
+ this.OECId = '';
this.isDisabledForCustomerText = true;
- this.ForCustomerText = "";
- this.cocLwc["Order_ForCustomerText__c"] = "";
+ this.ForCustomerText = '';
+ this.cocLwc['Order_ForCustomerText__c'] = '';
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
this.isMutualTransferGoods = true;
@@ -1118,42 +1342,42 @@
}
dataChange(event) {
- let fieldName = event.target.getAttribute("data-field");
+ let fieldName = event.target.getAttribute('data-field');
let value = event.detail.value;
- console.log("fieldName = " + fieldName + " value = " + value);
+ console.log('fieldName = ' + fieldName + ' value = ' + value);
switch (fieldName) {
- case "summonsForDirction":
+ case 'summonsForDirction':
this.summonsForDirction = value;
break;
- case "secondaryDistributor":
+ case 'secondaryDistributor':
this.secondaryDistributor = value;
break;
- case "HospitalName":
+ case 'HospitalName':
this.HospitalName = value;
break;
- case "outOutPattern":
+ case 'outOutPattern':
this.outOutPattern = value;
break;
- case "ForDealerText":
+ case 'ForDealerText':
this.ForDealerText = value;
- this.cocLwc["Order_ForDealerText__c"] = value;
+ this.cocLwc['Order_ForDealerText__c'] = value;
break;
- case "ForCustomerText":
- this.cocLwc["Order_ForCustomerText__c"] = value;
+ case 'ForCustomerText':
+ this.cocLwc['Order_ForCustomerText__c'] = value;
this.ForCustomerText = value;
break;
- case "sumPrice":
+ case 'sumPrice':
this.sumPrice = value.toFixed(2);
break;
- case "NoConfirmedPrice":
+ case 'NoConfirmedPrice':
this.NoConfirmedPrice = !this.NoConfirmedPrice;
- this.cocLwc["NoConfirmedPrice__c"] = this.NoConfirmedPrice;
- console.log("this.NoConfirmedPrice = " + this.NoConfirmedPrice);
+ this.cocLwc['NoConfirmedPrice__c'] = this.NoConfirmedPrice;
+ console.log('this.NoConfirmedPrice = ' + this.NoConfirmedPrice);
break;
- case "consumableName":
+ case 'consumableName':
this.consumableName = value;
break;
- case "Category3":
+ case 'Category3':
this.Category3 = value;
//璋冪敤鍚庡彴鏄剧ず绗洓浜斿垎绫�
this.showAllCate();
@@ -1162,7 +1386,7 @@
this.Category5 = '';
}
break;
- case "Category4":
+ case 'Category4':
this.Category4 = value;
//璋冪敤鍚庡彴鏄剧ず绗簲鍒嗙被
this.showCate();
@@ -1170,88 +1394,96 @@
this.Category5 = '';
}
break;
- case "Category5":
+ case 'Category5':
this.Category5 = value;
break;
- case "searchHospitalName":
+ case 'searchHospitalName':
this.searchHospitalName = value;
break;
- case "Barcode":
+ case 'Barcode':
this.Barcode = value;
break;
- case "Order_ForDealerText__c":
- this.cocLwc["Order_ForDealerText__c"] = value;
+ case 'Order_ForDealerText__c':
+ this.cocLwc['Order_ForDealerText__c'] = value;
break;
}
}
showAllCate() {
- console.log('showAllCate')
+ console.log('showAllCate');
categoryAllload({
category3Lwc: this.Category3
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.category4Options = [];
- this.category5Options = [];
- //绗�4鍒嗙被
- for (var key in r.entity.category4OptionMap) {
- let object = {};
- object["label"] = r.entity.category4OptionMap[key];
- object["value"] = key;
- this.category4Options.push(object);
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.category4Options = [];
+ this.category5Options = [];
+ //绗�4鍒嗙被
+ for (var key in r.entity.category4OptionMap) {
+ let object = {};
+ object['label'] = r.entity.category4OptionMap[key];
+ object['value'] = key;
+ this.category4Options.push(object);
+ }
+ console.log(
+ 'this.category4Options = ' + this.category4Options
+ );
+ //绗�5鍒嗙被
+ for (var key in r.entity.category5OptionMap) {
+ let object = {};
+ object['label'] = r.entity.category5OptionMap[key];
+ object['value'] = key;
+ this.category5Options.push(object);
+ }
+ } else {
+ console.log('r = ' + JSON.stringify(r));
+ this.showMyToast('4/5鍒嗙被鏌ヨ澶辫触', r.msg, 'Error');
}
- console.log("this.category4Options = " + this.category4Options);
- //绗�5鍒嗙被
- for (var key in r.entity.category5OptionMap) {
- let object = {};
- object["label"] = r.entity.category5OptionMap[key];
- object["value"] = key;
- this.category5Options.push(object);
- }
- } else {
- console.log("r = " + JSON.stringify(r));
- this.showMyToast('4/5鍒嗙被鏌ヨ澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error" + JSON.stringify(error));
- });
+ })
+ .catch((error) => {
+ console.log('error' + JSON.stringify(error));
+ });
}
showCate() {
- console.log('showAllCate')
+ console.log('showAllCate');
categoryload({
category3Lwc: this.Category3,
category4Lwc: this.Category4
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- this.category4Options = [];
- this.category5Options = [];
- //绗�4鍒嗙被
- for (var key in r.entity.category4OptionMap) {
- let object = {};
- object["label"] = r.entity.category4OptionMap[key];
- object["value"] = key;
- this.category4Options.push(object);
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.category4Options = [];
+ this.category5Options = [];
+ //绗�4鍒嗙被
+ for (var key in r.entity.category4OptionMap) {
+ let object = {};
+ object['label'] = r.entity.category4OptionMap[key];
+ object['value'] = key;
+ this.category4Options.push(object);
+ }
+ console.log(
+ 'this.category4Options = ' + this.category4Options
+ );
+ //绗�5鍒嗙被
+ for (var key in r.entity.category5OptionMap) {
+ let object = {};
+ object['label'] = r.entity.category5OptionMap[key];
+ object['value'] = key;
+ this.category5Options.push(object);
+ }
+ } else {
+ console.log('r = ' + JSON.stringify(r));
+ this.showMyToast('Error', r.msg, 'Error');
}
- console.log("this.category4Options = " + this.category4Options);
- //绗�5鍒嗙被
- for (var key in r.entity.category5OptionMap) {
- let object = {};
- object["label"] = r.entity.category5OptionMap[key];
- object["value"] = key;
- this.category5Options.push(object);
- }
- } else {
- console.log("r = " + JSON.stringify(r));
- this.showMyToast('Error', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error" + JSON.stringify(error));
- });
+ })
+ .catch((error) => {
+ console.log('error' + JSON.stringify(error));
+ });
}
invoiceChange(event) {
@@ -1272,37 +1504,46 @@
iconName = 'utility:error';
}
if (message != '') {
- content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
} else {
content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
}
searchProductJs() {
this.isEditShowSpinner = true;
//this.showTable = false;
//鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
- const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
+ const selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
console.log('selectedRows = ' + selectedRows);
for (var i in this.data) {
- this.data[i]["check"] = false;
+ this.data[i]['check'] = false;
}
for (var i in this.data) {
for (var j in selectedRows) {
if (this.data[i].Id == selectedRows[j].Id) {
- this.data[i]["check"] = true;
+ this.data[i]['check'] = true;
}
}
}
- let cloneData = this.data;
+ let cloneData = this.deepClone(this.data);
for (var i in cloneData) {
- cloneData[i]["Name"] = cloneData[i].Name__c;
- cloneData[i]["Category3"] = cloneData[i].Category3__c;
- cloneData[i]["Category4"] = cloneData[i].Category4__c;
- cloneData[i]["Category5"] = cloneData[i].Category5__c;
- cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
+ cloneData[i]['Name'] = cloneData[i].Name__c;
+ cloneData[i]['Category3'] = cloneData[i].Category3__c;
+ cloneData[i]['Category4'] = cloneData[i].Category4__c;
+ cloneData[i]['Category5'] = cloneData[i].Category5__c;
+ cloneData[i]['BoxPiece'] = cloneData[i].Box_Piece__c;
delete cloneData[i].Name__c;
delete cloneData[i].Category3__c;
delete cloneData[i].Category4__c;
@@ -1310,7 +1551,7 @@
delete cloneData[i].Box_Piece__c;
}
- console.log("cloneData = " + JSON.stringify(cloneData));
+ console.log('cloneData = ' + JSON.stringify(cloneData));
searchConsumableorderdetails({
agencyProTypeLwc: this.agencyProType,
accountNameLwc: this.accountName,
@@ -1322,24 +1563,31 @@
category5: this.Category5,
editAbleLwc: this.EditAble,
pageRecordsLwcLwc: cloneData,
- consumableproductdetailsRecordsLwc: this.consumableproductdetailsRecords,
+ consumableproductdetailsRecordsLwc:
+ this.consumableproductdetailsRecords,
arriveorderLwc: this.arriveorder,
pageSizeLWC: this.pageSize,
pageTokenLWC: this.currentPageToken
}).then((r) => {
r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
-
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
//鍒嗛〉
- console.log('r.entity.paginatedAccounts = ' + JSON.stringify(r.entity.paginatedAccounts));
+ console.log(
+ 'r.entity.paginatedAccounts = ' +
+ JSON.stringify(r.entity.paginatedAccounts)
+ );
this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
this.totalRecords = r.entity.paginatedAccounts.totalRecords;
this.recordStart = r.entity.paginatedAccounts.recordStart;
this.recordEnd = r.entity.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(r.entity.paginatedAccounts.totalRecords / this.pageSize);
+ this.totalPages = Math.ceil(
+ r.entity.paginatedAccounts.totalRecords / this.pageSize
+ );
console.log('this.totalPages = ' + this.totalPages);
+ this.hasHosPro = r.entity.hasHosPro;
+ console.log('this.hasHosPro = ' + this.hasHosPro);
this.SearchDone = r.entity.SearchDone;
let tempData = [];
@@ -1349,126 +1597,189 @@
let unitOptions = [];
for (var key in tempData[i].boxorpieceMap) {
let unitOption = {};
- unitOption["label"] = tempData[i].boxorpieceMap[key];
- unitOption["value"] = key;
+ unitOption['label'] = tempData[i].boxorpieceMap[key];
+ unitOption['value'] = key;
unitOptions.push(unitOption);
}
- tempData[i]["unitOptions"] = unitOptions;
- tempData[i]["unitValue"] = tempData[i]["unitValue"] == null ? unitOptions[0].value : tempData[i]["unitValue"];
+ tempData[i]['unitOptions'] = unitOptions;
+ tempData[i]['unitValue'] =
+ tempData[i]['unitValue'] == null
+ ? unitOptions[0].value
+ : tempData[i]['unitValue'];
if (this.EditAble) {
- tempData[i].orderdetails1["Box_Piece__c"] = tempData[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : tempData[i].orderdetails1["Box_Piece__c"];
- tempData[i]["unitValue"] = tempData[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : tempData[i].orderdetails1["Box_Piece__c"];
- tempData[i].orderdetails1["Shipment_Count__c"] = tempData[i].orderdetails1["Shipment_Count__c"] == null ? 0 : tempData[i].orderdetails1["Shipment_Count__c"];
- tempData[i].orderdetails1["Delivery_List_RMB__c"] = tempData[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : tempData[i].orderdetails1["Delivery_List_RMB__c"];
+ tempData[i].orderdetails1['Box_Piece__c'] =
+ tempData[i].orderdetails1['Box_Piece__c'] == null
+ ? unitOptions[0].value
+ : tempData[i].orderdetails1['Box_Piece__c'];
+ tempData[i]['unitValue'] =
+ tempData[i].orderdetails1['Box_Piece__c'] == null
+ ? unitOptions[0].value
+ : tempData[i].orderdetails1['Box_Piece__c'];
+ tempData[i].orderdetails1['Shipment_Count__c'] =
+ tempData[i].orderdetails1['Shipment_Count__c'] ==
+ null
+ ? 0
+ : tempData[i].orderdetails1[
+ 'Shipment_Count__c'
+ ];
+ tempData[i].orderdetails1['Delivery_List_RMB__c'] =
+ tempData[i].orderdetails1['Delivery_List_RMB__c'] ==
+ null
+ ? 0.0
+ : tempData[i].orderdetails1[
+ 'Delivery_List_RMB__c'
+ ];
} else {
- tempData[i]["InvoiceProNot_count__c"] =
+ tempData[i]['InvoiceProNot_count__c'] =
tempData[i].orderdetails1.InvoiceProNot_count__c;
- tempData[i]["RrturnPro_count__c"] =
+ tempData[i]['RrturnPro_count__c'] =
tempData[i].orderdetails1.RrturnPro_count__c;
- tempData[i]["Invoiced_Procount__c"] =
+ tempData[i]['Invoiced_Procount__c'] =
tempData[i].orderdetails1.Invoiced_Procount__c;
}
- tempData[i]["shipmentNumber"] = tempData[i].orderdetails1["Shipment_Count__c"];
- tempData[i]["shippingUnitPrice"] = tempData[i].orderdetails1["Delivery_List_RMB__c"];
+ tempData[i]['shipmentNumber'] =
+ tempData[i].orderdetails1['Shipment_Count__c'];
+ tempData[i]['shippingUnitPrice'] =
+ tempData[i].orderdetails1['Delivery_List_RMB__c'];
+ tempData[i]['Id'] = tempData[i].Prod.Id;
- console.log('tempData[i]["hospitalSpecialOffer"] = ' + tempData[i]["hospitalSpecialOffer"])
- if (tempData[i]["hospitalSpecialOffer"]) {
- tempData[i]["Id"] = tempData[i].Prod.Id + 'ishos';
- } else {
- tempData[i]["Id"] = tempData[i].Prod.Id + 'nothos';
+ console.log(
+ 'tempData[i]["hospitalSpecialOffer"] = ' +
+ tempData[i]['hospitalSpecialOffer']
+ );
+ if (this.hasHosPro) {
+ if (tempData[i]['hospitalSpecialOffer']) {
+ tempData[i]['Id'] = tempData[i].Prod.Id + 'ishos';
+ } else {
+ tempData[i]['Id'] = tempData[i].Prod.Id + 'nothos';
+ }
}
- tempData[i]["recordId"] = tempData[i]["Id"];
- tempData[i]["Name__c"] = tempData[i].Prod.Name__c;
- tempData[i]["SFDA_Status__c"] = tempData[i].Prod.SFDA_Status__c;
- tempData[i]["Category3__c"] = tempData[i].Prod.Category3__c;
- tempData[i]["Category4__c"] = tempData[i].Prod.Category4__c;
- tempData[i]["Category5__c"] = tempData[i].Prod.Category5__c;
- tempData[i]["Box_Piece__c"] = tempData[i].orderdetails1.Box_Piece__c;
- tempData[i]["shipmentAmount"] = tempData[i].orderdetails1.Shipment_amount__c;
- tempData[i]["Shipment_amount__c"] = tempData[i].orderdetails1.Shipment_amount__c;
- tempData[i]["Shipment_Count__c"] = tempData[i].orderdetails1.Shipment_Count__c;
- if (tempData[i]["shippingUnitPrice"] && tempData[i]["shipmentNumber"])
- tempData[i]["shipmentAmount"] = this.amend(
- tempData[i]["shipmentNumber"],
- tempData[i]["shippingUnitPrice"],
- "*"
+ tempData[i]['recordId'] = tempData[i]['Id'];
+ tempData[i]['Name__c'] = tempData[i].Prod.Name__c;
+ tempData[i]['SFDA_Status__c'] =
+ tempData[i].Prod.SFDA_Status__c;
+ tempData[i]['Category3__c'] = tempData[i].Prod.Category3__c;
+ tempData[i]['Category4__c'] = tempData[i].Prod.Category4__c;
+ tempData[i]['Category5__c'] = tempData[i].Prod.Category5__c;
+ tempData[i]['Box_Piece__c'] =
+ tempData[i].orderdetails1.Box_Piece__c;
+ tempData[i]['shipmentAmount'] =
+ tempData[i].orderdetails1.Shipment_amount__c;
+ tempData[i]['Shipment_amount__c'] =
+ tempData[i].orderdetails1.Shipment_amount__c;
+ tempData[i]['Shipment_Count__c'] =
+ tempData[i].orderdetails1.Shipment_Count__c;
+
+ if (
+ tempData[i]['shippingUnitPrice'] &&
+ tempData[i]['shipmentNumber']
+ )
+ tempData[i]['shipmentAmount'] = this.amend(
+ tempData[i]['shipmentNumber'],
+ tempData[i]['shippingUnitPrice'],
+ '*'
);
if (tempData[i]['check']) {
this.selectedRows.push(tempData[i].Id);
}
-
}
this.data = tempData;
- console.log("this.data = " + JSON.stringify(this.data));
- console.log(" this.selectedRows = " + JSON.stringify(this.selectedRows));
+
+ //濡傛灉hasHosPro = true 鍖婚櫌鐗逛环
+ console.log('this.hasHosPro = ' + this.hasHosPro);
+ if (this.hasHosPro) {
+ let object1 = {
+ label: '鍖婚櫌鐗逛环',
+ fieldName: 'hospitalSpecialOffer',
+ type: 'boolean',
+ initialWidth: 80,
+ hideDefaultActions: true
+ };
+ this.columns.push(object1);
+ this.editColumns.push(object1);
+ }
+ this.columns = [...this.columns];
+ this.editColumns = [...this.editColumns];
+ console.log('this.columns = ' + JSON.stringify(this.columns));
+ console.log('this.data = ' + JSON.stringify(this.data));
+ console.log(
+ ' this.selectedRows = ' + JSON.stringify(this.selectedRows)
+ );
//this.showTable = true;
this.isEditShowSpinner = false;
} else {
- console.log("r = " + JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
this.showMyToast('鏌ヨ澶辫触', r.msg, 'Error');
}
});
}
searchHospitalNameModal() {
- console.log("searchHospitalNameModal");
+ console.log('searchHospitalNameModal');
hospitalInit({
- ctype: this.agencyProType,
+ ctype: this.agencyProType
}).then((r) => {
r = JSON.parse(JSON.stringify(r));
- if (r.status == "Success") {
+ if (r.status == 'Success') {
this.hospitalList = r.entity.at;
for (var i in this.hospitalList) {
- this.hospitalList[i]["stateMasterName"] =
+ this.hospitalList[i]['stateMasterName'] =
this.hospitalList[i].State_Master__r.Name;
}
- console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
+ console.log(
+ 'hospitalInit r = ' + JSON.stringify(this.hospitalList)
+ );
this.isModalOpen = true;
}
});
}
searchHospital() {
- console.log("this.searchHospitalName = " + this.searchHospitalName);
+ console.log('this.searchHospitalName = ' + this.searchHospitalName);
serContact({
searchName: this.searchHospitalName,
- ctype: this.agencyProType,
+ ctype: this.agencyProType
}).then((r) => {
r = JSON.parse(JSON.stringify(r));
- if (r.status == "Success") {
+ if (r.status == 'Success') {
this.hospitalList = r.entity.at;
for (var i in this.hospitalList) {
- this.hospitalList[i]["stateMasterName"] =
+ this.hospitalList[i]['stateMasterName'] =
this.hospitalList[i].State_Master__r.Name;
}
- console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
+ console.log(
+ 'hospitalInit r = ' + JSON.stringify(this.hospitalList)
+ );
}
});
}
searchHandleRowAction(event) {
- console.log("searchHandleRowAction");
+ console.log('searchHandleRowAction');
let row = event.detail.row;
this.OECId = row.Id;
this.HospitalName = row.Name;
console.log(
- "this.OECId = " + this.OECId + " this.HospitalName = " + this.HospitalName
+ 'this.OECId = ' +
+ this.OECId +
+ ' this.HospitalName = ' +
+ this.HospitalName
);
this.isModalOpen = false;
- console.log("this.isModalOpen = " + this.isModalOpen);
+ console.log('this.isModalOpen = ' + this.isModalOpen);
}
clearAgencyI(event) {
this.HospitalName = event.target.value;
- if (this.HospitalName == "" || this.HospitalName == null) {
- this.OECId = "";
+ if (this.HospitalName == '' || this.HospitalName == null) {
+ this.OECId = '';
}
- console.log("this.HospitalName = " + this.HospitalName);
- console.log("this.OECId = " + this.OECId);
- if (this.OECId != null && this.OECId != "") {
+ console.log('this.HospitalName = ' + this.HospitalName);
+ console.log('this.OECId = ' + this.OECId);
+ if (this.OECId != null && this.OECId != '') {
this.checkOutPattern();
}
}
@@ -1485,9 +1796,9 @@
}
}
if (ishos > 0) {
- this.cocLwc["OutPattern__c"] = true;
+ this.cocLwc['OutPattern__c'] = true;
} else {
- this.cocLwc["OutPattern__c"] = false;
+ this.cocLwc['OutPattern__c'] = false;
}
}
@@ -1496,47 +1807,62 @@
}
handleUnitChange(event) {
- console.log("handleUnitChange");
+ console.log('handleUnitChange');
const unitDetail = event.detail;
- console.log("unitDetail = " + JSON.stringify(unitDetail));
+ console.log('unitDetail = ' + JSON.stringify(unitDetail));
for (var i in this.data) {
if (this.data[i].Id == unitDetail.data.recordId) {
this.data[i].unitValue = unitDetail.data.unitValue;
- this.data[i].orderdetails1["Box_Piece__c"] = unitDetail.data.unitValue;
+ this.data[i].orderdetails1['Box_Piece__c'] =
+ unitDetail.data.unitValue;
}
}
- console.log("this.data = " + JSON.stringify(this.data));
+ console.log('this.data = ' + JSON.stringify(this.data));
}
handleShipmentNumber(event) {
- console.log("handleShipmentNumber");
+ console.log('handleShipmentNumber');
const numberDetail = event.detail;
- console.log("numberDetail = " + JSON.stringify(numberDetail));
+ console.log('numberDetail = ' + JSON.stringify(numberDetail));
let index = 0;
for (var i in this.data) {
if (this.data[i].Id == numberDetail.data.recordId) {
index = i;
- this.data[i].shipmentNumber = Number(numberDetail.data.shipmentnumber);
- this.data[i].orderdetails1["Shipment_Count__c"] = Number(
+ this.data[i].shipmentNumber = Number(
numberDetail.data.shipmentnumber
);
- console.log('this.data[i].orderdetails1["Shipment_Count__c"] = ' + this.data[i].orderdetails1["Shipment_Count__c"]);
- console.log('this.selectedRows.indexOf(this.data[i].Id) = ' + this.selectedRows.indexOf(this.data[i].Id));
- if (this.data[i].orderdetails1["Shipment_Count__c"] != '') {
+ this.data[i].orderdetails1['Shipment_Count__c'] = Number(
+ numberDetail.data.shipmentnumber
+ );
+ console.log(
+ 'this.data[i].orderdetails1["Shipment_Count__c"] = ' +
+ this.data[i].orderdetails1['Shipment_Count__c']
+ );
+ console.log(
+ 'this.selectedRows.indexOf(this.data[i].Id) = ' +
+ this.selectedRows.indexOf(this.data[i].Id)
+ );
+ if (this.data[i].orderdetails1['Shipment_Count__c'] != '') {
if (this.selectedRows.indexOf(this.data[i].Id) == -1) {
this.selectedRows.push(this.data[i].Id);
}
this.data[i].check = true;
} else {
if (this.selectedRows.indexOf(this.data[i].Id) != -1) {
- this.selectedRows.splice(this.selectedRows.indexOf(this.data[i].Id), 1);
+ this.selectedRows.splice(
+ this.selectedRows.indexOf(this.data[i].Id),
+ 1
+ );
}
this.data[i].check = false;
}
this.selectedRows = [...this.selectedRows];
- console.log('this.selectedRows = ' + JSON.stringify(this.selectedRows));
+ console.log(
+ 'this.selectedRows = ' + JSON.stringify(this.selectedRows)
+ );
}
}
+ this.data = [...this.data];
this.ComputePrice(
index,
this.data[index].shipmentNumber,
@@ -1545,7 +1871,7 @@
}
handleShipmentUnitPrice(event) {
- console.log("handleShipmentUnitPrice");
+ console.log('handleShipmentUnitPrice');
const priceDetail = event.detail;
let index = 0;
for (var i in this.data) {
@@ -1554,7 +1880,7 @@
this.data[i].shippingUnitPrice = Number(
priceDetail.data.shipmentunitprice
);
- this.data[i].orderdetails1["Delivery_List_RMB__c"] = Number(
+ this.data[i].orderdetails1['Delivery_List_RMB__c'] = Number(
priceDetail.data.shipmentunitprice
);
}
@@ -1567,17 +1893,18 @@
}
ComputePrice(index, number, price) {
- console.log("index = " + index);
- console.log("number = " + number);
- console.log("price = " + price);
- let shipmentAmount = this.amend(number, price, "*");
- console.log("shipmentAmount = " + shipmentAmount);
+ console.log('index = ' + index);
+ console.log('number = ' + number);
+ console.log('price = ' + price);
+ let shipmentAmount = this.amend(number, price, '*');
+ console.log('shipmentAmount = ' + shipmentAmount);
let sumPrice = 0.0;
this.data[index].shipmentAmount = shipmentAmount;
for (var i in this.data) {
- if (this.data[i].shipmentAmount) sumPrice += this.data[i].shipmentAmount;
+ if (this.data[i].shipmentAmount)
+ sumPrice += this.data[i].shipmentAmount;
}
- this.sumPrice = sumPrice.toFixed(2) + "鍏�";
+ this.sumPrice = sumPrice.toFixed(2) + '鍏�';
//瀛樹笅閫夋嫨琛岋紝涓嶄細琚竻绌�
// if (this.selectedRows.indexOf(this.data[index].Id) == -1)
// this.selectedRows.push(this.data[index].Id);
@@ -1590,7 +1917,7 @@
this.data = [...this.data];
// this.selectedRows = [...this.selectedRows]
// console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
- console.log("this.data = " + JSON.stringify(this.data));
+ console.log('this.data = ' + JSON.stringify(this.data));
}
//num1 num2浼犲叆涓や釜鍊� symbol +-*/绗﹀彿
@@ -1602,12 +1929,12 @@
str2Length;
//瑙e喅鏁存暟娌℃湁灏忔暟鐐规柟娉�
try {
- str1Length = str1.split(".")[1].length;
+ str1Length = str1.split('.')[1].length;
} catch (error) {
str1Length = 0;
}
try {
- str2Length = str2.split(".")[1].length;
+ str2Length = str2.split('.')[1].length;
} catch (error) {
str2Length = 0;
}
@@ -1615,16 +1942,16 @@
//
console.log(step);
switch (symbol) {
- case "+":
+ case '+':
result = (num1 * step + num2 * step) / step;
break;
- case "-":
+ case '-':
result = (num1 * step - num2 * step) / step;
break;
- case "*":
+ case '*':
result = (num1 * step * (num2 * step)) / step / step;
break;
- case "/":
+ case '/':
result = (num1 * step) / (num2 * step);
break;
default:
@@ -1635,10 +1962,10 @@
getSelectedRows(event) {
let selectedRowsEvent = event.detail.selectedRows;
- console.log('selectedRowsEvent = ' + JSON.stringify(selectedRowsEvent))
+ console.log('selectedRowsEvent = ' + JSON.stringify(selectedRowsEvent));
this.selectedRows = [];
for (var i in selectedRowsEvent) {
- this.selectedRows.push(selectedRowsEvent[i].Id)
+ this.selectedRows.push(selectedRowsEvent[i].Id);
}
// for (var i in this.data) {
// for (var j in selectedRowsEvent) {
@@ -1671,8 +1998,8 @@
}
saveConfirmJs() {
- let msg = "鍑哄簱浠锋牸浠呭彲鎿嶄綔涓�娆″彉鏇达紝淇濆瓨鍚庡皢鏃犳硶淇敼銆俓n\n璇风‘璁わ紒";
- if (this.SummonsStatus == "浠锋牸鏈畾") {
+ let msg = '鍑哄簱浠锋牸浠呭彲鎿嶄綔涓�娆″彉鏇达紝淇濆瓨鍚庡皢鏃犳硶淇敼銆俓n\n璇风‘璁わ紒';
+ if (this.SummonsStatus == '浠锋牸鏈畾') {
if (confirm(msg) == true) {
this.saveConfirm();
}
@@ -1681,46 +2008,53 @@
}
}
+ deepClone(obj) {
+ return JSON.parse(JSON.stringify(obj));
+ }
+
saveConfirm() {
this.isShowSpinner = true;
//鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
- const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
+ const selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
console.log('selectedRows = ' + selectedRows);
for (var i in this.data) {
- this.data[i]["check"] = false;
+ this.data[i]['check'] = false;
}
for (var i in this.data) {
for (var j in selectedRows) {
if (this.data[i].Id == selectedRows[j].Id) {
- this.data[i]["check"] = true;
+ this.data[i]['check'] = true;
}
}
}
- let cloneData = this.data;
+ let cloneData = this.deepClone(this.data);
for (var i in cloneData) {
- cloneData[i]["Name"] = cloneData[i].Name__c;
- cloneData[i]["Category3"] = cloneData[i].Category3__c;
- cloneData[i]["Category4"] = cloneData[i].Category4__c;
- cloneData[i]["Category5"] = cloneData[i].Category5__c;
- cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
+ cloneData[i]['Name'] = cloneData[i].Name__c;
+ cloneData[i]['Category3'] = cloneData[i].Category3__c;
+ cloneData[i]['Category4'] = cloneData[i].Category4__c;
+ cloneData[i]['Category5'] = cloneData[i].Category5__c;
+ cloneData[i]['BoxPiece'] = cloneData[i].Box_Piece__c;
+ //cloneData[i]["shippingUnitPrice"] = cloneData[i]["shippingUnitPrice"] == '' ? 0 : cloneData[i]["shippingUnitPrice"];
delete cloneData[i].Name__c;
delete cloneData[i].Category3__c;
delete cloneData[i].Category4__c;
delete cloneData[i].Category5__c;
delete cloneData[i].Box_Piece__c;
}
- console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
- console.log("this.OECId = " + this.OECId);
- console.log("this.HospitalName = " + this.HospitalName);
- console.log("this.secondaryDistributor = " + this.secondaryDistributor);
- console.log("this.pageRecordsLwc = " + JSON.stringify(cloneData));
- console.log("this.accountid = " + this.accountid);
- console.log("this.ESetid = " + this.ESetid);
+ console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
+ console.log('this.OECId = ' + this.OECId);
+ console.log('this.HospitalName = ' + this.HospitalName);
+ console.log('this.secondaryDistributor = ' + this.secondaryDistributor);
+ console.log('this.pageRecordsLwc = ' + JSON.stringify(cloneData));
+ console.log('this.accountid = ' + this.accountid);
+ console.log('this.ESetid = ' + this.ESetid);
console.log(
- "this.consumableproductdetailsRecords = " +
- JSON.stringify(this.consumableproductdetailsRecords)
+ 'this.consumableproductdetailsRecords = ' +
+ JSON.stringify(this.consumableproductdetailsRecords)
);
save({
cocLwc: this.cocLwc,
@@ -1730,45 +2064,49 @@
pageRecordsLwc: cloneData,
accountidLwc: this.accountid,
ESetIdLwc: this.ESetid,
- consumableproductdetailsRecordsLwc: this.consumableproductdetailsRecords,
+ consumableproductdetailsRecordsLwc:
+ this.consumableproductdetailsRecords,
agencyProTypeLwc: this.agencyProType,
userWorkLocationLwc: this.userWorkLocation
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- debugger
- if (r.status == "Success") {
- // let url = "/lexsummonscreat?ESetid=" + r.entity.ESetId;
- // this[NavigationMixin.Navigate]({
- // type: "standard__webPage",
- // attributes: {
- // url: url,
- // },
- // });
- window.location.href = "/s/lexsummonscreat?ESetid=" + r.entity.ESetId;
- } else {
- console.log("r.msg = " + r.msg);
- this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error));
- });
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ debugger;
+ if (r.status == 'Success') {
+ // let url = "/lexsummonscreat?ESetid=" + r.entity.ESetId;
+ // this[NavigationMixin.Navigate]({
+ // type: "standard__webPage",
+ // attributes: {
+ // url: url,
+ // },
+ // });
+ window.location.href =
+ '/s/lexsummonscreat?ESetid=' + r.entity.ESetId;
+ } else {
+ console.log('r.msg = ' + r.msg);
+ this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ });
}
//鎵撳嵃鎸囩ず鍗�
PraseToPDFJs() {
- console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
- console.log("this.ESetId = " + this.ESetid);
+ console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
+ console.log('this.ESetId = ' + this.ESetid);
PraseToPDF({
cocLwc: this.cocLwc,
- ESetId: this.ESetid,
+ ESetId: this.ESetid
}).then((r) => {
r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- window.open("/customer/summonsPDF?ESetid=" + r.entity.ESetId);
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ window.open('/customer/summonsPDF?ESetid=' + r.entity.ESetId);
} else {
- console.log("r.msg = " + r.msg);
+ console.log('r.msg = ' + r.msg);
this.showMyToast('鎵撳嵃澶辫触', r.msg, 'Error');
}
});
@@ -1776,36 +2114,46 @@
//鏄剧ず鏄庣粏
openReportJs() {
- console.log("openReportJs");
+ console.log('openReportJs');
var reportId = this.ESetid;
reportId = reportId.substring(0, 15);
- let reportFilters = '[{"operator":"equals","value":"' + reportId + '","column":"FK_CUSTENT_ID"}]';
+ console.log('reportId = ' + reportId);
+ let reportFilters =
+ '[{"operator":"equals","value":"' +
+ reportId +
+ '","column":"FK_CUSTENT_ID"}]';
let reportUrl = this.label.ConsumableOutboundReportId;
- console.log("reportUrl = " + reportUrl);
- let url = "/report/" + reportUrl + "?reportFilters=" + encodeURIComponent(reportFilters);
- console.log("url = " + url);
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: url,
- },
- });
+ console.log('reportUrl = ' + reportUrl);
+ let url =
+ '/s/report/' +
+ reportUrl +
+ '?reportFilters=' +
+ encodeURIComponent(reportFilters);
+ console.log('url = ' + url);
+ window.open(url);
+ // this[NavigationMixin.Navigate]({
+ // type: "standard__webPage",
+ // attributes: {
+ // url: url,
+ // target: '_blank'
+ // },
+ // });
}
vpClear2Delay(event) {
- console.log("vpClear2Delay");
- if (this.summonsForDirction != "浜掔浉璋冭揣") {
- this.cocLwc["Order_ForDealerText__c"] = event.target.value;
- console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
+ console.log('vpClear2Delay');
+ if (this.summonsForDirction != '浜掔浉璋冭揣') {
+ this.cocLwc['Order_ForDealerText__c'] = event.target.value;
+ console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
} else {
//console.log('Order_ForDealerTextID__c = ' + this.cocLwc['Order_ForDealerTextID__c'])
- this.cocLwc["Order_ForDealerText__c"] =
- this.cocLwc["Order_ForDealerTextID__c"] == "" ||
- this.cocLwc["Order_ForDealerTextID__c"] == null ||
- this.cocLwc["Order_ForDealerTextID__c"] == undefined
- ? ""
- : this.cocLwc["Order_ForDealerText__c"];
- console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
+ this.cocLwc['Order_ForDealerText__c'] =
+ this.cocLwc['Order_ForDealerTextID__c'] == '' ||
+ this.cocLwc['Order_ForDealerTextID__c'] == null ||
+ this.cocLwc['Order_ForDealerTextID__c'] == undefined
+ ? ''
+ : this.cocLwc['Order_ForDealerText__c'];
+ console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
// console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
// this.ForDealerText = this.cocLwc['Order_ForDealerText__c'];
// event.target.value = this.cocLwc['Order_ForDealerText__c'];
@@ -1814,26 +2162,28 @@
}
handleSearch(event) {
const lookupElement = event.target;
- console.log("event.detail = " + JSON.stringify(event.detail));
+ console.log('event.detail = ' + JSON.stringify(event.detail));
apexSearch({
- searchTerm: event.detail.searchTerm,
- }).then((results) => {
- lookupElement.setSearchResults(results);
- }).catch((error) => {
- console.log("error" + JSON.stringify(error));
- });
+ searchTerm: event.detail.searchTerm
+ })
+ .then((results) => {
+ lookupElement.setSearchResults(results);
+ })
+ .catch((error) => {
+ console.log('error' + JSON.stringify(error));
+ });
}
handleSelectionChange(event) {
const selection = event.target.getSelection();
- console.log("selection = " + JSON.stringify(selection));
- this.cocLwc["Order_ForDealerTextID__c"] = selection[0].id;
- this.cocLwc["Order_ForDealerText__c"] = selection[0].title;
- console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
+ console.log('selection = ' + JSON.stringify(selection));
+ this.cocLwc['Order_ForDealerTextID__c'] = selection[0].id;
+ this.cocLwc['Order_ForDealerText__c'] = selection[0].title;
+ console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
}
handleFilesChange(event) {
- console.log("handleFilesChange");
+ console.log('handleFilesChange');
if (event.target.files.length > 0) {
this.filesUploaded = event.target.files;
this.fileName = event.target.files[0].name;
@@ -1841,7 +2191,7 @@
}
handleSave() {
- console.log("saveFile");
+ console.log('saveFile');
if (this.filesUploaded.length > 0) {
this.file = this.filesUploaded[0];
if (this.file.size > this.MAX_FILE_SIZE) {
@@ -1853,60 +2203,68 @@
this.fileReader.onloadend = () => {
this.fileContents = this.fileReader.result;
- let base64 = "base64,";
- this.content = this.fileContents.indexOf(base64) + base64.length;
+ let base64 = 'base64,';
+ this.content =
+ this.fileContents.indexOf(base64) + base64.length;
this.fileContents = this.fileContents.substring(this.content);
this.saveToFile();
};
this.fileReader.readAsDataURL(this.file);
} else {
- this.fileName = "閫夋嫨涓�涓枃浠朵笂浼�";
+ this.fileName = '閫夋嫨涓�涓枃浠朵笂浼�';
}
}
saveToFile() {
- console.log("saveToFile");
- console.log("base64Data = " + encodeURIComponent(this.fileContents));
+ console.log('saveToFile');
+ console.log('base64Data = ' + encodeURIComponent(this.fileContents));
saveFile({
recordId: this.ESetid,
fileName: this.fileName,
- base64Data: encodeURIComponent(this.fileContents),
- }).then((r) => {
+ base64Data: encodeURIComponent(this.fileContents)
+ })
+ .then((r) => {
this.showPopSpinner = false;
r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
this.closePop();
- this.showMyToast('鎴愬姛', '涓婁紶鎴愬姛', 'Success');
+ this.showMyToast('涓婁紶鎴愬姛', '', 'Success');
this.getFiles();
- }).catch((error) => {
+ })
+ .catch((error) => {
this.showPopSpinner = false;
- console.log("error = " + error.message);
+ console.log('error = ' + error.message);
this.showMyToast('澶辫触', '涓婁紶澶辫触', 'Error');
});
}
getFiles() {
- console.log("getFiles");
+ console.log('getFiles');
this.showLoadingSpinner = true;
getFiles({
- recordId: this.ESetid,
- }).then((r) => {
+ recordId: this.ESetid
+ })
+ .then((r) => {
r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
this.fileData = r.entity.cvList;
- console.log("this.fileData = " + JSON.stringify(this.fileData));
+ console.log('this.fileData = ' + JSON.stringify(this.fileData));
for (var i in this.fileData) {
- this.fileData[i]["Id"] = this.fileData[i].Id;
- this.fileData[i]["recordId"] = this.fileData[i].Id;
- this.fileData[i]["url"] = "/" + this.fileData[i].Id;
- this.fileData[i]["Title"] = this.fileData[i].Title;
- this.fileData[i]["attUrl"] = '/' + this.fileData[i].Id;
- this.fileData[i]['downloadUrl'] = '/sfc/servlet.shepherd/document/download/' + this.fileData[i].ContentDocumentId + '?operationContext=S1';
+ this.fileData[i]['Id'] = this.fileData[i].Id;
+ this.fileData[i]['recordId'] = this.fileData[i].Id;
+ this.fileData[i]['url'] = '/' + this.fileData[i].Id;
+ this.fileData[i]['Title'] = this.fileData[i].Title;
+ this.fileData[i]['attUrl'] = '/' + this.fileData[i].Id;
+ this.fileData[i]['downloadUrl'] =
+ '/sfc/servlet.shepherd/document/download/' +
+ this.fileData[i].ContentDocumentId +
+ '?operationContext=S1';
}
- console.log("this.fileData = " + this.fileData);
+ console.log('this.fileData = ' + this.fileData);
this.showLoadingSpinner = false;
- }).catch((error) => {
- console.log("error = " + error.message);
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
this.showMyToast('澶辫触', '鑾峰彇闄勪欢澶辫触', 'Error');
});
}
@@ -1915,89 +2273,201 @@
this.isShowSpinner = true;
//鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
- const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
+ const selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
console.log('selectedRows = ' + selectedRows);
for (var i in this.data) {
- this.data[i]["check"] = false;
+ this.data[i]['check'] = false;
}
for (var i in this.data) {
for (var j in selectedRows) {
if (this.data[i].Id == selectedRows[j].Id) {
- this.data[i]["check"] = true;
+ this.data[i]['check'] = true;
}
}
}
- let cloneData = this.data;
+ let cloneData = this.deepClone(this.data);
for (var i in cloneData) {
- cloneData[i]["Name"] = cloneData[i].Name__c;
- cloneData[i]["Category3"] = cloneData[i].Category3__c;
- cloneData[i]["Category4"] = cloneData[i].Category4__c;
- cloneData[i]["Category5"] = cloneData[i].Category5__c;
- cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
+ cloneData[i]['Name'] = cloneData[i].Name__c;
+ cloneData[i]['Category3'] = cloneData[i].Category3__c;
+ cloneData[i]['Category4'] = cloneData[i].Category4__c;
+ cloneData[i]['Category5'] = cloneData[i].Category5__c;
+ cloneData[i]['BoxPiece'] = cloneData[i].Box_Piece__c;
delete cloneData[i].Name__c;
delete cloneData[i].Category3__c;
delete cloneData[i].Category4__c;
delete cloneData[i].Category5__c;
delete cloneData[i].Box_Piece__c;
}
- console.log("cloneData = " + JSON.stringify(cloneData));
+ console.log('cloneData = ' + JSON.stringify(cloneData));
GoodsDelivery({
cocLwc: this.cocLwc,
ESetId: this.ESetid,
- pageRecordsLwcLwc: cloneData,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- console.log(
- "Summons_Order_type__c = " + this.cocLwc["Summons_Order_type__c"]
- );
- this.isSales = this.cocLwc["Summons_Order_type__c"] == "閿�鍞�" ? true : false;
- this.GoodsDeliveryInit();
- } else {
- console.log("r.msg = " + r.msg);
- this.showMyToast('閿欒', r.msg, 'Error');
- }
- this.isShippingSales = true;
- }).catch((error) => {
- console.log("error = " + error.message);
- this.showMyToast('澶辫触', '璺宠浆澶辫触', 'Error');
- });
+ pageRecordsLwcLwc: cloneData
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ console.log(
+ 'Summons_Order_type__c = ' +
+ this.cocLwc['Summons_Order_type__c']
+ );
+ this.isSales =
+ this.cocLwc['Summons_Order_type__c'] == '閿�鍞�'
+ ? true
+ : false;
+ this.GoodsDeliveryInit();
+ } else {
+ console.log('r.msg = ' + r.msg);
+ this.showMyToast('閿欒', r.msg, 'Error');
+ }
+ this.isShippingSales = true;
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
+ this.showMyToast('澶辫触', '璺宠浆澶辫触', 'Error');
+ });
}
GoodsDeliveryInit() {
- console.log("GoodsDeliveryInit");
+ console.log('GoodsDeliveryInit');
GoodsDeliveryInit({
- ESetId: this.ESetid,
- }).then((r) => {
+ ESetId: this.ESetid
+ })
+ .then((r) => {
r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
this.salesCoc = r.entity.coc;
this.salesAccountName = r.entity.accountName;
this.salesUserWorkLocation = r.entity.userWorkLocation;
this.salesAccountid = r.entity.accountid;
this.salesOrderdetails = r.entity.orderdetails;
- console.log('this.salesOrderdetails = ' + JSON.stringify(this.salesOrderdetails))
+ console.log(
+ 'this.salesOrderdetails = ' +
+ JSON.stringify(this.salesOrderdetails)
+ );
this.salesData = r.entity.consumableorderdetailsRecords;
- this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
+ console.log(
+ 'this.salesData = ' + JSON.stringify(this.salesData)
+ );
+ this.salesErrorData =
+ r.entity.consumableorderdetailsRecordserror;
this.salesOrderpieceorboxMap = r.entity.orderpieceorboxMap;
this.salesOrderpriceMap = r.entity.orderpriceMap;
- this.salesOrderagencypriceMap = r.entity.orderagencypriceMap;
+ this.salesOrderagencypriceMap =
+ r.entity.orderagencypriceMap;
+ for (var i in this.salesData) {
+ this.salesData[i]['Id'] =
+ this.salesData[i].orderdetails2.Id;
+ this.salesData[i]['Consumable_order_minor__c'] =
+ this.salesData[i].orderdetails2
+ .Consumable_order_minor__r != null
+ ? this.salesData[i].orderdetails2
+ .Consumable_order_minor__r.Name
+ : '';
+ this.salesData[i]['ConsumableorderminorUrl'] =
+ this.salesData[i].orderdetails2
+ .Consumable_order_minor__c != null
+ ? '/' +
+ this.salesData[i].orderdetails2
+ .Consumable_order_minor__c
+ : '';
+ this.salesData[i]['orderdetails2Name'] =
+ this.salesData[i].orderdetails2.Name;
+ this.salesData[i]['orderdetails2NameUrl'] =
+ '/' + this.salesData[i].orderdetails2.Id;
+ this.salesData[i]['Box_Piece__c'] =
+ this.salesData[i].orderdetails2.Box_Piece__c;
+ this.salesData[i]['ProdName'] =
+ this.salesData[i].Prod.Name;
+ this.salesData[i]['Deliver_date__c'] =
+ this.salesData[i].orderdetails2.Deliver_date__c;
+ this.salesData[i]['Bar_Code__c'] =
+ this.salesData[i].orderdetails2.Bar_Code__c;
+ this.salesData[i]['Sterilization_limit__c'] =
+ this.salesData[
+ i
+ ].orderdetails2.Sterilization_limit__c;
+ if (this.salesData[i]['Box_Piece__c'] == '鐩�') {
+ console.log(
+ 'this.salesData[i] = ' +
+ JSON.stringify(this.salesData[i])
+ );
+ this.salesData[i]['outboundCount'] =
+ this.salesData[i].outboundCount;
+ } else {
+ for (var j in this.salesOrderdetails) {
+ console.log(
+ 'this.salesOrderdetails[j].Consumable_product__c = ' +
+ this.salesOrderdetails[j]
+ .Consumable_product__c
+ );
+ console.log(
+ 'this.salesData[i].orderdetails2.Consumable_product__c = ' +
+ this.salesData[i].orderdetails2
+ .Consumable_product__c
+ );
+ if (
+ this.salesOrderdetails[j]
+ .Consumable_product__c ==
+ this.salesData[i].orderdetails2
+ .Consumable_product__c
+ ) {
+ this.salesData[i]['outboundCount'] =
+ this.salesOrderdetails[
+ j
+ ].Shipment_Count__c;
+ }
+ }
+ }
+ }
+ for (var i in this.salesErrorData) {
+ this.salesErrorData[i]['Id'] =
+ this.salesErrorData[i].orderdetails2.Id;
+ this.salesErrorData[i]['Consumable_order_minor__c'] =
+ this.salesErrorData[i].orderdetails2
+ .Consumable_order_minor__r != null
+ ? this.salesErrorData[i].orderdetails2
+ .Consumable_order_minor__r.Name
+ : '';
+ this.salesErrorData[i]['ConsumableorderminorUrl'] =
+ this.salesErrorData[i].orderdetails2
+ .Consumable_order_minor__c != null
+ ? '/' +
+ this.salesErrorData[i].orderdetails2
+ .Consumable_order_minor__c
+ : '';
+ this.salesErrorData[i]['orderdetails2Name'] =
+ this.salesErrorData[i].orderdetails2.Name;
+ this.salesErrorData[i]['ProdName'] =
+ this.salesErrorData[i].Prod.Name;
+ this.salesErrorData[i]['Box_Piece__c'] =
+ this.salesErrorData[i].orderdetails2.Box_Piece__c;
+ this.salesErrorData[i]['Bar_Code__c'] =
+ this.salesErrorData[i].orderdetails2.Bar_Code__c;
+ this.salesErrorData[i]['Sterilization_limit__c'] =
+ this.salesErrorData[
+ i
+ ].orderdetails2.Sterilization_limit__c;
+ }
this.isShowSpinner = false;
} else {
- console.log("r.msg = " + r.msg);
+ console.log('r.msg = ' + r.msg);
this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
}
- }).catch((error) => {
- console.log("error = " + error.message);
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error');
});
}
SalesearchProductJs() {
- console.log("this.Barcode = " + this.Barcode);
+ console.log('this.Barcode = ' + this.Barcode);
this.isShowSpinner = true;
SearchPro({
cocLwc: this.salesCoc,
@@ -2006,78 +2476,143 @@
userWorkLocation: this.salesUserWorkLocation,
accountid: this.salesAccountid,
orderdetails: this.salesOrderdetails,
- orderpieceorboxMap: this.salesOrderpieceorboxMap,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- console.log("SearchPro success");
- this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
- this.salesData = r.entity.consumableorderdetailsRecords;
- for (var i in this.salesErrorData) {
- this.salesErrorData[i]["Id"] = this.salesErrorData[i].orderdetails2.Id;
- this.salesErrorData[i]["Consumable_order_minor__c"] = this.salesErrorData[i].orderdetails2.Consumable_order_minor__r != null ? this.salesErrorData[i].orderdetails2.Consumable_order_minor__r.Name : '';
- this.salesErrorData[i]["ConsumableorderminorUrl"] = this.salesErrorData[i].orderdetails2.Consumable_order_minor__c != null ? "/" + this.salesErrorData[i].orderdetails2.Consumable_order_minor__c : '';
- this.salesErrorData[i]["orderdetails2Name"] = this.salesErrorData[i].orderdetails2.Name;
- this.salesErrorData[i]["ProdName"] = this.salesErrorData[i].Prod.Name;
- this.salesErrorData[i]["Box_Piece__c"] = this.salesErrorData[i].orderdetails2.Box_Piece__c;
- this.salesErrorData[i]["Bar_Code__c"] = this.salesErrorData[i].orderdetails2.Bar_Code__c;
- this.salesErrorData[i]["Sterilization_limit__c"] = this.salesErrorData[i].orderdetails2.Sterilization_limit__c;
- }
- console.log('this.salesData = ' + JSON.stringify(this.salesData));
- for (var i in this.salesData) {
- this.salesData[i]["Id"] = this.salesData[i].orderdetails2.Id;
- this.salesData[i]["Consumable_order_minor__c"] = this.salesData[i].orderdetails2.Consumable_order_minor__r != null ? this.salesData[i].orderdetails2.Consumable_order_minor__r.Name : '';
- this.salesData[i]["ConsumableorderminorUrl"] = this.salesData[i].orderdetails2.Consumable_order_minor__c != null ? "/" + this.salesData[i].orderdetails2.Consumable_order_minor__c : '';
- this.salesData[i]["orderdetails2Name"] = this.salesData[i].orderdetails2.Name;
- this.salesData[i]["orderdetails2NameUrl"] = "/" + this.salesData[i].orderdetails2.Id;
- this.salesData[i]["Box_Piece__c"] = this.salesData[i].orderdetails2.Box_Piece__c;
- this.salesData[i]["ProdName"] = this.salesData[i].Prod.Name;
- this.salesData[i]["Deliver_date__c"] = this.salesData[i].orderdetails2.Deliver_date__c;
- this.salesData[i]["Bar_Code__c"] = this.salesData[i].orderdetails2.Bar_Code__c;
- this.salesData[i]["Sterilization_limit__c"] = this.salesData[i].orderdetails2.Sterilization_limit__c;
- if (this.salesData[i]["Box_Piece__c"] == '鐩�') {
- console.log('this.salesData[i] = ' + JSON.stringify(this.salesData[i]))
- this.salesData[i]["outboundCount"] = this.salesData[i].outboundCount;
- } else {
- for (var j in this.salesOrderdetails) {
- console.log('this.salesOrderdetails[j].Consumable_product__c = ' + this.salesOrderdetails[j].Consumable_product__c);
- console.log('this.salesData[i].orderdetails2.Consumable_product__c = ' + this.salesData[i].orderdetails2.Consumable_product__c);
- if (this.salesOrderdetails[j].Consumable_product__c == this.salesData[i].orderdetails2.Consumable_product__c) {
- this.salesData[i]["outboundCount"] = this.salesOrderdetails[j].Shipment_Count__c;
+ orderpieceorboxMap: this.salesOrderpieceorboxMap
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ console.log('SearchPro success');
+ this.salesErrorData =
+ r.entity.consumableorderdetailsRecordserror;
+ this.salesData = r.entity.consumableorderdetailsRecords;
+ for (var i in this.salesErrorData) {
+ this.salesErrorData[i]['Id'] =
+ this.salesErrorData[i].orderdetails2.Id;
+ this.salesErrorData[i]['Consumable_order_minor__c'] =
+ this.salesErrorData[i].orderdetails2
+ .Consumable_order_minor__r != null
+ ? this.salesErrorData[i].orderdetails2
+ .Consumable_order_minor__r.Name
+ : '';
+ this.salesErrorData[i]['ConsumableorderminorUrl'] =
+ this.salesErrorData[i].orderdetails2
+ .Consumable_order_minor__c != null
+ ? '/' +
+ this.salesErrorData[i].orderdetails2
+ .Consumable_order_minor__c
+ : '';
+ this.salesErrorData[i]['orderdetails2Name'] =
+ this.salesErrorData[i].orderdetails2.Name;
+ this.salesErrorData[i]['ProdName'] =
+ this.salesErrorData[i].Prod.Name;
+ this.salesErrorData[i]['Box_Piece__c'] =
+ this.salesErrorData[i].orderdetails2.Box_Piece__c;
+ this.salesErrorData[i]['Bar_Code__c'] =
+ this.salesErrorData[i].orderdetails2.Bar_Code__c;
+ this.salesErrorData[i]['Sterilization_limit__c'] =
+ this.salesErrorData[
+ i
+ ].orderdetails2.Sterilization_limit__c;
+ }
+ console.log(
+ 'this.salesData = ' + JSON.stringify(this.salesData)
+ );
+ for (var i in this.salesData) {
+ this.salesData[i]['Id'] =
+ this.salesData[i].orderdetails2.Id;
+ this.salesData[i]['Consumable_order_minor__c'] =
+ this.salesData[i].orderdetails2
+ .Consumable_order_minor__r != null
+ ? this.salesData[i].orderdetails2
+ .Consumable_order_minor__r.Name
+ : '';
+ this.salesData[i]['ConsumableorderminorUrl'] =
+ this.salesData[i].orderdetails2
+ .Consumable_order_minor__c != null
+ ? '/' +
+ this.salesData[i].orderdetails2
+ .Consumable_order_minor__c
+ : '';
+ this.salesData[i]['orderdetails2Name'] =
+ this.salesData[i].orderdetails2.Name;
+ this.salesData[i]['orderdetails2NameUrl'] =
+ '/' + this.salesData[i].orderdetails2.Id;
+ this.salesData[i]['Box_Piece__c'] =
+ this.salesData[i].orderdetails2.Box_Piece__c;
+ this.salesData[i]['ProdName'] =
+ this.salesData[i].Prod.Name;
+ this.salesData[i]['Deliver_date__c'] =
+ this.salesData[i].orderdetails2.Deliver_date__c;
+ this.salesData[i]['Bar_Code__c'] =
+ this.salesData[i].orderdetails2.Bar_Code__c;
+ this.salesData[i]['Sterilization_limit__c'] =
+ this.salesData[
+ i
+ ].orderdetails2.Sterilization_limit__c;
+ if (this.salesData[i]['Box_Piece__c'] == '鐩�') {
+ console.log(
+ 'this.salesData[i] = ' +
+ JSON.stringify(this.salesData[i])
+ );
+ this.salesData[i]['outboundCount'] =
+ this.salesData[i].outboundCount;
+ } else {
+ for (var j in this.salesOrderdetails) {
+ console.log(
+ 'this.salesOrderdetails[j].Consumable_product__c = ' +
+ this.salesOrderdetails[j]
+ .Consumable_product__c
+ );
+ console.log(
+ 'this.salesData[i].orderdetails2.Consumable_product__c = ' +
+ this.salesData[i].orderdetails2
+ .Consumable_product__c
+ );
+ if (
+ this.salesOrderdetails[j]
+ .Consumable_product__c ==
+ this.salesData[i].orderdetails2
+ .Consumable_product__c
+ ) {
+ this.salesData[i]['outboundCount'] =
+ this.salesOrderdetails[
+ j
+ ].Shipment_Count__c;
+ }
}
}
- }
- //salescolomus
- // console.log('this.salesData[i]["Box_Piece__c"] = ' + this.salesData[i]["Box_Piece__c"])
- // if (this.salesData[i]["Box_Piece__c"] == '鐩�') {
- // this.salesData[i]["isDisable"] = true;
- // this.salesData[i]["count"] = this.salesData[i].outboundCount;
- // }
- // if (this.salesData[i]["Box_Piece__c"] == '涓�') {
- // this.salesData[i]["isDisable"] = false;
- // }
+ //salescolomus
+ // console.log('this.salesData[i]["Box_Piece__c"] = ' + this.salesData[i]["Box_Piece__c"])
+ // if (this.salesData[i]["Box_Piece__c"] == '鐩�') {
+ // this.salesData[i]["isDisable"] = true;
+ // this.salesData[i]["count"] = this.salesData[i].outboundCount;
+ // }
+ // if (this.salesData[i]["Box_Piece__c"] == '涓�') {
+ // this.salesData[i]["isDisable"] = false;
+ // }
+ }
+ this.salesColumns = [...this.salesColumns];
+ this.isShowSpinner = false;
+ } else {
+ console.log('r.msg = ' + r.msg);
+ this.showMyToast('鑾峰彇澶辫触', r.msg, 'Error');
}
- this.salesColumns = [...this.salesColumns];
- this.isShowSpinner = false;
- } else {
- console.log("r.msg = " + r.msg);
- this.showMyToast('鑾峰彇澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error.message));
- });
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error.message));
+ });
}
handleOutboundCount(event) {
let outboundDetail = event.detail;
for (var i in this.salesData) {
if (this.salesData[i].Id == outboundDetail.data.recordId) {
- this.salesData[i]['outboundCount'] = outboundDetail.data.count
+ this.salesData[i]['outboundCount'] = outboundDetail.data.count;
}
}
- console.log('this.salesData = ' + JSON.stringify(this.salesData))
+ console.log('this.salesData = ' + JSON.stringify(this.salesData));
}
SaveP() {
@@ -2092,7 +2627,7 @@
delete cloneSalesData[i].Deliver_date__c;
delete cloneSalesData[i].Bar_Code__c;
delete cloneSalesData[i].Sterilization_limit__c;
- cloneSalesData[i]["ErrorReason"] = "";
+ cloneSalesData[i]['ErrorReason'] = '';
}
this.isShowSpinner = true;
ProSale({
@@ -2104,27 +2639,29 @@
consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
orderdetailsLwc: this.salesOrderdetails,
orderpriceMapLwc: this.salesOrderpriceMap,
- orderagencypriceMapLwc: this.salesOrderagencypriceMap,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- console.log("ProdElivery success");
- this.isShowSpinner = false;
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: "/lexsaleanddelivery",
- },
- });
- } else {
- console.log("r.msg = " + r.msg);
- this.showMyToast('閿�鍞け璐�', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error.message));
- this.showMyToast('閿欒', '閿�鍞け璐�', 'Error');
- });
+ orderagencypriceMapLwc: this.salesOrderagencypriceMap
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ console.log('ProdElivery success');
+ this.isShowSpinner = false;
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: '/lexsaleanddelivery'
+ }
+ });
+ } else {
+ console.log('r.msg = ' + r.msg);
+ this.showMyToast('閿�鍞け璐�', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error.message));
+ this.showMyToast('閿欒', '閿�鍞け璐�', 'Error');
+ });
}
SaveE() {
@@ -2138,7 +2675,7 @@
delete cloneSalesData[i].Deliver_date__c;
delete cloneSalesData[i].Bar_Code__c;
delete cloneSalesData[i].Sterilization_limit__c;
- cloneSalesData[i]["ErrorReason"] = "";
+ cloneSalesData[i]['ErrorReason'] = '';
}
this.isShowSpinner = true;
ProdElivery({
@@ -2150,27 +2687,29 @@
consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
orderdetailsLwc: this.salesOrderdetails,
orderpriceMapLwc: this.salesOrderpriceMap,
- orderagencypriceMapLwc: this.salesOrderagencypriceMap,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- console.log("ProdElivery success");
- this.isShowSpinner = false;
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: "/lexsaleanddelivery",
- },
- });
- } else {
- console.log("r.msg = " + r.msg);
- this.showMyToast('鍑鸿揣澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + JSON.stringify(error.message));
- this.showMyToast('閿欒', '鍑鸿揣澶辫触', 'Error');
- });
+ orderagencypriceMapLwc: this.salesOrderagencypriceMap
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ console.log('ProdElivery success');
+ this.isShowSpinner = false;
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: '/lexsaleanddelivery'
+ }
+ });
+ } else {
+ console.log('r.msg = ' + r.msg);
+ this.showMyToast('鍑鸿揣澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error.message));
+ this.showMyToast('閿欒', '鍑鸿揣澶辫触', 'Error');
+ });
}
//鍙戠エ
@@ -2178,49 +2717,62 @@
let url = '';
console.log('this.invoiceId = ' + this.invoiceId);
if (this.invoiceId.length > 0 && this.invoiceId != '000000000000000') {
- url = "/lexconinvoiceview?deliveryId=" + this.ESetid + "&invoiceId=" + this.invoiceId + "&KeyWords=Redirect";
+ url =
+ '/s/lexconinvoiceview?deliveryId=' +
+ this.ESetid +
+ '&invoiceId=' +
+ this.invoiceId +
+ '&KeyWords=Redirect';
} else {
- url = "/lexconinvoiceview?deliveryId=" + this.ESetid + "&KeyWords=Redirect";
+ url =
+ '/s/lexconinvoiceview?deliveryId=' +
+ this.ESetid +
+ '&KeyWords=Redirect';
}
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: url,
- },
- });
+ window.open(url);
+ // this[NavigationMixin.Navigate]({
+ // type: "standard__webPage",
+ // attributes: {
+ // url: url,
+ // target:'_blank'
+ // },
+ // });
}
//鍒犻櫎
DeleteConsumable() {
this.isShowSpinner = true;
DelConsumable({
- ESetId: this.ESetid,
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- let url = "/lexsaleanddelivery";
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: url,
- },
- });
- } else {
- console.log("r.msg = " + r.msg);
- this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- console.log("error = " + error.message);
- this.showMyToast('閿欒', '鍒犻櫎澶辫触', 'Error');
- });
+ ESetId: this.ESetid
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ let url = '/lexsaleanddelivery';
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: url
+ }
+ });
+ } else {
+ console.log('r.msg = ' + r.msg);
+ this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + error.message);
+ this.showMyToast('閿欒', '鍒犻櫎澶辫触', 'Error');
+ });
}
handleLoad() {
- console.log('handleLoad')
+ console.log('handleLoad');
try {
const style = document.createElement('style');
- style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}';
+ style.innerText =
+ '.hehe-layoutItem .slds-button__icon {display: none;}';
this.template.querySelector('.hideHelpText').appendChild(style);
} catch (error) {
console.log(error);
@@ -2228,14 +2780,16 @@
}
handleLoad2() {
- console.log('handleLoad2')
+ console.log('handleLoad2');
try {
const style = document.createElement('style');
- style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}';
+ style.innerText =
+ '.hehe-layoutItem .slds-button__icon {display: none;}';
this.template.querySelector('.hideHelpText').appendChild(style);
const style2 = document.createElement('style');
- style2.innerText = '.hehe-layoutItem .slds-form-element__label {padding : 0px}';
+ style2.innerText =
+ '.hehe-layoutItem .slds-form-element__label {padding : 0px}';
this.template.querySelector('.hideHelpText').appendChild(style2);
} catch (error) {
console.log(error);
@@ -2243,12 +2797,13 @@
}
//缂栬緫鍑哄簱鍗�
EditConsumable() {
- let url = "/lexsummonscreat?ESetid=" + this.ESetid + "&KeyWords=Redirect";
+ let url =
+ '/lexsummonscreat?ESetid=' + this.ESetid + '&KeyWords=Redirect';
this[NavigationMixin.Navigate]({
- type: "standard__webPage",
+ type: 'standard__webPage',
attributes: {
- url: url,
- },
+ url: url
+ }
});
}
@@ -2268,7 +2823,11 @@
//鏄惁鏄剧ず闄勪欢绉婚櫎
get attDelBtn() {
- if (this.fileName != '' && this.fileName != null && this.fileName != '璇烽�夋嫨涓�涓枃浠朵笂浼�') {
+ if (
+ this.fileName != '' &&
+ this.fileName != null &&
+ this.fileName != '璇烽�夋嫨涓�涓枃浠朵笂浼�'
+ ) {
return true;
} else {
return false;
@@ -2299,11 +2858,11 @@
sortBy(field, reverse, primer) {
const key = primer
? function (x) {
- return primer(x[field]);
- }
+ return primer(x[field]);
+ }
: function (x) {
- return x[field];
- };
+ return x[field];
+ };
return function (a, b) {
a = key(a);
@@ -2313,14 +2872,17 @@
}
onHandleSort(event) {
-
//灏嗗凡缁忛�夊ソ浜嗙殑鏀惧埌鍓嶉潰锛屼笉杩涜鎺掑簭
if (this.EditAble) {
const { fieldName: sortedBy, sortDirection } = event.detail;
const cloneData = [...this.data];
- cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
+ cloneData.sort(
+ this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1)
+ );
let index = 0;
- let selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
+ let selectedRows = this.template
+ .querySelector('c-lex-custom-lightning-datatable')
+ .getSelectedRows();
let selectedRowsIds = [];
for (var i in selectedRows) {
selectedRowsIds.push(selectedRows[i].Id);
@@ -2342,7 +2904,9 @@
} else {
const { fieldName: sortedBy, sortDirection } = event.detail;
const cloneData = [...this.editData];
- cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
+ cloneData.sort(
+ this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1)
+ );
this.editData = cloneData;
this.sortDirection = sortDirection;
this.sortedBy = sortedBy;
@@ -2350,12 +2914,14 @@
}
handlePrevious() {
- this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);
+ this.currentPageToken =
+ Number(this.currentPageToken) - Number(this.pageSize);
this.searchProductJs();
}
handleNext() {
- this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize);
+ this.currentPageToken =
+ Number(this.currentPageToken) + Number(this.pageSize);
this.searchProductJs();
}
handleFirst() {
@@ -2364,7 +2930,8 @@
}
handleLast() {
- this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+ this.currentPageToken =
+ this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
this.searchProductJs();
}
@@ -2375,15 +2942,15 @@
this.searchProductJs();
}
-
-
editHandlePrevious() {
- this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);
+ this.currentPageToken =
+ Number(this.currentPageToken) - Number(this.pageSize);
this.searchEditProductJs();
}
editHandleNext() {
- this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize);
+ this.currentPageToken =
+ Number(this.currentPageToken) + Number(this.pageSize);
this.searchEditProductJs();
}
editHandleFirst() {
@@ -2392,7 +2959,8 @@
}
editHandleLast() {
- this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+ this.currentPageToken =
+ this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
this.searchEditProductJs();
}
@@ -2411,51 +2979,80 @@
statusEdit: this.statusEdit,
pageSizeLWC: this.pageSize,
pageTokenLWC: this.currentPageToken
- }).then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- //鍒嗛〉
- console.log('r.entity.paginatedAccounts = ' + JSON.stringify(r.entity.paginatedAccounts));
- this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
- this.totalRecords = r.entity.paginatedAccounts.totalRecords;
- this.recordStart = r.entity.paginatedAccounts.recordStart;
- this.recordEnd = r.entity.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(r.entity.paginatedAccounts.totalRecords / this.pageSize);
- console.log('this.totalPages = ' + this.totalPages);
+ })
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log('r = ' + JSON.stringify(r));
+ if (r.status == 'Success') {
+ //鍒嗛〉
+ console.log(
+ 'r.entity.paginatedAccounts = ' +
+ JSON.stringify(r.entity.paginatedAccounts)
+ );
+ this.nextPageToken =
+ r.entity.paginatedAccounts.nextPageToken;
+ this.totalRecords = r.entity.paginatedAccounts.totalRecords;
+ this.recordStart = r.entity.paginatedAccounts.recordStart;
+ this.recordEnd = r.entity.paginatedAccounts.recordEnd;
+ this.totalPages = Math.ceil(
+ r.entity.paginatedAccounts.totalRecords / this.pageSize
+ );
+ console.log('this.totalPages = ' + this.totalPages);
- this.editData = r.entity.pageRecords;
- console.log("this.data start = " + JSON.stringify(this.data));
- for (var i in this.editData) {
- this.editData[i]["unitValue"] = this.editData[i]["unitValue"];
- this.editData[i]["InvoiceProNot_count__c"] = this.editData[i].orderdetails1.InvoiceProNot_count__c;
- this.editData[i]["RrturnPro_count__c"] = this.editData[i].orderdetails1.RrturnPro_count__c;
- this.editData[i]["Invoiced_Procount__c"] = this.editData[i].orderdetails1.Invoiced_Procount__c;
- this.editData[i]["shipmentNumber"] = this.editData[i].orderdetails1["Shipment_Count__c"];
- this.editData[i]["shippingUnitPrice"] = this.editData[i].orderdetails1["Delivery_List_RMB__c"];
+ this.editData = r.entity.pageRecords;
+ console.log(
+ 'this.data start = ' + JSON.stringify(this.data)
+ );
+ for (var i in this.editData) {
+ this.editData[i]['unitValue'] =
+ this.editData[i]['unitValue'];
+ this.editData[i]['InvoiceProNot_count__c'] =
+ this.editData[
+ i
+ ].orderdetails1.InvoiceProNot_count__c;
+ this.editData[i]['RrturnPro_count__c'] =
+ this.editData[i].orderdetails1.RrturnPro_count__c;
+ this.editData[i]['Invoiced_Procount__c'] =
+ this.editData[i].orderdetails1.Invoiced_Procount__c;
+ this.editData[i]['shipmentNumber'] =
+ this.editData[i].orderdetails1['Shipment_Count__c'];
+ this.editData[i]['shippingUnitPrice'] =
+ this.editData[i].orderdetails1[
+ 'Delivery_List_RMB__c'
+ ];
- this.editData[i]["recordId"] = this.editData[i].Prod.Id;
- this.editData[i]["Id"] = this.editData[i].Prod.Id;
- this.editData[i]["Name__c"] = this.editData[i].Prod.Name__c;
- this.editData[i]["SFDA_Status__c"] = this.editData[i].Prod.SFDA_Status__c;
- this.editData[i]["Category3__c"] = this.editData[i].Prod.Category3__c;
- this.editData[i]["Category4__c"] = this.editData[i].Prod.Category4__c;
- this.editData[i]["Category5__c"] = this.editData[i].Prod.Category5__c;
- this.editData[i]["Box_Piece__c"] = this.editData[i].orderdetails1.Box_Piece__c;
- this.editData[i]["shipmentAmount"] = this.editData[i].orderdetails1.Shipment_amount__c;
- //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
- this.editData[i]["Delivery_List_RMB__c"] = this.editData[i].orderdetails1.Delivery_List_RMB__c;
- this.editData[i]["Shipment_Count__c"] = this.editData[i].orderdetails1.Shipment_Count__c;
+ this.editData[i]['recordId'] = this.editData[i].Prod.Id;
+ this.editData[i]['Id'] = this.editData[i].Prod.Id;
+ this.editData[i]['Name__c'] =
+ this.editData[i].Prod.Name__c;
+ this.editData[i]['SFDA_Status__c'] =
+ this.editData[i].Prod.SFDA_Status__c;
+ this.editData[i]['Category3__c'] =
+ this.editData[i].Prod.Category3__c;
+ this.editData[i]['Category4__c'] =
+ this.editData[i].Prod.Category4__c;
+ this.editData[i]['Category5__c'] =
+ this.editData[i].Prod.Category5__c;
+ this.editData[i]['Box_Piece__c'] =
+ this.editData[i].orderdetails1.Box_Piece__c;
+ this.editData[i]['shipmentAmount'] =
+ this.editData[i].orderdetails1.Shipment_amount__c;
+ //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
+ this.editData[i]['Delivery_List_RMB__c'] =
+ this.editData[i].orderdetails1.Delivery_List_RMB__c;
+ this.editData[i]['Shipment_Count__c'] =
+ this.editData[i].orderdetails1.Shipment_Count__c;
+ }
+ this.showTable = true;
+ this.isEditShowSpinner = false;
+ } else {
+ console.log('r = ' + JSON.stringify(r));
+ this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
}
- this.showTable = true;
- this.isEditShowSpinner = false;
- } else {
- console.log("r = " + JSON.stringify(r));
- this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
- }
- }).catch((error) => {
- this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
- });
+ })
+ .catch((error) => {
+ this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
+ });
}
get previousButtonDisabled() {
@@ -2468,23 +3065,24 @@
//鍒犻櫎闄勪欢
deleteAtt(event) {
- this.showLoadingSpinner = true;
+ this.isShowSpinner = true;
//var recordId = event.detail.data.recordId;
- var recordId = event.target.getAttribute("data-fileid");
+ var recordId = event.target.getAttribute('data-fileid');
console.log('attid:' + recordId);
- deleteAtt(
- {
- contentVersionId: recordId
- }
- ).then(result => {
- if (result.result == 'Success') {
- this.showMyToast('鎴愬姛', '鍒犻櫎鎴愬姛', 'Success');
- this.getFiles();
- } else {
- this.showMyToast('鍒犻櫎澶辫触', result.errorMsg, 'Error');
- }
- }).catch(error => {
- this.showMyToast('閿欒', '鍒犻櫎澶辫触', 'Error');
+ deleteAtt({
+ contentVersionId: recordId
})
+ .then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ if (r.status == 'Success') {
+ this.showMyToast('鍒犻櫎鎴愬姛', '', 'Success');
+ this.getFiles();
+ } else {
+ this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
+ }
+ })
+ .catch((error) => {
+ this.showMyToast('閿欒', error.message, 'Error');
+ });
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexTopPage/lexTopPage.html b/force-app/main/default/lwc/lexTopPage/lexTopPage.html
index 8886b5c..fbd71f0 100644
--- a/force-app/main/default/lwc/lexTopPage/lexTopPage.html
+++ b/force-app/main/default/lwc/lexTopPage/lexTopPage.html
@@ -1,6 +1,16 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
<template if:true={showPage}>
@@ -21,8 +31,15 @@
</div> -->
<!-- 鏈叏閮ㄥ彂璐ц鍗曟槑缁� -->
<template if:true={over_view}>
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -32,15 +49,29 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>鏈叏閮ㄥ彂璐ц鍗曟槑缁�</strong></p> -->
</div>
- <div style="padding:10px;">
- <c-lex-custom-lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="Id" data={raesList} columns={colms} onclicklink={clickLick}></c-lex-custom-lightning-datatable>
+ <div style="padding: 10px">
+ <c-lex-custom-lightning-datatable
+ class="wrapped-header-datatable"
+ hide-checkbox-column
+ key-field="Id"
+ data={raesList}
+ columns={colms}
+ onclicklink={clickLick}
+ ></c-lex-custom-lightning-datatable>
</div>
</div>
</template>
<!-- 浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧 -->
<template if:true={overlimit}>
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -50,8 +81,14 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧</strong></p> -->
</div>
- <div style="padding:10px;">
- <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodName" data={overlimitdateorderdetails} columns={colm3}></lightning-datatable>
+ <div style="padding: 10px">
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ hide-checkbox-column
+ key-field="prodName"
+ data={overlimitdateorderdetails}
+ columns={colm3}
+ ></lightning-datatable>
</div>
</div>
</template>
@@ -140,8 +177,15 @@
</div>
</div> -->
<!--缁忛攢鍟嗗簱瀛樹笂涓嬮檺 -->
- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
- <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-top: 3px solid #51606e;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
<lightning-layout>
<lightning-layout-item padding="around-small">
<p style="font-size: 18px">
@@ -151,12 +195,24 @@
</lightning-layout>
<!-- <p style="font-size: 16px;"><strong>缁忛攢鍟嗗簱瀛樹笂涓嬮檺</strong></p> -->
</div>
- <div style="padding:10px;">
+ <div style="padding: 10px">
<div lwc:dom="manual" id="resultDiv" class="resultDiv"></div>
- <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodName" data={productLimitRecords} columns={colm4}></lightning-datatable>
- <p style="height: 10px;"></p>
- <div draggable="false" >
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="width: 220px;" onclick={editProductLimit}>缁忛攢鍟嗕骇鍝佷笂涓嬮檺缂栬緫</button>
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ hide-checkbox-column
+ key-field="prodName"
+ data={productLimitRecords}
+ columns={colm4}
+ ></lightning-datatable>
+ <p style="height: 10px"></p>
+ <div draggable="false">
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ style="width: 220px"
+ onclick={editProductLimit}
+ >
+ 缁忛攢鍟嗕骇鍝佷笂涓嬮檺缂栬緫
+ </button>
</div>
</div>
</div>
@@ -187,28 +243,69 @@
</div> -->
<!-- 璁㈠崟鍚勭鏁伴噺淇℃伅寮圭獥 -->
<template if:true={showPop}>
- <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small" style="border: 1px solid #D4D4D4;">
+ <section
+ role="dialog"
+ tabindex="-1"
+ aria-labelledby="modal-heading-01"
+ aria-modal="true"
+ aria-describedby="modal-content-id-1"
+ class="slds-modal slds-fade-in-open slds-modal_small"
+ style="border: 1px solid #d4d4d4"
+ >
<div class="slds-modal__container">
- <header class="slds-modal__header" style="background-color: #F3F3F3;">
- <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closePop}>
- <lightning-icon icon-name="utility:close"
+ <header
+ class="slds-modal__header"
+ style="background-color: #f3f3f3"
+ >
+ <button
+ style=""
+ class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+ title="Close"
+ onclick={closePop}
+ >
+ <lightning-icon
+ icon-name="utility:close"
alternative-text="close"
variant="inverse"
- size="small" ></lightning-icon>
+ size="small"
+ ></lightning-icon>
<span class="slds-assistive-text">Close</span>
</button>
- <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">{popTitle}</h2>
+ <h2
+ id="modal-heading-01"
+ class="slds-text-heading_medium slds-hyphenate"
+ >
+ {popTitle}
+ </h2>
</header>
- <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" style="border: 1px solid #F3F3F3;">
- <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodModel" columns={colms2} data={recordList}></lightning-datatable>
+ <div
+ class="slds-modal__content slds-p-around_medium"
+ id="modal-content-id-1"
+ style="border: 1px solid #f3f3f3"
+ >
+ <lightning-datatable
+ class="wrapped-header-datatable"
+ hide-checkbox-column
+ key-field="prodModel"
+ columns={colms2}
+ data={recordList}
+ ></lightning-datatable>
</div>
<footer class="slds-modal__footer">
<!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}></lightning-button> -->
- <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}>鍏抽棴</button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ style="margin-left: 10px"
+ variant="neutral"
+ label="鍏抽棴"
+ onclick={closePop}
+ >
+ 鍏抽棴
+ </button>
</footer>
</div>
</section>
<div class="slds-backdrop slds-backdrop_open"></div>
</template>
</template>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexTopPage/lexTopPage.js b/force-app/main/default/lwc/lexTopPage/lexTopPage.js
index cb6582a..88ffbbb 100644
--- a/force-app/main/default/lwc/lexTopPage/lexTopPage.js
+++ b/force-app/main/default/lwc/lexTopPage/lexTopPage.js
@@ -11,9 +11,9 @@
import initNotArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDetAll';
import initMoreThan7 from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7';
import initMoreThan7All from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7All';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
export default class LexTopPage extends NavigationMixin(LightningElement) {
@track title = [];
@@ -48,12 +48,12 @@
@track showTable = false;
@track hidecheckboxcolumn = true;
//鎺掑簭
- defaultSortDirection = "asc";
- sortDirection = "asc";
+ defaultSortDirection = 'asc';
+ sortDirection = 'asc';
sortedBy;
//鍒嗛〉start
- @track sortBy = "";
+ @track sortBy = '';
@track pageSize = 10;
error;
records;
@@ -76,212 +76,258 @@
@track colms = [
{
label: '娑堣�楀搧璁㈠崟鍚嶇О',
- type: "customOutputGood",
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "Name" },
+ outputValue: { fieldName: 'Name' },
type: 'Title',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true,initialWidth: 200
+ hideDefaultActions: true,
+ // initialWidth: 200,
+ wrapText: true
},
- { label: 'SAP鍚堝悓鍙�', fieldName: 'ContractNo__c', hideDefaultActions: true},
+ {
+ label: 'SAP鍚堝悓鍙�',
+ fieldName: 'ContractNo__c',
+ hideDefaultActions: true,
+ wrapText: true,
+ initialWidth: 180
+ },
{
label: '璁㈠崟鎬绘暟',
- type: "customOutputGood",
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "Total_num__c" },
+ outputValue: { fieldName: 'Total_num__c' },
type: 'TotalNum',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 100
+ hideDefaultActions: true,
+ initialWidth: 100
},
{
label: '宸插埌璐ф暟閲�',
- type: "customOutputGood",
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "OrderNumber_arrived__c" },
+ outputValue: { fieldName: 'OrderNumber_arrived__c' },
type: 'ArrDet',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 110
+ hideDefaultActions: true,
+ initialWidth: 100
},
{
label: '寰呯郴缁熸搷浣滃叆搴撴暟閲�',
- type: "customOutputGood",
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "Delivery_detail_count__c" },
+ outputValue: { fieldName: 'Delivery_detail_count__c' },
type: 'DeliveryDet',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 180
+ hideDefaultActions: true,
+ initialWidth: 150
},
{
label: '杩樻病鍙戣揣鏁伴噺',
- type: "customOutputGood",
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "OrderNumber_notarrive__c" },
+ outputValue: { fieldName: 'OrderNumber_notarrive__c' },
type: 'NotArrDet',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 120
+ hideDefaultActions: true,
+ initialWidth: 120
},
{
label: '鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�',
- type: "customOutputGood",
+ type: 'customOutputGood',
typeAttributes: {
- outputValue: { fieldName: "More_than_seven_days__c" },
+ outputValue: { fieldName: 'More_than_seven_days__c' },
type: 'MoreThan7',
- recordId: { fieldName: "Id" }
+ recordId: { fieldName: 'Id' }
},
- hideDefaultActions: true, initialWidth: 180
+ hideDefaultActions: true,
+ initialWidth: 150
},
- { label: '鏈�鏂板彂璐ф棩鏈�', fieldName: 'Shipment_date__c', hideDefaultActions: true , initialWidth: 140},
- { label: '棣栨鍙戣揣鏃ユ湡', fieldName: 'First_Delivery__c', hideDefaultActions: true , initialWidth: 140}
+ {
+ label: '鏈�鏂板彂璐ф棩鏈�',
+ fieldName: 'Shipment_date__c',
+ hideDefaultActions: true,
+ initialWidth: 105
+ },
+ {
+ label: '棣栨鍙戣揣鏃ユ湡',
+ fieldName: 'First_Delivery__c',
+ hideDefaultActions: true,
+ initialWidth: 105
+ }
];
@track colms2 = [
{ label: '浜у搧鍨嬪彿', fieldName: 'prodModel', hideDefaultActions: true },
- { label: '鏁伴噺', fieldName: 'recordCount', hideDefaultActions: true ,initialWidth: 100}
+ {
+ label: '鏁伴噺',
+ fieldName: 'recordCount',
+ hideDefaultActions: true,
+ initialWidth: 60,
+ cellAttributes: { alignment: 'center' }
+ }
];
//浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧col
@track colm3 = [
{ label: '浜у搧鍨嬪彿', fieldName: 'prodName', hideDefaultActions: true },
- { label: '鏁伴噺', fieldName: 'countid', hideDefaultActions: true ,cellAttributes: { alignment: "left" }},
- { label: '鍗曚綅', fieldName: 'BoxPiece', hideDefaultActions: true ,cellAttributes: { alignment: "left" }}
+ {
+ label: '鏁伴噺',
+ fieldName: 'countid',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'left' }
+ },
+ {
+ label: '鍗曚綅',
+ fieldName: 'BoxPiece',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'left' }
+ }
];
//缁忛攢鍟嗗簱瀛樹笂涓嬮檺col
@track colm4 = [
{ label: '浜у搧鍨嬪彿', fieldName: 'prodName', hideDefaultActions: true },
- { label: '搴撳瓨涓嬮檺', fieldName: 'limitLow', hideDefaultActions: true ,cellAttributes: { alignment: "left" }},
- { label: '搴撳瓨涓婇檺', fieldName: 'limitUp', hideDefaultActions: true ,cellAttributes: { alignment: "left" }}
+ {
+ label: '搴撳瓨涓嬮檺',
+ fieldName: 'limitLow',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'left' }
+ },
+ {
+ label: '搴撳瓨涓婇檺',
+ fieldName: 'limitUp',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'left' }
+ }
];
@track columns = [
{
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "Name__c",
- type: "Name",
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ type: 'Name',
sortable: true,
hideDefaultActions: true,
wrapText: true,
- cellAttributes: { alignment: "left" }
+ cellAttributes: { alignment: 'left' }
},
{
- label: "瑙勬牸",
- fieldName: "packing_list",
- cellAttributes: { alignment: "right" },
+ label: '瑙勬牸',
+ fieldName: 'packing_list',
+ cellAttributes: { alignment: 'right' },
initialWidth: 50,
wrapText: true,
- hideDefaultActions: true,
+ hideDefaultActions: true
},
{
- label: "绗笁鍒嗙被",
- fieldName: "Category3__c",
+ label: '绗笁鍒嗙被',
+ fieldName: 'Category3__c',
initialWidth: 85,
- cellAttributes: { alignment: "left" },
+ cellAttributes: { alignment: 'left' },
hideDefaultActions: true,
- wrapText: true,
+ wrapText: true
},
{
- label: "绗洓鍒嗙被",
- fieldName: "Category4__c",
- cellAttributes: { alignment: "left" },
+ label: '绗洓鍒嗙被',
+ fieldName: 'Category4__c',
+ cellAttributes: { alignment: 'left' },
+ initialWidth: 85,
+ hideDefaultActions: true,
+ wrapText: true
+ },
+ {
+ label: '绗簲鍒嗙被',
+ fieldName: 'Category5__c',
+ cellAttributes: { alignment: 'left' },
initialWidth: 85,
hideDefaultActions: true,
wrapText: true,
-
+ sortable: true
},
{
- label: "绗簲鍒嗙被",
- fieldName: "Category5__c",
- cellAttributes: { alignment: "left" },
- initialWidth: 85,
- hideDefaultActions: true,
- wrapText: true,
- sortable: true,
-
- },
- {
- label: "CFDA鐘舵��",
- fieldName: "SFDA_Status__c",
- cellAttributes: { alignment: "left" },
+ label: 'CFDA鐘舵��',
+ fieldName: 'SFDA_Status__c',
+ cellAttributes: { alignment: 'left' },
initialWidth: 80,
- hideDefaultActions: true,
+ hideDefaultActions: true
},
{
- label: "娉ㄥ唽璇佺紪鐮佸彿",
- fieldName: "approbation_No",
- cellAttributes: { alignment: "left" },
+ label: '娉ㄥ唽璇佺紪鐮佸彿',
+ fieldName: 'approbation_No',
+ cellAttributes: { alignment: 'left' },
wrapText: true,
initialWidth: 155,
- hideDefaultActions: true,
+ hideDefaultActions: true
},
{
- label: "娉ㄥ唽璇佹晥鏈�",
- fieldName: "expiration_Date",
- cellAttributes: { alignment: "left" },
+ label: '娉ㄥ唽璇佹晥鏈�',
+ fieldName: 'expiration_Date',
+ cellAttributes: { alignment: 'left' },
wrapText: true,
hideDefaultActions: true,
initialWidth: 100
},
{
- label: "浜у搧鏁伴噺涓嬮檺",
- fieldName: "lowerlimit",
- cellAttributes: { alignment: "right" },
+ label: '浜у搧鏁伴噺涓嬮檺',
+ fieldName: 'lowerlimit',
+ cellAttributes: { alignment: 'right' },
wrapText: true,
hideDefaultActions: true,
initialWidth: 100
},
{
- label: "浣跨敤鏈熼檺",
- fieldName: "guaranteeperiod",
- cellAttributes: { alignment: "left" },
+ label: '浣跨敤鏈熼檺',
+ fieldName: 'guaranteeperiod',
+ cellAttributes: { alignment: 'left' },
hideDefaultActions: true,
initialWidth: 95
},
{
label: '鏈夋晥鏈熷唴搴撳瓨',
- type: "customInventoryColor",
- cellAttributes: { alignment: "right" },
+ type: 'customInventoryColor',
+ cellAttributes: { alignment: 'right' },
typeAttributes: {
- value: { fieldName: "limitCount" },
- upperlimit: { fieldName: "upperlimit" },
- lowerlimit: { fieldName: "lowerlimit" },
- boxPrice: { fieldName: "BoxPiece" },
+ value: { fieldName: 'limitCount' },
+ upperlimit: { fieldName: 'upperlimit' },
+ lowerlimit: { fieldName: 'lowerlimit' },
+ boxPrice: { fieldName: 'BoxPiece' }
},
hideDefaultActions: true,
initialWidth: 95
},
{
- label: "杩囨湡搴撳瓨",
- fieldName: "overlimitCount",
+ label: '杩囨湡搴撳瓨',
+ fieldName: 'overlimitCount',
hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
+ cellAttributes: { alignment: 'right' },
initialWidth: 75
},
{
- label: "鍗曚綅",
- fieldName: "BoxPiece",
- cellAttributes: { alignment: "left" },
+ label: '鍗曚綅',
+ fieldName: 'BoxPiece',
+ cellAttributes: { alignment: 'left' },
initialWidth: 50,
wrapText: true,
- hideDefaultActions: true,
- },
-
+ hideDefaultActions: true
+ }
];
renderedCallback() {
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
@@ -294,20 +340,23 @@
this.showSpinner = true;
initPage({
pageSizeLWC: this.pageSize,
- pageTokenLWC: this.currentPageToken,
+ pageTokenLWC: this.currentPageToken
})
- .then(result => {
+ .then((result) => {
this.isNoteStay = result.isNoteStay;
- console.log('isNoteStay:'+result.isNoteStay);
+ console.log('isNoteStay:' + result.isNoteStay);
if (result.result == 'Success') {
//鍒嗛〉start
this.nextPageToken = result.paginatedAccounts.nextPageToken;
this.totalRecords = result.paginatedAccounts.totalRecords;
this.recordStart = result.paginatedAccounts.recordStart;
this.recordEnd = result.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(result.paginatedAccounts.totalRecords / this.pageSize);
+ this.totalPages = Math.ceil(
+ result.paginatedAccounts.totalRecords / this.pageSize
+ );
console.log('this.totalPages = ' + this.totalPages);
- this.paginationVisibility = this.totalPages > 1 ? true : false;
+ this.paginationVisibility =
+ this.totalPages > 1 ? true : false;
console.log('this.sortDirection = ' + this.sortDirection);
this.loader = false;
//鍒嗛〉end
@@ -318,81 +367,117 @@
this.orderNumberNotarrive = result.orderNumberNotarrive;
this.moreThanSevenDays = result.moreThanSevenDays;
this.raesList = result.raesList;
- this.raesList.push({ Id: '1', Name: '寰呮搷浣滃叆搴撹鍗曟眹鎬�', Total_num__c: this.totalNum, OrderNumber_arrived__c: this.orderNumberArrived, Delivery_detail_count__c: this.deliveryDetailCount, OrderNumber_notarrive__c: this.orderNumberNotarrive, More_than_seven_days__c: this.moreThanSevenDays });
+ this.raesList.push({
+ Id: '1',
+ Name: '寰呮搷浣滃叆搴撹鍗曟眹鎬�',
+ Total_num__c: this.totalNum,
+ OrderNumber_arrived__c: this.orderNumberArrived,
+ Delivery_detail_count__c: this.deliveryDetailCount,
+ OrderNumber_notarrive__c: this.orderNumberNotarrive,
+ More_than_seven_days__c: this.moreThanSevenDays
+ });
this.column = result.column;
this.accountInfo = result.accountInfo;
this.accountId = result.accountInfo.Id;
this.pageRecords = result.pageRecords;
- this.overlimitdateorderdetails = result.overlimitdateorderdetails;
+ this.overlimitdateorderdetails =
+ result.overlimitdateorderdetails;
this.over_view = result.over_view;
this.overlimit = result.overlimit;
this.hasHos = result.hasHos;
this.product_Limit = result.product_Limit;
console.log('result==>' + JSON.stringify(result));
for (var i in this.pageRecords) {
- this.pageRecords[i]["Name__c"] = this.pageRecords[i].Prod.Name__c;
- this.pageRecords[i]["Category3__c"] = this.pageRecords[i].Prod.Category3__c;
- this.pageRecords[i]["Category4__c"] = this.pageRecords[i].Prod.Category3__c;
- this.pageRecords[i]["Category5__c"] = this.pageRecords[i].Prod.Category3__c;
- this.pageRecords[i]["SFDA_Status__c"] = this.pageRecords[i].Prod.SFDA_Status__c;
+ this.pageRecords[i]['Name__c'] =
+ this.pageRecords[i].Prod.Name__c;
+ this.pageRecords[i]['Category3__c'] =
+ this.pageRecords[i].Prod.Category3__c;
+ this.pageRecords[i]['Category4__c'] =
+ this.pageRecords[i].Prod.Category3__c;
+ this.pageRecords[i]['Category5__c'] =
+ this.pageRecords[i].Prod.Category3__c;
+ this.pageRecords[i]['SFDA_Status__c'] =
+ this.pageRecords[i].Prod.SFDA_Status__c;
}
//hasHos = true 鍖婚櫌鐗逛环
if (this.hasHos) {
let object1 = {
- label: "鍖婚櫌鐗逛环",
- fieldName: "hospitalSpecialOffer",
+ label: '鍖婚櫌鐗逛环',
+ fieldName: 'hospitalSpecialOffer',
hideDefaultActions: true,
type: 'boolean',
- cellAttributes: { alignment: "left" },
+ cellAttributes: { alignment: 'left' },
initialWidth: 75
-
};
this.columns.push(object1);
console.log(' this.columns' + this.columns);
for (var j in this.pageRecords) {
- this.pageRecords[j]["Name__c"] = this.pageRecords[j].Prod.Name__c;
- this.pageRecords[j]["Category3__c"] = this.pageRecords[j].Prod.Category3__c;
- this.pageRecords[j]["Category4__c"] = this.pageRecords[j].Prod.Category3__c;
- this.pageRecords[j]["Category5__c"] = this.pageRecords[j].Prod.Category3__c;
- this.pageRecords[j]["SFDA_Status__c"] = this.pageRecords[j].Prod.SFDA_Status__c;
- this.pageRecords[j]["hospitalSpecialOffer__c"] = this.pageRecords[j].hospitalSpecialOffer;
+ this.pageRecords[j]['Name__c'] =
+ this.pageRecords[j].Prod.Name__c;
+ this.pageRecords[j]['Category3__c'] =
+ this.pageRecords[j].Prod.Category3__c;
+ this.pageRecords[j]['Category4__c'] =
+ this.pageRecords[j].Prod.Category3__c;
+ this.pageRecords[j]['Category5__c'] =
+ this.pageRecords[j].Prod.Category3__c;
+ this.pageRecords[j]['SFDA_Status__c'] =
+ this.pageRecords[j].Prod.SFDA_Status__c;
+ this.pageRecords[j]['hospitalSpecialOffer__c'] =
+ this.pageRecords[j].hospitalSpecialOffer;
}
}
this.showTable = true;
- if (this.product_Limit != null && this.product_Limit != '') {
- var records = this.product_Limit.split(",");
+ if (
+ this.product_Limit != null &&
+ this.product_Limit != ''
+ ) {
+ var records = this.product_Limit.split(',');
for (var i in records) {
- var parms = records[i].split("|");
+ var parms = records[i].split('|');
var record = new Object();
- record["prodName"] = parms[0];
- record["limitLow"] = parms[1];
- record["limitUp"] = parms[2];
+ record['prodName'] = parms[0];
+ record['limitLow'] = parms[1];
+ record['limitUp'] = parms[2];
this.productLimitRecords.push(record);
}
}
// this.productLimitRecords = records;
- console.log("productLimitRecords:" + JSON.stringify(this.productLimitRecords));
- console.log("product_Limit:" + this.product_Limit);
- this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview;
+ console.log(
+ 'productLimitRecords:' +
+ JSON.stringify(this.productLimitRecords)
+ );
+ console.log('product_Limit:' + this.product_Limit);
+ this.consumableorderdetailsRecordsview =
+ result.consumableorderdetailsRecordsview;
//add by WangXueqin 2023/05/05
this.userPro_Type = result.userPro_Type;
console.log('this.accountId:' + this.accountId);
- console.log('this.accountInfo:' + JSON.stringify(this.accountInfo));
+ console.log(
+ 'this.accountInfo:' + JSON.stringify(this.accountInfo)
+ );
this.showSpinner = false;
this.showPage = true;
// this.showMyToast('鍒濆鍖栭〉闈㈡垚鍔�', '', 'success');
} else {
this.showPage = true;
this.showSpinner = false;
- console.log("Error:" + result.errorMsg);
- this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', result.errorMsg, 'error');
+ console.log('Error:' + result.errorMsg);
+ this.showMyToast(
+ '鍒濆鍖栭〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
}
})
- .catch(error => {
+ .catch((error) => {
this.showSpinner = false;
- console.log("Error:" + error);
- this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', JSON.stringify(error), 'error');
- })
+ console.log('Error:' + error);
+ this.showMyToast(
+ '鍒濆鍖栭〉闈㈠け璐�',
+ JSON.stringify(error),
+ 'error'
+ );
+ });
}
//鐐瑰嚮閾炬帴
@@ -400,7 +485,9 @@
var outputValue = event.detail.data.value;
var outputType = event.detail.data.type;
var recordId = event.detail.data.recordId;
- console.log("click:" + outputValue + "---" + outputType + "---" + recordId);
+ console.log(
+ 'click:' + outputValue + '---' + outputType + '---' + recordId
+ );
if (outputType == 'Title') {
const config = {
type: 'standard__webPage',
@@ -411,120 +498,146 @@
this[NavigationMixin.Navigate](config);
} else if (outputType == 'TotalNum') {
this.popTitle = '鎵�鏈変骇鍝佷竴瑙�';
- initTotalNum({ ordId: recordId, type: '' })
- .then(result => {
+ initTotalNum({ ordId: recordId, type: '' }).then((result) => {
+ if (result.result == 'Success') {
+ this.recordList = result.recordList;
+ console.log('data:' + JSON.stringify(this.recordList));
+ this.showPop = true;
+ } else {
+ this.showMyToast(
+ '鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ });
+ } else if (outputType == 'ArrDet') {
+ if (recordId == '1') {
+ this.popTitle = '鎵�鏈夊凡鍒拌揣浜у搧涓�瑙�';
+ initArrDetAll({ type: '' }).then((result) => {
if (result.result == 'Success') {
this.recordList = result.recordList;
console.log('data:' + JSON.stringify(this.recordList));
this.showPop = true;
} else {
- this.showMyToast('鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
+ this.showMyToast(
+ '鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
}
- })
- } else if (outputType == 'ArrDet') {
- if (recordId == '1') {
- this.popTitle = '鎵�鏈夊凡鍒拌揣浜у搧涓�瑙�';
- initArrDetAll({ type: '' })
- .then(result => {
- if (result.result == 'Success') {
- this.recordList = result.recordList;
- console.log('data:' + JSON.stringify(this.recordList));
- this.showPop = true;
- } else {
- this.showMyToast('鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
- }
- })
+ });
} else {
this.popTitle = '宸插埌璐т骇鍝佷竴瑙�';
- initArrDet({ orderId: recordId })
- .then(result => {
- if (result.result == 'Success') {
- this.recordList = result.recordList;
- console.log('data:' + JSON.stringify(this.recordList));
- this.showPop = true;
- } else {
- this.showMyToast('鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
- }
- })
+ initArrDet({ orderId: recordId }).then((result) => {
+ if (result.result == 'Success') {
+ this.recordList = result.recordList;
+ console.log('data:' + JSON.stringify(this.recordList));
+ this.showPop = true;
+ } else {
+ this.showMyToast(
+ '鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ });
}
} else if (outputType == 'DeliveryDet') {
if (recordId == '1') {
this.popTitle = '鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙�';
- initDeliveryDetAll({ type: '' })
- .then(result => {
- if (result.result == 'Success') {
- this.recordList = result.recordList;
- console.log('data:' + JSON.stringify(this.recordList));
- this.showPop = true;
- } else {
- this.showMyToast('鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
- }
- })
+ initDeliveryDetAll({ type: '' }).then((result) => {
+ if (result.result == 'Success') {
+ this.recordList = result.recordList;
+ console.log('data:' + JSON.stringify(this.recordList));
+ this.showPop = true;
+ } else {
+ this.showMyToast(
+ '鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ });
} else {
this.popTitle = '鏈埌璐т骇鍝佷竴瑙�';
- initDeliveryDet({ orderId: recordId })
- .then(result => {
- if (result.result == 'Success') {
- this.recordList = result.recordList;
- console.log('data:' + JSON.stringify(this.recordList));
- this.showPop = true;
- } else {
- this.showMyToast('鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
- }
- })
+ initDeliveryDet({ orderId: recordId }).then((result) => {
+ if (result.result == 'Success') {
+ this.recordList = result.recordList;
+ console.log('data:' + JSON.stringify(this.recordList));
+ this.showPop = true;
+ } else {
+ this.showMyToast(
+ '鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ });
}
} else if (outputType == 'NotArrDet') {
if (recordId == '1') {
this.popTitle = '鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙�';
- initNotArrDetAll({ type: '' })
- .then(result => {
- if (result.result == 'Success') {
- this.recordList = result.recordList;
- console.log('data:' + JSON.stringify(this.recordList));
- this.showPop = true;
- } else {
- this.showMyToast('鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
- }
- })
+ initNotArrDetAll({ type: '' }).then((result) => {
+ if (result.result == 'Success') {
+ this.recordList = result.recordList;
+ console.log('data:' + JSON.stringify(this.recordList));
+ this.showPop = true;
+ } else {
+ this.showMyToast(
+ '鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ });
} else {
this.popTitle = '杩樻病鍙戣揣鏁伴噺';
- initNotArrDet({ orderId: recordId })
- .then(result => {
- if (result.result == 'Success') {
- this.recordList = result.recordList;
- console.log('data:' + JSON.stringify(this.recordList));
- this.showPop = true;
- } else {
- this.showMyToast('鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触', result.errorMsg, 'error');
- }
- })
+ initNotArrDet({ orderId: recordId }).then((result) => {
+ if (result.result == 'Success') {
+ this.recordList = result.recordList;
+ console.log('data:' + JSON.stringify(this.recordList));
+ this.showPop = true;
+ } else {
+ this.showMyToast(
+ '鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ });
}
-
} else if (outputType == 'MoreThan7') {
if (recordId == '1') {
this.popTitle = '鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟';
- initMoreThan7All({ type: '' })
- .then(result => {
- if (result.result == 'Success') {
- this.recordList = result.recordList;
- console.log('data:' + JSON.stringify(this.recordList));
- this.showPop = true;
- } else {
- this.showMyToast('鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触', result.errorMsg, 'error');
- }
- })
+ initMoreThan7All({ type: '' }).then((result) => {
+ if (result.result == 'Success') {
+ this.recordList = result.recordList;
+ console.log('data:' + JSON.stringify(this.recordList));
+ this.showPop = true;
+ } else {
+ this.showMyToast(
+ '鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ });
} else {
this.popTitle = '鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�';
- initMoreThan7({ orderId: recordId })
- .then(result => {
- if (result.result == 'Success') {
- this.recordList = result.recordList;
- console.log('data:' + JSON.stringify(this.recordList));
- this.showPop = true;
- } else {
- this.showMyToast('鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�', result.errorMsg, 'error');
- }
- })
+ initMoreThan7({ orderId: recordId }).then((result) => {
+ if (result.result == 'Success') {
+ this.recordList = result.recordList;
+ console.log('data:' + JSON.stringify(this.recordList));
+ this.showPop = true;
+ } else {
+ this.showMyToast(
+ '鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�',
+ result.errorMsg,
+ 'error'
+ );
+ }
+ });
}
}
}
@@ -536,7 +649,16 @@
editProductLimit(event) {
//add by Wang Xueqin 2023/05/05
- let url = "/lexproductlimitedit?accountid=" + this.accountId + "&userPro_Type=" + this.userPro_Type;
+ //let url =
+ // '/LexProductLimitEdit?accountid=' +
+ // this.accountId +
+ // '&userPro_Type=' +
+ // this.userPro_Type;
+ let url =
+ '/lexproductlimitedit?accountid=' +
+ this.accountId +
+ '&userPro_Type=' +
+ this.userPro_Type;
const config = {
type: 'standard__webPage',
attributes: {
@@ -564,18 +686,24 @@
console.log('show custom message');
var iconName = '';
var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
}
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').
- showToast(variant,content,iconName,10000);
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
// var mode;
// if(this.isNoteStay){
// mode ='sticky';
@@ -589,17 +717,17 @@
// mode: mode
// });
// this.dispatchEvent(evt);
- }
+ }
//鎺掑簭
sortByMethod(field, reverse, primer) {
const key = primer
? function (x) {
- return primer(x[field]);
- }
+ return primer(x[field]);
+ }
: function (x) {
- return x[field];
- };
+ return x[field];
+ };
return function (a, b) {
a = key(a);
@@ -609,15 +737,17 @@
}
onHandleSort(event) {
- console.log("Sort");
+ console.log('Sort');
this.sortBy = event.detail.fieldName;
this.sortDirection = event.detail.sortDirection;
this.currentPageToken = 0;
- console.log('this.sortBy = ' + this.sortBy)
- console.log('this.sortDirection = ' + this.sortDirection)
+ console.log('this.sortBy = ' + this.sortBy);
+ console.log('this.sortDirection = ' + this.sortDirection);
const { fieldName: sortedBy, sortDirection } = event.detail;
const cloneData = [...this.pageRecords];
- cloneData.sort(this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1));
+ cloneData.sort(
+ this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1)
+ );
this.pageRecords = cloneData;
this.sortDirection = sortDirection;
this.sortedBy = sortedBy;
@@ -633,12 +763,14 @@
}
}
handlePrevious() {
- this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);
+ this.currentPageToken =
+ Number(this.currentPageToken) - Number(this.pageSize);
this.init();
}
handleNext() {
- this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize);
+ this.currentPageToken =
+ Number(this.currentPageToken) + Number(this.pageSize);
this.init();
}
handleFirst() {
@@ -647,7 +779,8 @@
}
handleLast() {
- this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+ this.currentPageToken =
+ this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
this.init();
}
@@ -664,4 +797,4 @@
get nextButtonDisabled() {
return this.nextPageToken === undefined;
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.css b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.css
index 49d6963..4547f7c 100644
--- a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.css
+++ b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.css
@@ -1 +1,16 @@
-@import 'c/lexCssUtility';
\ No newline at end of file
+@import 'c/lexCssUtility';
+.lexButtoun {
+ font-size: 18px;
+ font-family: 'sans-serif';
+ font-weight: 500;
+ color: #0a81df;
+ /* border:2px solid rgb(8,16,132); */
+ /* border-color:rgb(8,16,132); */
+ width: 160px;
+ height: 36px;
+ border-radius: 4px;
+ opacity: 1;
+ background: #ffffff;
+ box-sizing: border-box;
+ border: 1px solid #0a81df;
+}
diff --git a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html
index 18ee0c9..90057ad 100644
--- a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html
+++ b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html
@@ -1,10 +1,26 @@
<template>
<template if:true={showSpinner}>
- <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+ <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+ <div class="slds-spinner_container">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
</template>
<c-common-toast></c-common-toast>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;">
- <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div style="border: 1px solid #d4d4d4; border-radius: 5px">
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<!-- <p style="font-size: 18px;"><strong>搴撳瓨绠$悊</strong></p> -->
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -14,9 +30,21 @@
</lightning-layout-item>
</lightning-layout>
</div>
- <div style="padding:10px;">
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:10px;">
+ <div style="padding: 10px">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 10px;
+ "
+ >
<!-- <lightning-button variant="brand" class = 'lexstyle' style="margin:12px;" label="搴撳瓨鐩樼偣" title="搴撳瓨鐩樼偣"
onclick={inventoryCount}></lightning-button>
<lightning-button variant="brand" class = 'lexstyle' style="margin: 12px;" label="杩囨湡搴撳瓨閿�瀛�" title="杩囨湡搴撳瓨閿�瀛�"
@@ -24,16 +52,58 @@
<lightning-button variant="brand" class = 'lexstyle' style="margin: 12px;" label="鎷嗙洅" title="鎷嗙洅" onclick={removeBox}></lightning-button>
<lightning-button variant="brand" class = 'lexstyle' style="margin: 12px;" label="鍙栨秷鎷嗙洅" title="鍙栨秷鎷嗙洅"
onclick={cancelremoveBox}></lightning-button> -->
- <button style ="margin-left:5px;" class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="搴撳瓨鐩樼偣" onclick={inventoryCount}>搴撳瓨鐩樼偣</button>
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="杩囨湡搴撳瓨閿�瀛�" style = "margin-left:150px;" onclick={handleExpired}>杩囨湡搴撳瓨閿�瀛�</button>
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="鎷嗙洅" style = "margin-left:150px;" onclick={removeBox}>鎷嗙洅</button>
- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="鍙栨秷鎷嗙洅" style = "margin-left:150px;" onclick={cancelremoveBox}>鍙栨秷鎷嗙洅</button>
+ <button
+ style="margin-left: 5px"
+ class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+ label="搴撳瓨鐩樼偣"
+ onclick={inventoryCount}
+ >
+ 搴撳瓨鐩樼偣
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexButtoun"
+ label="杩囨湡搴撳瓨閿�瀛�"
+ style="margin-left: 60px"
+ onclick={handleExpired}
+ >
+ 杩囨湡搴撳瓨閿�瀛�
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexButtoun"
+ label="鎷嗙洅"
+ style="margin-left: 60px"
+ onclick={removeBox}
+ >
+ 鎷嗙洅
+ </button>
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexButtoun"
+ label="鍙栨秷鎷嗙洅"
+ style="margin-left: 60px"
+ onclick={cancelremoveBox}
+ >
+ 鍙栨秷鎷嗙洅
+ </button>
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:30px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;height:115px">
- <table style="margin-top:10px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ margin-top: 30px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ height: 115px;
+ "
+ >
+ <table style="margin-top: 10px">
<colgroup>
<col width="160px" />
<col width="100px" />
@@ -53,52 +123,130 @@
<col width="100px" />
</colgroup>
<tbody>
- <tr>
- <td style="width:10px;"></td>
- <td style="width:250px">
- <div style="width:90px;margin-left:12px;" class="searchName">娑堣�楀搧鍚嶇О</div>
+ <tr>
+ <td style="width: 10px"></td>
+ <td style="width: 250px">
+ <div
+ style="width: 90px; margin-left: 12px"
+ class="searchName"
+ >
+ 娑堣�楀搧鍚嶇О
+ </div>
</td>
- <td style="width: 21%;">
- <lightning-input class="searchName" type="text" name="Name" label="娑堣�楀搧鍚嶇О" value={Name}
- variant="label-hidden" onchange={dataChange}
- data-field="Name"></lightning-input>
+ <td style="width: 21%">
+ <lightning-input
+ class="searchName"
+ type="text"
+ name="Name"
+ label="娑堣�楀搧鍚嶇О"
+ value={Name}
+ variant="label-hidden"
+ onchange={dataChange}
+ data-field="Name"
+ ></lightning-input>
</td>
- <td style="width:150px">
- <div style="width:90px;text-align:center;" class="searchName">绗�3鍒嗙被</div>
+ <td style="width: 150px">
+ <div
+ style="width: 90px; text-align: center"
+ class="searchName"
+ >
+ 绗�3鍒嗙被
+ </div>
</td>
- <td style="width: 21%;">
- <lightning-combobox class="inputFont" style="margin-left:5px;" name="CategoryThree" label="绗�3鍒嗙被" value={value}
- placeholder="璇烽�夋嫨..." options={category3Options} variant="label-hidden"
- data-field="CategoryThree" onchange={dataChange}></lightning-combobox>
+ <td style="width: 21%">
+ <lightning-combobox
+ class="inputFont"
+ style="margin-left: 5px"
+ name="CategoryThree"
+ label="绗�3鍒嗙被"
+ value={value}
+ placeholder="璇烽�夋嫨..."
+ options={category3Options}
+ variant="label-hidden"
+ data-field="CategoryThree"
+ onchange={dataChange}
+ ></lightning-combobox>
</td>
- <td style="width:150px">
- <div style="width:90px;text-align:center;" class="searchName">绗�4鍒嗙被</div>
+ <td style="width: 150px">
+ <div
+ style="width: 90px; text-align: center"
+ class="searchName"
+ >
+ 绗�4鍒嗙被
+ </div>
</td>
- <td style="width: 21%;">
- <lightning-combobox class="inputFont" name="CategoryFour" label="绗�4鍒嗙被" value={value}
- placeholder="璇烽�夋嫨..." options={category4Options} variant="label-hidden"
- data-field="CategoryFour" onchange={dataChange}></lightning-combobox>
+ <td style="width: 21%">
+ <lightning-combobox
+ class="inputFont"
+ name="CategoryFour"
+ label="绗�4鍒嗙被"
+ value={value}
+ placeholder="璇烽�夋嫨..."
+ options={category4Options}
+ variant="label-hidden"
+ data-field="CategoryFour"
+ onchange={dataChange}
+ ></lightning-combobox>
</td>
- <td style="width:150px">
- <div style="width:90px;text-align:center;" class="searchName">绗�5鍒嗙被</div>
+ <td style="width: 150px">
+ <div
+ style="width: 90px; text-align: center"
+ class="searchName"
+ >
+ 绗�5鍒嗙被
+ </div>
</td>
- <td style="width: 21%;">
- <lightning-combobox class="inputFont" name="CategoryFive" label="绗�5鍒嗙被" value={value}
- placeholder="璇烽�夋嫨..." options={category5Options} variant="label-hidden"
- data-field="CategoryFive" onchange={dataChange}></lightning-combobox>
+ <td style="width: 21%">
+ <lightning-combobox
+ class="inputFont"
+ name="CategoryFive"
+ label="绗�5鍒嗙被"
+ value={value}
+ placeholder="璇烽�夋嫨..."
+ options={category5Options}
+ variant="label-hidden"
+ data-field="CategoryFive"
+ onchange={dataChange}
+ ></lightning-combobox>
</td>
- <td style="width: 1%;"></td>
+ <td style="width: 1%"></td>
</tr>
</tbody>
</table>
- <br/>
- <div style="float:right;margin-right:10px;"> <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" label="娑堣�楀搧鎼滅储" onclick={searchOrderDetail}>娑堣�楀搧鎼滅储</button>
- <button style="margin-left:10px;" class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" label="娓呯┖" onclick={clearAll}>娓呯┖</button></div>
-
+ <br />
+ <div style="float: right; margin-right: 10px">
+ <button
+ class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+ label="娑堣�楀搧鎼滅储"
+ onclick={searchOrderDetail}
+ >
+ 娑堣�楀搧鎼滅储
+ </button>
+ <button
+ style="margin-left: 10px"
+ class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+ label="娓呯┖"
+ onclick={clearAll}
+ >
+ 娓呯┖
+ </button>
+ </div>
</div>
</div>
- <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;">
- <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;">
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ border-radius: 5px;
+ margin-bottom: 7px;
+ "
+ >
+ <div
+ style="
+ border-top: 3px solid #51606e;
+ border-bottom: 1px solid #d4d4d4;
+ padding: 3px;
+ "
+ >
<!-- <p style="font-size: 16px;"><strong>搴撳瓨璇︽儏</strong></p> -->
<lightning-layout>
<lightning-layout-item padding="around-small">
@@ -108,22 +256,37 @@
</lightning-layout-item>
</lightning-layout>
</div>
- <div style="padding:10px;">
+ <div style="padding: 10px">
<template if:true={showTable}>
- <c-lex-custom-lightning-datatable key-field="id" data={data} columns={columns}
- default-sort-direction={defaultSortDirection} sorted-direction={sortDirection}
- sorted-by={sortedBy} onsort={onHandleSort} hide-checkbox-column={hidecheckboxcolumn}
- class="wrapped-header-datatable">
+ <c-lex-custom-lightning-datatable
+ key-field="id"
+ data={data}
+ columns={columns}
+ default-sort-direction={defaultSortDirection}
+ sorted-direction={sortDirection}
+ sorted-by={sortedBy}
+ onsort={onHandleSort}
+ hide-checkbox-column={hidecheckboxcolumn}
+ style="word-wrap: break-word; word-break: break-all"
+ class="wrapped-header-datatable"
+ >
</c-lex-custom-lightning-datatable>
</template>
- <c-paginator onprevious={handlePrevious} onnext={handleNext} onpageschange={handlePageschange}
- onfirst={handleFirst} onlast={handleLast} page-size-options={pageSizeOptions}
- previous-button-disabled={previousButtonDisabled} next-button-disabled={nextButtonDisabled}
- record-start={recordStart} record-end={recordEnd} total-records={totalRecords}></c-paginator>
+ <c-paginator
+ onprevious={handlePrevious}
+ onnext={handleNext}
+ onpageschange={handlePageschange}
+ onfirst={handleFirst}
+ onlast={handleLast}
+ page-size-options={pageSizeOptions}
+ previous-button-disabled={previousButtonDisabled}
+ next-button-disabled={nextButtonDisabled}
+ record-start={recordStart}
+ record-end={recordEnd}
+ total-records={totalRecords}
+ ></c-paginator>
</div>
</div>
</div>
-
-
</div>
-</template>
\ No newline at end of file
+</template>
diff --git a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
index 7b2a2c7..484c5da 100644
--- a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
+++ b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
@@ -1,335 +1,366 @@
import { LightningElement, wire, api, track } from 'lwc';
-import oninit from "@salesforce/apex/LexInventoryViewController.init";
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import searchOrder from "@salesforce/apex/LexInventoryViewController.searchConsumableorderdetails";
-import categoryAllload from "@salesforce/apex/LexInventoryViewController.categoryAllload";
-import { NavigationMixin } from "lightning/navigation";
+import oninit from '@salesforce/apex/LexInventoryViewController.init';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import searchOrder from '@salesforce/apex/LexInventoryViewController.searchConsumableorderdetails';
+import categoryAllload from '@salesforce/apex/LexInventoryViewController.categoryAllload';
+import { NavigationMixin } from 'lightning/navigation';
-//table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+//table css
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
+export default class LexinventoryViewLWC extends NavigationMixin(
+ LightningElement
+) {
+ //鍒嗛〉start
+ @track sortBy = '';
+ //@track sortDirection = "asc";
+ @track pageSize = 10;
+ error;
+ records;
+ currentPageToken = 0;
+ nextPageToken = this.pageSize;
+ @track totalRecords = 0;
+ @track loader = false;
+ @track pageNumber = 1;
+ @track paginationVisibility = false;
+ @track totalPages = 1;
+ pageSizeOptions = [10, 25, 50, 100];
+ @track recordStart = 0;
+ @track recordEnd = 0;
+ //end
-export default class LexinventoryViewLWC extends NavigationMixin(LightningElement) {
- //鍒嗛〉start
- @track sortBy = "";
- //@track sortDirection = "asc";
- @track pageSize = 10;
- error;
- records;
- currentPageToken = 0;
- nextPageToken = this.pageSize;
- @track totalRecords = 0;
- @track loader = false;
- @track pageNumber = 1;
- @track paginationVisibility = false;
- @track totalPages = 1;
- pageSizeOptions = [10,25,50,100];
- @track recordStart = 0;
- @track recordEnd = 0;
- //end
+ @track data = [];
+ @track message = '';
+ @track Name;
+ @track CategoryThree;
- @track data = [];
- @track message = "";
- @track Name;
- @track CategoryThree;
+ @track category3Options = [];
+ @track CategoryFour;
+ @track category4Options = [];
+ @track CategoryFive;
+ @track category5Options = [];
+ @track orderDetZaikuList = [];
+ @track accountName;
+ @track agencyProType;
+ @track userWorkLocation;
+ @track value = '';
+ @track showTable = false;
+ @track hidecheckboxcolumn = true;
+ @track check = false;
+ @track productkucun;
+ //鍔犺浇
+ @track showSpinner = false;
+ @track showSpinners = false;
+ //鍖婚櫌鐗逛环
+ @track hasHos = false;
+ //琛ㄥご鏍峰紡
+ stylesLoaded = false;
- @track category3Options = [];
- @track CategoryFour;
- @track category4Options = [];
- @track CategoryFive;
- @track category5Options = [];
- @track orderDetZaikuList = [];
- @track accountName;
- @track agencyProType;
- @track userWorkLocation;
- @track value = "";
- @track showTable = false;
- @track hidecheckboxcolumn = true;
- @track check = false;
- //鍔犺浇
- @track showSpinner = false;
- @track showSpinners = false;
- //鍖婚櫌鐗逛环
- @track hasHos = false;
- //琛ㄥご鏍峰紡
- stylesLoaded = false;
+ @track columns = [
+ {
+ label: '娑堣�楀搧鍚嶇О',
+ fieldName: 'Name__c',
+ type: 'Name',
+ sortable: true,
+ hideDefaultActions: true,
+ // initialWidth: 200,
+ wrapText: true,
+ cellAttributes: { alignment: 'left' }
+ },
+ {
+ label: '绗笁鍒嗙被',
+ fieldName: 'Category3__c',
+ initialWidth: 102,
+ cellAttributes: { alignment: 'left' },
+ hideDefaultActions: true,
+ sortable: true,
+ wrapText: true
+ },
+ {
+ label: '绗洓鍒嗙被',
+ fieldName: 'Category4__c',
+ cellAttributes: { alignment: 'left' },
+ initialWidth: 102,
+ hideDefaultActions: true,
+ wrapText: true,
+ sortable: true
+ },
+ {
+ label: '绗簲鍒嗙被',
+ fieldName: 'Category5__c',
+ cellAttributes: { alignment: 'left' },
+ initialWidth: 102,
+ hideDefaultActions: true,
+ wrapText: true,
+ sortable: true
+ },
+ {
+ label: '瑙勬牸',
+ fieldName: 'packing_list',
+ cellAttributes: { alignment: 'right' },
+ initialWidth: 50,
+ wrapText: true,
+ hideDefaultActions: true
+ },
+ {
+ label: '鍗曚綅',
+ fieldName: 'BoxPiece',
+ cellAttributes: { alignment: 'left' },
+ initialWidth: 50,
+ wrapText: true,
+ hideDefaultActions: true
+ },
+ {
+ label: '娉ㄥ唽璇佺紪鐮佸彿',
+ fieldName: 'approbation_No',
+ cellAttributes: { alignment: 'left' },
+ wrapText: true,
+ initialWidth: 104,
+ hideDefaultActions: true
+ },
+ {
+ label: '娉ㄥ唽鏈夋晥鏈�',
+ fieldName: 'expiration_Date',
+ cellAttributes: { alignment: 'left' },
+ wrapText: true,
+ hideDefaultActions: true,
+ initialWidth: 95
+ },
+ {
+ label: 'CFDA鐘舵��',
+ fieldName: 'SFDA_Status__c',
+ cellAttributes: { alignment: 'left' },
+ initialWidth: 84,
+ wrapText: true,
+ hideDefaultActions: true
+ },
+ {
+ label: '浣跨敤鏈熼檺',
+ fieldName: 'guaranteeperiod',
+ cellAttributes: { alignment: 'left' },
+ hideDefaultActions: true,
+ initialWidth: 95
+ },
+ {
+ label: '鏈夋晥鏈熷唴搴撳瓨',
+ type: 'customInventoryColor',
+ fieldName: 'limitCount',
+ sortable: true,
+ cellAttributes: { alignment: 'right' },
+ typeAttributes: {
+ value: { fieldName: 'limitCount' },
+ upperlimit: { fieldName: 'upperlimit' },
+ lowerlimit: { fieldName: 'lowerlimit' },
+ boxPrice: { fieldName: 'BoxPiece' }
+ },
+ hideDefaultActions: true,
+ initialWidth: 110
+ },
- @track columns = [
- {
- label: "娑堣�楀搧鍚嶇О",
- fieldName: "Name__c",
- type: "Name",
- sortable: true,
- hideDefaultActions: true,
- // initialWidth: 300,
- wrapText: true,
- cellAttributes: { alignment: "left" }
- },
- {
- label: "绗笁鍒嗙被",
- fieldName: "Category3__c",
- initialWidth: 90,
- cellAttributes: { alignment: "left" },
- hideDefaultActions: true,
- sortable: true,
- wrapText: true,
- },
- {
- label: "绗洓鍒嗙被",
- fieldName: "Category4__c",
- cellAttributes: { alignment: "left" },
- initialWidth: 90,
- hideDefaultActions: true,
- wrapText: true,
- sortable: true,
-
- },
- {
- label: "绗簲鍒嗙被",
- fieldName: "Category5__c",
- cellAttributes: { alignment: "left" },
- initialWidth: 90,
- hideDefaultActions: true,
- wrapText: true,
- sortable: true,
-
- },
-
- {
- label: "瑙勬牸",
- fieldName: "packing_list",
- cellAttributes: { alignment: "right" },
- initialWidth: 55,
- wrapText: true,
- hideDefaultActions: true,
- },
- {
- label: "鍗曚綅",
- fieldName: "BoxPiece",
- cellAttributes: { alignment: "left" },
- initialWidth: 55,
- wrapText: true,
- hideDefaultActions: true,
- },
- {
- label: "娉ㄥ唽璇佺紪鐮佸彿",
- fieldName: "approbation_No",
- cellAttributes: { alignment: "left" },
- wrapText: true,
- initialWidth: 155,
- hideDefaultActions: true,
- },
- {
- label: "娉ㄥ唽鏈夋晥鏈�",
- fieldName: "expiration_Date",
- cellAttributes: { alignment: "left" },
- wrapText: true,
- hideDefaultActions: true,
- initialWidth: 100
- },
- {
- label: "CFDA鐘舵��",
- fieldName: "SFDA_Status__c",
- cellAttributes: { alignment: "left" },
- initialWidth: 95,
- wrapText: true,
- hideDefaultActions: true,
- },
- {
- label: "浣跨敤鏈熼檺",
- fieldName: "guaranteeperiod",
- cellAttributes: { alignment: "left" },
- hideDefaultActions: true,
- initialWidth: 105
- },
- {
- label:'鏈夋晥鏈熷唴搴撳瓨',
- type: "customInventoryColor",
- // sortable: true,
- cellAttributes: {alignment: "right" },
- typeAttributes: {
- value: { fieldName:"limitCount"},
- upperlimit: { fieldName: "upperlimit" },
- lowerlimit: { fieldName: "lowerlimit" },
- boxPrice:{ fieldName: "BoxPiece" },
- },
- hideDefaultActions: true,
- initialWidth:150
- },
+ {
+ label: '杩囨湡搴撳瓨',
+ fieldName: 'overlimitCount',
+ hideDefaultActions: true,
+ cellAttributes: { alignment: 'right' },
+ initialWidth: 78
+ }
+ ];
+ defaultSortDirection = 'asc';
+ sortDirection = 'asc';
+ sortedBy;
- {
- label: "杩囨湡搴撳瓨",
- fieldName: "overlimitCount",
- hideDefaultActions: true,
- cellAttributes: { alignment: "right" },
- initialWidth:80
- }
- ];
- defaultSortDirection = "asc";
- sortDirection = "asc";
- sortedBy;
-
-
-
renderedCallback() {
if (!this.stylesLoaded) {
Promise.all([loadStyle(this, WrappedHeaderTable)])
.then(() => {
- console.log("Custom styles loaded");
+ console.log('Custom styles loaded');
this.stylesLoaded = true;
})
.catch((error) => {
- console.error("Error loading custom styles");
+ console.error('Error loading custom styles');
});
}
}
-
- connectedCallback() {
- this.loader = true;
- this.init();
- }
+ connectedCallback() {
+ this.loader = true;
+ this.init();
+ }
- init() {
- this.showSpinner = true;
- oninit({
- pageSizeLWC: this.pageSize,
- pageTokenLWC: this.currentPageToken,
- sortFieldLWC: this.sortBy,
- sortOrderLWC: this.sortDirection
- }).then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log("result.pageRecords = " + JSON.stringify(result.entity.pageRecords));
- console.log("result.consumableorderdetailsRecords = " + JSON.stringify(result.entity.consumableorderdetailsRecords));
- console.log("result.status = " + result.status);
- console.log("result = " + JSON.stringify(result));
- console.log("result 1= " + JSON.stringify(result.entity));
- console.log("result 2= " + JSON.stringify(result.entity.pageRecords));
- console.log("result.entity.categoryOptionMap 2= " + JSON.stringify(result.entity.categoryOptionMap));
- console.log("result.entity.categoryOptionMap 2= " + JSON.stringify(result.entity.category4OptionMap));
- console.log("result.entity.categoryOptionMap 2= " + JSON.stringify(result.entity.category5OptionMap));
- if (result.status == "Success") {
- console.log('result.entity.paginatedAccounts = ' + JSON.stringify(result.entity.paginatedAccounts));
- this.nextPageToken = result.entity.paginatedAccounts.nextPageToken;
- this.totalRecords = result.entity.paginatedAccounts.totalRecords;
- this.recordStart = result.entity.paginatedAccounts.recordStart;
- this.recordEnd = result.entity.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(result.entity.paginatedAccounts.totalRecords / this.pageSize);
- console.log('this.totalPages = ' + this.totalPages);
- this.paginationVisibility = this.totalPages > 1 ? true : false;
+ init() {
+ this.showSpinner = true;
+ oninit({
+ pageSizeLWC: this.pageSize,
+ pageTokenLWC: this.currentPageToken,
+ sortFieldLWC: this.sortBy,
+ sortOrderLWC: this.sortDirection
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log(
+ 'result.pageRecords = ' +
+ JSON.stringify(result.entity.pageRecords)
+ );
+ console.log(
+ 'result.consumableorderdetailsRecords = ' +
+ JSON.stringify(
+ result.entity.consumableorderdetailsRecords
+ )
+ );
+ console.log('result.status = ' + result.status);
+ console.log('result = ' + JSON.stringify(result));
+ console.log('result 1= ' + JSON.stringify(result.entity));
+ console.log(
+ 'result 2= ' + JSON.stringify(result.entity.pageRecords)
+ );
+ if (result.status == 'Success') {
+ console.log(
+ 'result.entity.paginatedAccounts = ' +
+ JSON.stringify(result.entity.paginatedAccounts)
+ );
+ this.nextPageToken =
+ result.entity.paginatedAccounts.nextPageToken;
+ this.totalRecords =
+ result.entity.paginatedAccounts.totalRecords;
+ this.recordStart =
+ result.entity.paginatedAccounts.recordStart;
+ this.recordEnd = result.entity.paginatedAccounts.recordEnd;
+ this.totalPages = Math.ceil(
+ result.entity.paginatedAccounts.totalRecords /
+ this.pageSize
+ );
+ console.log('this.totalPages = ' + this.totalPages);
+ this.paginationVisibility =
+ this.totalPages > 1 ? true : false;
- this.loader = false;
- this.data = result.entity.pageRecords;
+ this.loader = false;
+ this.data = result.entity.pageRecords;
+ this.productkucun = result.entity.productkucun;
- for (var i in this.data) {
- this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
- this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["Category4__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["Category5__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
- }
- this.showTable = true;
- this.orderDetZaikuList = result.entity.orderDetZaikuList;
- this.accountName = result.entity.accountName;
- this.agencyProType = result.entity.agencyProType;
- this.userWorkLocation = result.entity.userWorkLocation;
- let option1ValueTemp = [];
- for (var key in result.entity.categoryOptionMap) {
- let object = {};
- object['label'] = result.entity.categoryOptionMap[key];
- object['value'] = key;
- option1ValueTemp.push(object);
- }
- this.category3Options = option1ValueTemp;
- console.log(' this.optionscatone===>' + JSON.stringify(this.optionscatone));
- let option2ValueTemp = [];
- for (var key in result.entity.category4OptionMap) {
- let object = {};
- object["label"] = result.entity.category4OptionMap[key];
- object["value"] = key;
- option2ValueTemp.push(object);
- }
- this.category4Options = option2ValueTemp;
- let option3ValueTemp = [];
- for (var key in result.entity.category5OptionMap) {
- let object = {};
- object["label"] = result.entity.category5OptionMap[key];
- object["value"] = key;
- option3ValueTemp.push(object);
- }
- this.category5Options = option3ValueTemp;
- this.hasHos = result.entity.hasHos;
- console.log('this.hasHos'+this.hasHos);
- //棰滆壊鏍囪
-
- //hasHos = true 鍖婚櫌鐗逛环
- if (this.hasHos) {
- let object1 = {
- label: "鍖婚櫌鐗逛环",
- fieldName: "hospitalSpecialOffer__c",
- hideDefaultActions: true,
- type:'boolean',
- cellAttributes: { alignment: "left" },
- initialWidth:80
+ for (var i in this.data) {
+ this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
+ this.data[i]['Category3__c'] =
+ this.data[i].Prod.Category3__c;
+ this.data[i]['Category4__c'] =
+ this.data[i].Prod.Category4__c;
+ this.data[i]['Category5__c'] =
+ this.data[i].Prod.Category5__c;
+ this.data[i]['SFDA_Status__c'] =
+ this.data[i].Prod.SFDA_Status__c;
+ }
+ this.showTable = true;
+ this.orderDetZaikuList = result.entity.orderDetZaikuList;
+ this.accountName = result.entity.accountName;
+ this.agencyProType = result.entity.agencyProType;
+ this.userWorkLocation = result.entity.userWorkLocation;
+ let option1ValueTemp = [];
+ for (var key in result.entity.categoryOptionMap) {
+ let object = {};
+ object['label'] = result.entity.categoryOptionMap[key];
+ object['value'] = key;
+ option1ValueTemp.push(object);
+ }
+ this.category3Options = option1ValueTemp;
+ console.log(
+ ' this.optionscatone===>' +
+ JSON.stringify(this.optionscatone)
+ );
+ let option2ValueTemp = [];
+ for (var key in result.entity.category4OptionMap) {
+ let object = {};
+ object['label'] = result.entity.category4OptionMap[key];
+ object['value'] = key;
+ option2ValueTemp.push(object);
+ }
+ this.category4Options = option2ValueTemp;
+ let option3ValueTemp = [];
+ for (var key in result.entity.category5OptionMap) {
+ let object = {};
+ object['label'] = result.entity.category5OptionMap[key];
+ object['value'] = key;
+ option3ValueTemp.push(object);
+ }
+ this.category5Options = option3ValueTemp;
+ this.hasHos = result.entity.hasHos;
+ console.log('this.hasHos' + this.hasHos);
+ //棰滆壊鏍囪
- };
- this.columns.push(object1);
- console.log(' this.columns'+ this.columns);
- for (var j in this.data) {
- this.data[j]["Name__c"] = this.data[j].Prod.Name__c;
- this.data[j]["Category3__c"] = this.data[j].Prod.Category3__c;
- this.data[j]["Category4__c"] = this.data[j].Prod.Category3__c;
- this.data[j]["Category5__c"] = this.data[j].Prod.Category3__c;
- this.data[j]["SFDA_Status__c"] = this.data[j].Prod.SFDA_Status__c;
- this.data[j]["hospitalSpecialOffer__c"] = this.data[j].hospitalSpecialOffer;
- console.log('this.data[j].hospitalSpecialOffer__c'+this.data[j].hospitalSpecialOffer);
- }
+ //hasHos = true 鍖婚櫌鐗逛环
+ if (this.hasHos) {
+ let object1 = {
+ label: '鍖婚櫌鐗逛环',
+ fieldName: 'hospitalSpecialOffer__c',
+ hideDefaultActions: true,
+ type: 'boolean',
+ cellAttributes: { alignment: 'left' },
+ initialWidth: 80
+ };
+ this.columns.push(object1);
+ console.log(' this.columns' + this.columns);
+ for (var j in this.data) {
+ this.data[j]['Name__c'] = this.data[j].Prod.Name__c;
+ this.data[j]['Category3__c'] =
+ this.data[j].Prod.Category3__c;
+ this.data[j]['Category4__c'] =
+ this.data[j].Prod.Category4__c;
+ this.data[j]['Category5__c'] =
+ this.data[j].Prod.Category5__c;
+ this.data[j]['SFDA_Status__c'] =
+ this.data[j].Prod.SFDA_Status__c;
+ this.data[j]['hospitalSpecialOffer__c'] =
+ this.data[j].hospitalSpecialOffer;
+ console.log(
+ 'this.data[j].hospitalSpecialOffer__c' +
+ this.data[j].hospitalSpecialOffer
+ );
+ }
+ }
+ this.showSpinner = false;
+ } else {
+ // this.showToast("Error",'Error', result.msg);
+ this.showMyToast('鍒濆鍖栧け璐�', result.msg, 'error');
}
- this.showSpinner = false;
- } else {
- // this.showToast("Error",'Error', result.msg);
- this.showMyToast('鍒濆鍖栧け璐�',result.msg,'error');
- }
- }).catch((error) => {
- this.loader = false;
- this.showSpinner = false;
- console.log("error = " + JSON.stringify(error));
- });
- }
+ })
+ .catch((error) => {
+ this.loader = false;
+ this.showSpinner = false;
+ console.log('error = ' + JSON.stringify(error));
+ });
+ }
- handleChange(event) {
- let fieldName = event.target.getAttribute("data-field");
- let value = event.detail.value;
- console.log("======>fieldName" + fieldName);
- console.log("======>value" + value);
- switch (fieldName) {
- case "Name":
- this.Name = value;
- break;
- case "CategoryThree":
- this.CategoryThree = value;
- break;
- case "CategoryFour":
- this.CategoryFour = value;
- break;
- case "CategoryFive":
- this.CategoryFive = value;
- break;
- default:
- console.log("no data");
- }
- }
- dataChange(event) {
- let fieldName = event.target.getAttribute("data-field");
+ handleChange(event) {
+ let fieldName = event.target.getAttribute('data-field');
let value = event.detail.value;
- console.log("fieldName = " + fieldName + " value = " + value);
+ console.log('======>fieldName' + fieldName);
+ console.log('======>value' + value);
switch (fieldName) {
- case "Name":
- this.Name = value;
- break;
- case "CategoryThree":
+ case 'Name':
+ this.Name = value;
+ break;
+ case 'CategoryThree':
+ this.CategoryThree = value;
+ break;
+ case 'CategoryFour':
+ this.CategoryFour = value;
+ break;
+ case 'CategoryFive':
+ this.CategoryFive = value;
+ break;
+ default:
+ console.log('no data');
+ }
+ }
+ dataChange(event) {
+ let fieldName = event.target.getAttribute('data-field');
+ let value = event.detail.value;
+ console.log('fieldName = ' + fieldName + ' value = ' + value);
+ switch (fieldName) {
+ case 'Name':
+ this.Name = value;
+ break;
+ case 'CategoryThree':
this.CategoryThree = value;
//璋冪敤鍚庡彴鏄剧ず绗洓浜斿垎绫�
this.showAllCate();
@@ -338,206 +369,251 @@
this.CategoryFive = '';
}
break;
- case "CategoryFour":
- this.Category4 = value;
+ case 'CategoryFour':
+ this.CategoryFour = value;
//璋冪敤鍚庡彴鏄剧ず绗簲鍒嗙被
this.showCate();
if (this.CategoryFour == '') {
this.CategoryFive = '';
}
break;
- case "CategoryFive":
+ case 'CategoryFive':
this.CategoryFive = value;
break;
}
}
-
- showAllCate() {
+ showAllCate() {
categoryAllload({
category3LWC: this.CategoryThree,
- agencyProTypeLWC:this.agencyProType
- }).then((result) => {
- result = JSON.parse(JSON.stringify(result));
- console.log("result = " + JSON.stringify(result));
- if (result.status == "Success") {
- this.category4Options = [];
- this.category5Options = [];
- //绗�4鍒嗙被
- for (var key in result.entity.category4OptionMap) {
- let object = {};
- object["label"] = result.entity.category4OptionMap[key];
- object["value"] = key;
- this.category4Options.push(object);
+ agencyProTypeLWC: this.agencyProType
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ console.log('result = ' + JSON.stringify(result));
+ if (result.status == 'Success') {
+ this.category4Options = [];
+ this.category5Options = [];
+ //绗�4鍒嗙被
+ for (var key in result.entity.category4OptionMap) {
+ let object = {};
+ object['label'] = result.entity.category4OptionMap[key];
+ object['value'] = key;
+ this.category4Options.push(object);
+ }
+ console.log(
+ 'this.category4Options = ' +
+ JSON.stringify(this.category4Options)
+ );
+ //绗�5鍒嗙被
+ for (var key in result.entity.category5OptionMap) {
+ let object = {};
+ object['label'] = result.entity.category5OptionMap[key];
+ object['value'] = key;
+ this.category5Options.push(object);
+ }
+ } else {
+ console.log('result = ' + JSON.stringify(result));
+ this.showMyToast(result.msg, '', 'error');
}
- console.log("this.category4Options = " + JSON.stringify(this.category4Options));
- //绗�5鍒嗙被
- for (var key in result.entity.category5OptionMap) {
- let object = {};
- object["label"] = result.entity.category5OptionMap[key];
- object["value"] = key;
- this.category5Options.push(object);
+ })
+ .catch((error) => {
+ console.log('error' + JSON.stringify(error));
+ });
+ }
+
+ searchOrderDetail() {
+ this.showTable = false;
+ this.showSpinner = true;
+ searchOrder({
+ category1: this.Name,
+ Category3: this.CategoryThree,
+ Category4: this.CategoryFour,
+ Category5: this.CategoryFive,
+ orderDetZaikuListLWC: JSON.stringify(this.orderDetZaikuList),
+ accountName: this.accountName,
+ agencyProType: this.agencyProType,
+ userWorkLocation: this.userWorkLocation,
+ pageSizeLWC: this.pageSize,
+ pageTokenLWC: this.currentPageToken,
+ productkucunLWC: this.productkucun
+
+ // sortFieldLWC: this.sortBy,
+ // sortOrderLWC: this.sortDirection
+ })
+ .then((result) => {
+ result = JSON.parse(JSON.stringify(result));
+ if (result.status == 'Success') {
+ this.nextPageToken =
+ result.entity.paginatedAccounts.nextPageToken;
+ this.totalRecords =
+ result.entity.paginatedAccounts.totalRecords;
+ this.recordStart =
+ result.entity.paginatedAccounts.recordStart;
+ this.recordEnd = result.entity.paginatedAccounts.recordEnd;
+ this.totalPages = Math.ceil(
+ result.entity.paginatedAccounts.totalRecords /
+ this.pageSize
+ );
+ console.log(
+ 'result.entity.paginatedAccounts = ' +
+ JSON.stringify(result.entity.paginatedAccounts)
+ );
+ console.log('this.totalPages = ' + this.totalPages);
+ this.paginationVisibility =
+ this.totalPages > 1 ? true : false;
+ console.log('this.sortDirection = ' + this.sortDirection);
+ // this.showToast("Success",'鎼滅储鎴愬姛', result.msg);
+ // this.showMyToast('鎼滅储鎴愬姛',result.msg,'success');
+ this.data = result.entity.pageRecords;
+ console.log('鎼滅储Data==>' + JSON.stringify(this.data));
+ for (var i in this.data) {
+ this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
+ this.data[i]['Category3__c'] =
+ this.data[i].Prod.Category3__c;
+ this.data[i]['Category4__c'] =
+ this.data[i].Prod.Category4__c;
+ this.data[i]['Category5__c'] =
+ this.data[i].Prod.Category5__c;
+ this.data[i]['SFDA_Status__c'] =
+ this.data[i].Prod.SFDA_Status__c;
+ this.data[i]['hospitalSpecialOffer__c'] =
+ this.data[i].hospitalSpecialOffer;
+ this.data[i]['guaranteeperiod'] =
+ this.data[i].guaranteeperiod;
+ }
+ this.data = [...this.data];
+ console.log('this.data = ' + JSON.stringify(this.data));
+ this.showTable = true;
+ this.showSpinner = false;
+ } else {
+ this.nextPageToken = this.pageSize;
+ this.totalRecords = 0;
+ this.recordStart = 0;
+ this.recordEnd = 0;
+ this.totalPages = 0;
+
+ // this.showToast("Error",'Error', result.msg);
+ // this.showMyToast('鎼滅储澶辫触',result.msg,'error');
+ this.showSpinner = false;
}
- } else {
- console.log("result = " + JSON.stringify(result));
- this.showMyToast(result.msg,'','error');
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showSpinner = false;
+ });
+ }
+ inventoryCount() {
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: '/lexinventory'
}
- }).catch((error) => {
- console.log("error" + JSON.stringify(error));
});
}
- searchOrderDetail() {
- this.showTable = false;
- searchOrder({
- category1: this.Name,
- Category3: this.CategoryThree,
- Category4: this.CategoryFour,
- Category5: this.CategoryFive,
- orderDetZaikuListLWC: JSON.stringify(this.orderDetZaikuList),
- accountName: this.accountName,
- agencyProType: this.agencyProType,
- userWorkLocation: this.userWorkLocation,
- pageSizeLWC: this.pageSize,
- pageTokenLWC: this.currentPageToken,
- // sortFieldLWC: this.sortBy,
- // sortOrderLWC: this.sortDirection
- })
- .then((result) => {
- result = JSON.parse(JSON.stringify(result));
- if (result.status == "Success") {
- this.nextPageToken = result.entity.paginatedAccounts.nextPageToken;
- this.totalRecords = result.entity.paginatedAccounts.totalRecords;
- this.recordStart = result.entity.paginatedAccounts.recordStart;
- this.recordEnd = result.entity.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(result.entity.paginatedAccounts.totalRecords / this.pageSize);
- console.log('this.totalPages = ' + this.totalPages);
- this.paginationVisibility = this.totalPages > 1 ? true : false;
- console.log('this.sortDirection = ' + this.sortDirection);
- // this.showToast("Success",'鎼滅储鎴愬姛', result.msg);
- this.showMyToast('鎼滅储鎴愬姛',result.msg,'success');
- this.data = result.entity.pageRecords;
- console.log('鎼滅储Data==>'+JSON.stringify(this.data));
- for (var i in this.data) {
- this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
- this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["Category4__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["Category5__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
- this.data[i]["hospitalSpecialOffer__c"] = this.data[i].hospitalSpecialOffer;
- }
- this.data = [...this.data];
- console.log('this.data = ' + JSON.stringify(this.data));
- this.showTable = true;
- } else {
- // this.showToast("Error",'Error', result.msg);
- this.showMyToast('鎼滅储澶辫触',result.msg,'error');
- }
- })
- .catch((error) => {
- console.log("error = " + JSON.stringify(error));
- });
- }
- inventoryCount() {
- this[NavigationMixin.Navigate]({
- type: 'standard__webPage',
- attributes: {
- url: '/lexinventory'
- }
- });
- }
+ handleExpired() {
+ console.log('杩囨湡搴撳瓨鍛㈤攢瀛�');
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: '/lexoverduestock'
+ }
+ });
+ }
+ removeBox() {
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: '/lexremovebox'
+ }
+ });
+ }
+ cancelremoveBox() {
+ this[NavigationMixin.Navigate]({
+ type: 'standard__webPage',
+ attributes: {
+ url: '/lexcancelremovebox'
+ }
+ });
+ }
- handleExpired() {
- console.log('杩囨湡搴撳瓨鍛㈤攢瀛�');
- this[NavigationMixin.Navigate]({
- type: 'standard__webPage',
- attributes: {
- url: '/lexoverduestock'
- }
- });
+ clearAll() {
+ this.showSpinner = true;
+ this.showTable = false;
+ this.Name = '';
+ this.CategoryThree = '';
+ this.CategoryFour = '';
+ this.CategoryFive = '';
+ this.template.querySelectorAll('lightning-combobox').forEach((each) => {
+ each.value = null;
+ });
+ console.log(' this.CategoryThree' + this.CategoryThree);
+ console.log('鏁版嵁鍒楄〃' + this.data);
+ searchOrder({
+ category1: this.Name,
+ Category3: this.CategoryThree,
+ Category4: this.CategoryFour,
+ Category5: this.CategoryFive,
+ orderDetZaikuListLWC: JSON.stringify(this.orderDetZaikuList),
+ accountName: this.accountName,
+ agencyProType: this.agencyProType,
+ userWorkLocation: this.userWorkLocation,
+ pageSizeLWC: this.pageSize,
+ pageTokenLWC: this.currentPageToken,
+ productkucunLWC: this.productkucun
+ })
+ .then((result) => {
+ console.log('result鎼滅储 = ' + JSON.stringify(result));
+ result = JSON.parse(JSON.stringify(result));
+ if (result.status == 'Success') {
+ this.nextPageToken =
+ result.entity.paginatedAccounts.nextPageToken;
+ this.totalRecords =
+ result.entity.paginatedAccounts.totalRecords;
+ this.recordStart =
+ result.entity.paginatedAccounts.recordStart;
+ this.recordEnd = result.entity.paginatedAccounts.recordEnd;
+ this.totalPages = Math.ceil(
+ result.entity.paginatedAccounts.totalRecords /
+ this.pageSize
+ );
+ console.log('this.totalPages = ' + this.totalPages);
+ this.paginationVisibility =
+ this.totalPages > 1 ? true : false;
+ console.log('this.sortDirection = ' + this.sortDirection);
+ this.data = result.entity.pageRecords;
- }
- removeBox() {
- this[NavigationMixin.Navigate]({
- type: 'standard__webPage',
- attributes: {
- url: '/lexremovebox'
- }
- });
+ for (var i in this.data) {
+ this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
+ this.data[i]['Category3__c'] =
+ this.data[i].Prod.Category3__c;
+ this.data[i]['Category4__c'] =
+ this.data[i].Prod.Category4__c;
+ this.data[i]['Category5__c'] =
+ this.data[i].Prod.Category5__c;
+ this.data[i]['SFDA_Status__c'] =
+ this.data[i].Prod.SFDA_Status__c;
+ this.data[i]['guaranteeperiod'] =
+ this.data[i].guaranteeperiod;
+ }
+ this.showSpinner = false;
+ this.showTable = true;
+ // this.showMyToast('鎼滅储鎴愬姛',result.msg,'success');
+ // this.showToast("Success",'鎼滅储鎴愬姛', result.msg);
+ } else {
+ // this.showToast("Error", 'Error',result.msg);
+ // this.showMyToast('鎼滅储澶辫触',result.msg,'error');
+ this.showSpinner = false;
+ }
+ })
+ .catch((error) => {
+ console.log('error = ' + JSON.stringify(error));
+ this.showSpinner = false;
+ });
+ }
- }
- cancelremoveBox() {
- this[NavigationMixin.Navigate]({
- type: 'standard__webPage',
- attributes: {
- url: '/lexcancelremovebox'
- }
- });
-
- }
-
- clearAll() {
- this.showSpinner = true;
- this.showTable = false;
- this.Name = '';
- this.CategoryThree = '';
- this.CategoryFour = '';
- this.CategoryFive = '';
- this.template.querySelectorAll("lightning-combobox").forEach((each) => {
- each.value = null;
- });
- console.log(' this.CategoryThree' + this.CategoryThree);
- console.log('鏁版嵁鍒楄〃' + this.data);
- searchOrder({
- category1: this.Name,
- Category3: this.CategoryThree,
- Category4: this.CategoryFour,
- Category5: this.CategoryFive,
- orderDetZaikuListLWC: JSON.stringify(this.orderDetZaikuList),
- accountName: this.accountName,
- agencyProType: this.agencyProType,
- userWorkLocation: this.userWorkLocation,
- pageSizeLWC: this.pageSize,
- pageTokenLWC: this.currentPageToken,
- })
- .then((result) => {
- console.log("result鎼滅储 = " + JSON.stringify(result));
- result = JSON.parse(JSON.stringify(result));
- if (result.status == "Success") {
-
- this.nextPageToken = result.entity.paginatedAccounts.nextPageToken;
- this.totalRecords = result.entity.paginatedAccounts.totalRecords;
- this.recordStart = result.entity.paginatedAccounts.recordStart;
- this.recordEnd = result.entity.paginatedAccounts.recordEnd;
- this.totalPages = Math.ceil(result.entity.paginatedAccounts.totalRecords / this.pageSize);
- console.log('this.totalPages = ' + this.totalPages);
- this.paginationVisibility = this.totalPages > 1 ? true : false;
- console.log('this.sortDirection = ' + this.sortDirection);
- this.data = result.entity.pageRecords;
-
- for (var i in this.data) {
- this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
- this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["Category4__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["Category5__c"] = this.data[i].Prod.Category3__c;
- this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
- }
- this.showSpinner = false;
- this.showTable = true;
- this.showMyToast('鎼滅储鎴愬姛',result.msg,'success');
- // this.showToast("Success",'鎼滅储鎴愬姛', result.msg);
- this.showSpinner = false;
- } else {
- // this.showToast("Error", 'Error',result.msg);
- this.showMyToast('鎼滅储澶辫触',result.msg,'error');
- }
- })
- .catch((error) => {
- console.log("error = " + JSON.stringify(error));
- });
- }
-
- sortByMethod(field, reverse, primer) {
+ sortByMethod(field, reverse, primer) {
const key = primer
? function (x) {
return primer(x[field]);
@@ -553,104 +629,98 @@
};
}
- onHandleSort(event) {
- console.log("Sort");
- this.sortBy = event.detail.fieldName;
- this.sortDirection = event.detail.sortDirection;
- this.currentPageToken = 0;
- console.log('this.sortBy = ' + this.sortBy)
- console.log('this.sortDirection = ' + this.sortDirection)
- // if('limitCount' != this.sortBy)
- // this.searchOrderDetail();
- // else{
- // const { fieldName: sortedBy, sortDirection } = event.detail;
- // const cloneData = [...this.data];
- // cloneData.sort(this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1));
- // this.data = cloneData;
- // this.sortDirection = sortDirection;
- // this.sortedBy = sortedBy;
- // }
- const { fieldName: sortedBy, sortDirection } = event.detail;
- const cloneData = [...this.data];
- cloneData.sort(this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1));
- this.data = cloneData;
- this.sortDirection = sortDirection;
- this.sortedBy = sortedBy;
- }
- handlePaginatorChange(event) {
- this.recordsToDisplay = event.detail.recordsToDisplay;
- this.preSelected = event.detail.preSelected;
- if (this.recordsToDisplay && this.recordsToDisplay > 0) {
- this.rowNumberOffset = this.recordsToDisplay[0].rowNumber - 1;
- } else {
- this.rowNumberOffset = 0;
- }
- }
+ onHandleSort(event) {
+ console.log('Sort');
+ this.sortBy = event.detail.fieldName;
+ this.sortDirection = event.detail.sortDirection;
+ this.currentPageToken = 0;
+ console.log('this.sortBy = ' + this.sortBy);
+ console.log('this.sortDirection = ' + this.sortDirection);
+ // if('limitCount' != this.sortBy)
+ // this.searchOrderDetail();
+ // else{
+ // const { fieldName: sortedBy, sortDirection } = event.detail;
+ // const cloneData = [...this.data];
+ // cloneData.sort(this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1));
+ // this.data = cloneData;
+ // this.sortDirection = sortDirection;
+ // this.sortedBy = sortedBy;
+ // }
+ const { fieldName: sortedBy, sortDirection } = event.detail;
+ const cloneData = [...this.data];
+ cloneData.sort(
+ this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1)
+ );
+ this.data = cloneData;
+ this.sortDirection = sortDirection;
+ this.sortedBy = sortedBy;
+ }
+ handlePaginatorChange(event) {
+ this.recordsToDisplay = event.detail.recordsToDisplay;
+ this.preSelected = event.detail.preSelected;
+ if (this.recordsToDisplay && this.recordsToDisplay > 0) {
+ this.rowNumberOffset = this.recordsToDisplay[0].rowNumber - 1;
+ } else {
+ this.rowNumberOffset = 0;
+ }
+ }
- handlePrevious() {
- this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);
- this.searchOrderDetail();
- }
+ handlePrevious() {
+ this.currentPageToken =
+ Number(this.currentPageToken) - Number(this.pageSize);
+ this.searchOrderDetail();
+ }
- handleNext() {
- this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize);
- this.searchOrderDetail();
- }
- handleFirst() {
- this.currentPageToken = 0;
- this.searchOrderDetail();
- }
+ handleNext() {
+ this.currentPageToken =
+ Number(this.currentPageToken) + Number(this.pageSize);
+ this.searchOrderDetail();
+ }
+ handleFirst() {
+ this.currentPageToken = 0;
+ this.searchOrderDetail();
+ }
- handleLast() {
- this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
- this.searchOrderDetail();
- }
+ handleLast() {
+ this.currentPageToken =
+ this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+ this.searchOrderDetail();
+ }
- handlePageschange(event) {
- console.log(event.detail);
- this.pageSize = event.detail;
- this.currentPageToken = 0;
- this.searchOrderDetail();
- }
- get previousButtonDisabled() {
- return this.currentPageToken === 0;
- }
+ handlePageschange(event) {
+ console.log(event.detail);
+ this.pageSize = event.detail;
+ this.currentPageToken = 0;
+ this.searchOrderDetail();
+ }
+ get previousButtonDisabled() {
+ return this.currentPageToken === 0;
+ }
- get nextButtonDisabled() {
- return this.nextPageToken === undefined;
- }
- showMyToast(title, message, variant) {
+ get nextButtonDisabled() {
+ return this.nextPageToken === undefined;
+ }
+ showMyToast(title, message, variant) {
console.log('show custom message');
var iconName = '';
var content = '';
- if(variant == 'success'){
- iconName = 'utility:check';
- }else{
- iconName = 'utility:error';
+ if (variant == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
}
- if(message != ''){
- content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
- }else{
- content = '<h2><strong>'+title+'<strong/></h2>';
+ if (message != '') {
+ content =
+ '<h2><strong>' +
+ title +
+ '<strong/></h2><h5>' +
+ message +
+ '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
}
- this.template.querySelector('c-common-toast').showToast(variant,content,iconName,10000);
-
-
- // showToast(type,title,msg) {
- // this.showSpinner = false;
- // let mode = '';
- // if (type.toLowerCase() != 'success') {
- // mode = 'sticky';
- // } else {
- // mode = 'dismissable';
- // }
- // const event = new ShowToastEvent({
- // title: title,
- // variant: type,
- // message: msg,
- // mode: mode
- // });
- // this.dispatchEvent(event);
- // }
- }
-}
\ No newline at end of file
+ this.template
+ .querySelector('c-common-toast')
+ .showToast(variant, content, iconName, 10000);
+ }
+}
diff --git "a/force-app/main/default/networks/Consumable\347\263\273\347\273\237.network-meta.xml" "b/force-app/main/default/networks/Consumable\347\263\273\347\273\237.network-meta.xml"
index 33fe9fa..2d03f61 100644
--- "a/force-app/main/default/networks/Consumable\347\263\273\347\273\237.network-meta.xml"
+++ "b/force-app/main/default/networks/Consumable\347\263\273\347\273\237.network-meta.xml"
@@ -3,10 +3,10 @@
<allowInternalUserLogin>false</allowInternalUserLogin>
<allowMembersToFlag>false</allowMembersToFlag>
<changePasswordTemplate
- >unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
+ >unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
<communityRoles />
<disableReputationRecordConversations
- >false</disableReputationRecordConversations>
+ >false</disableReputationRecordConversations>
<emailSenderAddress>buli@deloitte.com.cn</emailSenderAddress>
<emailSenderName>Consumable绯荤粺</emailSenderName>
<enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
@@ -16,8 +16,8 @@
<enableGuestMemberVisibility>false</enableGuestMemberVisibility>
<enableInvitation>false</enableInvitation>
<enableKnowledgeable>false</enableKnowledgeable>
- <enableMemberVisibility>false</enableMemberVisibility>
- <enableNicknameDisplay>true</enableNicknameDisplay>
+ <enableMemberVisibility>true</enableMemberVisibility>
+ <enableNicknameDisplay>false</enableNicknameDisplay>
<enablePrivateMessages>false</enablePrivateMessages>
<enableReputation>false</enableReputation>
<enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
@@ -27,21 +27,21 @@
<enableTopicSuggestions>false</enableTopicSuggestions>
<enableUpDownVote>false</enableUpDownVote>
<forgotPasswordTemplate
- >unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
+ >unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
<gatherCustomerSentimentData>false</gatherCustomerSentimentData>
<networkMemberGroups>
- <permissionSet>Community_LEX_PS</permissionSet>
+ <permissionSet>Community_Consumable_LEX_PS</permissionSet>
<profile>admin</profile>
</networkMemberGroups>
<networkPageOverrides>
<changePasswordPageOverrideSetting
- >Standard</changePasswordPageOverrideSetting>
+ >Standard</changePasswordPageOverrideSetting>
<forgotPasswordPageOverrideSetting
- >Designer</forgotPasswordPageOverrideSetting>
+ >Designer</forgotPasswordPageOverrideSetting>
<homePageOverrideSetting>Designer</homePageOverrideSetting>
<loginPageOverrideSetting>Designer</loginPageOverrideSetting>
<selfRegProfilePageOverrideSetting
- >Designer</selfRegProfilePageOverrideSetting>
+ >Designer</selfRegProfilePageOverrideSetting>
</networkPageOverrides>
<picassoSite>Consumable1</picassoSite>
<selfRegistration>false</selfRegistration>
@@ -54,5 +54,5 @@
</tabs>
<urlPathPrefix>consumable</urlPathPrefix>
<welcomeTemplate
- >unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
+ >unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
</Network>
diff --git "a/force-app/main/default/networks/Consumable\347\263\273\347\273\2372.network-meta.xml" "b/force-app/main/default/networks/Consumable\347\263\273\347\273\2372.network-meta.xml"
new file mode 100644
index 0000000..d81a67e
--- /dev/null
+++ "b/force-app/main/default/networks/Consumable\347\263\273\347\273\2372.network-meta.xml"
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Network xmlns="http://soap.sforce.com/2006/04/metadata">
+ <allowInternalUserLogin>true</allowInternalUserLogin>
+ <allowMembersToFlag>false</allowMembersToFlag>
+ <changePasswordTemplate
+ >unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
+ <communityRoles />
+ <disableReputationRecordConversations
+ >true</disableReputationRecordConversations>
+ <emailSenderAddress>buli@deloitte.com.cn</emailSenderAddress>
+ <emailSenderName>Consumable绯荤粺2</emailSenderName>
+ <enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
+ <enableDirectMessages>true</enableDirectMessages>
+ <enableGuestChatter>false</enableGuestChatter>
+ <enableGuestFileAccess>false</enableGuestFileAccess>
+ <enableGuestMemberVisibility>false</enableGuestMemberVisibility>
+ <enableInvitation>false</enableInvitation>
+ <enableKnowledgeable>false</enableKnowledgeable>
+ <enableMemberVisibility>false</enableMemberVisibility>
+ <enableNicknameDisplay>true</enableNicknameDisplay>
+ <enablePrivateMessages>false</enablePrivateMessages>
+ <enableReputation>false</enableReputation>
+ <enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
+ <enableSiteAsContainer>true</enableSiteAsContainer>
+ <enableTalkingAboutStats>true</enableTalkingAboutStats>
+ <enableTopicAssignmentRules>true</enableTopicAssignmentRules>
+ <enableTopicSuggestions>false</enableTopicSuggestions>
+ <enableUpDownVote>false</enableUpDownVote>
+ <forgotPasswordTemplate
+ >unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
+ <gatherCustomerSentimentData>false</gatherCustomerSentimentData>
+ <networkMemberGroups>
+ <profile>admin</profile>
+ <profile>901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(et email)</profile>
+ <profile>901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(鑳介噺)</profile>
+ <profile>901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(鑳介噺email)</profile>
+ <profile>901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄�</profile>
+ <profile>901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(et)</profile>
+ </networkMemberGroups>
+ <networkPageOverrides>
+ <changePasswordPageOverrideSetting
+ >Standard</changePasswordPageOverrideSetting>
+ <forgotPasswordPageOverrideSetting
+ >Designer</forgotPasswordPageOverrideSetting>
+ <homePageOverrideSetting>Standard</homePageOverrideSetting>
+ <loginPageOverrideSetting>Designer</loginPageOverrideSetting>
+ <selfRegProfilePageOverrideSetting
+ >Designer</selfRegProfilePageOverrideSetting>
+ </networkPageOverrides>
+ <picassoSite>Consumable_21</picassoSite>
+ <selfRegistration>false</selfRegistration>
+ <sendWelcomeEmail>false</sendWelcomeEmail>
+ <site>Consumable_2</site>
+ <status>DownForMaintenance</status>
+ <tabs>
+ <defaultTab>home</defaultTab>
+ <standardTab>Chatter</standardTab>
+ </tabs>
+ <urlPathPrefix>consumable2</urlPathPrefix>
+ <welcomeTemplate
+ >unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
+</Network>
diff --git a/force-app/main/default/networks/Partner Sales.network-meta.xml b/force-app/main/default/networks/Partner Sales.network-meta.xml
new file mode 100644
index 0000000..4141c9a
--- /dev/null
+++ b/force-app/main/default/networks/Partner Sales.network-meta.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Network xmlns="http://soap.sforce.com/2006/04/metadata">
+ <allowInternalUserLogin>true</allowInternalUserLogin>
+ <allowMembersToFlag>false</allowMembersToFlag>
+ <changePasswordTemplate
+ >unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
+ <communityRoles />
+ <disableReputationRecordConversations
+ >false</disableReputationRecordConversations>
+ <emailSenderAddress>olympussupport@sunbridge.com</emailSenderAddress>
+ <emailSenderName>Partner Sales</emailSenderName>
+ <enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
+ <enableDirectMessages>false</enableDirectMessages>
+ <enableGuestChatter>true</enableGuestChatter>
+ <enableGuestFileAccess>true</enableGuestFileAccess>
+ <enableGuestMemberVisibility>false</enableGuestMemberVisibility>
+ <enableInvitation>false</enableInvitation>
+ <enableKnowledgeable>false</enableKnowledgeable>
+ <enableMemberVisibility>true</enableMemberVisibility>
+ <enableNicknameDisplay>false</enableNicknameDisplay>
+ <enablePrivateMessages>false</enablePrivateMessages>
+ <enableReputation>false</enableReputation>
+ <enableShowAllNetworkSettings>true</enableShowAllNetworkSettings>
+ <enableSiteAsContainer>true</enableSiteAsContainer>
+ <enableTalkingAboutStats>true</enableTalkingAboutStats>
+ <enableTopicAssignmentRules>false</enableTopicAssignmentRules>
+ <enableTopicSuggestions>true</enableTopicSuggestions>
+ <enableUpDownVote>false</enableUpDownVote>
+ <forgotPasswordTemplate
+ >unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
+ <gatherCustomerSentimentData>false</gatherCustomerSentimentData>
+ <networkMemberGroups>
+ <permissionSet>P002_Partner</permissionSet>
+ <permissionSet>P002_OCM</permissionSet>
+ <profile>admin</profile>
+ <profile>901_缁忛攢鍟嗘椿鍔ㄧ郴缁�</profile>
+ </networkMemberGroups>
+ <networkPageOverrides>
+ <changePasswordPageOverrideSetting
+ >Standard</changePasswordPageOverrideSetting>
+ <forgotPasswordPageOverrideSetting
+ >Standard</forgotPasswordPageOverrideSetting>
+ <homePageOverrideSetting>Designer</homePageOverrideSetting>
+ <loginPageOverrideSetting>Designer</loginPageOverrideSetting>
+ <selfRegProfilePageOverrideSetting
+ >Designer</selfRegProfilePageOverrideSetting>
+ </networkPageOverrides>
+ <picassoSite>Partner_Sales1</picassoSite>
+ <selfRegistration>false</selfRegistration>
+ <sendWelcomeEmail>true</sendWelcomeEmail>
+ <site>Partner_Sales</site>
+ <status>Live</status>
+ <tabs>
+ <defaultTab>home</defaultTab>
+ <standardTab>Chatter</standardTab>
+ </tabs>
+ <urlPathPrefix>partner</urlPathPrefix>
+ <welcomeTemplate
+ >unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
+</Network>
diff --git a/force-app/main/default/networks/Partner2.network-meta.xml b/force-app/main/default/networks/Partner2.network-meta.xml
new file mode 100644
index 0000000..36b9105
--- /dev/null
+++ b/force-app/main/default/networks/Partner2.network-meta.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Network xmlns="http://soap.sforce.com/2006/04/metadata">
+ <allowInternalUserLogin>false</allowInternalUserLogin>
+ <allowMembersToFlag>false</allowMembersToFlag>
+ <changePasswordTemplate
+ >unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
+ <communityRoles />
+ <disableReputationRecordConversations
+ >true</disableReputationRecordConversations>
+ <emailSenderAddress>buli@deloitte.com.cn</emailSenderAddress>
+ <emailSenderName>New Partner Sales</emailSenderName>
+ <enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
+ <enableDirectMessages>true</enableDirectMessages>
+ <enableGuestChatter>false</enableGuestChatter>
+ <enableGuestFileAccess>false</enableGuestFileAccess>
+ <enableGuestMemberVisibility>false</enableGuestMemberVisibility>
+ <enableInvitation>false</enableInvitation>
+ <enableKnowledgeable>false</enableKnowledgeable>
+ <enableMemberVisibility>false</enableMemberVisibility>
+ <enableNicknameDisplay>true</enableNicknameDisplay>
+ <enablePrivateMessages>false</enablePrivateMessages>
+ <enableReputation>false</enableReputation>
+ <enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
+ <enableSiteAsContainer>true</enableSiteAsContainer>
+ <enableTalkingAboutStats>true</enableTalkingAboutStats>
+ <enableTopicAssignmentRules>true</enableTopicAssignmentRules>
+ <enableTopicSuggestions>false</enableTopicSuggestions>
+ <enableUpDownVote>false</enableUpDownVote>
+ <forgotPasswordTemplate
+ >unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
+ <gatherCustomerSentimentData>false</gatherCustomerSentimentData>
+ <networkMemberGroups>
+ <profile>admin</profile>
+ </networkMemberGroups>
+ <networkPageOverrides>
+ <changePasswordPageOverrideSetting
+ >Standard</changePasswordPageOverrideSetting>
+ <forgotPasswordPageOverrideSetting
+ >Designer</forgotPasswordPageOverrideSetting>
+ <homePageOverrideSetting>Designer</homePageOverrideSetting>
+ <loginPageOverrideSetting>Designer</loginPageOverrideSetting>
+ <selfRegProfilePageOverrideSetting
+ >Designer</selfRegProfilePageOverrideSetting>
+ </networkPageOverrides>
+ <picassoSite>Partner21</picassoSite>
+ <selfRegistration>false</selfRegistration>
+ <sendWelcomeEmail>true</sendWelcomeEmail>
+ <site>Partner2</site>
+ <status>UnderConstruction</status>
+ <tabs>
+ <defaultTab>home</defaultTab>
+ <standardTab>Chatter</standardTab>
+ </tabs>
+ <urlPathPrefix>partner2</urlPathPrefix>
+ <welcomeTemplate
+ >unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
+</Network>
diff --git "a/force-app/main/default/networks/\346\266\210\350\200\227\345\223\201\347\256\241\347\220\206\347\263\273\347\273\237.network-meta.xml" "b/force-app/main/default/networks/\346\266\210\350\200\227\345\223\201\347\256\241\347\220\206\347\263\273\347\273\237.network-meta.xml"
new file mode 100644
index 0000000..6bce96d
--- /dev/null
+++ "b/force-app/main/default/networks/\346\266\210\350\200\227\345\223\201\347\256\241\347\220\206\347\263\273\347\273\237.network-meta.xml"
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Network xmlns="http://soap.sforce.com/2006/04/metadata">
+ <allowInternalUserLogin>false</allowInternalUserLogin>
+ <allowMembersToFlag>false</allowMembersToFlag>
+ <changePasswordTemplate
+ >unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
+ <communityRoles />
+ <disableReputationRecordConversations
+ >false</disableReputationRecordConversations>
+ <emailSenderAddress>OCM_Te2amPJ@olympus.com.cn</emailSenderAddress>
+ <emailSenderName>濂ユ灄宸存柉娑堣�楀搧绯荤粺</emailSenderName>
+ <enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
+ <enableDirectMessages>false</enableDirectMessages>
+ <enableGuestChatter>false</enableGuestChatter>
+ <enableGuestFileAccess>false</enableGuestFileAccess>
+ <enableGuestMemberVisibility>false</enableGuestMemberVisibility>
+ <enableInvitation>false</enableInvitation>
+ <enableKnowledgeable>false</enableKnowledgeable>
+ <enableMemberVisibility>true</enableMemberVisibility>
+ <enableNicknameDisplay>false</enableNicknameDisplay>
+ <enablePrivateMessages>false</enablePrivateMessages>
+ <enableReputation>false</enableReputation>
+ <enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
+ <enableSiteAsContainer>false</enableSiteAsContainer>
+ <enableTalkingAboutStats>true</enableTalkingAboutStats>
+ <enableTopicAssignmentRules>false</enableTopicAssignmentRules>
+ <enableTopicSuggestions>true</enableTopicSuggestions>
+ <enableUpDownVote>false</enableUpDownVote>
+ <forgotPasswordTemplate
+ >unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
+ <gatherCustomerSentimentData>false</gatherCustomerSentimentData>
+ <networkMemberGroups>
+ <permissionSet>Community_Consumable_Classic_PS</permissionSet>
+ <profile>admin</profile>
+ </networkMemberGroups>
+ <networkPageOverrides>
+ <changePasswordPageOverrideSetting
+ >Standard</changePasswordPageOverrideSetting>
+ <forgotPasswordPageOverrideSetting
+ >Standard</forgotPasswordPageOverrideSetting>
+ <homePageOverrideSetting>VisualForce</homePageOverrideSetting>
+ <loginPageOverrideSetting>Standard</loginPageOverrideSetting>
+ <selfRegProfilePageOverrideSetting
+ >Standard</selfRegProfilePageOverrideSetting>
+ </networkPageOverrides>
+ <picassoSite>Site1</picassoSite>
+ <selfRegistration>false</selfRegistration>
+ <sendWelcomeEmail>false</sendWelcomeEmail>
+ <site>Site</site>
+ <status>Live</status>
+ <tabs>
+ <customTab>TopPage</customTab>
+ <customTab>ConsumableAccount</customTab>
+ <customTab>ConsumableOrderManage</customTab>
+ <customTab>ArriveGoodsMain</customTab>
+ <customTab>SaleAndDelivery</customTab>
+ <customTab>ConInvoiceList</customTab>
+ <customTab>InventoryView</customTab>
+ <customTab>Consumable_order__c</customTab>
+ <customTab>RetrospectiveWeeklyReport</customTab>
+ <defaultTab>01r10000000Xo4Y</defaultTab>
+ <standardTab>report</standardTab>
+ </tabs>
+ <urlPathPrefix>customer</urlPathPrefix>
+ <welcomeTemplate
+ >unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
+</Network>
diff --git "a/force-app/main/default/networks/\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.network-meta.xml" "b/force-app/main/default/networks/\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.network-meta.xml"
new file mode 100644
index 0000000..8aa32ab
--- /dev/null
+++ "b/force-app/main/default/networks/\347\224\265\345\255\220\347\255\276\346\224\266\347\263\273\347\273\237.network-meta.xml"
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Network xmlns="http://soap.sforce.com/2006/04/metadata">
+ <allowInternalUserLogin>false</allowInternalUserLogin>
+ <allowMembersToFlag>false</allowMembersToFlag>
+ <changePasswordTemplate
+ >unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
+ <communityRoles />
+ <disableReputationRecordConversations
+ >false</disableReputationRecordConversations>
+ <emailSenderAddress>it_sfdc@olympus.com.cn</emailSenderAddress>
+ <emailSenderName>濂ユ灄宸存柉鐢靛瓙绛炬敹绯荤粺</emailSenderName>
+ <enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
+ <enableDirectMessages>true</enableDirectMessages>
+ <enableGuestChatter>false</enableGuestChatter>
+ <enableGuestFileAccess>false</enableGuestFileAccess>
+ <enableGuestMemberVisibility>false</enableGuestMemberVisibility>
+ <enableInvitation>false</enableInvitation>
+ <enableKnowledgeable>false</enableKnowledgeable>
+ <enableMemberVisibility>false</enableMemberVisibility>
+ <enableNicknameDisplay>true</enableNicknameDisplay>
+ <enablePrivateMessages>false</enablePrivateMessages>
+ <enableReputation>false</enableReputation>
+ <enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
+ <enableSiteAsContainer>true</enableSiteAsContainer>
+ <enableTalkingAboutStats>true</enableTalkingAboutStats>
+ <enableTopicAssignmentRules>true</enableTopicAssignmentRules>
+ <enableTopicSuggestions>false</enableTopicSuggestions>
+ <enableUpDownVote>false</enableUpDownVote>
+ <forgotPasswordTemplate
+ >unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
+ <gatherCustomerSentimentData>false</gatherCustomerSentimentData>
+ <networkMemberGroups>
+ <profile>admin</profile>
+ </networkMemberGroups>
+ <networkPageOverrides>
+ <changePasswordPageOverrideSetting
+ >Standard</changePasswordPageOverrideSetting>
+ <forgotPasswordPageOverrideSetting
+ >Designer</forgotPasswordPageOverrideSetting>
+ <homePageOverrideSetting>Designer</homePageOverrideSetting>
+ <loginPageOverrideSetting>Designer</loginPageOverrideSetting>
+ <selfRegProfilePageOverrideSetting
+ >Designer</selfRegProfilePageOverrideSetting>
+ </networkPageOverrides>
+ <picassoSite>Site3</picassoSite>
+ <selfRegistration>false</selfRegistration>
+ <sendWelcomeEmail>false</sendWelcomeEmail>
+ <site>Site2</site>
+ <status>Live</status>
+ <tabs>
+ <defaultTab>home</defaultTab>
+ <standardTab>Chatter</standardTab>
+ </tabs>
+ <urlPathPrefix>eSignSystem</urlPathPrefix>
+ <welcomeTemplate
+ >unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
+</Network>
diff --git a/force-app/main/default/pages/DealerInquiryModifyState.page b/force-app/main/default/pages/DealerInquiryModifyState.page
index 7398e3d..4fc33f6 100644
--- a/force-app/main/default/pages/DealerInquiryModifyState.page
+++ b/force-app/main/default/pages/DealerInquiryModifyState.page
@@ -1,495 +1,999 @@
-<apex:page controller="DealerInquiryModifyStateController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
-<head>
-<title>缁忛攢鍟嗘壒閲忎慨鏀硅浠风姸鎬�</title>
+<apex:page
+ controller="DealerInquiryModifyStateController"
+ docType="html-5.0"
+ showHeader="false"
+ sidebar="false"
+ id="allPage"
+ action="{!init}"
+ lightningStyleSheets="true"
+>
+ <head>
+ <title>缁忛攢鍟嗘壒閲忎慨鏀硅浠风姸鎬�</title>
-<apex:stylesheet value="{!URLFOR($Resource.blockUIcssOpp)}"/>
-<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
-<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-<!-- TODO 鐩墠闄や簡markOpp()鏂规硶锛屽叾浠栨柟娉曢�氱敤锛宩s鏀瑰悕涓哄懆浼氬叡閫歫s锛屽悇涓敾闈釜鍒玧s鍐嶈嚜宸卞垱寤簀s -->
-<apex:includeScript value="{!URLFOR($Resource.Dealer_enquiryJs1)}"/>
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcssOpp)}" />
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" />
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" />
+ <!-- TODO 鐩墠闄や簡markOpp()鏂规硶锛屽叾浠栨柟娉曢�氱敤锛宩s鏀瑰悕涓哄懆浼氬叡閫歫s锛屽悇涓敾闈釜鍒玧s鍐嶈嚜宸卞垱寤簀s -->
+ <apex:includeScript value="{!URLFOR($Resource.Dealer_enquiryJs1)}" />
-<style>
- td .dateFormat {
- display: none;
- }
-
- div.inline { float:left; }
- .clearBoth { clear:both; }
-div.reportBlock table.list {
- width:auto;
-}
-div#out_Div { /* 銇撱亾銇儤銉冦儉銈掓牸绱� */
- position:relative;
- overflow: hidden;
- float:left;
- width:50.3%;
-
-}
-div#out_Div_L {
- position:relative;
- overflow:hidden;
- float:left;
- width:48%;
- border-right:2px solid #000
-}
-div#in_Div {/* tbody銇屽叆銇c仸銇勩倠銆傘亾銇撱亴銈广偗銉兗銉璞�*/
- position:relative;
- overflow: auto; /*銈广偗銉兗銉儛銉�*/
- float:left;
- width:51.8%;
- height: 373px; /* tbody銈掕〃绀恒仚銈嬮珮銇曘�佸緦銇s銇仸瑾挎暣 */
-
-}
-div#in_Div_L {
- position:relative;
- overflow-x:auto;
- overflow-y: hidden;
- float:left;
- width:48%;
- height: 373px;
- border-right:2px solid #000
-}
+ <style>
+ td .dateFormat {
+ display: none;
+ }
-body .pbBody table.list tr.headerRow td {
- box-sizing: border-box;
- text-align:center;font-weight:normal;
- padding:0px 0px 0px 1px;
-}
-body .pbBody table.list tr.headerRow td.header1 {
- text-align:center;font-weight:normal;
- padding:0px 0px 0px 0px;
-}
-body .pbBody table.list tr.dataRow td {
- box-sizing: border-box;
- padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
-}
-body .pbBody table.list tr.dataRow td.dataCellBorder {
- /* 銇勩倝銇亜銆佷娇銇c仸銇勩仾銇� */
- padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
-}
-body .pbBody table.list tr.dataRow td.dataCellBorder1 {
- padding:0px 0px 0px 1px;
- border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;
-}
-@-moz-document url-prefix() {
-body .pbBody table.list tr.dataRow td.dataCellBorder1 {padding:0px 0px 0px 0px; border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;}
-}
+ div.inline {
+ float: left;
+ }
-table.list td {width:100px; }
-table.list td select {width:95%;}
-table.list td input {width:95%;}
-table.list td textarea {
- height:50px;
- width:90%;
-}
+ .clearBoth {
+ clear: both;
+ }
-table.list .col_OCSM_Opportunity_No__c {width:120px;}
-table.list .col_Strategic_department_Class_Name__c{width:80px;}
-table.list .col_Change_To_Opportunity_T__c {width:155px;}
-table.list .col_Department_Cateogy__c {width: 90px;}
-table.list .col_Department_Name_Text__c {width: 80px;}
-table.list .col_Hospital_City_Master__c {width: 70px;}
-table.list .col_Agency_Hospital__c {width: 146px;}
-/*table.list .col_Oly_Forecasted_Date__c {width: 125px;}*/
-table.list .col_Oly_Forecast_this_month__c {width: 135px;}
-table.list .col_Oly_NM_Forecast__c {width: 135px;}
-table.list .col_Oly_Forecast_last_month__c {width: 135px;}
-table.list .col_Oly_Inquiry_Stage__c {width: 95px;}
-table.list .col_Oly_Authorized_DB_No__c {width: 95px;}
-table.list .col_Oly_Inquiry_Status2__c {width: 95px;}
-table.list .col_Oly_Inquiry_Status1__c {width: 50px;}
-table.list .col_Name {width:139px;} /*瀹㈡埛鍚�*/
-table.list .col_Salesdepartment_HP__c {width:95px;} /*閿�鍞湰閮�(鍖婚櫌)*/
-table.list .col_State_Master__c{width:80px;} /*鐪�*/
-table.list .col_HP_146POCM_Category_From_Dept__c {width:100px;} /*OCM鍒嗙被(鍏紡)*/
-table.list .col_Salesdepartment_DeptClass__c{width:120px;} /*閿�鍞湰閮�(绉戝鍒嗙被)*/
-table.list .col_OCM_man_province_HP__c{width:90px;} /*OCM绠$悊鐪�*/
-table.list .col_City_Master__c{width:80px;} /*甯�*/
-table.list .col_Grade__c {width:70px;} /*鏀垮簻绛夌骇*/
-table.list .col_Attribute_Type__c{width:90px;} /*鍖婚櫌鎵�灞炴�ц川*/
-table.list .col_Speciality_Type__c{width:90px;} /*鍖婚櫌涓撲笟鍖哄垎*/
-table.list .col_Service_customer__c{width:120px;} /*鍙绾︽湇鍔″悎鍚屽鎴�*/
-table.list .col_BF_owner__c{width:100px;} /*鍛煎惛绉戜富鎷呭綋*/
-table.list .col_ENT_owner_ID__c{width:100px;} /*鑰抽蓟鍠夌涓绘媴褰�*/
-table.list .col_GI_Main__c{width:100px;} /*娑堝寲绉戜富鎷呭綋*/
-table.list .col_URO_owner_ID__c{width:100px;} /*娉屽翱绉戜富鎷呭綋*/
-table.list .col_SP_Main__c{width:100px;} /*鏅绉戜富鎷呭綋*/
-table.list .col_GYN_owner__c{width:100px;} /*濡囩涓绘媴褰�*/
-table.list .col_Hospital_name_link__c{width:100px;} /*鍖婚櫌鍚�(閾炬帴)*/
-table.list .col_Segment__c{width:90px;} /*OCM绉戝绛夌骇*/
-table.list .col_Department_Budget_Sum_Price__c {width:128px;} /*绉戝棰勭畻鎬婚噾棰�(鍏�)*/
-table.list .col_Target_amount_CV290__c {width:118px;} /*鐩爣鏁帮細CV-290*/
-table.list .col_OPD_CV290__c {width:118px;} /*OPD瀵硅薄锛欳V-290*/
-table.list .col_Target_amount_EUME2__c {width:118px;} /*鐩爣鏁帮細EU-ME2*/
-table.list .col_OPD_EUME2__c {width:118px;} /*OPD瀵硅薄锛欵U-ME2*/
-table.list .col_Target_amount_CV170__c {width:118px;} /*鐩爣鏁帮細CV-170*/
-table.list .col_OPD_CV170__c {width:118px;} /*OPD瀵硅薄锛欳V-170*/
-table.list .col_Target_amount_OERAW__c {width:118px;} /*鐩爣鏁帮細OER-AW*/
-table.list .col_OPD_OERAW__c {width:118px;} /*OPD瀵硅薄锛歄ER-AW*/
-table.list .col_Target_amount_GW__c {width:118px;} /*鐩爣鏁帮細瀵间笣(GW)*/
-table.list .col_OPD_GW__c {width:118px;} /*OPD瀵硅薄锛氬涓�(GW)*/
-table.list .col_Target_amount_OTVS400__c {width:118px;} /*鐩爣鏁帮細OTV-S400*/
-table.list .col_OPD_OTVS400__c {width:118px;} /*OPD瀵硅薄锛歄TV-S400*/
-table.list .col_Target_amount_CHS400XZ__c {width:118px;} /*鐩爣鏁帮細CH-S400-XZ*/
-table.list .col_OPD_CHS400XZ__c {width:118px;} /*OPD瀵硅薄锛欳H-S400-XZ*/
-table.list .col_Target_amount_3D__c {width:118px;} /*鐩爣鏁帮細3D*/
-table.list .col_OPD_3D__c {width:118px;} /*OPD瀵硅薄锛�3D*/
-table.list .col_Target_amount_OTVS190__c {width:118px;} /*鐩爣鏁帮細OTV-S190*/
-table.list .col_OPD_OTVS190__c {width:118px;} /*OPD瀵硅薄锛歄TV-S190*/
-table.list .col_Target_amount_CV190__c {width:118px;} /*鐩爣鏁帮細CV-190*/
-table.list .col_OPD_CV190__c {width:118px;} /*OPD瀵硅薄锛欳V-190*/
-table.list .col_Target_amount_UCES3__c {width:118px;} /*鐩爣鏁帮細UCES-3*/
-table.list .col_OPD_UCES3__c {width:118px;} /*OPD瀵硅薄锛歎CES-3*/
-table.list .col_Target_amount_USG400__c {width:118px;} /*鐩爣鏁帮細USG-400*/
-table.list .col_OPD_USG400__c {width:118px;} /*OPD瀵硅薄锛歎SG-400*/
+ div.reportBlock table.list {
+ width: auto;
+ }
-table.list .col_Hospital_Name__c {width:139px;} /*鍖婚櫌鍚�*/
-table.list .col_Department_Name__c {width:60px;} /*绉戝鍚嶇О*/
+ div#out_Div {
+ /* 銇撱亾銇儤銉冦儉銈掓牸绱� */
+ position: relative;
+ overflow: hidden;
+ float: left;
+ width: 50% !important;
+ }
-table.list .col_Province_formula__c {width:78px;} /*鐪�(鍏紡)*/
-table.list .col_X2_Largescale_Project__c {width:78px;} /****鏈夋棤涓ゅ勾浠ュ唴澶ч」鐩噰璐�*/
-table.list .col_Ideal_Image_Sales__c {width:148px;} /****鎷撳睍銉诲紑鎷撹鍒�/钀ラ攢鏂规(閿�鍞�)*/
-table.list .col_Review_Sales__c {width:148px;} /****杩涘睍鎯呭喌(閿�鍞�)*/
-table.list .col_Submit_proposal_document__c {width:58px;} /*鏄惁鎻愪氦鎻愭涔�*/
-table.list .col_OPP_Flag__c {width:58px;}
-table.list .col_Sales_activity_plan__c {width:178px;} /*娲诲姩璁″垝(閿�鍞�)*/
-/*table.list .col_Link1 {width:58px;}
-table.list .col_Link2 {width:58px;}
-table.list .col_Link3 {width:58px;}
-table.list .col_Link4 {width:58px;}
-table.list .col_Link5 {width:58px;}
-table.list .col_Link6 {width:58px;}
-table.list .col_Link7 {width:58px;}
-table.list .col_Link8 {width:58px;}*/
+ div#out_Div_L {
+ position: relative;
+ overflow: hidden;
+ float: left;
+ width: 50% !important;
+ border-right: 2px solid #808383;
+ }
-body .pbBody table.list tr.headerRow td.colViewing {
- /* 銉囥儠銈┿儷銉堝�ゃ�佹渶灏忓寲銈€偆銈炽兂銈掕〃绀� */
- background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ;
- background-repeat:no-repeat;
-}
-body .pbBody table.list tr.headerRow td.colUnHideIcon {
- /* 鏈�澶у寲銈€偆銈炽兂銈掕〃绀� */
- background-image:url('{!URLFOR($Resource.IconResizePlus_5)}');
- background-repeat:no-repeat;
-}
-body .pbBody table.list tr.headerRow td.col_Scroll {width:0px; padding:0px; border-width:0px;}
-body .pbBody table.list tr.dataRow td.col_Scroll {width:0px; padding:0px; border-width:0px;}
-/*.zxk{
- margin-bottom: 3px;
-}*/
-</style>
-<script type="text/javascript">
-var heightAjustment = 120;
-var widthAjustment = 30;
-function setChangeFlgRight(cnt) {
- document.getElementById('allPage:allForm:oppBlock:oppTable:' + cnt + ':changeFlgRt').value = 1;
-}
+ div#in_Div {
+ /* tbody銇屽叆銇c仸銇勩倠銆傘亾銇撱亴銈广偗銉兗銉璞�*/
+ position: relative;
+ overflow: auto; /*銈广偗銉兗銉儛銉�*/
+ float: left;
+ width: 50% !important;
+ height: 600px;
+ }
-</script>
-</head>
+ div#in_Div_L {
+ position: relative;
+ overflow-x: auto;
+ overflow-y: hidden;
+ float: left;
+ width: 50% !important;
+ height: 600px;
+ border-right: 2px solid #808383;
+ }
+
+ body .pbBody table.list tr.headerRow td {
+ box-sizing: border-box;
+ text-align: center;
+ font-weight: normal;
+ padding: 0px 0px 0px 1px;
+ }
+
+ body .pbBody table.list tr.headerRow td.header1 {
+ text-align: center;
+ font-weight: normal;
+ padding: 0px 0px 0px 0px;
+ }
+
+ body .pbBody table.list tr.dataRow td {
+ box-sizing: border-box;
+ padding: 0px 0px 0px 1px;
+ border-width: 0px 0px 1px 0px;
+ vertical-align: middle;
+ word-break: break-all;
+ }
+
+ body .pbBody table.list tr.dataRow td.dataCellBorder {
+ /* 銇勩倝銇亜銆佷娇銇c仸銇勩仾銇� */
+ padding: 0px 0px 0px 1px;
+ border-width: 0px 0px 1px 0px;
+ vertical-align: middle;
+ word-break: break-all;
+ }
+
+ body .pbBody table.list tr.dataRow td.dataCellBorder1 {
+ padding: 0px 0px 0px 1px;
+ border-width: 0px 0px 1px 1px;
+ vertical-align: middle;
+ word-break: break-all;
+ }
+
+ @-moz-document url-prefix() {
+ body .pbBody table.list tr.dataRow td.dataCellBorder1 {
+ padding: 0px 0px 0px 0px;
+ border-width: 0px 0px 1px 1px;
+ vertical-align: middle;
+ word-break: break-all;
+ }
+ }
+
+ table.list td {
+ width: 100px;
+ }
+
+ table.list td select {
+ width: 95%;
+ }
+
+ table.list td input {
+ width: 95%;
+ }
+
+ table.list td textarea {
+ height: 50px;
+ width: 90%;
+ }
+
+ table.list .col_OCSM_Opportunity_No__c {
+ width: 120px;
+ }
+ table.list .col_Strategic_department_Class_Name__c {
+ width: 80px;
+ }
+ table.list .col_Change_To_Opportunity_T__c {
+ width: 155px;
+ }
+ table.list .col_Department_Cateogy__c {
+ width: 90px;
+ }
+ table.list .col_Department_Name_Text__c {
+ width: 80px;
+ }
+ table.list .col_Hospital_City_Master__c {
+ width: 70px;
+ }
+ table.list .col_Agency_Hospital__c {
+ width: 146px;
+ }
+ /*table.list .col_Oly_Forecasted_Date__c {width: 125px;}*/
+ table.list .col_Oly_Forecast_this_month__c {
+ width: 135px;
+ }
+ table.list .col_Oly_NM_Forecast__c {
+ width: 135px;
+ }
+ table.list .col_Oly_Forecast_last_month__c {
+ width: 135px;
+ }
+ table.list .col_Oly_Inquiry_Stage__c {
+ width: 95px;
+ }
+ table.list .col_Oly_Authorized_DB_No__c {
+ width: 95px;
+ }
+ table.list .col_Oly_Inquiry_Status2__c {
+ width: 95px;
+ }
+ table.list .col_Oly_Inquiry_Status1__c {
+ width: 50px;
+ }
+ table.list .col_Name {
+ width: 139px;
+ } /*瀹㈡埛鍚�*/
+ table.list .col_Salesdepartment_HP__c {
+ width: 95px;
+ } /*閿�鍞湰閮�(鍖婚櫌)*/
+ table.list .col_State_Master__c {
+ width: 80px;
+ } /*鐪�*/
+ table.list .col_HP_146POCM_Category_From_Dept__c {
+ width: 100px;
+ } /*OCM鍒嗙被(鍏紡)*/
+ table.list .col_Salesdepartment_DeptClass__c {
+ width: 120px;
+ } /*閿�鍞湰閮�(绉戝鍒嗙被)*/
+ table.list .col_OCM_man_province_HP__c {
+ width: 90px;
+ } /*OCM绠$悊鐪�*/
+ table.list .col_City_Master__c {
+ width: 80px;
+ } /*甯�*/
+ table.list .col_Grade__c {
+ width: 70px;
+ } /*鏀垮簻绛夌骇*/
+ table.list .col_Attribute_Type__c {
+ width: 90px;
+ } /*鍖婚櫌鎵�灞炴�ц川*/
+ table.list .col_Speciality_Type__c {
+ width: 90px;
+ } /*鍖婚櫌涓撲笟鍖哄垎*/
+ table.list .col_Service_customer__c {
+ width: 120px;
+ } /*鍙绾︽湇鍔″悎鍚屽鎴�*/
+ table.list .col_BF_owner__c {
+ width: 100px;
+ } /*鍛煎惛绉戜富鎷呭綋*/
+ table.list .col_ENT_owner_ID__c {
+ width: 100px;
+ } /*鑰抽蓟鍠夌涓绘媴褰�*/
+ table.list .col_GI_Main__c {
+ width: 100px;
+ } /*娑堝寲绉戜富鎷呭綋*/
+ table.list .col_URO_owner_ID__c {
+ width: 100px;
+ } /*娉屽翱绉戜富鎷呭綋*/
+ table.list .col_SP_Main__c {
+ width: 100px;
+ } /*鏅绉戜富鎷呭綋*/
+ table.list .col_GYN_owner__c {
+ width: 100px;
+ } /*濡囩涓绘媴褰�*/
+ table.list .col_Hospital_name_link__c {
+ width: 100px;
+ } /*鍖婚櫌鍚�(閾炬帴)*/
+ table.list .col_Segment__c {
+ width: 90px;
+ } /*OCM绉戝绛夌骇*/
+ table.list .col_Department_Budget_Sum_Price__c {
+ width: 128px;
+ } /*绉戝棰勭畻鎬婚噾棰�(鍏�)*/
+ table.list .col_Target_amount_CV290__c {
+ width: 118px;
+ } /*鐩爣鏁帮細CV-290*/
+ table.list .col_OPD_CV290__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛欳V-290*/
+ table.list .col_Target_amount_EUME2__c {
+ width: 118px;
+ } /*鐩爣鏁帮細EU-ME2*/
+ table.list .col_OPD_EUME2__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛欵U-ME2*/
+ table.list .col_Target_amount_CV170__c {
+ width: 118px;
+ } /*鐩爣鏁帮細CV-170*/
+ table.list .col_OPD_CV170__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛欳V-170*/
+ table.list .col_Target_amount_OERAW__c {
+ width: 118px;
+ } /*鐩爣鏁帮細OER-AW*/
+ table.list .col_OPD_OERAW__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛歄ER-AW*/
+ table.list .col_Target_amount_GW__c {
+ width: 118px;
+ } /*鐩爣鏁帮細瀵间笣(GW)*/
+ table.list .col_OPD_GW__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛氬涓�(GW)*/
+ table.list .col_Target_amount_OTVS400__c {
+ width: 118px;
+ } /*鐩爣鏁帮細OTV-S400*/
+ table.list .col_OPD_OTVS400__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛歄TV-S400*/
+ table.list .col_Target_amount_CHS400XZ__c {
+ width: 118px;
+ } /*鐩爣鏁帮細CH-S400-XZ*/
+ table.list .col_OPD_CHS400XZ__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛欳H-S400-XZ*/
+ table.list .col_Target_amount_3D__c {
+ width: 118px;
+ } /*鐩爣鏁帮細3D*/
+ table.list .col_OPD_3D__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛�3D*/
+ table.list .col_Target_amount_OTVS190__c {
+ width: 118px;
+ } /*鐩爣鏁帮細OTV-S190*/
+ table.list .col_OPD_OTVS190__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛歄TV-S190*/
+ table.list .col_Target_amount_CV190__c {
+ width: 118px;
+ } /*鐩爣鏁帮細CV-190*/
+ table.list .col_OPD_CV190__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛欳V-190*/
+ table.list .col_Target_amount_UCES3__c {
+ width: 118px;
+ } /*鐩爣鏁帮細UCES-3*/
+ table.list .col_OPD_UCES3__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛歎CES-3*/
+ table.list .col_Target_amount_USG400__c {
+ width: 118px;
+ } /*鐩爣鏁帮細USG-400*/
+ table.list .col_OPD_USG400__c {
+ width: 118px;
+ } /*OPD瀵硅薄锛歎SG-400*/
+ table.list .col_Hospital_Name__c {
+ width: 139px;
+ } /*鍖婚櫌鍚�*/
+ table.list .col_Department_Name__c {
+ width: 60px;
+ } /*绉戝鍚嶇О*/
+ table.list .col_Province_formula__c {
+ width: 78px;
+ } /*鐪�(鍏紡)*/
+ table.list .col_X2_Largescale_Project__c {
+ width: 78px;
+ } /****鏈夋棤涓ゅ勾浠ュ唴澶ч」鐩噰璐�*/
+ table.list .col_Ideal_Image_Sales__c {
+ width: 148px;
+ } /****鎷撳睍銉诲紑鎷撹鍒�/钀ラ攢鏂规(閿�鍞�)*/
+ table.list .col_Review_Sales__c {
+ width: 148px;
+ } /****杩涘睍鎯呭喌(閿�鍞�)*/
+ table.list .col_Submit_proposal_document__c {
+ width: 58px;
+ } /*鏄惁鎻愪氦鎻愭涔�*/
+ table.list .col_OPP_Flag__c {
+ width: 58px;
+ }
+ table.list .col_Sales_activity_plan__c {
+ width: 178px;
+ } /*娲诲姩璁″垝(閿�鍞�)*/
+ /*table.list .col_Link1 {width:58px;}
+ table.list .col_Link2 {width:58px;}
+ table.list .col_Link3 {width:58px;}
+ table.list .col_Link4 {width:58px;}
+ table.list .col_Link5 {width:58px;}
+ table.list .col_Link6 {width:58px;}
+ table.list .col_Link7 {width:58px;}
+ table.list .col_Link8 {width:58px;}*/
+ body .pbBody table.list tr.headerRow td.colViewing {
+ /* 銉囥儠銈┿儷銉堝�ゃ�佹渶灏忓寲銈€偆銈炽兂銈掕〃绀� */
+ background-image: url('{!URLFOR($Resource.IconResizeMinus_5)}');
+ background-repeat: no-repeat;
+ }
+ body .pbBody table.list tr.headerRow td.colUnHideIcon {
+ /* 鏈�澶у寲銈€偆銈炽兂銈掕〃绀� */
+ background-image: url('{!URLFOR($Resource.IconResizePlus_5)}');
+ background-repeat: no-repeat;
+ }
+ body .pbBody table.list tr.headerRow td.col_Scroll {
+ width: 0px;
+ padding: 0px;
+ border-width: 0px;
+ }
+ body .pbBody table.list tr.dataRow td.col_Scroll {
+ width: 0px;
+ padding: 0px;
+ border-width: 0px;
+ }
+ /*.zxk{
+ margin-bottom: 3px;
+ }*/
+ .buttonStyle {
+ font-size: 14px !important;
+ font-family: 'sans-serif' !important;
+ font-weight: 500 !important;
+ width: 70px !important;
+ height: 32px !important;
+ border-radius: 4px !important;
+ opacity: 1 !important;
+ background: #090f84 !important;
+ color: #ffffff !important;
+ }
+ </style>
+ <script type="text/javascript">
+ var heightAjustment = 120;
+ var widthAjustment = 30;
+ function setChangeFlgRight(cnt) {
+ document.getElementById(
+ 'allPage:allForm:oppBlock:oppTable:' + cnt + ':changeFlgRt'
+ ).value = 1;
+ }
+ </script>
+ </head>
+ <apex:slds />
+ <div id="spinner" class="slds-spinner_container" style="display: none">
+ <div
+ role="status"
+ class="slds-spinner slds-spinner_medium slds-spinner_brand"
+ >
+ <span class="slds-assistive-text">Loading</span>
+ <div class="slds-spinner__dot-a"></div>
+ <div class="slds-spinner__dot-b"></div>
+ </div>
+ </div>
<apex:form id="allForm">
-
- <apex:actionFunction name="saveAndSearch" action="{!save}" rerender="allPanel" oncomplete="unblockUI();expandAll();">
- <apex:param name="firstParam" assignTo="{!saveType}" value="" />
+ <apex:actionFunction
+ name="saveAndSearch"
+ action="{!save}"
+ rerender="allPanel"
+ oncomplete="closeSpinner();expandAll();"
+ >
+ <apex:param name="firstParam" assignTo="{!saveType}" value="" />
</apex:actionFunction>
- <apex:actionFunction name="saveAndSort" action="{!save}" rerender="allPanel" oncomplete="unblockUI();expandAll();">
+ <apex:actionFunction
+ name="saveAndSort"
+ action="{!save}"
+ rerender="allPanel"
+ oncomplete="closeSpinner();expandAll();"
+ >
<apex:param name="firstParam" assignTo="{!saveType}" value="" />
<apex:param name="secondParam" assignTo="{!sortKey}" value="" />
</apex:actionFunction>
- <apex:actionFunction name="searchOpp" action="{!chick}" rerender="allPanel" oncomplete="unblockUI();expandAll();"/>
- <apex:actionFunction name="sortTable" action="{!sortTable}" rerender="allPanel" oncomplete="unblockUI();expandAll();">
+ <apex:actionFunction
+ name="searchOpp"
+ action="{!chick}"
+ rerender="allPanel"
+ oncomplete="closeSpinner();expandAll();"
+ />
+ <apex:actionFunction
+ name="sortTable"
+ action="{!sortTable}"
+ rerender="allPanel"
+ oncomplete="closeSpinner();expandAll();"
+ >
<apex:param name="firstParam" assignTo="{!sortKey}" value="" />
</apex:actionFunction>
<apex:outputPanel id="allPanel">
- <div id="zxk" style="margin-bottom: -15px;">
- <apex:pageBlock id="searchBlock" mode="maindetail">
- <!-- tabStyle="Report"绾㈣壊 mode="maindetail" 娑堝け mode="edit" 鍙樺ぇ -->
- <!-- <apex:pageMessages ></apex:pageMessages> -->
- <!-- <table style="border-bottom-width: 0px; font-size:12px;">
- <tr>
- <td width="150px">
- <apex:commandButton action="{!save}" value="淇濆瓨" rerender="allPanel" onclick="blockme();" oncomplete="unblockUI();expandAll();" style="height:30px;width:50px;"/>
- <apex:commandButton value="妫�绱�" onclick="searchOppJs_Account();return false;" style="height:30px;width:70px;"/>
- </td>
- <td width="1000px">
- <apex:pageMessages />
- </td>
- </tr>
- </table> -->
- <table style="border-bottom-width: 0px; font-size:12px;">
- <tr>
- <!-- <td width="150px">鍒嗙被 <apex:selectList value="{!accType}" size="1" style="width:80px" id="accType"><apex:selectOptions value="{!accTypeOpts}" id="accTypeOptsId"/></apex:selectList></td> -->
- <td width="250px">缁忛攢鍟嗗尰闄� <apex:inputText value="{!accSearch}" style="width:170px"/>銆�</td>
- <td></td>
- <td width="250px"> 閿�鍞媴褰� <apex:inputText value="{!aooSearch}" style="width:150px"/>銆�</td>
- <td width="230px"> 鏄剧ず
- <apex:selectList value="{!limits}" size="1" onchange="searchOppJs_Account();return false;">
- <apex:selectOptions value="{!limitOpts}"/></apex:selectList>銆�鏉℃暟鎹�
- </td>
- <!-- <td width="10px"></td> -->
- <td width="70px"><a href="#" onclick="expandAll();return false;" style="text-decoration: underline;">鍏ㄩ儴灞曞紑</a></td>
-<!-- text-decoration: underline; -->
- </tr>
- </table>
- <table style="border-bottom-width: 0px; font-size:12px;">
- <tr>
- <td width="200px">
- <font>鏁� 鎹� 瀛� 娈� </font>
- <apex:selectList value="{!numtext1}" size="1" style="width:110px"><apex:selectOptions value="{!textOpts}"/></apex:selectList>
- </td>
- <td width="130px">
-
- <apex:selectList value="{!numtext2}" size="1" style="width:110px"><apex:selectOptions value="{!equalOpts}"/></apex:selectList>
- </td>
- <td width="200px">
- <apex:inputText style="width:150px" value="{!numtext}"/>
- </td>
- <td width="150px">
- <apex:commandButton value="妫�绱�" onclick="searchOppJs_Account();return false;" style="height:30px;width:50px;"/>
- <apex:commandButton action="{!save}" value="淇濆瓨" rerender="allPanel" onclick="blockme();" oncomplete="unblockUI();expandAll();" style="height:30px;width:50px;"/>
- </td>
- <td width="500px">
- <apex:pageMessages />
- </td>
- </tr>
- <!-- <tr>
- <td width="110px">
- <font> 鏃� 鏈� </font>
- <apex:selectList value="{!timetext1}" size="1" style="width:110px"><apex:selectOptions value="{!timeOpts}"/></apex:selectList>
- </td>
- <td>
- 浠�<apex:inputField style="width:150px" value="{!tmpAO.MaxActivityDate__c}"/> -->
- <!-- <apex:selectList value="{!timetext2}" size="1" style="width:110px"><apex:selectOptions value="{!timeequalOpts}"/></apex:selectList> -->
- <!-- </td>
- <td>
- 鍒�<apex:inputField style="width:150px" value="{!tmpBO.MaxActivityDate__c}"/>
- </td>
- </tr> -->
- </table>
- </apex:pageBlock>
+ <div id="zxk" style="margin-bottom: -15px">
+ <apex:pageBlock id="searchBlock" mode="maindetail">
+ <table
+ style="
+ border-bottom-width: 0px;
+ font-size: 14px;
+ color: #696969;
+ "
+ >
+ <tr>
+ <td width="283px">
+ <div style="color: #696969">
+ 缁忛攢鍟嗗尰闄�
+ <apex:inputText
+ styleClass="slds-input"
+ value="{!accSearch}"
+ style="width: 170px"
+ />
+ </div>
+ </td>
+ <td width="250px">
+ <div style="color: #696969">
+ 閿�鍞媴褰�
+ <apex:inputText
+ styleClass="slds-input"
+ value="{!aooSearch}"
+ style="width: 150px"
+ />
+ </div>
+ </td>
+ <td width="230px">
+ <div style="color: #696969">
+ 鏄剧ず
+ <apex:selectList
+ styleClass="slds-input slds-combobox__input"
+ style="width: 100px"
+ value="{!limits}"
+ size="1"
+ onchange="searchOppJs_Account();return false;"
+ >
+ <apex:selectOptions
+ value="{!limitOpts}"
+ />
+ </apex:selectList>
+ 鏉℃暟鎹�
+ </div>
+ </td>
+ <td>
+ <a
+ href="#"
+ onclick="expandAll();return false;"
+ style="
+ text-decoration: underline;
+ color: #696969;
+ "
+ >鍏ㄩ儴灞曞紑</a
+ >
+ </td>
+ </tr>
+ </table>
+ <p style="height: 10px"></p>
+ <table
+ style="
+ border-bottom-width: 0px;
+ font-size: 12px;
+ font-size: 14px;
+ color: #696969;
+ "
+ >
+ <tr>
+ <td width="220px">
+ <div style="color: #696969">
+ <font>鏁� 鎹� 瀛� 娈�</font
+ >
+ <apex:selectList
+ styleClass="slds-input slds-combobox__input"
+ value="{!numtext1}"
+ size="1"
+ style="width: 110px"
+ >
+ <apex:selectOptions
+ value="{!textOpts}"
+ />
+ </apex:selectList>
+ </div>
+ </td>
+ <td width="130px">
+ <apex:selectList
+ styleClass="slds-input slds-combobox__input"
+ value="{!numtext2}"
+ size="1"
+ style="width: 110px"
+ >
+ <apex:selectOptions value="{!equalOpts}" />
+ </apex:selectList>
+ </td>
+ <td width="183px">
+ <apex:inputText
+ styleClass="slds-input"
+ style="width: 150px"
+ value="{!numtext}"
+ />
+ </td>
+ <td width="188px">
+ <!-- slds-button slds-button_brand -->
+ <apex:commandButton
+ styleClass="buttonStyle"
+ value="妫�绱�"
+ onclick="searchOppJs_Account();return false;"
+ style="height: 30px; width: 70px"
+ />
+ <apex:commandButton
+ styleClass="buttonStyle"
+ action="{!save}"
+ value="淇濆瓨"
+ rerender="allPanel"
+ onclick="showSpinner();"
+ oncomplete="closeSpinner();expandAll();"
+ style="height: 30px; width: 70px"
+ />
+ </td>
+ <td>
+ <!-- <apex:pageMessages /> -->
+ <!-- add by Link 2023-6-2 -->
+ <apex:outputPanel
+ rendered="{! remindMsg != '' && remindMsg != null}"
+ >
+ <div
+ style="
+ border: 1px solid #d4d4d4;
+ height: 32px;
+ border-radius: 5px;
+ color: #ff6a00;
+ font-size: 18px;
+ "
+ >
+ <span
+ class="slds-icon_container slds-icon-custom-custom53 slds-icon-text-default"
+ >
+ <svg
+ aria-hidden="true"
+ class="slds-icon"
+ >
+ <use
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xlink:href="/apexpages/slds/latest/assets/icons/custom-sprite/svg/symbols.svg#custom53"
+ ></use>
+ </svg>
+ <span class="slds-assistive-text"
+ >Custom 53</span
+ >
+ </span>
+ <strong style="padding-top: 2px"
+ > {!remindMsg}</strong
+ >
+ </div>
+ </apex:outputPanel>
+ </td>
+ </tr>
+ </table>
+ </apex:pageBlock>
</div>
- <apex:pageBlock id="oppBlock" >
+ <!-- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;"> -->
+ <apex:pageBlock id="oppBlock" mode="maindetail">
<!-- <apex:pageblocksection columns="1" id="oppSection"> -->
- <apex:outputPanel >
- <apex:inputHidden id="oppCount" value="{!oppCount}"/>
-
+ <apex:outputPanel>
+ <apex:inputHidden id="oppCount" value="{!oppCount}" />
+
<div id="out_Div_L">
- <table class="list" style="border-bottom-width: 0px; width:1100px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
+ <table
+ class="list"
+ style="
+ border-bottom-width: 0px;
+ width: 1100px;
+ font-size: 14px !important;
+ border-spacing: 0;
+ "
+ border=""
+ id="tableHeader"
+ >
<tr class="dataRow" height="1px">
- <apex:variable value="{!0}" var="cnt" />
- <apex:repeat value="{!titleRight}" var="t">
- <td class="col_{!columnRightCss[cnt]}"></td>
- <apex:variable value="{!cnt + 1}" var="cnt" />
- </apex:repeat>
- <td id="cell_Scroll" class="col_Scroll"></td>
+ <apex:variable value="{!0}" var="cnt" />
+ <apex:repeat value="{!titleRight}" var="t">
+ <td class="col_{!columnRightCss[cnt]}"></td>
+ <apex:variable
+ value="{!cnt + 1}"
+ var="cnt"
+ />
+ </apex:repeat>
+ <td id="cell_Scroll" class="col_Scroll"></td>
</tr>
<tr class="headerRow" height="30px">
- <apex:variable value="{!0}" var="cnt" />
- <apex:repeat value="{!titleRight}" var="t">
- <td class="col_{!columnRightCss[cnt]}">
- <a href="#" onclick="sortTableJs_Account1('{!cnt + titleLeft.size}');return false;" style="text-decoration: underline;"><apex:outputText value="{!t}"/></a>{!sortOrder[cnt + titleLeft.size]}
- </td>
- <apex:variable value="{!cnt + 1}" var="cnt" />
- </apex:repeat>
- <!-- <td id="cell_Scroll" class="col_Scroll"></td> -->
+ <apex:variable value="{!0}" var="cnt" />
+ <apex:repeat value="{!titleRight}" var="t">
+ <td class="col_{!columnRightCss[cnt]}">
+ <a
+ href="#"
+ onclick="sortTableJs_Account1('{!cnt + titleLeft.size}');return false;"
+ style="
+ text-decoration: underline;
+ color: black;
+ font-size: 14px !important;
+ font-weight: bold;
+ "
+ ><apex:outputText value="{!t}" /></a
+ >{!sortOrder[cnt + titleLeft.size]}
+ </td>
+ <apex:variable
+ value="{!cnt + 1}"
+ var="cnt"
+ />
+ </apex:repeat>
+ <!-- <td id="cell_Scroll" class="col_Scroll"></td> -->
</tr>
</table>
</div>
<div id="out_Div">
- <table class="list" style="border-bottom-width: 0px; width:2000px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
+ <table
+ class="list"
+ style="
+ border-bottom-width: 0px;
+ width: 2000px;
+ font-size: 14px !important;
+ border-spacing: 0;
+ "
+ border=""
+ id="tableHeader_L"
+ >
<tr class="dataRow" height="1px">
- <apex:variable value="{!0}" var="cnt" />
- <apex:repeat value="{!titleLeft}" var="t">
- <td class="col_{!columnLeftCss[cnt]}"></td>
- <apex:variable value="{!cnt + 1}" var="cnt" />
- </apex:repeat>
+ <apex:variable value="{!0}" var="cnt" />
+ <apex:repeat value="{!titleLeft}" var="t">
+ <td class="col_{!columnLeftCss[cnt]}"></td>
+ <apex:variable
+ value="{!cnt + 1}"
+ var="cnt"
+ />
+ </apex:repeat>
</tr>
<tr class="headerRow" height="30px">
- <apex:variable value="{!0}" var="cnt" />
- <apex:repeat value="{!titleLeft}" var="t">
- <td class="col_{!columnLeftCss[cnt]}">
- <a href="#" onclick="sortTableJs_Account1('{!cnt}');return false;" style="text-decoration: underline;"><apex:outputText value="{!t}"/></a>{!sortOrder[cnt]}
- </td>
- <apex:variable value="{!cnt + 1}" var="cnt" />
- </apex:repeat>
- <!-- <td id="cell_Scroll" class="col_Scroll"></td> -->
+ <apex:variable value="{!0}" var="cnt" />
+ <apex:repeat value="{!titleLeft}" var="t">
+ <td class="col_{!columnLeftCss[cnt]}">
+ <a
+ href="#"
+ onclick="sortTableJs_Account1('{!cnt}');return false;"
+ style="
+ text-decoration: underline;
+ color: black;
+ font-size: 14px !important;
+ font-weight: bold;
+ "
+ ><apex:outputText value="{!t}" /></a
+ >{!sortOrder[cnt]}
+ </td>
+ <apex:variable
+ value="{!cnt + 1}"
+ var="cnt"
+ />
+ </apex:repeat>
+ <!-- <td id="cell_Scroll" class="col_Scroll"></td> -->
</tr>
</table>
-
- </div> <!-- out_Div -->
- <div style="clear:both;height:0px;"></div>
+ </div>
+ <!-- out_Div -->
+ <div style="clear: both; height: 0px"></div>
<div id="in_Div_L">
- <table class="list" style="border-bottom-width: 0px;width:1100px; font-size:11px; border-spacing:0;" border="" id="tableData">
+ <table
+ class="list"
+ style="
+ border-bottom-width: 0px;
+ width: 1100px;
+ font-size: 13px;
+ border-spacing: 0;
+ "
+ border=""
+ id="tableData"
+ >
<apex:variable value="{!1}" var="cnt" />
- <apex:repeat value="{!oppRecords}" var="or" id="oppTable">
- <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
- <apex:variable value="{!0}" var="cnt_3" />
- <apex:repeat value="{!columnsRightApi}" var="c">
- <td class="dataCellBorder1 col_{!columnRightCss[cnt_3]} {!cnt}_col_{!columnRightCss[cnt_3]}">
-
- <!-- vivek start -->
- <!-- <apex:outputLink rendered="{!c[0]=='Name'}" value="/{!or.opp.Id}" target="LINK_{!or.opp.Id}"><apex:outputField rendered="{!c[0]=='Name'}" value="{!or.opp[c[0]]}" /></apex:outputLink> -->
- <!-- vivek end -->
- <!-- <apex:outputField id="q1111111111" rendered="{!(c.size==1 && columnRightRW[c[0]]=='r' && or.opp.Id <> null && c[0] <> 'Name' && (c[0] <> 'Opp_Changed_Field__c' ||(c[0] == 'Opp_Changed_Field__c' &&
- or.opp.Opp_Changed_Field__c != '璇环闃舵鍙戠敓浜嗗彉鍖�' &&or.opp.Opp_Changed_Field__c != '棰勬祴绛剧害鏃ュ彂鐢熶簡鍙樺寲' &&or.opp.Opp_Changed_Field__c != '鍖婚櫌鍚堝悓閲戦鍙戠敓浜嗗彉鍖�' && or.opp.Opp_Changed_Field__c != '璁㈣揣閲戦鍙戠敓浜嗗彉鍖�')))}" value="{!or.opp[c[0]]}" /> && or.opp.Oly_Inquiry_Status1__c <> null AgcOpp -->
- <apex:outputField rendered="{!c[0] == 'Change_To_Opportunity_T__c' }" value="{!or.opp[c[0]]}" />
+ <apex:repeat
+ value="{!oppRecords}"
+ var="or"
+ id="oppTable"
+ >
+ <tr
+ class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}"
+ style="height: 35px"
+ onmouseover="if (window.hiOn){hiOn(this);} "
+ onmouseout="if (window.hiOff){hiOff(this);} "
+ onblur="if (window.hiOff){hiOff(this);}"
+ onfocus="if (window.hiOn){hiOn(this);}"
+ >
+ <apex:variable value="{!0}" var="cnt_3" />
+ <apex:repeat
+ value="{!columnsRightApi}"
+ var="c"
+ >
+ <td
+ class="dataCellBorder1 col_{!columnRightCss[cnt_3]} {!cnt}_col_{!columnRightCss[cnt_3]}"
+ >
+ <!-- vivek start -->
+ <!-- <apex:outputLink rendered="{!c[0]=='Name'}" value="/{!or.opp.Id}" target="LINK_{!or.opp.Id}"><apex:outputField rendered="{!c[0]=='Name'}" value="{!or.opp[c[0]]}" /></apex:outputLink> -->
+ <!-- vivek end -->
+ <!-- <apex:outputField id="q1111111111" rendered="{!(c.size==1 && columnRightRW[c[0]]=='r' && or.opp.Id <> null && c[0] <> 'Name' && (c[0] <> 'Opp_Changed_Field__c' ||(c[0] == 'Opp_Changed_Field__c' &&
+ or.opp.Opp_Changed_Field__c != '璇环闃舵鍙戠敓浜嗗彉鍖�' &&or.opp.Opp_Changed_Field__c != '棰勬祴绛剧害鏃ュ彂鐢熶簡鍙樺寲' &&or.opp.Opp_Changed_Field__c != '鍖婚櫌鍚堝悓閲戦鍙戠敓浜嗗彉鍖�' && or.opp.Opp_Changed_Field__c != '璁㈣揣閲戦鍙戠敓浜嗗彉鍖�')))}" value="{!or.opp[c[0]]}" /> && or.opp.Oly_Inquiry_Status1__c <> null AgcOpp -->
+ <apex:outputField
+ rendered="{!c[0] == 'Change_To_Opportunity_T__c' }"
+ value="{!or.opp[c[0]]}"
+ />
- <apex:outputField rendered="{!columnRightRW[c[0]]=='r' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Strategic_department_Class_Name__c' }" value="{!or.opp[c[0]]}" />
- <!-- <apex:outputField id="q1111111111" rendered="{!( columnRightRW[c[0]]=='r' && c[0] <> 'Name' && (c[0] <> 'StageName__c' ||(c[0] == 'StageName__c' &&
- or.opp.Oly_Inquiry_Stage__c != '璇环闃舵鍙戠敓浜嗗彉鍖�' &&or.opp.Oly_Inquiry_Stage__c != '棰勬祴绛剧害鏃ュ彂鐢熶簡鍙樺寲' &&or.opp.Oly_Inquiry_Stage__c != '鍖婚櫌鍚堝悓閲戦鍙戠敓浜嗗彉鍖�' && or.opp.Oly_Inquiry_Stage__c != '璁㈣揣閲戦鍙戠敓浜嗗彉鍖�')))}" value="{!or.opp[c[0]]}" /> -->
- <!-- <div style ="color:red"> -->
- <!-- <apex:outputField id="q2222222" rendered="{!(c.size==1 && columnRightRW[c[0]]=='r' && or.opp.Id <> null && c[0] <> 'Name' && c[0] == 'Opp_Changed_Field__c' && (
- or.opp.Opp_Changed_Field__c == '璇环闃舵鍙戠敓浜嗗彉鍖�' || or.opp.Opp_Changed_Field__c == '棰勬祴绛剧害鏃ュ彂鐢熶簡鍙樺寲' || or.opp.Opp_Changed_Field__c == '鍖婚櫌鍚堝悓閲戦鍙戠敓浜嗗彉鍖�' || or.opp.Opp_Changed_Field__c == '璁㈣揣閲戦鍙戠敓浜嗗彉鍖�'))}" value="{!or.opp[c[0]]}" /> -->
- <!-- <apex:outputField id="q2222222" rendered="{!(c.size==1 && columnRightRW[c[0]]=='r' && c[0] <> 'Name' && c[0] == 'StageName__c' && (
+ <apex:outputField
+ rendered="{!columnRightRW[c[0]]=='r' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Strategic_department_Class_Name__c' }"
+ value="{!or.opp[c[0]]}"
+ />
+ <!-- <apex:outputField id="q1111111111" rendered="{!( columnRightRW[c[0]]=='r' && c[0] <> 'Name' && (c[0] <> 'StageName__c' ||(c[0] == 'StageName__c' &&
+ or.opp.Oly_Inquiry_Stage__c != '璇环闃舵鍙戠敓浜嗗彉鍖�' &&or.opp.Oly_Inquiry_Stage__c != '棰勬祴绛剧害鏃ュ彂鐢熶簡鍙樺寲' &&or.opp.Oly_Inquiry_Stage__c != '鍖婚櫌鍚堝悓閲戦鍙戠敓浜嗗彉鍖�' && or.opp.Oly_Inquiry_Stage__c != '璁㈣揣閲戦鍙戠敓浜嗗彉鍖�')))}" value="{!or.opp[c[0]]}" /> -->
+ <!-- <div style ="color:red"> -->
+ <!-- <apex:outputField id="q2222222" rendered="{!(c.size==1 && columnRightRW[c[0]]=='r' && or.opp.Id <> null && c[0] <> 'Name' && c[0] == 'Opp_Changed_Field__c' && (
+ or.opp.Opp_Changed_Field__c == '璇环闃舵鍙戠敓浜嗗彉鍖�' || or.opp.Opp_Changed_Field__c == '棰勬祴绛剧害鏃ュ彂鐢熶簡鍙樺寲' || or.opp.Opp_Changed_Field__c == '鍖婚櫌鍚堝悓閲戦鍙戠敓浜嗗彉鍖�' || or.opp.Opp_Changed_Field__c == '璁㈣揣閲戦鍙戠敓浜嗗彉鍖�'))}" value="{!or.opp[c[0]]}" /> -->
+ <!-- <apex:outputField id="q2222222" rendered="{!(c.size==1 && columnRightRW[c[0]]=='r' && c[0] <> 'Name' && c[0] == 'StageName__c' && (
or.opp.Oly_Inquiry_Stage__c == '璇环闃舵鍙戠敓浜嗗彉鍖�' || or.opp.Oly_Inquiry_Stage__c == '棰勬祴绛剧害鏃ュ彂鐢熶簡鍙樺寲' || or.opp.Oly_Inquiry_Stage__c == '鍖婚櫌鍚堝悓閲戦鍙戠敓浜嗗彉鍖�' || or.opp.Oly_Inquiry_Stage__c == '璁㈣揣閲戦鍙戠敓浜嗗彉鍖�'))}" value="{!or.opp[c[0]]}" />
-
- </div> -->
- <!-- <apex:inputField rendered="{!(c.size==1 && columnRightRW[c[0]]=='w' && or.opp.Id <> null && c[0] <> 'Name')}" value="{!or.opp[c[0]]}" onchange="setChangeFlgRight('{!or.lineNo}')"/>
- <apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='wm' && c[0] <> 'Name' && or.opp.Id <> null)}" layout="none">
- <div class="requiredInput_r">
- <div class="requiredBlock_r"></div>
- <apex:inputField value="{!or.Opp[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/>
- </div>
+
+ </div> -->
+ <!-- <apex:inputField rendered="{!(c.size==1 && columnRightRW[c[0]]=='w' && or.opp.Id <> null && c[0] <> 'Name')}" value="{!or.opp[c[0]]}" onchange="setChangeFlgRight('{!or.lineNo}')"/>
+ <apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='wm' && c[0] <> 'Name' && or.opp.Id <> null)}" layout="none">
+ <div class="requiredInput_r">
+ <div class="requiredBlock_r"></div>
+ <apex:inputField value="{!or.Opp[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/>
+ </div>
</apex:outputPanel> -->
- <apex:outputField rendered="{!c[0] == 'Strategic_department_Class_Name__c'}" value="{!or.opp[c[0]]}" />
-
- <apex:inputField rendered="{!( columnRightRW[c[0]]=='w' && c[0] <> 'Strategic_department_Class_Name__c' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Name')}" value="{!or.opp[c[0]]}" onchange="setChangeFlgRight('{!or.lineNo}')"/>
- <apex:outputPanel rendered="{!( columnRightRW[c[0]]=='wm' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Name' )}" layout="none">
- <div class="requiredInput_r">
- <div class="requiredBlock_r"></div>
- <apex:inputField value="{!or.Opp[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/>
- </div>
- </apex:outputPanel>
- <apex:variable value="{!cnt_3 + 1}" var="cnt_3" />
- </td>
- </apex:repeat>
- <td id="cell_Scroll" class="col_Scroll">
- <apex:inputHidden value="{!or.changeFlg}" id="changeFlg"/>
- <apex:inputHidden value="{!or.changeFlgRt}" id="changeFlgRt"/>
- <script type="text/javascript">
- if ("{!or.canEdit}" == "false") {
- var right = j$("#tableData").find("tr").eq({!cnt-1});
- var rightline = j$(right).find("td");
- for (var i=0; i<rightline.length; i++) {
- j$(rightline[i]).find("input").each(function(){
- j$(this).attr("disabled",true);
- });
- j$(rightline[i]).find("a").each(function(){
- j$(this).attr("href","#");
- });
+ <apex:outputField
+ rendered="{!c[0] == 'Strategic_department_Class_Name__c'}"
+ value="{!or.opp[c[0]]}"
+ />
+
+ <apex:inputField
+ styleClass="slds-form-element"
+ rendered="{!( columnRightRW[c[0]]=='w' && c[0] <> 'Strategic_department_Class_Name__c' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Name')}"
+ value="{!or.opp[c[0]]}"
+ onchange="setChangeFlgRight('{!or.lineNo}')"
+ />
+ <apex:outputPanel
+ rendered="{!( columnRightRW[c[0]]=='wm' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Name' )}"
+ layout="none"
+ >
+ <div class="requiredInput_r">
+ <div
+ class="requiredBlock_r"
+ ></div>
+ <apex:inputField
+ styleClass="slds-form-element"
+ value="{!or.Opp[c[0]]}"
+ onchange="setChangeFlg('{!or.lineNo}')"
+ />
+ </div>
+ </apex:outputPanel>
+ <apex:variable
+ value="{!cnt_3 + 1}"
+ var="cnt_3"
+ />
+ </td>
+ </apex:repeat>
+ <td id="cell_Scroll" class="col_Scroll">
+ <apex:inputHidden
+ value="{!or.changeFlg}"
+ id="changeFlg"
+ />
+ <apex:inputHidden
+ value="{!or.changeFlgRt}"
+ id="changeFlgRt"
+ />
+ <script type="text/javascript">
+ if ("{!or.canEdit}" == "false") {
+ var right = j$("#tableData").find("tr").eq({!cnt-1});
+ var rightline = j$(right).find("td");
+ for (var i=0; i<rightline.length; i++) {
+ j$(rightline[i]).find("input").each(function(){
+ j$(this).attr("disabled",true);
+ });
+ j$(rightline[i]).find("a").each(function(){
+ j$(this).attr("href","#");
+ });
+ }
}
- }
- if ("{!or.hasError}" == "true") {
- var left = j$("#tableData_L").find("tr").eq({!cnt-1});
- var leftFirst = j$(left).find("td").eq(1);
- j$(leftFirst).css("background-color", "gray");
- }
- if ("{!or.hasFieldError}" == "true") {
- var left = j$("#tableData_L").find("tr").eq({!cnt-1});
- var leftFirst = j$(left).find("td").eq(1);
- j$(leftFirst).css("background-color", "red");
- }
- </script>
- </td>
+ if ("{!or.hasError}" == "true") {
+ var left = j$("#tableData_L").find("tr").eq({!cnt-1});
+ var leftFirst = j$(left).find("td").eq(1);
+ j$(leftFirst).css("background-color", "gray");
+ }
+ if ("{!or.hasFieldError}" == "true") {
+ var left = j$("#tableData_L").find("tr").eq({!cnt-1});
+ var leftFirst = j$(left).find("td").eq(1);
+ j$(leftFirst).css("background-color", "red");
+ }
+ </script>
+ </td>
</tr>
<apex:variable value="{!cnt + 1}" var="cnt" />
- </apex:repeat>
+ </apex:repeat>
</table>
</div>
<div id="in_Div">
- <table class="list" style="border-bottom-width: 0px;width:2000px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
+ <table
+ class="list"
+ style="
+ border-bottom-width: 0px;
+ width: 2000px;
+ font-size: 13px;
+ border-spacing: 0;
+ "
+ border=""
+ id="tableData_L"
+ >
<apex:variable value="{!1}" var="cnt_2" />
- <apex:repeat value="{!oppRecords}" var="or" id="oppTable_L">
- <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
- <apex:variable value="{!0}" var="cnt_2" />
- <apex:repeat value="{!columnsLeftApi}" var="c">
- <td class="dataCellBorder1 col_{!columnLeftCss[cnt_2]}">
- <!-- vivek start -->
-
- <apex:outputLink target="_blank" rendered="{!c[0]=='Name'}" value="/{!or.AgcOpp.Id}" >
- <apex:outputField rendered="{!c[0]=='Name'}" value="{!or.AgcOpp[c[0]]}" />
- </apex:outputLink>
-
- <apex:outputPanel rendered="{!or.ifLock}">
- <apex:outputField rendered="{!c[0]!='Name'}" value="{!or.AgcOpp[c[0]]}">
- </apex:outputField>
- </apex:outputPanel>
- <!-- 閿�鍞媴褰� -->
- <apex:outputPanel rendered="{!or.ifLock == false}">
- <!-- <apex:outputLink target="_blank" rendered="{!c[0]=='Agency_Person__c'}" value="/{!or.AgcOpp[c[0]]}" > -->
- <!-- <apex:outputText value="{!or.AgcOpp.Agency_Person__r.Name }" /> -->
- <!-- <apex:outputText rendered="{!c[0]=='Agency_PersonName__c'}" value="{!or.AgcOpp.Agency_PersonName__c }" /> -->
- <!-- </apex:outputLink> -->
- <!-- 缁忛攢鍟� -->
- <apex:outputLink target="_blank" rendered="{!c[0]=='Agency__c'}" value="/{!or.AgcOpp[c[0]]}" >
- <apex:outputText value="{!or.AgcOpp.Agency__r.Name }" />
- </apex:outputLink>
- <!-- OCSM璇环 -->
- <!-- <apex:outputLink target="_blank" rendered="{!c[0]=='Change_To_Opportunity__c'}" value="/{!or.AgcOpp[c[0]]}" >
- <apex:outputText value="{!or.AgcOpp.Agency__r.Name }" />
- </apex:outputLink> -->
- <!-- 蹇呭~瀛楁 -->
- <!-- <apex:outputField rendered="{!(c[0]<>'Name' && c[0]<>'Agency_Hospital__c' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='wm')}" value="{!or.AgcOpp[c[0]] }"/> -->
- <apex:inputField rendered="{!(c[0]<>'Name' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='wm')}" value="{!or.AgcOpp[c[0]] }" onchange="setChangeFlg('{!or.lineNo}')"/>
- <!-- vivek end -->
-
+ <apex:repeat
+ value="{!oppRecords}"
+ var="or"
+ id="oppTable_L"
+ >
+ <tr
+ class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}"
+ style="height: 35px"
+ onmouseover="if (window.hiOn){hiOn(this);} "
+ onmouseout="if (window.hiOff){hiOff(this);} "
+ onblur="if (window.hiOff){hiOff(this);}"
+ onfocus="if (window.hiOn){hiOn(this);}"
+ >
+ <apex:variable value="{!0}" var="cnt_2" />
+ <apex:repeat
+ value="{!columnsLeftApi}"
+ var="c"
+ >
+ <td
+ class="dataCellBorder1 col_{!columnLeftCss[cnt_2]}"
+ >
+ <!-- vivek start -->
- <apex:outputField rendered="{!(c[0]<>'Name' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='r')}" value="{!or.AgcOpp[c[0]] }"/>
- <!-- <apex:outputField rendered="{!(c[0]<>'Name' && columnLeftRW[c[0]]<>'w')}" value="{!or.AgcOpp[c[0]] }"/> -->
- <!-- 鍙紪杈戠殑瀛楁 -->
- <apex:inputField value="{!or.AgcOpp[c[0]]}" rendered="{!columnLeftRW[c[0]]=='w'}" onchange="setChangeFlg('{!or.lineNo}')"/>
- </apex:outputPanel>
- </td>
- <apex:variable value="{!cnt_2 + 1}" var="cnt_2" />
- </apex:repeat>
+ <apex:outputLink
+ target="_blank"
+ rendered="{!c[0]=='Name'}"
+ value="/{!or.AgcOpp.Id}"
+ >
+ <apex:outputField
+ rendered="{!c[0]=='Name'}"
+ value="{!or.AgcOpp[c[0]]}"
+ />
+ </apex:outputLink>
+
+ <apex:outputPanel
+ rendered="{!or.ifLock}"
+ >
+ <apex:outputField
+ rendered="{!c[0]!='Name'}"
+ value="{!or.AgcOpp[c[0]]}"
+ >
+ </apex:outputField>
+ </apex:outputPanel>
+ <!-- 閿�鍞媴褰� -->
+ <apex:outputPanel
+ rendered="{!or.ifLock == false}"
+ >
+ <!-- <apex:outputLink target="_blank" rendered="{!c[0]=='Agency_Person__c'}" value="/{!or.AgcOpp[c[0]]}" > -->
+ <!-- <apex:outputText value="{!or.AgcOpp.Agency_Person__r.Name }" /> -->
+ <!-- <apex:outputText rendered="{!c[0]=='Agency_PersonName__c'}" value="{!or.AgcOpp.Agency_PersonName__c }" /> -->
+ <!-- </apex:outputLink> -->
+ <!-- 缁忛攢鍟� -->
+ <apex:outputLink
+ target="_blank"
+ rendered="{!c[0]=='Agency__c'}"
+ value="/{!or.AgcOpp[c[0]]}"
+ >
+ <apex:outputText
+ value="{!or.AgcOpp.Agency__r.Name }"
+ />
+ </apex:outputLink>
+ <!-- OCSM璇环 -->
+ <!-- <apex:outputLink target="_blank" rendered="{!c[0]=='Change_To_Opportunity__c'}" value="/{!or.AgcOpp[c[0]]}" >
+ <apex:outputText value="{!or.AgcOpp.Agency__r.Name }" />
+ </apex:outputLink> -->
+ <!-- 蹇呭~瀛楁 -->
+ <!-- <apex:outputField rendered="{!(c[0]<>'Name' && c[0]<>'Agency_Hospital__c' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='wm')}" value="{!or.AgcOpp[c[0]] }"/> -->
+ <apex:inputField
+ styleClass="slds-form-element"
+ rendered="{!(c[0]<>'Name' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='wm')}"
+ value="{!or.AgcOpp[c[0]] }"
+ onchange="setChangeFlg('{!or.lineNo}')"
+ />
+ <!-- vivek end -->
+
+ <apex:outputField
+ rendered="{!(c[0]<>'Name' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='r')}"
+ value="{!or.AgcOpp[c[0]] }"
+ />
+ <!-- <apex:outputField rendered="{!(c[0]<>'Name' && columnLeftRW[c[0]]<>'w')}" value="{!or.AgcOpp[c[0]] }"/> -->
+ <!-- 鍙紪杈戠殑瀛楁 -->
+ <apex:inputField
+ styleClass="slds-form-element"
+ value="{!or.AgcOpp[c[0]]}"
+ rendered="{!columnLeftRW[c[0]]=='w'}"
+ onchange="setChangeFlg('{!or.lineNo}')"
+ />
+ </apex:outputPanel>
+ </td>
+ <apex:variable
+ value="{!cnt_2 + 1}"
+ var="cnt_2"
+ />
+ </apex:repeat>
</tr>
<apex:variable value="{!cnt + 1}" var="cnt" />
</apex:repeat>
</table>
-
- </div><!-- /in_Div -->
+ </div>
+ <!-- /in_Div -->
</apex:outputPanel>
</apex:pageBlock>
-<script type="text/javascript">
-j$(function() {
- var tableWidth = 0;
- j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
- var colClass = getColClassName(this);
- if (colClass != 'col_Scroll') {
- var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
- tableWidth += headerCol.width();
- }
- });
- // j$('table#tableData').css('width', (tableWidth + 2) + 'px');
- // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
+ <!-- </div> -->
+ <script type="text/javascript">
+ j$(function () {
+ var tableWidth = 0;
+ j$('body .pbBody table#tableHeader tr.headerRow td').each(
+ function () {
+ var colClass = getColClassName(this);
+ if (colClass != 'col_Scroll') {
+ var headerCol = j$(
+ 'body .pbBody table.list tr.headerRow td.' +
+ colClass
+ );
+ tableWidth += headerCol.width();
+ }
+ }
+ );
+ // j$('table#tableData').css('width', (tableWidth + 2) + 'px');
+ // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
- // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
- bindTdToggleWidth();
-});
-var elements = document.getElementsByTagName("select");
-for (i = 0; i < elements.length; i++) {
- var id = elements[i].id;
- if (id.length > 5 && id.substring(id.length - 5, id.length) == 'mlktp') {
- elements[i].style.display = "none";
- }
-}
-var tbl_l = document.getElementById("tableData_L");
-var input_l = tbl_l.getElementsByTagName("input");
-for (i = 0; i < input_l.length; i++) {
- var id = input_l[i].id + '_lkid';
- if (document.getElementById(id) != null) {
- input_l[i].style.width = "75%";
- }
-}
-var tbl = document.getElementById("tableData");
-var input = tbl.getElementsByTagName("input");
-for (i = 0; i < input.length; i++) {
- var id = input[i].id + '_lkid';
- if (document.getElementById(id) != null) {
- input[i].style.width = "75%";
- }
-}
-</script>
+ // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
+ bindTdToggleWidth();
+ // j$("input").attr("styleClass","slds-input");
+ });
+ var elements = document.getElementsByTagName('select');
+ for (i = 0; i < elements.length; i++) {
+ var id = elements[i].id;
+ if (
+ id.length > 5 &&
+ id.substring(id.length - 5, id.length) == 'mlktp'
+ ) {
+ elements[i].style.display = 'none';
+ }
+ }
+ var tbl_l = document.getElementById('tableData_L');
+ var input_l = tbl_l.getElementsByTagName('input');
+ for (i = 0; i < input_l.length; i++) {
+ var id = input_l[i].id + '_lkid';
+ if (document.getElementById(id) != null) {
+ input_l[i].style.width = '75%';
+ }
+ }
+ var tbl = document.getElementById('tableData');
+ var input = tbl.getElementsByTagName('input');
+ for (i = 0; i < input.length; i++) {
+ var id = input[i].id + '_lkid';
+ if (document.getElementById(id) != null) {
+ input[i].style.width = '75%';
+ }
+ }
+ </script>
</apex:outputPanel>
</apex:form>
-</apex:page>
\ No newline at end of file
+</apex:page>
diff --git a/force-app/main/default/pages/DealerInquiryModifyState.page-meta.xml b/force-app/main/default/pages/DealerInquiryModifyState.page-meta.xml
index c9d11cf..1ff0fd6 100644
--- a/force-app/main/default/pages/DealerInquiryModifyState.page-meta.xml
+++ b/force-app/main/default/pages/DealerInquiryModifyState.page-meta.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>35.0</apiVersion>
+ <apiVersion>39.0</apiVersion>
<availableInTouch>true</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<label>DealerInquiryModifyState</label>
diff --git a/force-app/main/default/pages/OFSInsReportLayout.page b/force-app/main/default/pages/OFSInsReportLayout.page
index c1826ae..ff58289 100644
--- a/force-app/main/default/pages/OFSInsReportLayout.page
+++ b/force-app/main/default/pages/OFSInsReportLayout.page
@@ -1,749 +1,1874 @@
-<apex:page id="Page" showHeader="false" sidebar="false" controller="OFSInsReportLayoutController" applyBodyTag="false" applyHtmlTag="false" action="{!init}" lightningStylesheets="true">
-<!-- <apex:page id="Page" showHeader="false" sidebar="false" standardcontroller="Inspection_Item__c" extensions="OFSInsReportLayoutController" applyBodyTag="false" applyHtmlTag="false" action="{!init}"> -->
-<html>
-<head>
- <meta name="viewport" content="width=1150,user-scalable=yes" /> <!-- TODO 1150銇偝銉炽儐銉炽儎銇箙 -->
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
- <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <style type="text/css">
- table#AssetTable select {
- width: 98%;
- }
- table#AssetTableHeader .headerCell {
- box-sizing: border-box;
- padding: 2px 1px;
- }
- table#AssetTable .dataCell {
- box-sizing: border-box;
- padding: 1px 1px;
- }
- .bPageBlock .dataCol .requiredInput {
- display: inline-table;
- }
- .bPageBlock .detailList .labelCol {
- width: 1%;
- }
- .dateFormat {
- display: none;
- }
-
- </style>
- <script type="text/javascript">
- var tmpaid = "";
- var tmpan = "";
- var tmpahid = "";
- var tmpahn = "";
- var tmpadid = "";
- var tmpadn = "";
- var tmpaaid = "";
- var tmpaan = "";
- var tmpinsid = "";
- var tmpinsn = "";
- var tmprstr = "";
- sforce.connection.sessionId = '{!$Api.Session_ID}';
- function toggleIrNameDisabled(checker) {
- if (checker.checked) {
- j$(escapeVfId('Page:Form:Block:Ir_Name')).prop("disabled", false);
- } else {
- j$(escapeVfId('Page:Form:Block:Ir_Name')).prop("disabled", true);
- }
- }
- function changeAllCheckResult(val) {
- var cnt = j$(escapeVfId('ProductCnt')).val();
- for (var i = 0; i < cnt; i++) {
- if (val == ' ') {
- document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:' + i + ':AssetRowCheckboxIsNormal').value = '';
- } else {
- document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:' + i + ':AssetRowCheckboxIsNormal').value = val;
+<apex:page
+ id="Page"
+ showHeader="false"
+ sidebar="false"
+ controller="OFSInsReportLayoutController"
+ applyBodyTag="false"
+ applyHtmlTag="false"
+ action="{!init}"
+ lightningStylesheets="true"
+>
+ <!-- <apex:page id="Page" showHeader="false" sidebar="false" standardcontroller="Inspection_Item__c" extensions="OFSInsReportLayoutController" applyBodyTag="false" applyHtmlTag="false" action="{!init}"> -->
+ <html>
+ <head>
+ <meta name="viewport" content="width=1150,user-scalable=yes" />
+ <!-- TODO 1150銇偝銉炽儐銉炽儎銇箙 -->
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" />
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" />
+ <apex:includeScript value="{!URLFOR($Resource.connection20)}" />
+ <apex:includeScript value="{!URLFOR($Resource.apex20)}" />
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}" />
+ <apex:includeScript
+ value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"
+ />
+ <style type="text/css">
+ table#AssetTable select {
+ width: 98%;
}
- }
- }
-
- function clearAndSearch() {
- document.getElementById("Page:Form:Block:UnCheckSection:text1").value = "";
- document.getElementById("Page:Form:Block:UnCheckSection:cond1").value = "equals";
- document.getElementById("Page:Form:Block:UnCheckSection:val1").value = "";
- blockme();
- searchfunc();
- }
-
- function searchJs() {
- blockme();
- searchfunc();
- }
-
- function sortTableJs(key) {
- blockme();
- sortTablefunc(key);
- }
-
- function exchangeAssetJs() {
- blockme();
- exchangeAssetfunc();
- }
-
- function saveByRepairJs(aid, an, ahid, ahn, adid, adn, aaid, aan, rstr) {
- tmpaid = aid;
- tmpan = an;
- tmpahid = ahid;
- tmpahn = ahn;
- tmpadid = adid;
- tmpadn = adn;
- tmpaaid = aaid;
- tmpaan = aan;
- tmprstr = rstr;
- // 鐐规鍫卞憡鏇稿鏇淬仹銇嶃仾銇忋仸銈傘�佷慨鐞嗐倰浣溿倢銈嬶紵
- if (tmpinsid == "") {
- blockme();
- saveByRepair();
- } else {
- openRepair();
- }
-}
-
-function openRepair() {
- // TODO 浠婂緦鎺$暘銉嗐兗銉栥儷銈掍娇銇凬ame銈掑彇寰椼�佺偣妞滃牨鍛婃浉銇竴鏅傜殑銇倐銇仹銇�
- window.open('/a0J/e?retURL=%2F' + tmpaid + '&CF00N10000002Dx66_lkid=' + tmpahid + '&CF00N10000002Dx66=' + encodeURIComponent(tmpahn) + '&CF00N10000002Dx5t_lkid=' + tmpadid + '&CF00N10000002Dx5t=' + encodeURIComponent(tmpadn) + '&CF00N10000002Dx5n_lkid=' + tmpaaid + '&CF00N10000002Dx5n=' + encodeURIComponent(tmpaan) + '&CF00N10000002Dx1X_lkid=' + tmpaid + '&CF00N10000002Dx1X=' + encodeURIComponent(tmpan) + '&00N10000002FH86=' + encodeURIComponent(tmprstr) + '&CF00N10000006PRCp=' + encodeURIComponent(tmpinsn) + '&CF00N10000006PRCp_lkid=' + tmpinsid, '_blank');
-}
-//add by rentx 20210809 鍏ㄩ�夊姛鑳� start
-function checkAll(checker) {
- var cnt = j$(escapeVfId('ProductCnt')).val();
- for (var i = 0; i < cnt; i++) {
- if (j$(escapeVfId('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':AssetRowCheckbox1')).size() == 0) {
- break;
- }
- document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':AssetRowCheckbox1').checked = checker.checked;
- }
-}
-function checkAll2(checker) {
- var cnt = j$(escapeVfId('ProductCnt2')).val();
- var tempi = parseInt(cnt / 900 )+1;
- for (var j = 0; j < tempi; j++) {
- for (var i = 0; i < 900; i++) {
- if (j$(escapeVfId('Page:Form:Block:UnCheckSection:unCheckedInfoListForThousend:'+j+':UnCheckedInfoList:'+i+':AssetRowCheckbox2')).size() == 0) {
- break;
- }
- document.getElementById('Page:Form:Block:UnCheckSection:unCheckedInfoListForThousend:'+j+':UnCheckedInfoList:'+i+':AssetRowCheckbox2').checked = checker.checked;
- }
- }
-
-}
-//add by rentx 20210809 鍏ㄩ�夊姛鑳� end
-
-
-AWSService.sfSessionId = '{!GETSESSIONID()}';
-var staticResource = JSON.parse('{!staticResource}');
-var aws_data = {};
-var txid = null;
-function Encrypt(callback){
- blockme();
- //callback();return;
- //<input type="hidden" value="{!ir.Id}" id="IrId"/>
- let e_id = document.getElementById("IrId");
- let url = staticResource.newUrl;
-
- aws_data = {
- "phone":j$("[field-api='phone__c']").val(),
- "responsiblePerson":j$("[field-api='Responsible_Person__c']").val(),
- };
-
- if(e_id && e_id.value){
- url = staticResource.updateUrl;
- aws_data.dataId = document.getElementById("Page:Form:Block:AWS_Data_Id__c").value;
- }
-
-
-
- AWSService.post(url, JSON.stringify([aws_data]), function(data){
-
- if (!(data && data.object && data.object.length)) {
- console.log('AWSService.post failed');
- return;
- }
- let aws_data1 = data.object[0];
- txid = data.txId;
-
- document.getElementById("Page:Form:Block:AWS_Data_Id__c").value = aws_data1.dataId;
- j$("[field-api='phone__c']").val(aws_data1.phone);
- j$("[field-api='Responsible_Person__c']").val(aws_data1.responsiblePerson);
-
- if (callback) {
- callback();
- }
- }, staticResource.token);
-}
-
-function saveBtnJs(){
- Encrypt(saveBtn);
-}
-function submitJs(){
- Encrypt(submit);
-}
-function showPDFJs(){
- Encrypt(showPDF);
-}
-
-function afterSaveBtnJs(){
- Trans();
-}
-
-function afterSubmitJs(){
- Trans();
-}
-
-function afterShowPDFJs(){
- Trans(function(){
- if (!HasError()) {
- window.location.href = '/apex/InsReportPDFOuter?id=' + document.getElementById("IrId").value;
- }
-
- });
-}
-
-function HasError(){
-
- // if (IsAddmessage) {
- // return true;
- // }
- let e = document.getElementById("Page:Form:MessageP");
- if (!e) {
- return false;
- }
-
- let divs = j$(e).find("div.message");
- for (let i = 0; i < divs.length; i++) {
- for (let j = 0; j < divs[i].classList.length; j++) {
- for(let clsi in divs[i].classList){let cls=divs[i].classList[clsi];
- if (typeof cls == 'string' && cls.indexOf('error')>-1) {
- return true;
+ table#AssetTableHeader .headerCell {
+ box-sizing: border-box;
+ padding: 2px 1px;
}
- }
-
- }
-
- }
+ table#AssetTable .dataCell {
+ box-sizing: border-box;
+ padding: 1px 1px;
+ }
+ .bPageBlock .dataCol .requiredInput {
+ display: inline-table;
+ }
+ .bPageBlock .detailList .labelCol {
+ width: 1%;
+ }
+ .dateFormat {
+ display: none;
+ }
+ table.detailList td:nth-child(4) .requiredInput select {
+ min-width: 150px;
+ width: 150px;
+ }
+ table.detailList
+ td:nth-child(4)
+ .requiredInput
+ .lookupInput
+ input {
+ min-width: 180px;
+ width: 180px;
+ }
+ body .bPageBlock .detailList .labelCol,
+ .slds-vf-scope .bPageBlock .detailList .labelCol {
+ width: 9%;
+ }
+ body .bPageBlock .detailList .dataCol {
+ width: auto;
+ }
+ table.detailList
+ tr:nth-child(2)
+ .dataCol
+ .requiredInput
+ span
+ input,
+ table.detailList
+ tr:nth-child(3)
+ .dataCol
+ span.dateInput
+ > input {
+ min-width: 150px;
+ width: 100px;
+ }
+ table.detailList td.dataCol.last input {
+ min-width: 150px;
+ width: 150px;
+ }
+ table.detailList tr:nth-child(2) .dataCol:nth-child(4) > input,
+ table.detailList tr:nth-child(3) .dataCol:nth-child(4) > input {
+ width: 20px;
+ min-width: 50px;
+ }
+ </style>
+ <script type="text/javascript">
+ var tmpaid = '';
+ var tmpan = '';
+ var tmpahid = '';
+ var tmpahn = '';
+ var tmpadid = '';
+ var tmpadn = '';
+ var tmpaaid = '';
+ var tmpaan = '';
+ var tmpinsid = '';
+ var tmpinsn = '';
+ var tmprstr = '';
+ sforce.connection.sessionId = '{!$Api.Session_ID}';
+ function toggleIrNameDisabled(checker) {
+ if (checker.checked) {
+ j$(escapeVfId('Page:Form:Block:Ir_Name')).prop(
+ 'disabled',
+ false
+ );
+ } else {
+ j$(escapeVfId('Page:Form:Block:Ir_Name')).prop(
+ 'disabled',
+ true
+ );
+ }
+ }
+ function changeAllCheckResult(val) {
+ var cnt = j$(escapeVfId('ProductCnt')).val();
+ for (var i = 0; i < cnt; i++) {
+ if (val == ' ') {
+ document.getElementById(
+ 'Page:Form:Block:CheckSection:CheckedInfoList:' +
+ i +
+ ':AssetRowCheckboxIsNormal'
+ ).value = '';
+ } else {
+ document.getElementById(
+ 'Page:Form:Block:CheckSection:CheckedInfoList:' +
+ i +
+ ':AssetRowCheckboxIsNormal'
+ ).value = val;
+ }
+ }
+ }
- return false;
-}
+ function clearAndSearch() {
+ document.getElementById(
+ 'Page:Form:Block:UnCheckSection:text1'
+ ).value = '';
+ document.getElementById(
+ 'Page:Form:Block:UnCheckSection:cond1'
+ ).value = 'equals';
+ document.getElementById(
+ 'Page:Form:Block:UnCheckSection:val1'
+ ).value = '';
+ blockme();
+ searchfunc();
+ }
-function Decrypt(data){
-
- j$("[field-api='phone__c']").val(data.phone);
- j$("[field-api='Responsible_Person__c']").val(data.responsiblePerson);
-
-
-}
+ function searchJs() {
+ blockme();
+ searchfunc();
+ }
-function Trans(callback){
- let payload = {
- "txId":txid,
- "sfRecordId":document.getElementById("IrId").value,
- "isSuccess":(txid && !HasError()) ? 1 : 0
- };
- AWSService.post(staticResource.transactionUrl, JSON.stringify(payload), function(result){
- Decrypt(aws_data);
- if(callback)callback();
- unblockUI();
- }, staticResource.token);
-}
+ function sortTableJs(key) {
+ blockme();
+ sortTablefunc(key);
+ }
-function Query(){
- let ele = document.getElementById("Page:Form:Block:AWS_Data_Id__c");
- if (ele && ele.value) {
- blockme();
- AWSService.query(staticResource.queryUrl, ele.value, function(data){
- if (data && data.object) {
- Decrypt(data.object);
- }
- unblockUI();
- }, staticResource.token);
- }
-}
+ function exchangeAssetJs() {
+ blockme();
+ exchangeAssetfunc();
+ }
-j$(function(){
- Query();
-})
+ function saveByRepairJs(
+ aid,
+ an,
+ ahid,
+ ahn,
+ adid,
+ adn,
+ aaid,
+ aan,
+ rstr
+ ) {
+ tmpaid = aid;
+ tmpan = an;
+ tmpahid = ahid;
+ tmpahn = ahn;
+ tmpadid = adid;
+ tmpadn = adn;
+ tmpaaid = aaid;
+ tmpaan = aan;
+ tmprstr = rstr;
+ // 鐐规鍫卞憡鏇稿鏇淬仹銇嶃仾銇忋仸銈傘�佷慨鐞嗐倰浣溿倢銈嬶紵
+ if (tmpinsid == '') {
+ blockme();
+ saveByRepair();
+ } else {
+ openRepair();
+ }
+ }
-</script>
-<title>{!ir.Name}</title>
-</head>
-<body>
- <!-- HWAG-B4Q3G5 20180918Start -->
- <apex:form id="Form" style="margin:0 5px;" onkeydown="if(event.keyCode==13){return false;}">>
- <!-- HWAG-B4Q3G5 20180918End -->
- <script type="text/javascript">
- // 淇濆瓨寰屻�佹柊瑕忋伄鍫卞憡鏇窱D銈掑彇寰�
- tmpinsid = '{!ir.Id}';
- tmpinsn = '{!JSENCODE(ir.Name)}';
- //var IsAddmessage = {IsAddmessage};
- var isPDF = {!isPDF};
-
-</script>
-<apex:actionFunction name="searchfunc" action="{!searchBtn}" rerender="Form,Block,UnCheckSection" onComplete="unblockUI();"></apex:actionFunction>
+ function openRepair() {
+ // TODO 浠婂緦鎺$暘銉嗐兗銉栥儷銈掍娇銇凬ame銈掑彇寰椼�佺偣妞滃牨鍛婃浉銇竴鏅傜殑銇倐銇仹銇�
+ window.open(
+ '/a0J/e?retURL=%2F' +
+ tmpaid +
+ '&CF00N10000002Dx66_lkid=' +
+ tmpahid +
+ '&CF00N10000002Dx66=' +
+ encodeURIComponent(tmpahn) +
+ '&CF00N10000002Dx5t_lkid=' +
+ tmpadid +
+ '&CF00N10000002Dx5t=' +
+ encodeURIComponent(tmpadn) +
+ '&CF00N10000002Dx5n_lkid=' +
+ tmpaaid +
+ '&CF00N10000002Dx5n=' +
+ encodeURIComponent(tmpaan) +
+ '&CF00N10000002Dx1X_lkid=' +
+ tmpaid +
+ '&CF00N10000002Dx1X=' +
+ encodeURIComponent(tmpan) +
+ '&00N10000002FH86=' +
+ encodeURIComponent(tmprstr) +
+ '&CF00N10000006PRCp=' +
+ encodeURIComponent(tmpinsn) +
+ '&CF00N10000006PRCp_lkid=' +
+ tmpinsid,
+ '_blank'
+ );
+ }
+ //add by rentx 20210809 鍏ㄩ�夊姛鑳� start
+ function checkAll(checker) {
+ var cnt = j$(escapeVfId('ProductCnt')).val();
+ for (var i = 0; i < cnt; i++) {
+ if (
+ j$(
+ escapeVfId(
+ 'Page:Form:Block:CheckSection:CheckedInfoList:' +
+ i +
+ ':AssetRowCheckbox1'
+ )
+ ).size() == 0
+ ) {
+ break;
+ }
+ document.getElementById(
+ 'Page:Form:Block:CheckSection:CheckedInfoList:' +
+ i +
+ ':AssetRowCheckbox1'
+ ).checked = checker.checked;
+ }
+ }
+ function checkAll2(checker) {
+ var cnt = j$(escapeVfId('ProductCnt2')).val();
+ var tempi = parseInt(cnt / 900) + 1;
+ for (var j = 0; j < tempi; j++) {
+ for (var i = 0; i < 900; i++) {
+ if (
+ j$(
+ escapeVfId(
+ 'Page:Form:Block:UnCheckSection:unCheckedInfoListForThousend:' +
+ j +
+ ':UnCheckedInfoList:' +
+ i +
+ ':AssetRowCheckbox2'
+ )
+ ).size() == 0
+ ) {
+ break;
+ }
+ document.getElementById(
+ 'Page:Form:Block:UnCheckSection:unCheckedInfoListForThousend:' +
+ j +
+ ':UnCheckedInfoList:' +
+ i +
+ ':AssetRowCheckbox2'
+ ).checked = checker.checked;
+ }
+ }
+ }
+ //add by rentx 20210809 鍏ㄩ�夊姛鑳� end
-<apex:actionFunction name="exchangeAssetfunc" action="{!exchangeAsset}" rerender="Form" onComplete="unblockUI();"></apex:actionFunction>
+ AWSService.sfSessionId = '{!GETSESSIONID()}';
+ var staticResource = JSON.parse('{!staticResource}');
+ var aws_data = {};
+ var txid = null;
+ function Encrypt(callback) {
+ blockme();
+ //callback();return;
+ //<input type="hidden" value="{!ir.Id}" id="IrId"/>
+ let e_id = document.getElementById('IrId');
+ let url = staticResource.newUrl;
-<apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="Form" onComplete="unblockUI();">
-<apex:param name="firstParam" assignTo="{!sortKey}" value="" />
-</apex:actionFunction>
+ aws_data = {
+ phone: j$("[field-api='phone__c']").val(),
+ responsiblePerson: j$(
+ "[field-api='Responsible_Person__c']"
+ ).val()
+ };
-<apex:actionFunction name="getAssetFromHp" action="{!getAssetFromHp}" rerender="Form" onComplete="unblockUI();" />
+ if (e_id && e_id.value) {
+ url = staticResource.updateUrl;
+ aws_data.dataId = document.getElementById(
+ 'Page:Form:Block:AWS_Data_Id__c'
+ ).value;
+ }
-<apex:actionFunction name="saveByRepair" action="{!saveBtn}" rerender="Form" onComplete="unblockUI();openRepair();"/>
+ AWSService.post(
+ url,
+ JSON.stringify([aws_data]),
+ function (data) {
+ if (!(data && data.object && data.object.length)) {
+ console.log('AWSService.post failed');
+ return;
+ }
+ let aws_data1 = data.object[0];
+ txid = data.txId;
-<apex:actionFunction name="saveBtn" action="{!saveBtn}" rerender="Form" onComplete="afterSaveBtnJs();"/>
-<apex:actionFunction name="submit" action="{!submit}" rerender="Form" onComplete="afterSubmitJs();"/>
-<apex:actionFunction name="showPDF" action="{!showPDF}" rerender="Form" onComplete="afterShowPDFJs();"/>
+ document.getElementById(
+ 'Page:Form:Block:AWS_Data_Id__c'
+ ).value = aws_data1.dataId;
+ j$("[field-api='phone__c']").val(aws_data1.phone);
+ j$("[field-api='Responsible_Person__c']").val(
+ aws_data1.responsiblePerson
+ );
-<apex:outputPanel id="MessageP">
-<apex:pageMessages />
-</apex:outputPanel>
+ if (callback) {
+ callback();
+ }
+ },
+ staticResource.token
+ );
+ }
+ function saveBtnJs() {
+ Encrypt(saveBtn);
+ }
+ function submitJs() {
+ Encrypt(submit);
+ }
+ function showPDFJs() {
+ Encrypt(showPDF);
+ }
-<div><apex:pageBlock mode="maindetail" Id="Block" rendered="{!initFlag}">
- <div style="position: relative;top:0;width:100%;">
- <table>
- <tr>
- <td><apex:outputLabel value="{!$ObjectType.Inspection_Report__c.Label}:" style="font-size:18px;font-weight:bold;padding-right: 5px;"/></td>
- <td>锛�<apex:inputCheckBox value="{!ir.Name_Manual__c}" id="Name_Manual" onchange="toggleIrNameDisabled(this);return false;"/>
- <apex:outputLabel value="{!$ObjectType.Inspection_Report__c.fields.Name_Manual__c.Label}" for="Name_Manual"/>锛�
- <apex:inputField value="{!ir.Name}" id="Ir_Name" html-disabled="disabled" style="border-width:0px;font-size:18px;font-weight:bold;padding-right:20px;-webkit-text-fill-color:black;"/>
- </td>
- <td style="text-align: center;padding-right: 100px;"><input class="btn" type="Button" style="width:80px;" value="淇濆瓨" action="" onclick="saveBtnJs();" rerender="Form" onComplete="unblockUI();"/></td>
- <td style="text-align: center;padding-right: 100px;"><input class="btn" type="Button" value="鎻愪氦" action="" onclick="submitJs();" style="width:80px" rerender="Form" id="submitButton" onComplete="unblockUI();"/></td>
- <td style="text-align: center;padding-right: 100px;"><apex:commandButton style="width:80px;" value="鍏抽棴绐楀彛" onclick="location.href='/apex/OFSWindowClose';return false;" id="closeButton"/></td>
- <td style="text-align: center;"><input class="btn" type="Button" style="width:80px;" value="PDF" action="" onclick="showPDFJs();" rerender="Form" onComplete="unblockUI();"/></td>
- </tr>
- </table>
- <apex:pageBlockSection title="{!sectionList[0].title}" columns="{!sectionList[0].column}" showHeader="{!sectionList[0].showHeader}" rendered="{!sectionList.size>0}">
- <apex:repeat value="{!sectionList[0].sectionItemList}" var="sectionItem" id="SectionItemList">
- <apex:outputField value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&NOT(sectionItem.isInput)}"/>
- <apex:inputField style="width:{!sectionItem.width};height:{!sectionItem.height};" value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&§ionItem.isInput}" required="{!sectionItem.isRequired}" html-tabindex="{!sectionItem.index}"/>
- <apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&Not(isNull(sectionItem.customizeLable))}">
- <apex:outputLabel value="{!sectionItem.customizeLable}"/>
- <apex:outputPanel layout="none">
- <apex:repeat value="{!sectionItem.apiList}" var="api">
- <!-- 淇濆瓨寰屻�佺梾闄€伅寮峰埗outputField -->
- <apex:outputPanel layout="none" rendered="{!api == 'Hospital__c' && ir.Id != ''}">
- <apex:outputField value="{!ir[api]}"/>
- </apex:outputPanel>
- <apex:outputPanel layout="none" rendered="{!NOT(api == 'Hospital__c' && ir.Id != '')}">
- <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
- <apex:inputField value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
- <apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
- <apex:outputField value="{!ir[api]}"/>
-</apex:outputPanel>
-</apex:outputPanel>
-</apex:repeat>
-</apex:outputPanel>
-</apex:pageblockSectionItem>
-<apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&(isNull(sectionItem.customizeLable))}">
-<apex:outputPanel layout="none">
-<apex:repeat value="{!sectionItem.apiList}" var="api">
-<apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
-<apex:inputField value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
-<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
-<apex:outputField value="{!ir[api]}"/>
-</apex:outputPanel>
-</apex:repeat>
-</apex:outputPanel>
-</apex:pageblockSectionItem>
-<apex:pageBlockSectionItem rendered="{!sectionItem.isDummy}"/>
-</apex:repeat>
-</apex:pageBlockSection>
-</div>
-<div style="position: relative;top:0;height:700px;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling: touch;">
- <input type="hidden" value="{!ir.Id}" id="IrId"/>
- <apex:inputHidden value="{!ir.AWS_Data_Id__c}" id="AWS_Data_Id__c"/>
-
-
+ function afterSaveBtnJs() {
+ Trans();
+ }
+ function afterSubmitJs() {
+ Trans();
+ }
- <apex:repeat value="{!sectionList}" var="section" id="SectionList">
- <apex:pageBlockSection title="{!section.title}" columns="{!section.column}" showHeader="{!section.showHeader}" rendered="{!!section.isTop}">
- <apex:repeat value="{!section.sectionItemList}" var="sectionItem" id="SectionItemList">
- <apex:outputField value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&NOT(sectionItem.isInput)}"/>
- <apex:inputField html-field-api="{!sectionItem.api}" style="width:{!sectionItem.width};height:{!sectionItem.height};" value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&§ionItem.isInput}" required="{!sectionItem.isRequired}" html-tabindex="{!sectionItem.index}"/>
- <apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&Not(isNull(sectionItem.customizeLable))}">
- <apex:outputLabel value="{!sectionItem.customizeLable}"/>
- <apex:outputPanel layout="none">
- <apex:repeat value="{!sectionItem.apiList}" var="api">
- <!-- 淇濆瓨寰屻�佺梾闄€伅寮峰埗outputField -->
- <apex:outputPanel layout="none" rendered="{!api == 'Hospital__c' && ir.Id != ''}">
- <apex:outputField value="{!ir[api]}"/>
-</apex:outputPanel>
-<apex:outputPanel layout="none" rendered="{!NOT(api == 'Hospital__c' && ir.Id != '')}">
-<apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
-<apex:inputField html-field-api="{!api}" value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
-<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
-<apex:outputField value="{!ir[api]}"/>
-</apex:outputPanel>
-</apex:outputPanel>
-</apex:repeat>
-</apex:outputPanel>
-</apex:pageblockSectionItem>
-<apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&(isNull(sectionItem.customizeLable))}">
-<apex:outputPanel layout="none">
-<apex:repeat value="{!sectionItem.apiList}" var="api">
-<apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
-<apex:inputField html-field-api="api" value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
-<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
-<apex:outputField value="{!ir[api]}"/>
-</apex:outputPanel>
-</apex:repeat>
-</apex:outputPanel>
-</apex:pageblockSectionItem>
-<apex:pageBlockSectionItem rendered="{!sectionItem.isDummy}"/>
-</apex:repeat>
-</apex:pageBlockSection>
-</apex:repeat>
+ function afterShowPDFJs() {
+ Trans(function () {
+ if (!HasError()) {
+ window.location.href =
+ '/apex/InsReportPDFOuter?id=' +
+ document.getElementById('IrId').value;
+ }
+ });
+ }
-<script type="text/javascript">
- // 鐥呴櫌銇乏鍋淬�屽埛鏂般�嶃儨銈裤兂杩藉姞
- var labels = document.getElementsByTagName("label");
- for (var i = 0; i < labels.length; i++) {
- var lbl = labels[i];
- if (lbl.innerText == "鍖婚櫌" || lbl.innerText == "鐥呴櫌") {
- var html = lbl.parentNode.innerHTML;
- html = "<input type='button' value='鍒锋柊' class='btn' onclick='blockme();getAssetFromHp();' /> " + html;
- lbl.parentNode.innerHTML = html;
- break;
- }
- }
-</script>
-<apex:pageBlockSection title="宸查�変繚鏈夎澶囧瓧娈靛巻鍙�" columns="1" id="CheckSection">
-<input type="hidden" id="ProductCnt" value="{!productCount}" />
+ function HasError() {
+ // if (IsAddmessage) {
+ // return true;
+ // }
+ let e = document.getElementById('Page:Form:MessageP');
+ if (!e) {
+ return false;
+ }
-<apex:outputPanel >
-<table width="100%">
- <tr>
- <td> </td>
- <td width="100px">
- <span>鍏�</span>
- <select style="vertical-align:text-bottom" id="allCheckResult" size="1" onchange="changeAllCheckResult(this.value);">
- <option value=" ">--鏃�--</option>
- <!-- 榛樿鍏∣K -->
- <option value="OK" selected = "selected" >OK</option>
- <!-- 榛樿鍏∣K -->
- <option value="NG">NG</option>
- <!-- add by rentx 20210630 start -->
- <option value="鍖婚櫌鏀惧純">鍖婚櫌鏀惧純</option>
- <!-- add by rentx 20210630 end -->
- </select>
- </td>
- <td width="500px"> </td>
- </tr>
-</table>
-<!-- TODO minus scroll with -->
-<table id="AssetTableHeader" class="list" style="border-bottom-width: 0px; font-size:13px;" border="0" cellspacing="0" cellpadding="0">
- <tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);background: #f2f3f3;">
- <!-- add by rentx 20210809 -->
- <th class="headerCell" style="width:14px"> <apex:inputCheckbox id="checkAll1" onclick="checkAll(this)" /> </th>
- <!-- <th class="headerCell" style="width:14px" /> -->
- <!-- add by rentx 202120809 -->
- <th class="headerCell" style="width:24px"/>
- <th class="headerCell" style="width:60px">{!$ObjectType.Asset.fields.Asset_situation__c.label}</th>
- <th class="headerCell">{!$ObjectType.Asset.fields.Name.label}</th>
- <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.SerialNumber__c.Label}</th>
- <!-- TODO 闋呯洰銇綔鎴� -->
- <th class="headerCell" style="width:80px">涓婃鐐规鏃�</th>
- <th class="headerCell" style="width:100px">涓婃淇悊瀹屾瘯鏃�</th>
- <th class="headerCell" style="width:80px">
- {!$ObjectType.Inspection_Item__c.Fields.ItemStatus__c.Label}
- </th>
- <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Fault_Classification1__c.Label}</th>
- <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Fault_Classification2__c.Label}</th>
- <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Fault_Classification3__c.Label}</th>
- <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Diagnosis__c.Label}</th>
- <!-- add by rentx 20210630 -->
- <th class="headerCell" style="width:85px">{!$ObjectType.Inspection_Item__c.Fields.Abandonment_Reasons__c.Label}</th>
- <!-- add by rentx 20210630 -->
- <th class="headerCell" style="width:35px">{!$ObjectType.Asset.Fields.Create_repair__c.Label}</th>
- <!-- <td class="headerScroll"></td> -->
- </tr>
-</table>
+ let divs = j$(e).find('div.message');
+ for (let i = 0; i < divs.length; i++) {
+ for (let j = 0; j < divs[i].classList.length; j++) {
+ for (let clsi in divs[i].classList) {
+ let cls = divs[i].classList[clsi];
+ if (
+ typeof cls == 'string' &&
+ cls.indexOf('error') > -1
+ ) {
+ return true;
+ }
+ }
+ }
+ }
-<div style="height:320px; width:100%; overflow:auto;">
- <table style="border-collapse:collapse; width:100%;" id="AssetTable">
- <apex:variable value="{!1}" var="cnt" />
- <apex:repeat value="{!checkedInfoList}" var="cInfo" id="CheckedInfoList" >
- <tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);">
- <td style="width:14px">
- <apex:inputCheckbox value="{!cInfo.rec_checkBox_c}" id="AssetRowCheckbox1" rendered="{!Not(cInfo.IsManual)}"/>
- <apex:outputText value="{!cInfo.IsManual}" id="IsManual" style="display:none;" />
- <input type="hidden" value="{!cInfo.rec.Id}" id="CheckAssetId"/>
- </td>
- <td style="font-weight:bold; text-align:right; width:24px;">{!cnt}</td>
- <td class="dataCell" style="width:60px">
- <apex:outputField value="{!cInfo.rec.Asset_situation__c}"/>
- </td>
- <td class="dataCell">
- <!-- HWAG-BDCA9J 娣诲姞浜� onclick blurProduct 鍐呭 start-->
- <apex:outputField value="{!cInfo.rec.Name}" rendered="{!Not(cInfo.IsManual)}"/>
- <apex:inputField value="{!cInfo.ah.Product_Manual__c}" id="Assert" style="width:90%;" rendered="{!cInfo.IsManual}"
- onclick="if(!blurProduct(this))return false;"/>
- <!-- HWAG-BDCA9J 娣诲姞浜� onclick blurProduct 鍐呭 end-->
- </td>
- <td class="dataCell" style="width:100px">
- <apex:outputField value="{!cInfo.ah.SerialNumber__c}" rendered="{!Not(cInfo.IsManual)}"/>
- <apex:inputField value="{!cInfo.ah.SerialNo_Manual__c}" id="SerialNo" style="width:90%;" rendered="{!cInfo.IsManual}" />
- </td>
- <td class="dataCell" style="width:80px">
- <apex:outputField value="{!cInfo.rec.Final_Examination_Date__c}" rendered="{!Not(cInfo.IsManual)}"/>
- </td>
- <td class="dataCell" style="width:100px">
- <apex:outputField value="{!cInfo.rec.After_repair_last_internal_check_day__c}" rendered="{!Not(cInfo.IsManual)}"/>
- </td>
- <td class="dataCell" style="width:80px">
- <apex:inputField value="{!cInfo.ah.ItemStatus__c}" id="AssetRowCheckboxIsNormal" style="width:98%"/>
- </td>
- <td class="dataCell" style="width:100px">
- <apex:inputField value="{!cInfo.ah.Fault_Classification1__c}" />
- </td>
- <td class="dataCell" style="width:100px">
- <apex:inputField value="{!cInfo.ah.Fault_Classification2__c}" id="cat2" />
- </td>
- <td class="dataCell" style="width:100px">
- <apex:inputField value="{!cInfo.ah.Fault_Classification3__c}" id="cat3" />
- </td>
- <td class="dataCell" style="width:100px">
- <apex:inputField value="{!cInfo.ah.Diagnosis__c}" style="width:93%"/>
- </td>
- <!-- add by rentx 20210630 -->
- <td class="dataCell" style="width:85px">
- <apex:inputField value="{!cInfo.ah.Abandonment_Reasons__c}" style="width:93%" />
- </td>
- <!-- add by rentx 20210630 -->
- <td class="dataCell" style="width:35px">
- <apex:outputPanel layout="none" rendered="{!Not(cInfo.IsManual)}">
- <a href="#" onclick="saveByRepairJs('{!cInfo.rec.Id}', '{!JSENCODE(cInfo.rec.Name)}', '{!cInfo.rec.Hospital__r.Id}', '{!JSENCODE(cInfo.rec.Hospital__r.Name)}', '{!cInfo.rec.Department_Class__r.Id}', '{!JSENCODE(cInfo.rec.Department_Class__r.Name)}', '{!cInfo.rec.Account.Id}', '{!JSENCODE(cInfo.rec.Account.Name)}', '鍙慨鐞�');">鈻�</a>
+ return false;
+ }
+
+ function Decrypt(data) {
+ j$("[field-api='phone__c']").val(data.phone);
+ j$("[field-api='Responsible_Person__c']").val(
+ data.responsiblePerson
+ );
+ }
+
+ function Trans(callback) {
+ let payload = {
+ txId: txid,
+ sfRecordId: document.getElementById('IrId').value,
+ isSuccess: txid && !HasError() ? 1 : 0
+ };
+ AWSService.post(
+ staticResource.transactionUrl,
+ JSON.stringify(payload),
+ function (result) {
+ Decrypt(aws_data);
+ if (callback) callback();
+ unblockUI();
+ },
+ staticResource.token
+ );
+ }
+
+ function Query() {
+ let ele = document.getElementById(
+ 'Page:Form:Block:AWS_Data_Id__c'
+ );
+ if (ele && ele.value) {
+ blockme();
+ AWSService.query(
+ staticResource.queryUrl,
+ ele.value,
+ function (data) {
+ if (data && data.object) {
+ Decrypt(data.object);
+ }
+ unblockUI();
+ },
+ staticResource.token
+ );
+ }
+ }
+
+ j$(function () {
+ Query();
+ });
+ </script>
+ <title>{!ir.Name}</title>
+ </head>
+ <body>
+ <!-- HWAG-B4Q3G5 20180918Start -->
+ <apex:form
+ id="Form"
+ style="margin: 0 5px"
+ onkeydown="if(event.keyCode==13){return false;}"
+ >
+ <!-- HWAG-B4Q3G5 20180918End -->
+ <script type="text/javascript">
+ // 淇濆瓨寰屻�佹柊瑕忋伄鍫卞憡鏇窱D銈掑彇寰�
+ tmpinsid = '{!ir.Id}';
+ tmpinsn = '{!JSENCODE(ir.Name)}';
+ //var IsAddmessage = {IsAddmessage};
+ var isPDF = {!isPDF};
+ </script>
+ <apex:actionFunction
+ name="searchfunc"
+ action="{!searchBtn}"
+ rerender="Form,Block,UnCheckSection"
+ onComplete="unblockUI();"
+ ></apex:actionFunction>
+
+ <apex:actionFunction
+ name="exchangeAssetfunc"
+ action="{!exchangeAsset}"
+ rerender="Form"
+ onComplete="unblockUI();"
+ ></apex:actionFunction>
+
+ <apex:actionFunction
+ name="sortTablefunc"
+ action="{!sortTable}"
+ rerender="Form"
+ onComplete="unblockUI();"
+ >
+ <apex:param
+ name="firstParam"
+ assignTo="{!sortKey}"
+ value=""
+ />
+ </apex:actionFunction>
+
+ <apex:actionFunction
+ name="getAssetFromHp"
+ action="{!getAssetFromHp}"
+ rerender="Form"
+ onComplete="unblockUI();"
+ />
+
+ <apex:actionFunction
+ name="saveByRepair"
+ action="{!saveBtn}"
+ rerender="Form"
+ onComplete="unblockUI();openRepair();"
+ />
+
+ <apex:actionFunction
+ name="saveBtn"
+ action="{!saveBtn}"
+ rerender="Form"
+ onComplete="afterSaveBtnJs();"
+ />
+ <apex:actionFunction
+ name="submit"
+ action="{!submit}"
+ rerender="Form"
+ onComplete="afterSubmitJs();"
+ />
+ <apex:actionFunction
+ name="showPDF"
+ action="{!showPDF}"
+ rerender="Form"
+ onComplete="afterShowPDFJs();"
+ />
+
+ <apex:outputPanel id="MessageP">
+ <apex:pageMessages />
</apex:outputPanel>
- </td>
- </tr>
-<apex:variable value="{!cnt + 1}" var="cnt" />
-</apex:repeat>
-</table>
-</div>
-</apex:outputPanel>
-</apex:pageBlockSection>
+ <div>
+ <apex:pageBlock
+ mode="maindetail"
+ Id="Block"
+ rendered="{!initFlag}"
+ >
+ <div style="position: relative; top: 0; width: 100%">
+ <table>
+ <tr>
+ <td>
+ <apex:outputLabel
+ value="{!$ObjectType.Inspection_Report__c.Label}:"
+ style="
+ font-size: 18px;
+ font-weight: bold;
+ padding-right: 5px;
+ "
+ />
+ </td>
+ <td>
+ 锛�<apex:inputCheckBox
+ value="{!ir.Name_Manual__c}"
+ id="Name_Manual"
+ onchange="toggleIrNameDisabled(this);return false;"
+ />
+ <apex:outputLabel
+ value="{!$ObjectType.Inspection_Report__c.fields.Name_Manual__c.Label}"
+ for="Name_Manual"
+ />锛�
+ <apex:inputField
+ value="{!ir.Name}"
+ id="Ir_Name"
+ html-disabled="disabled"
+ style="
+ border-width: 0px;
+ font-size: 18px;
+ font-weight: bold;
+ padding-right: 20px;
+ -webkit-text-fill-color: black;
+ "
+ />
+ </td>
+ <td
+ style="
+ text-align: center;
+ padding-right: 100px;
+ "
+ >
+ <input
+ class="btn"
+ type="Button"
+ style="width: 80px"
+ value="淇濆瓨"
+ action=""
+ onclick="saveBtnJs();"
+ rerender="Form"
+ onComplete="unblockUI();"
+ />
+ </td>
+ <td
+ style="
+ text-align: center;
+ padding-right: 100px;
+ "
+ >
+ <input
+ class="btn"
+ type="Button"
+ value="鎻愪氦"
+ action=""
+ onclick="submitJs();"
+ style="width: 80px"
+ rerender="Form"
+ id="submitButton"
+ onComplete="unblockUI();"
+ />
+ </td>
+ <td
+ style="
+ text-align: center;
+ padding-right: 100px;
+ "
+ >
+ <apex:commandButton
+ style="width: 90px"
+ value="鍏抽棴绐楀彛"
+ onclick="location.href='/apex/OFSWindowClose';return false;"
+ id="closeButton"
+ />
+ </td>
+ <td style="text-align: center">
+ <input
+ class="btn"
+ type="Button"
+ style="width: 80px"
+ value="PDF"
+ action=""
+ onclick="showPDFJs();"
+ rerender="Form"
+ onComplete="unblockUI();"
+ />
+ </td>
+ </tr>
+ </table>
+ <apex:pageBlockSection
+ title="{!sectionList[0].title}"
+ columns="{!sectionList[0].column}"
+ showHeader="{!sectionList[0].showHeader}"
+ rendered="{!sectionList.size>0}"
+ >
+ <apex:repeat
+ value="{!sectionList[0].sectionItemList}"
+ var="sectionItem"
+ id="SectionItemList"
+ >
+ <apex:outputField
+ value="{!ir[sectionItem.api]}"
+ rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&NOT(sectionItem.isInput)}"
+ />
+ <apex:inputField
+ style="width:{!sectionItem.width};height:{!sectionItem.height};"
+ value="{!ir[sectionItem.api]}"
+ rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&§ionItem.isInput}"
+ required="{!sectionItem.isRequired}"
+ html-tabindex="{!sectionItem.index}"
+ />
+ <apex:pageblockSectionItem
+ rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&Not(isNull(sectionItem.customizeLable))}"
+ >
+ <apex:outputLabel
+ value="{!sectionItem.customizeLable}"
+ />
+ <apex:outputPanel layout="none">
+ <apex:repeat
+ value="{!sectionItem.apiList}"
+ var="api"
+ >
+ <!-- 淇濆瓨寰屻�佺梾闄€伅寮峰埗outputField -->
+ <apex:outputPanel
+ layout="none"
+ rendered="{!api == 'Hospital__c' && ir.Id != ''}"
+ >
+ <apex:outputField
+ value="{!ir[api]}"
+ />
+ </apex:outputPanel>
+ <apex:outputPanel
+ layout="none"
+ rendered="{!NOT(api == 'Hospital__c' && ir.Id != '')}"
+ >
+ <apex:outputLabel
+ style="
+ font-weight: bold;
+ padding-right: 5px;
+ "
+ value="{!sectionItem.apiLabelMap[api]}"
+ />
+ <apex:inputField
+ value="{!ir[api]}"
+ style="{!sectionItem.apiStyleMap[api]}"
+ rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}"
+ required="{!sectionItem.apiRequireMap[api]}"
+ html-tabindex="{!sectionItem.index}"
+ />
+ <apex:outputPanel
+ style="display:inline-block;{!sectionItem.apiStyleMap[api]}"
+ rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}"
+ >
+ <apex:outputField
+ value="{!ir[api]}"
+ />
+ </apex:outputPanel>
+ </apex:outputPanel>
+ </apex:repeat>
+ </apex:outputPanel>
+ </apex:pageblockSectionItem>
+ <apex:pageblockSectionItem
+ rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&(isNull(sectionItem.customizeLable))}"
+ >
+ <apex:outputPanel layout="none">
+ <apex:repeat
+ value="{!sectionItem.apiList}"
+ var="api"
+ >
+ <apex:outputLabel
+ style="
+ font-weight: bold;
+ padding-right: 5px;
+ "
+ value="{!sectionItem.apiLabelMap[api]}"
+ />
+ <apex:inputField
+ value="{!ir[api]}"
+ style="{!sectionItem.apiStyleMap[api]}"
+ rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}"
+ required="{!sectionItem.apiRequireMap[api]}"
+ html-tabindex="{!sectionItem.index}"
+ />
+ <apex:outputPanel
+ style="display:inline-block;{!sectionItem.apiStyleMap[api]}"
+ rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}"
+ >
+ <apex:outputField
+ value="{!ir[api]}"
+ />
+ </apex:outputPanel>
+ </apex:repeat>
+ </apex:outputPanel>
+ </apex:pageblockSectionItem>
+ <apex:pageBlockSectionItem
+ rendered="{!sectionItem.isDummy}"
+ />
+ </apex:repeat>
+ </apex:pageBlockSection>
+ </div>
+ <div
+ style="
+ position: relative;
+ top: 0;
+ height: 700px;
+ overflow: hidden;
+ overflow-y: auto;
+ -webkit-overflow-scrolling: touch;
+ "
+ >
+ <input type="hidden" value="{!ir.Id}" id="IrId" />
+ <!-- zhj 鏂版柟妗堟敼閫� 2022-12-05 start-->
+ <!-- <apex:inputHidden value="{!ir.Responsible_Person_Encrypted__c}" id="Responsible_Person_Encrypted__c"/>
+ <apex:inputHidden value="{!ir.phone_Encrypted__c}" id="phone_Encrypted__c"/> -->
+ <!-- zhj 鏂版柟妗堟敼閫� 2022-12-05 end-->
+ <apex:inputHidden
+ value="{!ir.AWS_Data_Id__c}"
+ id="AWS_Data_Id__c"
+ />
-<apex:outputPanel id="ButtonPanel">
-<table style="width:100%;">
- <tr>
- <td>
- <apex:commandButton value="琛岃拷鍔�" action="{!addNewRows}" disabled="{!Not($ObjectType.Inspection_Item__c.createable)}"
- style="margin-left:10px;float:left;" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" />
- <apex:commandButton value="鍒锋柊閫変腑鐨勪繚鏈夎澶�" onclick="exchangeAssetJs();return false;" rerender="dummy"/>
- <!-- <apex:commandButton value="鍒锋柊閫変腑鐨勪繚鏈夎澶�" action="{!exchangeAsset}" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" /> -->
- <!-- <apex:commandButton value="鍒锋柊鍖婚櫌涓嬬殑鍏ㄩ儴淇濇湁璁惧" action="{!getAssetFromHp}" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" /> -->
- </td>
- </tr>
-</table>
-</apex:outputPanel>
-<table>
- <tr>
- <td><div id="ErrorName" style="color: red;font-weight: bold;">{!alertMessage}</div>
- </td>
- </tr>
-</table>
-<!-- HWAG-B4Q3G5 20180918Start -->
-<apex:pageBlockSection title="鏈�変繚鏈夎澶囧瓧娈靛巻鍙�" columns="1" id="UnCheckSection" onkeydown="if(event.keyCode==13){searchJs(); return false;}">
-<!-- HWAG-B4Q3G5 20180918End -->
-<input type="hidden" id="ProductCnt2" value="{!productCount2}" />
-<apex:outputPanel >
-<div align="center">
- <apex:outputPanel id="countorder">绗瑊!countorder}椤�</apex:outputPanel>
- <apex:commandButton value="涓婁竴椤�" action="{!UpPage}" onclick="blockme();" disabled="{!IF(countorder=1,true,false)}" oncomplete="unblockUI();" reRender="Form"/>
- <apex:commandButton value="涓嬩竴椤�" action="{!DownPage}" onclick="blockme();" disabled="{!IF(countorder >=nowAssetcount ,true,false)}" oncomplete="unblockUI();" rerender="Form"/>
- <apex:outputPanel id="NowOrdercount">鍏眥!nowAssetcount}椤�</apex:outputPanel>
-</div>
+ <apex:repeat
+ value="{!sectionList}"
+ var="section"
+ id="SectionList"
+ >
+ <apex:pageBlockSection
+ title="{!section.title}"
+ columns="{!section.column}"
+ showHeader="{!section.showHeader}"
+ rendered="{!!section.isTop}"
+ >
+ <apex:repeat
+ value="{!section.sectionItemList}"
+ var="sectionItem"
+ id="SectionItemList"
+ >
+ <apex:outputField
+ value="{!ir[sectionItem.api]}"
+ rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&NOT(sectionItem.isInput)}"
+ />
+ <apex:inputField
+ html-field-api="{!sectionItem.api}"
+ style="width:{!sectionItem.width};height:{!sectionItem.height};margin-left:17px;"
+ value="{!ir[sectionItem.api]}"
+ rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&§ionItem.isInput}"
+ required="{!sectionItem.isRequired}"
+ html-tabindex="{!sectionItem.index}"
+ />
+ <apex:pageblockSectionItem
+ rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&Not(isNull(sectionItem.customizeLable))}"
+ >
+ <apex:outputLabel
+ value="{!sectionItem.customizeLable}"
+ />
+ <apex:outputPanel layout="none">
+ <apex:repeat
+ value="{!sectionItem.apiList}"
+ var="api"
+ >
+ <!-- 淇濆瓨寰屻�佺梾闄€伅寮峰埗outputField -->
+ <apex:outputPanel
+ layout="none"
+ rendered="{!api == 'Hospital__c' && ir.Id != ''}"
+ >
+ <apex:outputField
+ value="{!ir[api]}"
+ />
+ </apex:outputPanel>
+ <apex:outputPanel
+ layout="none"
+ rendered="{!NOT(api == 'Hospital__c' && ir.Id != '')}"
+ >
+ <apex:outputLabel
+ style="
+ font-weight: bold;
+ padding-right: 5px;
+ "
+ value="{!sectionItem.apiLabelMap[api]}"
+ />
+ <apex:inputField
+ html-field-api="{!api}"
+ value="{!ir[api]}"
+ style="{!sectionItem.apiStyleMap[api]}"
+ rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}"
+ required="{!sectionItem.apiRequireMap[api]}"
+ html-tabindex="{!sectionItem.index}"
+ />
+ <apex:outputPanel
+ style="display:inline-block;{!sectionItem.apiStyleMap[api]}"
+ rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}"
+ >
+ <apex:outputField
+ value="{!ir[api]}"
+ />
+ </apex:outputPanel>
+ </apex:outputPanel>
+ </apex:repeat>
+ </apex:outputPanel>
+ </apex:pageblockSectionItem>
+ <apex:pageblockSectionItem
+ rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&(isNull(sectionItem.customizeLable))}"
+ >
+ <apex:outputPanel layout="none">
+ <apex:repeat
+ value="{!sectionItem.apiList}"
+ var="api"
+ >
+ <apex:outputLabel
+ style="
+ font-weight: bold;
+ padding-right: 5px;
+ "
+ value="{!sectionItem.apiLabelMap[api]}"
+ />
+ <apex:inputField
+ html-field-api="api"
+ value="{!ir[api]}"
+ style="{!sectionItem.apiStyleMap[api]}"
+ rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}"
+ required="{!sectionItem.apiRequireMap[api]}"
+ html-tabindex="{!sectionItem.index}"
+ />
+ <apex:outputPanel
+ style="display:inline-block;{!sectionItem.apiStyleMap[api]}"
+ rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}"
+ >
+ <apex:outputField
+ value="{!ir[api]}"
+ />
+ </apex:outputPanel>
+ </apex:repeat>
+ </apex:outputPanel>
+ </apex:pageblockSectionItem>
+ <apex:pageBlockSectionItem
+ rendered="{!sectionItem.isDummy}"
+ />
+ </apex:repeat>
+ </apex:pageBlockSection>
+ </apex:repeat>
-<table>
- <tr>
- <td style="width:85px" align="right">閫夋嫨鏉′欢</td>
- <td style="width:85px" align="right"><apex:selectList value="{!text1}" id="text1" size="1" style="width:80px"><apex:selectOptions value="{!textOpts}"/></apex:selectList></td>
- <td style="width:85px" align="center"><apex:selectList value="{!cond1}" id="cond1" size="1" style="width:80px"><apex:selectOptions value="{!equalOpts}"/></apex:selectList></td>
- <td style="width:95px" align="left"><apex:inputText value="{!val1}" id="val1" style="width:100px"/></td>
- <td align="left">
-
- <apex:commandButton value="妫�绱�" onclick="searchJs();return false;" style="width:130px" rerender="dummy"/>
-
- <apex:commandButton value="娓呴櫎鏉′欢" onclick="clearAndSearch();" style="width:130px" rerender="dummy"/>
-
- <span style="vertical-align: text-bottom;">浣跨敤涓�<apex:inputCheckBox value="{!activeOn}" /></span>
- </td>
- </tr>
-</table>
-<table style="border-collapse:collapse;" id="AssetTable2">
- <tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);background: #f2f3f3;">
- <!-- add by rentx 20210809 start 鍏ㄩ�夊姛鑳� -->
- <!-- <th class="headerCell" style="width:25px"></th> -->
- <th class="headerCell" style="padding: 2px 5px; width:25px"><apex:inputCheckbox id="checkAll1" onclick="checkAll2(this)" /> </th>
- <!-- add by rentx 20210809 end 鍏ㄩ�夊姛鑳� -->
- <th class="headerCell" style="width:70px">
- <a href="#" onclick="sortTableJs('0');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Asset_situation__c.label}</a>{!sortOrder[0]}
- </th>
- <th class="headerCell">
- <a href="#" onclick="sortTableJs('1');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Name.label}</a>{!sortOrder[1]}
- </th>
- <th class="headerCell" style="width:70px">
- <a href="#" onclick="sortTableJs('2');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.SerialNumber.label}</a>{!sortOrder[2]}
- </th>
- <th class="headerCell" style="width:70px">
- <a href="#" onclick="sortTableJs('3');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.CurrentContract__c.label}</a>{!sortOrder[3]}
- </th>
- <th class="headerCell" style="width:70px">
- <a href="#" onclick="sortTableJs('4');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Department_Name__c.label}</a>{!sortOrder[4]}
- </th>
- <th class="headerCell" style="width:70px">
- <a href="#" onclick="sortTableJs('5');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Status.label}</a>{!sortOrder[5]}
- </th>
- <th class="headerCell" style="width:90px">
- <a href="#" onclick="sortTableJs('6');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Installation_Site__c.label}</a>{!sortOrder[6]}
- </th>
- <th class="headerCell" style="width:90px">
- <a href="#" onclick="sortTableJs('7');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Room_Number__c.label}</a>{!sortOrder[7]}
- </th>
- <th class="headerCell" style="width:90px">
- <a href="#" onclick="sortTableJs('8');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.InstallDate.label}</a>{!sortOrder[8]}
- </th>
- <th class="headerCell" style="width:90px">
- <a href="#" onclick="sortTableJs('9');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Asset_Owner__c.label}</a>{!sortOrder[9]}
- </th>
- <th class="headerCell" style="width:90px">
- <a href="#" onclick="sortTableJs('10');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Accumulation_Repair_Amount__c.label}</a>{!sortOrder[10]}
- </th>
- </tr>
- <apex:variable value="{!1}" var="cnt" />
- <apex:variable value="{!0}" var="cntOut" />
- <apex:repeat value="{!IF(ThousandFLG>0,unCheckedInfoListForThousend,1)}" var="Thoinfo" id="unCheckedInfoListForThousend">
- <apex:repeat value="{!IF(ThousandFLG>0,Thoinfo,unCheckedInfoList)}" var="ucInfo" id="UnCheckedInfoList" >
+ <script type="text/javascript">
+ // 鐥呴櫌銇乏鍋淬�屽埛鏂般�嶃儨銈裤兂杩藉姞
+ var labels =
+ document.getElementsByTagName('label');
+ for (var i = 0; i < labels.length; i++) {
+ var lbl = labels[i];
+ if (
+ lbl.innerText == '鍖婚櫌' ||
+ lbl.innerText == '鐥呴櫌'
+ ) {
+ var html = lbl.parentNode.innerHTML;
+ html =
+ "<input type='button' value='鍒锋柊' class='btn' onclick='blockme();getAssetFromHp();' /> " +
+ html;
+ lbl.parentNode.innerHTML = html;
+ break;
+ }
+ }
+ </script>
+ <apex:pageBlockSection
+ title="宸查�変繚鏈夎澶囧瓧娈靛巻鍙�"
+ columns="1"
+ id="CheckSection"
+ >
+ <input
+ type="hidden"
+ id="ProductCnt"
+ value="{!productCount}"
+ />
- <tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);">
- <td style="padding: 2px 5px; width:25px">
- <apex:inputCheckbox value="{!ucInfo.rec_checkBox_c}" id="AssetRowCheckbox2"/>
- <input type="hidden" value="{!ucInfo.rec.Id}" id="UncheckAssetId"/>
- </td>
- <td style="padding: 2px 5px; width:70px">
- <apex:outputField value="{!ucInfo.rec.Asset_situation__c}"/>
- </td>
- <td style="padding: 2px 5px;">
- <a href="#" onclick="window.open('/{!ucInfo.rec.Id}', '_blank');">{!ucInfo.rec.Name}</a>
- <!-- <apex:outputField value="{!ucInfo.rec.name}" id="assetName"/> -->
- </td>
- <td style="padding: 2px 5px; width:70px">
- <apex:outputField value="{!ucInfo.rec.SerialNumber}"/>
- </td>
- <td style="padding: 2px 5px; width:70px">
- <!-- <apex:outputField value="{!ucInfo.rec.CurrentContract__c}"/> -->
- <a href="#" onclick="window.open('/{!ucInfo.rec.CurrentContract__c}', '_blank');">{!ucInfo.rec.CurrentContract__r.Management_Code__c}</a>
- </td>
- <td style="padding: 2px 5px; width:70px">
- <apex:outputField value="{!ucInfo.rec.Department_Name__c}"/>
- </td>
- <td style="padding: 2px 5px; width:70px">
- <apex:outputField value="{!ucInfo.rec.Status}"/>
- </td>
- <td style="padding: 2px 5px; width:70px">
- <apex:outputField value="{!ucInfo.rec.Installation_Site__c}"/>
- </td>
- <td style="padding: 2px 5px; width:70px">
- <apex:outputField value="{!ucInfo.rec.Room_Number__c}"/>
- </td>
- <td style="padding: 2px 5px; width:90px;text-align:center">
- <apex:outputField value="{!ucInfo.rec.InstallDate}"/>
- </td>
- <td style="padding: 2px 5px; width:90px">
- <apex:outputField value="{!ucInfo.rec.Asset_Owner__c}"/>
- </td>
- <td style="padding: 2px 5px; width:90px;text-align:center">
- <apex:outputField value="{!ucInfo.rec.Accumulation_Repair_Amount__c}"/>
- </td>
- </tr>
- <apex:variable value="{!cnt + 1}" var="cnt" />
-</apex:repeat>
-<apex:variable value="{!cntOut + 1}" var="cntOut" />
-</apex:repeat>
-</table>
-</apex:outputPanel>
-</apex:pageBlockSection>
-<!-- fxk 2021/8/4 鏂板姞 Start-->
-<apex:pageBlockSection title="鎵撳嵃鏃舵礂娑堜俊鎭�" columns="1" id="UnCheckSection1" >
-<apex:outputPanel >
-<table class="edittable" border="0" style="border-collapse: collapse; width:600px; table-layout:fixed;">
- <tr>
- <td>{!$ObjectType.Inspection_Report__c.fields.CleaningFluid__c.Label}:</td>
- <td><apex:inputField value="{!ir.CleaningFluid__c}" style="width: 90%"/></td>
- <!-- 鏂瑰紡 add by rentx 20210927 start-->
- <td>{!$ObjectType.Inspection_Report__c.fields.Mode__c.Label}:</td>
- <td><apex:inputField value="{!ir.Mode__c}" style="width: 90%"/></td>
- <!-- 鏂瑰紡 add by rentx 20210927 end -->
- <td>{!$ObjectType.Inspection_Report__c.fields.SterilizationMethod__c.Label}:</td>
- <td><apex:inputField value="{!ir.SterilizationMethod__c}" style="width: 90%"/></td>
- <td>{!$ObjectType.Inspection_Report__c.fields.Remarks__c.Label}:</td>
- <td><apex:inputText value="{!ir.Remarks__c}" style="width: 90%"/></td>
- </tr>
- <tr>
- <td>{!$ObjectType.Inspection_Report__c.fields.Disinfectant__c.Label}:</td>
- <td><apex:inputField value="{!ir.Disinfectant__c}" style="width: 90%"/></td>
- <td>{!$ObjectType.Inspection_Report__c.fields.UsedMachine__c.Label}:</td>
- <td><apex:inputField value="{!ir.UsedMachine__c}" style="width: 90%"/></td>
- <td>{!$ObjectType.Inspection_Report__c.fields.Used_ET__c.Label}:</td>
- <td><apex:inputText value="{!ir.Used_ET__c}" style="width: 90%"/></td>
- </tr>
-</table>
-</apex:outputPanel>
-</apex:pageBlockSection>
-<!-- fxk 2021/8/4 鏂板姞 End-->
-</div>
-</apex:pageBlock></div>
-<script type="text/javascript">
- // 宸茬瀛椼伄鍫村悎銆佸鏇翠笉鑳姐伀銇欍倠
- var status = '{!ir.Status__c}';
- if (status == "鐢宠涓�" || status == "鎵瑰噯") {
- var inputs = document.getElementsByTagName("input");
- for (var i = 0; i < inputs.length; i++) {
- var obj = inputs[i];
-
- if (obj.id == "Page:Form:Block:closeButton") continue;
- //if (obj.id == "Page:Form:Block:submitButton") continue;
- //if (status == "宸茬瀛�" && obj.id == "Page:Form:Block:submitButton") continue;
-
- if (obj.type == "button") {
- setButtonDisable(obj, true);
- } else {
- obj.disabled = true;
- }
- }
- var selects = document.getElementsByTagName("select");
- console.log(selects);
- for (var i = 0; i < selects.length; i++) {
- selects[i].disabled = true;
- }
- } else {
- //var smb = j$(escapeVfId("Page:Form:Block:submitButton"))[0];
- //setButtonDisable(smb, true);
- }
- // HWAG-BDCA9J 鎻愰啋鏈繚瀛樺拰鍒锋柊鍓嶄笉鑳介�夋嫨浜у搧 start
- function blurProduct(obj) {
- var irID = "{!ir.Id}";
- var productCount2 = "{!productCount2}";
- if(!irID && productCount2 == 0){
- alert('璇峰厛杈撳叆鍖婚櫌骞剁偣鍑诲埛鏂版寜閽皟鍑轰繚鏈夎澶囷紝鍚﹀垯鐐规缁撴灉鏃犳硶涓庤澶囧叧鑱斻��');
- obj.blur();
- return false;
- }
- return true;
- }
- // HWAG-BDCA9J 鎻愰啋鏈繚瀛樺拰鍒锋柊鍓嶄笉鑳介�夋嫨浜у搧 end
-</script>
-</apex:form>
-</body>
-</html>
-</apex:page>
\ No newline at end of file
+ <apex:outputPanel>
+ <table width="100%">
+ <tr>
+ <td> </td>
+ <td width="120px">
+ <span>鍏�</span>
+ <select
+ style="
+ vertical-align: text-bottom;
+ "
+ id="allCheckResult"
+ size="1"
+ onchange="changeAllCheckResult(this.value);"
+ >
+ <option value=" ">
+ --鏃�--
+ </option>
+ <!-- 榛樿鍏∣K -->
+ <option
+ value="OK"
+ selected="selected"
+ >
+ OK
+ </option>
+ <!-- 榛樿鍏∣K -->
+ <option value="NG">
+ NG
+ </option>
+ <!-- add by rentx 20210630 start -->
+ <option value="鍖婚櫌鏀惧純">
+ 鍖婚櫌鏀惧純
+ </option>
+ <!-- add by rentx 20210630 end -->
+ </select>
+ </td>
+ <td width="500px"> </td>
+ </tr>
+ </table>
+ <!-- TODO minus scroll with -->
+ <table
+ id="AssetTableHeader"
+ class="list"
+ style="
+ border-bottom-width: 0px;
+ font-size: 13px;
+ "
+ border="0"
+ cellspacing="0"
+ cellpadding="0"
+ >
+ <tr
+ style="
+ border-bottom: 1px groove
+ rgba(254, 254, 254, 0.48);
+ background: #f2f3f3;
+ "
+ >
+ <!-- add by rentx 20210809 -->
+ <th
+ class="headerCell"
+ style="width: 14px"
+ >
+ <apex:inputCheckbox
+ id="checkAll1"
+ onclick="checkAll(this)"
+ />
+ </th>
+ <!-- <th class="headerCell" style="width:14px" /> -->
+ <!-- add by rentx 202120809 -->
+ <th
+ class="headerCell"
+ style="width: 24px"
+ />
+ <th
+ class="headerCell"
+ style="width: 60px"
+ >
+ {!$ObjectType.Asset.fields.Asset_situation__c.label}
+ </th>
+ <th class="headerCell">
+ {!$ObjectType.Asset.fields.Name.label}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 100px"
+ >
+ {!$ObjectType.Inspection_Item__c.Fields.SerialNumber__c.Label}
+ </th>
+ <!-- TODO 闋呯洰銇綔鎴� -->
+ <th
+ class="headerCell"
+ style="width: 80px"
+ >
+ 涓婃鐐规鏃�
+ </th>
+ <th
+ class="headerCell"
+ style="width: 100px"
+ >
+ 涓婃淇悊瀹屾瘯鏃�
+ </th>
+ <th
+ class="headerCell"
+ style="width: 80px"
+ >
+ {!$ObjectType.Inspection_Item__c.Fields.ItemStatus__c.Label}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 100px"
+ >
+ {!$ObjectType.Inspection_Item__c.Fields.Fault_Classification1__c.Label}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 100px"
+ >
+ {!$ObjectType.Inspection_Item__c.Fields.Fault_Classification2__c.Label}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 100px"
+ >
+ {!$ObjectType.Inspection_Item__c.Fields.Fault_Classification3__c.Label}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 100px"
+ >
+ {!$ObjectType.Inspection_Item__c.Fields.Diagnosis__c.Label}
+ </th>
+ <!-- add by rentx 20210630 -->
+ <th
+ class="headerCell"
+ style="width: 85px"
+ >
+ {!$ObjectType.Inspection_Item__c.Fields.Abandonment_Reasons__c.Label}
+ </th>
+ <!-- add by rentx 20210630 -->
+ <th
+ class="headerCell"
+ style="width: 35px"
+ >
+ {!$ObjectType.Asset.Fields.Create_repair__c.Label}
+ </th>
+ <!-- <td class="headerScroll"></td> -->
+ </tr>
+ </table>
+
+ <div
+ style="
+ height: 400px;
+ width: 100%;
+ overflow: auto;
+ "
+ >
+ <table
+ style="
+ border-collapse: collapse;
+ width: 100%;
+ "
+ id="AssetTable"
+ >
+ <apex:variable
+ value="{!1}"
+ var="cnt"
+ />
+ <apex:repeat
+ value="{!checkedInfoList}"
+ var="cInfo"
+ id="CheckedInfoList"
+ >
+ <tr
+ style="
+ border-bottom: 1px
+ groove
+ rgba(
+ 254,
+ 254,
+ 254,
+ 0.48
+ );
+ "
+ >
+ <td style="width: 14px">
+ <apex:inputCheckbox
+ value="{!cInfo.rec_checkBox_c}"
+ id="AssetRowCheckbox1"
+ rendered="{!Not(cInfo.IsManual)}"
+ />
+ <apex:outputText
+ value="{!cInfo.IsManual}"
+ id="IsManual"
+ style="
+ display: none;
+ "
+ />
+ <input
+ type="hidden"
+ value="{!cInfo.rec.Id}"
+ id="CheckAssetId"
+ />
+ </td>
+ <td
+ style="
+ font-weight: bold;
+ text-align: right;
+ width: 24px;
+ "
+ >
+ {!cnt}
+ </td>
+ <td
+ class="dataCell"
+ style="width: 60px"
+ >
+ <apex:outputField
+ value="{!cInfo.rec.Asset_situation__c}"
+ />
+ </td>
+ <td class="dataCell">
+ <!-- HWAG-BDCA9J 娣诲姞浜� onclick blurProduct 鍐呭 start-->
+ <apex:outputField
+ value="{!cInfo.rec.Name}"
+ rendered="{!Not(cInfo.IsManual)}"
+ />
+ <apex:inputField
+ value="{!cInfo.ah.Product_Manual__c}"
+ id="Assert"
+ style="width: 100%"
+ rendered="{!cInfo.IsManual}"
+ onclick="if(!blurProduct(this))return false;"
+ />
+ <!-- HWAG-BDCA9J 娣诲姞浜� onclick blurProduct 鍐呭 end-->
+ </td>
+ <td
+ class="dataCell"
+ style="width: 100px"
+ >
+ <apex:outputField
+ value="{!cInfo.ah.SerialNumber__c}"
+ rendered="{!Not(cInfo.IsManual)}"
+ />
+ <apex:inputField
+ value="{!cInfo.ah.SerialNo_Manual__c}"
+ id="SerialNo"
+ style="width: 90%"
+ rendered="{!cInfo.IsManual}"
+ />
+ </td>
+ <td
+ class="dataCell"
+ style="width: 80px"
+ >
+ <apex:outputField
+ value="{!cInfo.rec.Final_Examination_Date__c}"
+ rendered="{!Not(cInfo.IsManual)}"
+ />
+ </td>
+ <td
+ class="dataCell"
+ style="width: 100px"
+ >
+ <apex:outputField
+ value="{!cInfo.rec.After_repair_last_internal_check_day__c}"
+ rendered="{!Not(cInfo.IsManual)}"
+ />
+ </td>
+ <td
+ class="dataCell"
+ style="width: 80px"
+ >
+ <apex:inputField
+ value="{!cInfo.ah.ItemStatus__c}"
+ id="AssetRowCheckboxIsNormal"
+ style="width: 98%"
+ />
+ </td>
+ <td
+ class="dataCell"
+ style="width: 100px"
+ >
+ <apex:inputField
+ value="{!cInfo.ah.Fault_Classification1__c}"
+ />
+ </td>
+ <td
+ class="dataCell"
+ style="width: 100px"
+ >
+ <apex:inputField
+ value="{!cInfo.ah.Fault_Classification2__c}"
+ id="cat2"
+ />
+ </td>
+ <td
+ class="dataCell"
+ style="width: 100px"
+ >
+ <apex:inputField
+ value="{!cInfo.ah.Fault_Classification3__c}"
+ id="cat3"
+ />
+ </td>
+ <td
+ class="dataCell"
+ style="width: 100px"
+ >
+ <apex:inputField
+ value="{!cInfo.ah.Diagnosis__c}"
+ style="width: 93%"
+ />
+ </td>
+ <!-- add by rentx 20210630 -->
+ <td
+ class="dataCell"
+ style="width: 85px"
+ >
+ <apex:inputField
+ value="{!cInfo.ah.Abandonment_Reasons__c}"
+ style="width: 93%"
+ />
+ </td>
+ <!-- add by rentx 20210630 -->
+ <td
+ class="dataCell"
+ style="width: 35px"
+ >
+ <apex:outputPanel
+ layout="none"
+ rendered="{!Not(cInfo.IsManual)}"
+ >
+ <a
+ href="#"
+ onclick="saveByRepairJs('{!cInfo.rec.Id}', '{!JSENCODE(cInfo.rec.Name)}', '{!cInfo.rec.Hospital__r.Id}', '{!JSENCODE(cInfo.rec.Hospital__r.Name)}', '{!cInfo.rec.Department_Class__r.Id}', '{!JSENCODE(cInfo.rec.Department_Class__r.Name)}', '{!cInfo.rec.Account.Id}', '{!JSENCODE(cInfo.rec.Account.Name)}', '鍙慨鐞�');"
+ >鈻�</a
+ >
+ </apex:outputPanel>
+ </td>
+ </tr>
+ <apex:variable
+ value="{!cnt + 1}"
+ var="cnt"
+ />
+ </apex:repeat>
+ </table>
+ </div>
+ </apex:outputPanel>
+ </apex:pageBlockSection>
+
+ <apex:outputPanel id="ButtonPanel">
+ <table style="width: 100%">
+ <tr>
+ <td>
+ <apex:commandButton
+ value="琛岃拷鍔�"
+ action="{!addNewRows}"
+ disabled="{!Not($ObjectType.Inspection_Item__c.createable)}"
+ style="
+ margin-left: 10px;
+ float: left;
+ "
+ onclick="blockme();"
+ oncomplete="unblockUI();"
+ rerender="Form"
+ />
+ <apex:commandButton
+ value="鍒锋柊閫変腑鐨勪繚鏈夎澶�"
+ onclick="exchangeAssetJs();return false;"
+ rerender="dummy"
+ />
+ <!-- <apex:commandButton value="鍒锋柊閫変腑鐨勪繚鏈夎澶�" action="{!exchangeAsset}" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" /> -->
+ <!-- <apex:commandButton value="鍒锋柊鍖婚櫌涓嬬殑鍏ㄩ儴淇濇湁璁惧" action="{!getAssetFromHp}" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" /> -->
+ </td>
+ </tr>
+ </table>
+ </apex:outputPanel>
+ <table>
+ <tr>
+ <td>
+ <div
+ id="ErrorName"
+ style="
+ color: red;
+ font-weight: bold;
+ "
+ >
+ {!alertMessage}
+ </div>
+ </td>
+ </tr>
+ </table>
+ <!-- HWAG-B4Q3G5 20180918Start -->
+ <apex:pageBlockSection
+ title="鏈�変繚鏈夎澶囧瓧娈靛巻鍙�"
+ columns="1"
+ id="UnCheckSection"
+ onkeydown="if(event.keyCode==13){searchJs(); return false;}"
+ >
+ <!-- HWAG-B4Q3G5 20180918End -->
+ <input
+ type="hidden"
+ id="ProductCnt2"
+ value="{!productCount2}"
+ />
+ <apex:outputPanel>
+ <div align="center">
+ <apex:outputPanel id="countorder"
+ >绗瑊!countorder}椤�</apex:outputPanel
+ >
+ <apex:commandButton
+ value="涓婁竴椤�"
+ action="{!UpPage}"
+ onclick="blockme();"
+ disabled="{!IF(countorder=1,true,false)}"
+ oncomplete="unblockUI();"
+ reRender="Form"
+ />
+ <apex:commandButton
+ value="涓嬩竴椤�"
+ action="{!DownPage}"
+ onclick="blockme();"
+ disabled="{!IF(countorder >=nowAssetcount ,true,false)}"
+ oncomplete="unblockUI();"
+ rerender="Form"
+ />
+ <apex:outputPanel id="NowOrdercount"
+ >鍏眥!nowAssetcount}椤�</apex:outputPanel
+ >
+ </div>
+
+ <table>
+ <tr>
+ <td
+ style="width: 85px"
+ align="right"
+ >
+ 閫夋嫨鏉′欢
+ </td>
+ <td
+ style="width: 85px"
+ align="right"
+ >
+ <apex:selectList
+ value="{!text1}"
+ id="text1"
+ size="1"
+ style="width: 80px"
+ ><apex:selectOptions
+ value="{!textOpts}"
+ /></apex:selectList>
+ </td>
+ <td
+ style="width: 85px"
+ align="center"
+ >
+ <apex:selectList
+ value="{!cond1}"
+ id="cond1"
+ size="1"
+ style="width: 80px"
+ ><apex:selectOptions
+ value="{!equalOpts}"
+ /></apex:selectList>
+ </td>
+ <td
+ style="width: 95px"
+ align="left"
+ >
+ <apex:inputText
+ value="{!val1}"
+ id="val1"
+ style="width: 100px"
+ />
+ </td>
+ <td align="left">
+
+ <apex:commandButton
+ value="妫�绱�"
+ onclick="searchJs();return false;"
+ style="width: 130px"
+ rerender="dummy"
+ />
+
+ <apex:commandButton
+ value="娓呴櫎鏉′欢"
+ onclick="clearAndSearch();"
+ style="width: 130px"
+ rerender="dummy"
+ />
+
+ <span
+ style="
+ vertical-align: text-bottom;
+ "
+ >浣跨敤涓�<apex:inputCheckBox
+ value="{!activeOn}"
+ /></span>
+ </td>
+ </tr>
+ </table>
+ <table
+ style="border-collapse: collapse"
+ id="AssetTable2"
+ >
+ <tr
+ style="
+ border-bottom: 1px groove
+ rgba(254, 254, 254, 0.48);
+ background: #f2f3f3;
+ "
+ >
+ <!-- add by rentx 20210809 start 鍏ㄩ�夊姛鑳� -->
+ <!-- <th class="headerCell" style="width:25px"></th> -->
+ <th
+ class="headerCell"
+ style="
+ padding: 2px 5px;
+ width: 25px;
+ "
+ >
+ <apex:inputCheckbox
+ id="checkAll1"
+ onclick="checkAll2(this)"
+ />
+ </th>
+ <!-- add by rentx 20210809 end 鍏ㄩ�夊姛鑳� -->
+ <th
+ class="headerCell"
+ style="width: 70px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('0');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.Asset_situation__c.label}</a
+ >{!sortOrder[0]}
+ </th>
+ <th class="headerCell">
+ <a
+ href="#"
+ onclick="sortTableJs('1');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.Name.label}</a
+ >{!sortOrder[1]}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 70px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('2');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.SerialNumber.label}</a
+ >{!sortOrder[2]}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 70px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('3');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.CurrentContract__c.label}</a
+ >{!sortOrder[3]}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 70px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('4');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.Department_Name__c.label}</a
+ >{!sortOrder[4]}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 70px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('5');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.Status.label}</a
+ >{!sortOrder[5]}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 90px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('6');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.Installation_Site__c.label}</a
+ >{!sortOrder[6]}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 90px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('7');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.Room_Number__c.label}</a
+ >{!sortOrder[7]}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 90px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('8');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.InstallDate.label}</a
+ >{!sortOrder[8]}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 90px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('9');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.Asset_Owner__c.label}</a
+ >{!sortOrder[9]}
+ </th>
+ <th
+ class="headerCell"
+ style="width: 90px"
+ >
+ <a
+ href="#"
+ onclick="sortTableJs('10');return false;"
+ style="
+ text-decoration: underline;
+ "
+ >{!$ObjectType.Asset.fields.Accumulation_Repair_Amount__c.label}</a
+ >{!sortOrder[10]}
+ </th>
+ </tr>
+ <apex:variable value="{!1}" var="cnt" />
+ <apex:variable
+ value="{!0}"
+ var="cntOut"
+ />
+ <apex:repeat
+ value="{!IF(ThousandFLG>0,unCheckedInfoListForThousend,1)}"
+ var="Thoinfo"
+ id="unCheckedInfoListForThousend"
+ >
+ <apex:repeat
+ value="{!IF(ThousandFLG>0,Thoinfo,unCheckedInfoList)}"
+ var="ucInfo"
+ id="UnCheckedInfoList"
+ >
+ <tr
+ style="
+ border-bottom: 1px
+ groove
+ rgba(
+ 254,
+ 254,
+ 254,
+ 0.48
+ );
+ "
+ >
+ <td
+ style="
+ padding: 2px 5px;
+ width: 25px;
+ "
+ >
+ <apex:inputCheckbox
+ value="{!ucInfo.rec_checkBox_c}"
+ id="AssetRowCheckbox2"
+ />
+ <input
+ type="hidden"
+ value="{!ucInfo.rec.Id}"
+ id="UncheckAssetId"
+ />
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 70px;
+ "
+ >
+ <apex:outputField
+ value="{!ucInfo.rec.Asset_situation__c}"
+ />
+ </td>
+ <td
+ style="padding: 2px 5px"
+ >
+ <a
+ href="#"
+ onclick="window.open('/{!ucInfo.rec.Id}', '_blank');"
+ >{!ucInfo.rec.Name}</a
+ >
+ <!-- <apex:outputField value="{!ucInfo.rec.name}" id="assetName"/> -->
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 70px;
+ "
+ >
+ <apex:outputField
+ value="{!ucInfo.rec.SerialNumber}"
+ />
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 70px;
+ "
+ >
+ <!-- <apex:outputField value="{!ucInfo.rec.CurrentContract__c}"/> -->
+ <a
+ href="#"
+ onclick="window.open('/{!ucInfo.rec.CurrentContract__c}', '_blank');"
+ >{!ucInfo.rec.CurrentContract__r.Management_Code__c}</a
+ >
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 70px;
+ "
+ >
+ <apex:outputField
+ value="{!ucInfo.rec.Department_Name__c}"
+ />
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 70px;
+ "
+ >
+ <apex:outputField
+ value="{!ucInfo.rec.Status}"
+ />
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 70px;
+ "
+ >
+ <apex:outputField
+ value="{!ucInfo.rec.Installation_Site__c}"
+ />
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 70px;
+ "
+ >
+ <apex:outputField
+ value="{!ucInfo.rec.Room_Number__c}"
+ />
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 90px;
+ text-align: center;
+ "
+ >
+ <apex:outputField
+ value="{!ucInfo.rec.InstallDate}"
+ />
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 90px;
+ "
+ >
+ <apex:outputField
+ value="{!ucInfo.rec.Asset_Owner__c}"
+ />
+ </td>
+ <td
+ style="
+ padding: 2px 5px;
+ width: 90px;
+ text-align: center;
+ "
+ >
+ <apex:outputField
+ value="{!ucInfo.rec.Accumulation_Repair_Amount__c}"
+ />
+ </td>
+ </tr>
+ <apex:variable
+ value="{!cnt + 1}"
+ var="cnt"
+ />
+ </apex:repeat>
+ <apex:variable
+ value="{!cntOut + 1}"
+ var="cntOut"
+ />
+ </apex:repeat>
+ </table>
+ </apex:outputPanel>
+ </apex:pageBlockSection>
+ <!-- fxk 2021/8/4 鏂板姞 Start-->
+ <apex:pageBlockSection
+ title="鎵撳嵃鏃舵礂娑堜俊鎭�"
+ columns="1"
+ id="UnCheckSection1"
+ >
+ <apex:outputPanel>
+ <table
+ class="edittable"
+ border="0"
+ style="
+ border-collapse: collapse;
+ width: 600px;
+ table-layout: fixed;
+ "
+ >
+ <tr>
+ <td>
+ {!$ObjectType.Inspection_Report__c.fields.CleaningFluid__c.Label}:
+ </td>
+ <td>
+ <apex:inputField
+ value="{!ir.CleaningFluid__c}"
+ style="width: 90%"
+ />
+ </td>
+ <!-- 鏂瑰紡 add by rentx 20210927 start-->
+ <td>
+ {!$ObjectType.Inspection_Report__c.fields.Mode__c.Label}:
+ </td>
+ <td>
+ <apex:inputField
+ value="{!ir.Mode__c}"
+ style="width: 90%"
+ />
+ </td>
+ <!-- 鏂瑰紡 add by rentx 20210927 end -->
+ <td>
+ {!$ObjectType.Inspection_Report__c.fields.SterilizationMethod__c.Label}:
+ </td>
+ <td>
+ <apex:inputField
+ value="{!ir.SterilizationMethod__c}"
+ style="width: 90%"
+ />
+ </td>
+ <td>
+ {!$ObjectType.Inspection_Report__c.fields.Remarks__c.Label}:
+ </td>
+ <td>
+ <apex:inputText
+ value="{!ir.Remarks__c}"
+ style="width: 90%"
+ />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {!$ObjectType.Inspection_Report__c.fields.Disinfectant__c.Label}:
+ </td>
+ <td>
+ <apex:inputField
+ value="{!ir.Disinfectant__c}"
+ style="width: 90%"
+ />
+ </td>
+ <td>
+ {!$ObjectType.Inspection_Report__c.fields.UsedMachine__c.Label}:
+ </td>
+ <td>
+ <apex:inputField
+ value="{!ir.UsedMachine__c}"
+ style="width: 90%"
+ />
+ </td>
+ <td>
+ {!$ObjectType.Inspection_Report__c.fields.Used_ET__c.Label}:
+ </td>
+ <td>
+ <apex:inputText
+ value="{!ir.Used_ET__c}"
+ style="width: 90%"
+ />
+ </td>
+ </tr>
+ </table>
+ </apex:outputPanel>
+ </apex:pageBlockSection>
+ <!-- fxk 2021/8/4 鏂板姞 End-->
+ </div>
+ </apex:pageBlock>
+ </div>
+ <script type="text/javascript">
+ // 宸茬瀛椼伄鍫村悎銆佸鏇翠笉鑳姐伀銇欍倠
+ var status = '{!ir.Status__c}';
+ if (status == '鐢宠涓�' || status == '鎵瑰噯') {
+ var inputs = document.getElementsByTagName('input');
+ for (var i = 0; i < inputs.length; i++) {
+ var obj = inputs[i];
+
+ if (obj.id == 'Page:Form:Block:closeButton')
+ continue;
+ //if (obj.id == "Page:Form:Block:submitButton") continue;
+ //if (status == "宸茬瀛�" && obj.id == "Page:Form:Block:submitButton") continue;
+
+ if (obj.type == 'button') {
+ setButtonDisable(obj, true);
+ } else {
+ obj.disabled = true;
+ }
+ }
+ var selects = document.getElementsByTagName('select');
+ console.log(selects);
+ for (var i = 0; i < selects.length; i++) {
+ selects[i].disabled = true;
+ }
+ } else {
+ //var smb = j$(escapeVfId("Page:Form:Block:submitButton"))[0];
+ //setButtonDisable(smb, true);
+ }
+ // HWAG-BDCA9J 鎻愰啋鏈繚瀛樺拰鍒锋柊鍓嶄笉鑳介�夋嫨浜у搧 start
+ function blurProduct(obj) {
+ var irID = '{!ir.Id}';
+ var productCount2 = '{!productCount2}';
+ if (!irID && productCount2 == 0) {
+ alert(
+ '璇峰厛杈撳叆鍖婚櫌骞剁偣鍑诲埛鏂版寜閽皟鍑轰繚鏈夎澶囷紝鍚﹀垯鐐规缁撴灉鏃犳硶涓庤澶囧叧鑱斻��'
+ );
+ obj.blur();
+ return false;
+ }
+ return true;
+ }
+ // HWAG-BDCA9J 鎻愰啋鏈繚瀛樺拰鍒锋柊鍓嶄笉鑳介�夋嫨浜у搧 end
+ </script>
+ </apex:form>
+ </body>
+ </html>
+</apex:page>
diff --git a/force-app/main/default/pages/StraightBackAddress.page b/force-app/main/default/pages/StraightBackAddress.page
index 7c49578..ab1eba9 100644
--- a/force-app/main/default/pages/StraightBackAddress.page
+++ b/force-app/main/default/pages/StraightBackAddress.page
@@ -5,914 +5,948 @@
@last modified on : 03-30-2022
@last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
-->
-<apex:page controller="StraightBackAddressController" action="{!init}" showHeader="false" sidebar="true" id="allPage" title="鐩磋繑鏀惰揣鍦板潃">
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
- <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
+<apex:page
+ controller="StraightBackAddressController"
+ action="{!init}"
+ showHeader="false"
+ sidebar="true"
+ id="allPage"
+ title="鐩磋繑鏀惰揣鍦板潃"
+ lightningStylesheets="true"
+>
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}" />
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" />
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" />
+ <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}" />
+ <apex:includeScript
+ value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"
+ />
+ <apex:includeScript value="{!URLFOR($Resource.connection20)}" />
+ <apex:includeScript value="{!URLFOR($Resource.apex20)}" />
<script type="text/javascript">
- var checkedTrue;
- var tableDataStr = '';
- var staticResource = JSON.parse('{!staticResource}');
- var staticResourceContact = JSON.parse('{!staticResourceContact}');
- var staticResourceRepair = JSON.parse('{!staticResourceRepair}');
-
- var PIData = {};
- var contactDataIds = [];
- var ObjIdDecrypt = '';
- var closeField = '';
- var add_aws_result = '';
- var con_aws_result = '';
- var isAddCon = false;
- var contactInfoStr = '';
+ var checkedTrue;
+ var tableDataStr = '';
+ var staticResource = JSON.parse('{!staticResource}');
+ var staticResourceContact = JSON.parse('{!staticResourceContact}');
+ var staticResourceRepair = JSON.parse('{!staticResourceRepair}');
- var addressAwsData = {};
+ var PIData = {};
+ var contactDataIds = [];
+ var ObjIdDecrypt = '';
+ var closeField = '';
+ var add_aws_result = '';
+ var con_aws_result = '';
+ var isAddCon = false;
+ var contactInfoStr = '';
- var isBlocking = false;
+ var addressAwsData = {};
- var contactNamePlaintext = '';
- var telePhonePlaintext = '';
- var zipCodePlaintext = '';
- var detailedAddressPlaintext = '';
- function b(){
- if (!isBlocking) {
- blockme();
- isBlocking = true;
- }
- }
+ var isBlocking = false;
- function ub(){
- if (isBlocking) {
- unblockUI();
- isBlocking = false;
- }
- }
-
- //鏇挎崲vlookup
- var newSearchContactWindow = null;
- window.onload = function () {
- document.getElementById("tab01").style.height = screen.availHeight*0.07+'px';
- document.getElementById("tab02").style.height = screen.availHeight*0.53+'px';
- document.getElementById("tab03").style.height = screen.availHeight*0.25+'px';
- }
- //缂栬緫鎸夐挳
- function onEditorJs(ObjId){
- ObjIdDecrypt = ObjId;
- onEditor(ObjId);
+ var contactNamePlaintext = '';
+ var telePhonePlaintext = '';
+ var zipCodePlaintext = '';
+ var detailedAddressPlaintext = '';
+ function b(){
+ if (!isBlocking) {
+ blockme();
+ isBlocking = true;
+ }
}
- //澶嶅埗鎸夐挳
- function onCopyJs(ObjId){
- ObjIdDecrypt = ObjId;
- if(ObjId == ''){
- onCopy('绌�');//璁剧疆涓虹┖锛屼究浜庡悗绔仛鏁版嵁澶勭悊
- }else{
- onCopy(ObjId);
- }
- }
- //aws 纭
- function Trans(){
- let b = HasError();
- if(b){
- //杩樺師鑱旂郴浜虹數璇濆湴鍧�閭紪
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = contactNamePlaintext;
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = telePhonePlaintext;
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = zipCodePlaintext
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = detailedAddressPlaintext
- return
- }
- //{!IF(isSearchBtn,'searchBtnJs()',false)};
- let b1= false;
- let b2= false;
+ function ub(){
+ if (isBlocking) {
+ unblockUI();
+ isBlocking = false;
+ }
+ }
- let Foo = function(){
- // if (b1 && b2 && !b) {
- // window.location.reload();
- // }
- if (b1 && !b) {
- window.location.reload();
- }
- }
+ //鏇挎崲vlookup
+ var newSearchContactWindow = null;
+ window.onload = function () {
+ document.getElementById("tab01").style.height = screen.availHeight*0.07+'px';
+ document.getElementById("tab02").style.height = screen.availHeight*0.53+'px';
+ document.getElementById("tab03").style.height = screen.availHeight*0.25+'px';
+ }
+ //缂栬緫鎸夐挳
+ function onEditorJs(ObjId){
+ ObjIdDecrypt = ObjId;
+ onEditor(ObjId);
+ }
+ //澶嶅埗鎸夐挳
+ function onCopyJs(ObjId){
+ ObjIdDecrypt = ObjId;
+ if(ObjId == ''){
+ onCopy('绌�');//璁剧疆涓虹┖锛屼究浜庡悗绔仛鏁版嵁澶勭悊
+ }else{
+ onCopy(ObjId);
+ }
+ }
+ //aws 纭
+ function Trans(){
+ let b = HasError();
+ if(b){
+ //杩樺師鑱旂郴浜虹數璇濆湴鍧�閭紪
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = contactNamePlaintext;
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = telePhonePlaintext;
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = zipCodePlaintext
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = detailedAddressPlaintext
+ return
+ }
- AWSService.post(staticResource.transactionUrl, JSON.stringify({
- "txId":add_aws_result.txId,
- "isSuccess":b ? 0 : 1
- }), function(result){
- b1 = true;
- Foo();
- }, staticResource.token);
+ //{!IF(isSearchBtn,'searchBtnJs()',false)};
+ let b1= false;
+ let b2= false;
- //涓嶄細鍐嶆柊寤鸿仈绯讳汉鏃犻渶纭浜嬪姟
- // if(isAddCon){
- // AWSService.post(staticResourceContact.transactionUrl, JSON.stringify({
- // "txId":con_aws_result.txId,
- // "isSuccess":b ? 0 : 1
- // }), function(result){
- // b2 = true;
- // Foo();
- // }, staticResourceContact.token);
- // }else{
- // b2 = true;
- // Foo();
- // }
-
-
- }
+ let Foo = function(){
+ // if (b1 && b2 && !b) {
+ // window.location.reload();
+ // }
+ if (b1 && !b) {
+ window.location.reload();
+ }
+ }
- function HasError(){
- // if (IsAddmessage) {
- // return true;
- // }
- let e = document.getElementById("allPage:allForm:message");
- if (!e) {
- return false;
- }
+ AWSService.post(staticResource.transactionUrl, JSON.stringify({
+ "txId":add_aws_result.txId,
+ "isSuccess":b ? 0 : 1
+ }), function(result){
+ b1 = true;
+ Foo();
+ }, staticResource.token);
- let divs = j$(e).find("div.message");
- for (let i = 0; i < divs.length; i++) {
- for (let j = 0; j < divs[i].classList.length; j++) {
- for(let cls in divs[i].classList){
- if (cls.indexOf('error')>-1) {
- return true;
- }
- }
-
- }
-
- }
+ //涓嶄細鍐嶆柊寤鸿仈绯讳汉鏃犻渶纭浜嬪姟
+ // if(isAddCon){
+ // AWSService.post(staticResourceContact.transactionUrl, JSON.stringify({
+ // "txId":con_aws_result.txId,
+ // "isSuccess":b ? 0 : 1
+ // }), function(result){
+ // b2 = true;
+ // Foo();
+ // }, staticResourceContact.token);
+ // }else{
+ // b2 = true;
+ // Foo();
+ // }
- return false;
- }
- //瑙e瘑
- function decrypt(){
- if(PIData[ObjIdDecrypt] == null){
- // document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = '';
- //document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:contactIdValue').value = '000000000000000';
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = '';
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = '';
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = '';
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = '';
- }else{
- // document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = PIData[ObjIdDecrypt].lastName!=null?PIData[ObjIdDecrypt].lastName:'';
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = PIData[ObjIdDecrypt].lastName;
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = PIData[ObjIdDecrypt].telephone;
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = PIData[ObjIdDecrypt].zipCode;
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = PIData[ObjIdDecrypt].detailedAddress;
- }
- }
- function getPIPayload() {
- let leadPayloadList = [];
- var telePhone = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value;
- var zipCode = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value;
- var detailedAddress = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value;
- let leadPIData = new Object();
- leadPIData.telePhone = telePhone;
- leadPIData.zipCode = zipCode;
- leadPIData.detailedAddress = detailedAddress;
- leadPIData.sfRecordId = '';
- leadPayloadList.push(leadPIData);
- console.log(JSON.stringify(leadPayloadList));
- return JSON.stringify(leadPayloadList);
- }
- //WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 start
- //淇濆瓨鏂规硶
- function savaJs(){
- //b();
- //涓嶄細鏂板缓鑱旂郴浜猴紝鎵�浠ヨ繖閲屼笉闇�瑕佸皢isAddCon璁剧疆涓簍rue
- // if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value != ''){
- // isAddCon = true;
- // }
- document.getElementById("errorMsg").innerHTML = '';
-
- if(!document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value){
- document.getElementById("errorMsg").innerHTML = '<strong>銆愯仈绯讳汉銆戜笉鑳戒负绌猴紒</strong> ';
- return;
- }
- // else if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Contacts__c").value&&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
- // document.getElementById("errorMsg").innerHTML = '<strong>銆愯仈绯讳汉銆戝拰銆愯仈绯讳汉锛堟柊寤猴級銆戜笉鑳藉悓鏃舵湁鍊硷紒</strong> ';
- // return;
- // }
- b();
- console.log('{!insUpdData}')
- // if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
- // //new contact
- // ProcessPI({},GetEditObj('contact'),'contact',function(){
- // //new address
- // ProcessPI({},
- // GetEditObj('address'),'address',function(){
- // save();
- // });
- // });
- // }else{
- //new address
- ProcessPI({},GetEditObj('address'),'address',function(){
- save();
- });
- // }
- }
- //WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 end
+ }
- function ProcessPI(sobjJson, payloadForNewPI,type,callback) {
- var sr = ''
- // if(type == 'contact'){
- // sr = staticResourceContact
- // }
- if(type == 'address'){
- sr = staticResource
- }
- let url = sr.newUrl
- /*if (now_edit_id) {
- url = sr.updateUrl
- }*/
- AWSService.post(url, payloadForNewPI, function(result){
- // if(type == 'contact'){
- // con_aws_result = result
- // }
- if(type == 'address'){
- add_aws_result = result
- }
- SetEditObj(type);
- if(callback){
- callback();
- }
- }, sr.token);
- }
- function SetEditObj(type){
- let obj = GetAWSResultObj(type);
- if(obj){
- // if(type=='contact'){
- // document.getElementById("allPage:allForm:oppBlock2:Con_AWS_Data_Id__c").value = obj.dataId;
- // document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value = obj.lastName;
- // document.getElementById("allPage:allForm:oppBlock2:LastName_Encrypted__c").value = obj.lastNameEncrypt;
- // }
- if(type=='address'){
- document.getElementById("allPage:allForm:oppBlock2:Add_AWS_Data_Id__c").value = obj.dataId;
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = obj.contactName;
- //document.getElementById('allPage:allForm:oppBlock2:ContactName_Encrypted__c').value = obj.contactNameEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone__c").value = obj.telephone;
- //document.getElementById("allPage:allForm:oppBlock2:Telephone_Encrypted__c").value = obj.telephoneEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c").value = obj.zipCode;
- //document.getElementById("allPage:allForm:oppBlock2:ZipCode_Encrypted__c").value = obj.zipCodeEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c").value = obj.detailedAddress;
- //document.getElementById("allPage:allForm:oppBlock2:Detailed_Address_Encrypted__c").value = obj.detailedAddressEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
+ function HasError(){
+ // if (IsAddmessage) {
+ // return true;
+ // }
+ let e = document.getElementById("allPage:allForm:message");
+ if (!e) {
+ return false;
+ }
- }
- }
-
- }
- function GetAWSResultObj(type){
- // if(type == 'contact'){
- // if(con_aws_result && con_aws_result.object && con_aws_result.object.length > 0){
- // return con_aws_result.object[0];
- // }
- // }
- if(type == 'address'){
- if(add_aws_result && add_aws_result.object && add_aws_result.object.length > 0){
- return add_aws_result.object[0];
- }
- }
- return null;
- }
+ let divs = j$(e).find("div.message");
+ for (let i = 0; i < divs.length; i++) {
+ for (let j = 0; j < divs[i].classList.length; j++) {
+ for(let cls in divs[i].classList){
+ if (cls.indexOf('error')>-1) {
+ return true;
+ }
+ }
- function GetEditObj(type){
- // if(type=='contact'){
- // //new contact
- // return JSON.stringify([{
- // lastName : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value,
- // dataId : document.getElementById("allPage:allForm:oppBlock2:Con_AWS_Data_Id__c").value,
- // }]);
- // }
- contactNamePlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value;
- telePhonePlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone__c").value;
- zipCodePlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c").value
- detailedAddressPlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c").value;
- if(type == 'address'){
- //new address
- return JSON.stringify([{
- dataId : document.getElementById("allPage:allForm:oppBlock2:Add_AWS_Data_Id__c").value,
- contactName : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value,
- telephone : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone__c").value,
- zipCode : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c").value,
- detailedAddress : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c").value,
- }]);
- }
-
- }
+ }
- //澶嶉�夋閫変腑瑙﹀彂浜嬩欢
- //obj 褰撳墠瀵硅薄 checkIndex 褰撳墠鐐瑰嚮鐨勭鍑犺
- function onCheckBoxJd(obj,checkIndex){
- //濡傛灉涓簍rue,閭d箞鍏朵粬鐨勬墍鏈夊閫夋蹇呴』涓轰笉閫夋嫨鐘舵��
- if(obj.checked){
- checkedTrue = checkIndex;
- var lawtable = document.getElementById("tableHeader_L");//鑾峰彇id涓簍ableHeader_L鐨則able
- var rows = lawtable.rows;//鑾峰彇鎵�鏈夎
- for(var i=1; i < rows.length; i++){
- var InputObj = rows[i].cells[0].getElementsByTagName("input")[0];
- if(obj != InputObj){
- InputObj.checked = false;
- }
- }
- }else{
- checkedTrue = null;
- }
- }
- function searchBtnJs(){
- b();
- var addressDataIds = '';
- //鏌ヨ鍦板潃
- if(document.getElementById('allPage:allForm:searchBlock:txtAddressId').value != ''){
- //鍙戦�乤ws璇锋眰锛岀劧鍚庡啀鍙戦�佺粰controller
- new Promise(function(resolve, reject){
- let queryBack = function queryBack(result){
- if(result.object==null || result.object.length==0){
- searchBtn('\''+addressName+'\'');
- return
- }else{
-
- for(var i=0;i<result.object.length;i++){
- addressDataIds += ',\''+ result.object[i].dataId + '\'';
- addressAwsData[result.object[i].dataId] = result.object[i];
+ }
+
+
+ return false;
+ }
+ //瑙e瘑
+ function decrypt(){
+ if(PIData[ObjIdDecrypt] == null){
+ // document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = '';
+ //document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:contactIdValue').value = '000000000000000';
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = '';
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = '';
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = '';
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = '';
+ }else{
+ // document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = PIData[ObjIdDecrypt].lastName!=null?PIData[ObjIdDecrypt].lastName:'';
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = PIData[ObjIdDecrypt].lastName;
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = PIData[ObjIdDecrypt].telephone;
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = PIData[ObjIdDecrypt].zipCode;
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = PIData[ObjIdDecrypt].detailedAddress;
+ }
+ }
+ function getPIPayload() {
+ let leadPayloadList = [];
+ var telePhone = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value;
+ var zipCode = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value;
+ var detailedAddress = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value;
+ let leadPIData = new Object();
+ leadPIData.telePhone = telePhone;
+ leadPIData.zipCode = zipCode;
+ leadPIData.detailedAddress = detailedAddress;
+ leadPIData.sfRecordId = '';
+ leadPayloadList.push(leadPIData);
+ console.log(JSON.stringify(leadPayloadList));
+ return JSON.stringify(leadPayloadList);
+ }
+ //WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 start
+ //淇濆瓨鏂规硶
+ function savaJs(){
+ //b();
+ //涓嶄細鏂板缓鑱旂郴浜猴紝鎵�浠ヨ繖閲屼笉闇�瑕佸皢isAddCon璁剧疆涓簍rue
+ // if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value != ''){
+ // isAddCon = true;
+ // }
+ document.getElementById("errorMsg").innerHTML = '';
+
+ if(!document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value){
+ document.getElementById("errorMsg").innerHTML = '<strong>銆愯仈绯讳汉銆戜笉鑳戒负绌猴紒</strong> ';
+ return;
+ }
+ // else if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Contacts__c").value&&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
+ // document.getElementById("errorMsg").innerHTML = '<strong>銆愯仈绯讳汉銆戝拰銆愯仈绯讳汉锛堟柊寤猴級銆戜笉鑳藉悓鏃舵湁鍊硷紒</strong> ';
+ // return;
+ // }
+ b();
+ console.log('{!insUpdData}')
+ // if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
+ // //new contact
+ // ProcessPI({},GetEditObj('contact'),'contact',function(){
+ // //new address
+ // ProcessPI({},
+ // GetEditObj('address'),'address',function(){
+ // save();
+ // });
+ // });
+ // }else{
+ //new address
+ ProcessPI({},GetEditObj('address'),'address',function(){
+ save();
+ });
+ // }
+ }
+ //WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 end
+
+ function ProcessPI(sobjJson, payloadForNewPI,type,callback) {
+ var sr = ''
+ // if(type == 'contact'){
+ // sr = staticResourceContact
+ // }
+ if(type == 'address'){
+ sr = staticResource
+ }
+ let url = sr.newUrl
+ /*if (now_edit_id) {
+ url = sr.updateUrl
+ }*/
+ AWSService.post(url, payloadForNewPI, function(result){
+ // if(type == 'contact'){
+ // con_aws_result = result
+ // }
+ if(type == 'address'){
+ add_aws_result = result
+ }
+ SetEditObj(type);
+ if(callback){
+ callback();
+ }
+ }, sr.token);
+ }
+ function SetEditObj(type){
+ let obj = GetAWSResultObj(type);
+ if(obj){
+ // if(type=='contact'){
+ // document.getElementById("allPage:allForm:oppBlock2:Con_AWS_Data_Id__c").value = obj.dataId;
+ // document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value = obj.lastName;
+ // document.getElementById("allPage:allForm:oppBlock2:LastName_Encrypted__c").value = obj.lastNameEncrypt;
+ // }
+ if(type=='address'){
+ document.getElementById("allPage:allForm:oppBlock2:Add_AWS_Data_Id__c").value = obj.dataId;
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = obj.contactName;
+ //document.getElementById('allPage:allForm:oppBlock2:ContactName_Encrypted__c').value = obj.contactNameEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
+ document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone__c").value = obj.telephone;
+ //document.getElementById("allPage:allForm:oppBlock2:Telephone_Encrypted__c").value = obj.telephoneEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
+ document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c").value = obj.zipCode;
+ //document.getElementById("allPage:allForm:oppBlock2:ZipCode_Encrypted__c").value = obj.zipCodeEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
+ document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c").value = obj.detailedAddress;
+ //document.getElementById("allPage:allForm:oppBlock2:Detailed_Address_Encrypted__c").value = obj.detailedAddressEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
+
+ }
+ }
+
+ }
+ function GetAWSResultObj(type){
+ // if(type == 'contact'){
+ // if(con_aws_result && con_aws_result.object && con_aws_result.object.length > 0){
+ // return con_aws_result.object[0];
+ // }
+ // }
+ if(type == 'address'){
+ if(add_aws_result && add_aws_result.object && add_aws_result.object.length > 0){
+ return add_aws_result.object[0];
+ }
+ }
+ return null;
+ }
+
+ function GetEditObj(type){
+ // if(type=='contact'){
+ // //new contact
+ // return JSON.stringify([{
+ // lastName : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value,
+ // dataId : document.getElementById("allPage:allForm:oppBlock2:Con_AWS_Data_Id__c").value,
+ // }]);
+ // }
+ contactNamePlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value;
+ telePhonePlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone__c").value;
+ zipCodePlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c").value
+ detailedAddressPlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c").value;
+ if(type == 'address'){
+ //new address
+ return JSON.stringify([{
+ dataId : document.getElementById("allPage:allForm:oppBlock2:Add_AWS_Data_Id__c").value,
+ contactName : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value,
+ telephone : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone__c").value,
+ zipCode : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c").value,
+ detailedAddress : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c").value,
+ }]);
+ }
+
+ }
+
+ //澶嶉�夋閫変腑瑙﹀彂浜嬩欢
+ //obj 褰撳墠瀵硅薄 checkIndex 褰撳墠鐐瑰嚮鐨勭鍑犺
+ function onCheckBoxJd(obj,checkIndex){
+ //濡傛灉涓簍rue,閭d箞鍏朵粬鐨勬墍鏈夊閫夋蹇呴』涓轰笉閫夋嫨鐘舵��
+ if(obj.checked){
+ checkedTrue = checkIndex;
+ var lawtable = document.getElementById("tableHeader_L");//鑾峰彇id涓簍ableHeader_L鐨則able
+ var rows = lawtable.rows;//鑾峰彇鎵�鏈夎
+ for(var i=1; i < rows.length; i++){
+ var InputObj = rows[i].cells[0].getElementsByTagName("input")[0];
+ if(obj != InputObj){
+ InputObj.checked = false;
+ }
+ }
+ }else{
+ checkedTrue = null;
+ }
+ }
+ function searchBtnJs(){
+ b();
+ var addressDataIds = '';
+ //鏌ヨ鍦板潃
+ if(document.getElementById('allPage:allForm:searchBlock:txtAddressId').value != ''){
+ //鍙戦�乤ws璇锋眰锛岀劧鍚庡啀鍙戦�佺粰controller
+ new Promise(function(resolve, reject){
+ let queryBack = function queryBack(result){
+ if(result.object==null || result.object.length==0){
+ searchBtn('\''+addressName+'\'');
+ return
+ }else{
+
+ for(var i=0;i<result.object.length;i++){
+ addressDataIds += ',\''+ result.object[i].dataId + '\'';
+ addressAwsData[result.object[i].dataId] = result.object[i];
+ }
+ addressDataIds = addressDataIds.substring(1);
+ resolve('success');
+ }
+ };
+ var addressName = document.getElementById('allPage:allForm:searchBlock:txtAddressId').value;
+ AWSService.post(staticResource.searchUrl,{
+ detailedAddress:addressName.trim()
+ },queryBack,staticResource.token);
+ }).then(function(data){
+ console.log('data = '+data)
+ console.log('addressDataIds = '+addressDataIds)
+ searchBtn(addressDataIds);
+ });
+ }else{
+ searchBtn(addressDataIds);
+ }
+ }
+ //鍔犲瘑瀹㈡埛鍚嶅瓧娈�
+ // function encryptCustomer(e){
+ // let obj = JSON.parse(payloadForNewPI);
+ // let payloadForNewPIJson = JSON.stringify(obj);
+ // let payloadForNewPI = jQuery(e.target).closest("tr").find("a.cusmer__c");
+ // AWSService.update(staticResources.updateUrl, '', payloadForNewPI, updateMethod, staticResources.token, staticResources.transactionUrl, false, insertOrUpdateBack, redirectCallBack);
+ // },
+
+ sforce.connection.sessionId = '{!GETSESSIONID()}';
+ function UpdateSobject(staticResource,sobj,transId,callback){
+
+ let result = sforce.connection.update([sobj]);
+ let tobj = {
+ txId: transId
+ };
+ let b = result[0].getBoolean('success');
+ if(b) {
+ console.log('call sf Log Id: ' + result[0].id);
+ tobj.sfRecordId = result[0].id;
+ tobj.isSuccess = 1;
+
+ //return result[0].id;
+ }else {
+ console.log('call sf to insert log');
+ tobj.isSuccess = 0;
+ //return '';
+ }
+
+ AWSService.post(staticResource.transactionUrl,tobj,function(data){
+ if (callback) {
+ data.isSuccess = b;
+ callback(data)
+ }
+ },staticResource.token);
+ }
+
+
+
+ function adoptSaveJs(address,isUpload){
+ //鐢变簬瑕佹妸閲囩敤鏃堕棿璁板綍鍒板湴鍧�琛ㄤ腑锛屾墍浠ユ柊寤轰竴涓湴鍧�瀵硅薄
+ // Address__c DatetimeUpdate = new Address__c();
+ // DatetimeUpdate = tableData[i].address;
+ //璇︾粏鍦板潃
+ let address_str = address.Detailed_Address__c.trim();
+ if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
+ address_str = addressAwsData[address.AWS_Data_Id__c].detailedAddress;
+ }
+ let cityName = '';//甯�
+ //甯備笉涓虹┖锛屽洜涓鸿浣跨敤 __r.Name 濡傛灉涓虹┖锛屼細鎶ラ敊
+ if(address.City__c){
+ cityName = address.City__r.Name.trim();
+ //鐪� 鍚屼笂
+ if(address.Province__c){
+ let ProvinceCity = address.Province__r.Name.trim()+cityName;
+ //闃叉璇︾粏鍦板潃閲岄潰甯︾潃鐪佷唤鍜屽競
+ if(address_str.indexOf(ProvinceCity) < 0){
+ address_str = ProvinceCity + address_str;
+ }
+ }
+ }
+ //鑱旂郴浜�
+ let contactsName = '';
+ // WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 start
+ if(address.ContactName__c){
+ contactsName = address.ContactName__c;
+ }
+ // WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 end
+
+ // if (addressAwsData.hasOwnProperty(address.Contacts__r.AWS_Data_Id__c)) {
+ // contactsName = addressAwsData[address.Contacts__r.AWS_Data_Id__c].lastName;
+ // }
+ if(PIData[address.Id]){
+ contactsName = PIData[address.Id].lastName;
+ }
+
+ //瀹㈡埛
+ let ContactPerson = '';
+ if(address.Customer__c){
+ ContactPerson = address.Customer__r.Name;
+ }
+ try{
+ //淇濆瓨鏁版嵁鍒颁慨鐞嗚〃涓�
+ let rc = new sforce.SObject('Repair__c');
+ rc.Id='{!RepairId}';
+ rc.address_Contacts__c=contactsName;
+ rc.address_ZipCode__c = address.ZipCode__c;
+ rc.address_City__c = cityName;
+ rc.address_Contacts_Name__c = ContactPerson;
+ let AddressTypeIndex = {!AddressTypeIndex};
+ //isUpload锛氭槸鍚︿笂浼燬AP FSEApplyForRepairTime锛歋AP淇悊鐢宠鏃堕棿
+ if(isUpload && '{!pc.SAP_Transfer_time__c}'){
+ rc.Address_type__c = 'X';
+ rc.Address_Type_Index__c = AddressTypeIndex+1;
+ }
+ rc.address_Telephone__c=address.Telephone__c;
+ rc.Detailed_Address__c=address_str;
+
+ if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
+ rc.address_Telephone__c=addressAwsData[address.AWS_Data_Id__c].telephone;
+ rc.address_ZipCode__c=addressAwsData[address.AWS_Data_Id__c].zipCode;
+ }
+
+ let GetAsset = function(){
+ let ast = new sforce.SObject('Asset');
+ ast.Id = '{!pc.Delivered_Product__c}',
+ ast.address_Contacts__c= contactsName,
+ ast.address_ZipCode__c = address.ZipCode__c,
+ ast.address_City__c = cityName,
+ ast.address_Telephone__c = address.Telephone__c,
+ ast.address_Contacts_Name__c = ContactPerson,
+ ast.Detailed_Address__c= address_str
+ if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
+ ast.address_ZipCode__c=addressAwsData[address.AWS_Data_Id__c].zipCode;
+ ast.address_Telephone__c=addressAwsData[address.AWS_Data_Id__c].telephone;
+ }
+ return ast;
+ }
+
+ //淇濆瓨鏁版嵁鍒颁繚鏈夎澶囪〃涓�
+ let UpdateAsset = function(){
+ let ast = GetAsset();
+ let result = sforce.connection.update([ast]);
+ let b = result[0].getBoolean('success');
+ return b;
+ }
+
+ let UpdateRepair = function(callback){
+ AWSService.post(staticResourceRepair.updateUrl+'V2',[{
+ dataId:'{!pc.AWS_Data_Id__c}',
+ addressContactsName:rc.address_Contacts_Name__c,
+ addressContacts:rc.address_Contacts__c,
+ addressTelephone:rc.address_Telephone__c,
+ addressZipCode:rc.address_ZipCode__c,
+ detailedAddress:rc.Detailed_Address__c
+ }],function(data){
+ if(data && data.object){
+ console.log(data);
+ rc.address_Contacts_Name__c = data.object[0].addressContactsName;
+ //rc.Address_Contacts_Name_Encrypt__c = data.object[0].addressContactsNameEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+ rc.address_Contacts__c = data.object[0].addressContacts;
+ //rc.Address_Contacts_Encrypt__c = data.object[0].addressContactsEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+ rc.address_Telephone__c = data.object[0].addressTelephone;
+ //rc.Address_Telephone_Encrypt__c = data.object[0].addressTelephoneEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+ rc.address_ZipCode__c = data.object[0].addressZipCode;
+ //rc.Address_ZipCode_Encrypt__c = data.object[0].addressZipCodeEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+ rc.Detailed_Address__c = data.object[0].detailedAddress;
+ //rc.Detailed_Address_Encrypt__c = data.object[0].detailedAddressEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+
+ //UpdateSobject(staticResourceRepair,rc,data.txId,callback);
+ Visualforce.remoting.Manager.invokeAction(
+ 'StraightBackAddressController.SaveEx',
+ JSON.stringify(rc), JSON.stringify(GetAsset()), address.Id,
+ function (result, event) {
+
+ let message = '';
+ if (event.status) {
+ if (result) {
+ message = result;
+ }else{
+ }
+ }else{
+ }
+ let tobj = {
+ txId: data.txId
+ };
+ if(message) {
+ console.log('call sf to insert log');
+ tobj.isSuccess = 0;
+ }else {
+ console.log('call sf Log Id: ' + rc.id);
+ tobj.sfRecordId = rc.id;
+ tobj.isSuccess = 1;
+ }
+
+ AWSService.post(staticResource.transactionUrl,tobj,function(data){
+ if (message) {
+ ub();
+ alert(message);
+ }else{
+ window.location.href = '/{!RepairId}';
+ }
+ },staticResource.token);
+ },
+ { escape: true }
+ );
+ }else{
+ alert('AWS鏇存柊淇悊澶辫触');
+ ub();
+ }
+ },staticResourceRepair.token)
+ }
+
+
+
+
+ let UpdateAddress = function(){
+ let add = new sforce.SObject('Address__c');
+ add.Id = address.Id;
+ //鏈�鍚庢妸褰撳墠鏃堕棿淇濆瓨鍒板湴鍧�琛ㄤ腑锛屼綔涓洪噰鐢ㄦ椂闂�
+ add.Using_Datetime__c = new Date();
+ let result = sforce.connection.update([add]);
+ let b = result[0].getBoolean('success');
+ return b;
+ }
+
+ b();
+ UpdateRepair();
+ /*
+ UpdateRepair(function(data){
+ if (data.isSuccess) {
+ let b = UpdateAsset();
+ if (b) {
+ b = UpdateAddress();
+ if (b) {
+ window.location.href = '/{!RepairId}';
+ }else{
+ ub();
+ alert('閲囩敤澶辫触');
}
- addressDataIds = addressDataIds.substring(1);
- resolve('success');
- }
- };
- var addressName = document.getElementById('allPage:allForm:searchBlock:txtAddressId').value;
- AWSService.post(staticResource.searchUrl,{
- detailedAddress:addressName.trim()
- },queryBack,staticResource.token);
- }).then(function(data){
- console.log('data = '+data)
- console.log('addressDataIds = '+addressDataIds)
- searchBtn(addressDataIds);
- });
- }else{
- searchBtn(addressDataIds);
- }
- }
- //鍔犲瘑瀹㈡埛鍚嶅瓧娈�
- // function encryptCustomer(e){
- // let obj = JSON.parse(payloadForNewPI);
- // let payloadForNewPIJson = JSON.stringify(obj);
- // let payloadForNewPI = jQuery(e.target).closest("tr").find("a.cusmer__c");
- // AWSService.update(staticResources.updateUrl, '', payloadForNewPI, updateMethod, staticResources.token, staticResources.transactionUrl, false, insertOrUpdateBack, redirectCallBack);
- // },
-
- sforce.connection.sessionId = '{!GETSESSIONID()}';
- function UpdateSobject(staticResource,sobj,transId,callback){
-
- let result = sforce.connection.update([sobj]);
- let tobj = {
- txId: transId
- };
- let b = result[0].getBoolean('success');
- if(b) {
- console.log('call sf Log Id: ' + result[0].id);
- tobj.sfRecordId = result[0].id;
- tobj.isSuccess = 1;
-
- //return result[0].id;
- }else {
- console.log('call sf to insert log');
- tobj.isSuccess = 0;
- //return '';
- }
-
- AWSService.post(staticResource.transactionUrl,tobj,function(data){
- if (callback) {
- data.isSuccess = b;
- callback(data)
- }
- },staticResource.token);
- }
-
-
-
- function adoptSaveJs(address,isUpload){
- //鐢变簬瑕佹妸閲囩敤鏃堕棿璁板綍鍒板湴鍧�琛ㄤ腑锛屾墍浠ユ柊寤轰竴涓湴鍧�瀵硅薄
- // Address__c DatetimeUpdate = new Address__c();
- // DatetimeUpdate = tableData[i].address;
- //璇︾粏鍦板潃
- let address_str = address.Detailed_Address__c.trim();
- if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
- address_str = addressAwsData[address.AWS_Data_Id__c].detailedAddress;
- }
- let cityName = '';//甯�
- //甯備笉涓虹┖锛屽洜涓鸿浣跨敤 __r.Name 濡傛灉涓虹┖锛屼細鎶ラ敊
- if(address.City__c){
- cityName = address.City__r.Name.trim();
- //鐪� 鍚屼笂
- if(address.Province__c){
- let ProvinceCity = address.Province__r.Name.trim()+cityName;
- //闃叉璇︾粏鍦板潃閲岄潰甯︾潃鐪佷唤鍜屽競
- if(address_str.indexOf(ProvinceCity) < 0){
- address_str = ProvinceCity + address_str;
- }
- }
- }
- //鑱旂郴浜�
- let contactsName = '';
- // WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 start
- if(address.ContactName__c){
- contactsName = address.ContactName__c;
- }
- // WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 end
-
- // if (addressAwsData.hasOwnProperty(address.Contacts__r.AWS_Data_Id__c)) {
- // contactsName = addressAwsData[address.Contacts__r.AWS_Data_Id__c].lastName;
- // }
- if(PIData[address.Id]){
- contactsName = PIData[address.Id].lastName;
- }
-
- //瀹㈡埛
- let ContactPerson = '';
- if(address.Customer__c){
- ContactPerson = address.Customer__r.Name;
- }
- try{
- //淇濆瓨鏁版嵁鍒颁慨鐞嗚〃涓�
- let rc = new sforce.SObject('Repair__c');
- rc.Id='{!RepairId}';
- rc.address_Contacts__c=contactsName;
- debugger
- rc.address_ZipCode__c = address.ZipCode__c;
- rc.address_City__c = cityName;
- rc.address_Contacts_Name__c = ContactPerson;
- let AddressTypeIndex = {!AddressTypeIndex};
- //isUpload锛氭槸鍚︿笂浼燬AP FSEApplyForRepairTime锛歋AP淇悊鐢宠鏃堕棿
- if(isUpload && '{!pc.SAP_Transfer_time__c}'){
- rc.Address_type__c = 'X';
- rc.Address_Type_Index__c = AddressTypeIndex+1;
- }
- rc.address_Telephone__c=address.Telephone__c;
- rc.Detailed_Address__c=address_str;
-
- if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
- rc.address_Telephone__c=addressAwsData[address.AWS_Data_Id__c].telephone;
- rc.address_ZipCode__c=addressAwsData[address.AWS_Data_Id__c].zipCode;
- }
-
- let GetAsset = function(){
- let ast = new sforce.SObject('Asset');
- ast.Id = '{!pc.Delivered_Product__c}',
- ast.address_Contacts__c= contactsName,
- ast.address_ZipCode__c = address.ZipCode__c,
- ast.address_City__c = cityName,
- ast.address_Telephone__c = address.Telephone__c,
- ast.address_Contacts_Name__c = ContactPerson,
- ast.Detailed_Address__c= address_str
- if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
- ast.address_ZipCode__c=addressAwsData[address.AWS_Data_Id__c].zipCode;
- ast.address_Telephone__c=addressAwsData[address.AWS_Data_Id__c].telephone;
- }
- return ast;
- }
-
- //淇濆瓨鏁版嵁鍒颁繚鏈夎澶囪〃涓�
- let UpdateAsset = function(){
- let ast = GetAsset();
- let result = sforce.connection.update([ast]);
- let b = result[0].getBoolean('success');
- return b;
- }
-
- let UpdateRepair = function(callback){
- AWSService.post(staticResourceRepair.updateUrl+'V2',[{
- dataId:'{!pc.AWS_Data_Id__c}',
- addressContactsName:rc.address_Contacts_Name__c,
- addressContacts:rc.address_Contacts__c,
- addressTelephone:rc.address_Telephone__c,
- addressZipCode:rc.address_ZipCode__c,
- detailedAddress:rc.Detailed_Address__c
- }],function(data){
- if(data && data.object){
- console.log(data);
- rc.address_Contacts_Name__c = data.object[0].addressContactsName;
- //rc.Address_Contacts_Name_Encrypt__c = data.object[0].addressContactsNameEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
- rc.address_Contacts__c = data.object[0].addressContacts;
- //rc.Address_Contacts_Encrypt__c = data.object[0].addressContactsEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
- rc.address_Telephone__c = data.object[0].addressTelephone;
- //rc.Address_Telephone_Encrypt__c = data.object[0].addressTelephoneEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
- rc.address_ZipCode__c = data.object[0].addressZipCode;
- //rc.Address_ZipCode_Encrypt__c = data.object[0].addressZipCodeEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
- rc.Detailed_Address__c = data.object[0].detailedAddress;
- //rc.Detailed_Address_Encrypt__c = data.object[0].detailedAddressEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
-
- //UpdateSobject(staticResourceRepair,rc,data.txId,callback);
- Visualforce.remoting.Manager.invokeAction(
- 'StraightBackAddressController.SaveEx',
- JSON.stringify(rc), JSON.stringify(GetAsset()), address.Id,
- function (result, event) {
-
- let message = '';
- if (event.status) {
- if (result) {
- message = result;
- }else{
- }
- }else{
- }
- let tobj = {
- txId: data.txId
- };
- if(message) {
- console.log('call sf to insert log');
- tobj.isSuccess = 0;
- }else {
- console.log('call sf Log Id: ' + rc.id);
- tobj.sfRecordId = rc.id;
- tobj.isSuccess = 1;
- }
-
- AWSService.post(staticResource.transactionUrl,tobj,function(data){
- if (message) {
- ub();
- alert(message);
- }else{
- window.location.href = '/{!RepairId}';
- }
- },staticResource.token);
- },
- { escape: true }
- );
}else{
- alert('AWS鏇存柊淇悊澶辫触');
- ub();
- }
- },staticResourceRepair.token)
- }
-
-
-
-
- let UpdateAddress = function(){
- let add = new sforce.SObject('Address__c');
- add.Id = address.Id;
- //鏈�鍚庢妸褰撳墠鏃堕棿淇濆瓨鍒板湴鍧�琛ㄤ腑锛屼綔涓洪噰鐢ㄦ椂闂�
- add.Using_Datetime__c = new Date();
- let result = sforce.connection.update([add]);
- let b = result[0].getBoolean('success');
- return b;
- }
-
- b();
- UpdateRepair();
- /*
- UpdateRepair(function(data){
- if (data.isSuccess) {
- let b = UpdateAsset();
- if (b) {
- b = UpdateAddress();
- if (b) {
- window.location.href = '/{!RepairId}';
- }else{
- ub();
- alert('閲囩敤澶辫触');
- }
- }else{
- ub();
- alert('閲囩敤澶辫触');
- }
- }else{
-
- ub();
- alert('SF鏇存柊淇悊澶辫触');
- }
- })*/
-
- //椤甸潰閲嶅畾鍚�
- //return redirectPag();
- }catch( e){
- //澶辫触鎻愮ず
- //ApexPages.addMessages(e);
- }
- }
- //閲囩敤鎸夐挳
- function onAdoptJs(e, address){
-
- //鍒ゆ柇褰撳墠淇悊鍗曟槸鍚﹀凡缁忕敵璇蜂慨鐞�
- var uploadTime = '{!FSEApplyForRepairTime}';
- if(uploadTime != 'null' && uploadTime){
- var prompt = '鐢变簬褰撳墠淇悊鍗曞凡鐢宠淇悊锛岃闂槸鍚﹂噰鐢ㄥ苟涓婁紶鏁版嵁鍒癝AP锛�';
- if(confirm(prompt)){
- adoptSaveJs(address,true);
- }
- }else{
- adoptSaveJs(address,false);
- }
+ ub();
+ alert('閲囩敤澶辫触');
+ }
+ }else{
- }
- /* function onAdoptJs(){
- if(checkedTrue != null){
- b();
- var lawtable = document.getElementById("tableHeader_L");//鑾峰彇id涓簍ableHeader_L鐨則able
- var rows = lawtable.rows;//鑾峰彇鎵�鏈夎
- var InputObj = rows[checkedTrue].cells[0].getElementsByTagName("input")[0];
- if(InputObj.checked){
- //鍒ゆ柇褰撳墠淇悊鍗曟槸鍚﹀凡缁忕敵璇蜂慨鐞�
- var uploadTime = '{!FSEApplyForRepairTime}';
- if(uploadTime != null){
- var prompt = '鐢变簬褰撳墠淇悊鍗曞凡鐢宠淇悊锛岃闂槸鍚﹂噰鐢ㄥ苟涓婁紶鏁版嵁鍒癝AP锛�';
- if(confirm(prompt)){
- adoptSave(InputObj.value+"",true);
- }else{
- adoptSave(InputObj.value+"",false);
- }
- }else{
- adoptSave(InputObj.value+"",false);
- }
- }
- }else{
- alert('璇烽�変腑浣犺閲囩敤鐨勫湴鍧�锛�');
- return false;
- }
- }*/
- //杩斿洖鐖堕〉闈�
- function sendBackJs(){
- redirectPag();
- }
- //鍒锋柊褰撳墠椤甸潰
- function refreshJs(){
- window.location.reload();
- }
+ ub();
+ alert('SF鏇存柊淇悊澶辫触');
+ }
+ })*/
- //2022 02 28 寮犲崕寤� display PI Data start
-
- //queryPI();
- function q1(){
- debugger
- var index = 0;
- var correct = 0;
- var p = new Promise(function(resolve, reject){
- //鏌ヨ鍦板潃鐨凱I鏁版嵁
- let searchCallBack = function searchCallBack(result,Id,awsDataId){
- index++;
- let contacts = result.object;
- if(contacts == null){
- console.log('contacts == null')
- return;
- }
- let temp = {}
- temp.telephone = result.object.telephone;
- temp.zipCode = result.object.zipCode;
- temp.detailedAddress = result.object.detailedAddress;
- //temp.awsDataId = awsDataId;
- temp.lastName = result.object.contactName;
- PIData[Id] = temp;
- };
- for(var i=0;i<tableDataStr.length;i++){
- if(tableDataStr[i].address.AWS_Data_Id__c){
- correct++;
- AWSService.queryRepair(staticResource.queryUrl,
- tableDataStr[i].address.AWS_Data_Id__c,
- tableDataStr[i].address.Id,
- //tableDataStr[i].address.Contacts__r.AWS_Data_Id__c,
- null,
- searchCallBack,
- staticResource.token);
- }
- }
- var interval=self.setInterval(function (){
- console.log('setInterval index= ' + index);
- if(index == correct){
- console.log('PIDATA = ' + JSON.stringify(PIData))
- resolve('success')
- clearInterval(interval)
- }
- },1000);
- });
- return p;
- }
+ //椤甸潰閲嶅畾鍚�
+ //return redirectPag();
+ }catch( e){
+ //澶辫触鎻愮ず
+ //ApexPages.addMessages(e);
+ }
+ }
+ //閲囩敤鎸夐挳
+ function onAdoptJs(e, address){
- //zhj PIPL 2022-06-08 start
- function q2(){
- // sforce.connection.sessionId = '{!GETSESSIONID()}';
- // var p = new Promise(function(resolve, reject){
- // //鏌ヨ鑱旂郴浜虹殑鏁版嵁
- // let queryBack = function queryBack(result) {
- // let contacts = result.object;
- // if(contacts == null){
- // return;
- // }
- // for(var i=0;i<result.object.length;i++){
- // for(let key in PIData){
- // if(result.object[i].dataId == PIData[key].awsDataId){
- // PIData[key].lastName = result.object[i].lastName;
- // }
- // }
- // }
- // }
- // var condition = ''
- // for(var i=0;i<tableDataStr.length;i++){
- // if(tableDataStr[i].address.Contacts__c){
- // condition += "," + "\'"+tableDataStr[i].address.Contacts__c+"\'";
- // }
- // }
- // condition = condition.substr(1);
- // console.log('condition = ' + condition);
- // var record = sforce.connection.query("select AWS_Data_Id__c from Contact where id in("+condition+")");
- // var records = record.getArray("records");
- // for(var i =0;i<records.length;i++){
- // if(records[i].AWS_Data_Id__c){
- // contactDataIds.push(records[i].AWS_Data_Id__c);
- // }
- // }
- // let searchPayload = new Object();
- // searchPayload.dataIds = contactDataIds;
- // searchPayload.contactName = '';
- // console.log('contactDataIds = ' + contactDataIds);
- // AWSService.search(staticResourceContact.searchUrl, JSON.stringify(searchPayload), queryBack, staticResourceContact.token);
- // });
- }
+ //鍒ゆ柇褰撳墠淇悊鍗曟槸鍚﹀凡缁忕敵璇蜂慨鐞�
+ var uploadTime = '{!FSEApplyForRepairTime}';
+ if(uploadTime != 'null' && uploadTime){
+ var prompt = '鐢变簬褰撳墠淇悊鍗曞凡鐢宠淇悊锛岃闂槸鍚﹂噰鐢ㄥ苟涓婁紶鏁版嵁鍒癝AP锛�';
+ if(confirm(prompt)){
+ adoptSaveJs(address,true);
+ }
+ }else{
+ adoptSaveJs(address,false);
+ }
- //zhj PIPL 2022-06-08 end
+ }
+ /* function onAdoptJs(){
+ if(checkedTrue != null){
+ b();
+ var lawtable = document.getElementById("tableHeader_L");//鑾峰彇id涓簍ableHeader_L鐨則able
+ var rows = lawtable.rows;//鑾峰彇鎵�鏈夎
+ var InputObj = rows[checkedTrue].cells[0].getElementsByTagName("input")[0];
+ if(InputObj.checked){
+ //鍒ゆ柇褰撳墠淇悊鍗曟槸鍚﹀凡缁忕敵璇蜂慨鐞�
+ var uploadTime = '{!FSEApplyForRepairTime}';
+ if(uploadTime != null){
+ var prompt = '鐢变簬褰撳墠淇悊鍗曞凡鐢宠淇悊锛岃闂槸鍚﹂噰鐢ㄥ苟涓婁紶鏁版嵁鍒癝AP锛�';
+ if(confirm(prompt)){
+ adoptSave(InputObj.value+"",true);
+ }else{
+ adoptSave(InputObj.value+"",false);
+ }
+ }else{
+ adoptSave(InputObj.value+"",false);
+ }
+ }
+ }else{
+ alert('璇烽�変腑浣犺閲囩敤鐨勫湴鍧�锛�');
+ return false;
+ }
+ }*/
+ //杩斿洖鐖堕〉闈�
+ function sendBackJs(){
+ redirectPag();
+ }
+ //鍒锋柊褰撳墠椤甸潰
+ function refreshJs(){
+ window.location.reload();
+ }
+
+ //2022 02 28 寮犲崕寤� display PI Data start
+
+ //queryPI();
+ function q1(){
+ debugger
+ var index = 0;
+ var correct = 0;
+ var p = new Promise(function(resolve, reject){
+ //鏌ヨ鍦板潃鐨凱I鏁版嵁
+ let searchCallBack = function searchCallBack(result,Id,awsDataId){
+ index++;
+ let contacts = result.object;
+ if(contacts == null){
+ console.log('contacts == null')
+ return;
+ }
+ let temp = {}
+ temp.telephone = result.object.telephone;
+ temp.zipCode = result.object.zipCode;
+ temp.detailedAddress = result.object.detailedAddress;
+ //temp.awsDataId = awsDataId;
+ temp.lastName = result.object.contactName;
+ PIData[Id] = temp;
+ };
+ for(var i=0;i<tableDataStr.length;i++){
+ if(tableDataStr[i].address.AWS_Data_Id__c){
+ correct++;
+ AWSService.queryRepair(staticResource.queryUrl,
+ tableDataStr[i].address.AWS_Data_Id__c,
+ tableDataStr[i].address.Id,
+ //tableDataStr[i].address.Contacts__r.AWS_Data_Id__c,
+ null,
+ searchCallBack,
+ staticResource.token);
+ }
+ }
+ var interval=self.setInterval(function (){
+ console.log('setInterval index= ' + index);
+ if(index == correct){
+ console.log('PIDATA = ' + JSON.stringify(PIData))
+ resolve('success')
+ clearInterval(interval)
+ }
+ },1000);
+ });
+ return p;
+ }
+
+ //zhj PIPL 2022-06-08 start
+ function q2(){
+ // sforce.connection.sessionId = '{!GETSESSIONID()}';
+ // var p = new Promise(function(resolve, reject){
+ // //鏌ヨ鑱旂郴浜虹殑鏁版嵁
+ // let queryBack = function queryBack(result) {
+ // let contacts = result.object;
+ // if(contacts == null){
+ // return;
+ // }
+ // for(var i=0;i<result.object.length;i++){
+ // for(let key in PIData){
+ // if(result.object[i].dataId == PIData[key].awsDataId){
+ // PIData[key].lastName = result.object[i].lastName;
+ // }
+ // }
+ // }
+ // }
+ // var condition = ''
+ // for(var i=0;i<tableDataStr.length;i++){
+ // if(tableDataStr[i].address.Contacts__c){
+ // condition += "," + "\'"+tableDataStr[i].address.Contacts__c+"\'";
+ // }
+ // }
+ // condition = condition.substr(1);
+ // console.log('condition = ' + condition);
+ // var record = sforce.connection.query("select AWS_Data_Id__c from Contact where id in("+condition+")");
+ // var records = record.getArray("records");
+ // for(var i =0;i<records.length;i++){
+ // if(records[i].AWS_Data_Id__c){
+ // contactDataIds.push(records[i].AWS_Data_Id__c);
+ // }
+ // }
+ // let searchPayload = new Object();
+ // searchPayload.dataIds = contactDataIds;
+ // searchPayload.contactName = '';
+ // console.log('contactDataIds = ' + contactDataIds);
+ // AWSService.search(staticResourceContact.searchUrl, JSON.stringify(searchPayload), queryBack, staticResourceContact.token);
+ // });
+ }
+
+ //zhj PIPL 2022-06-08 end
- //鏌ヨ鏁忔劅瀛楁
- function queryPI(){
- //b();
- tableDataStr = JSON.parse(document.getElementById('allPage:allForm:tableValueFrontEnd').value);
- PIData = {};
- contactDataIds = [];
- console.log(tableDataStr)
- q1().then(function(data){
- return q2(data);
- })
- //ub();
- }
-
+ //鏌ヨ鏁忔劅瀛楁
+ function queryPI(){
+ //b();
+ tableDataStr = JSON.parse(document.getElementById('allPage:allForm:tableValueFrontEnd').value);
+ PIData = {};
+ contactDataIds = [];
+ console.log(tableDataStr)
+ q1().then(function(data){
+ return q2(data);
+ })
+ //ub();
+ }
- function showPIDiv(awsDataId){
- if(awsDataId.length == 0 || PIData[awsDataId]==null){
- return
- }
- console.log('awsDataId Value:'+awsDataId);
- let parentNode = document.getElementById(awsDataId);
- let createDiv = document.createElement("div");
- createDiv.id = awsDataId+"_PI";
- let piInformation = '';
-
- if(PIData[awsDataId].lastName){
- piInformation = '鑱旂郴浜�: '+PIData[awsDataId].lastName+
- '\n鐢佃瘽: '+PIData[awsDataId].telephone+
- '\n閭紪: '+PIData[awsDataId].zipCode+
- '\n璇︾粏鍦板潃: '+PIData[awsDataId].detailedAddress
- }else{
- piInformation = '鑱旂郴浜�: null'+
- '\n鐢佃瘽: '+PIData[awsDataId].telephone+
- '\n閭紪: '+PIData[awsDataId].zipCode+
- '\n璇︾粏鍦板潃: '+PIData[awsDataId].detailedAddress
- }
- //let piInformation = 'Name:'+contact['943114607025717249'].lastName +'\n' +'Phone:'+contact['943114607025717249'].phone
- createDiv.innerText = piInformation;
- let x=window.event.x;
- let y=window.event.y;
- createDiv.style.left=x;
- createDiv.style.top=y;
- createDiv.style.height='100px';
- createDiv.style.width='120px';
- createDiv.style.background="#dddddd";
- createDiv.style.position = "absolute";
- parentNode.appendChild(createDiv);
- parentNode.style.position = "relative";
- }
- function hidePIDiv(awsDataId){
- if(awsDataId.length == 0 || PIData[awsDataId]==null){
- return
- }
- document.getElementById(awsDataId+'_PI').remove();
- }
+ function showPIDiv(awsDataId){
+ if(awsDataId.length == 0 || PIData[awsDataId]==null){
+ return
+ }
+ console.log('awsDataId Value:'+awsDataId);
+ let parentNode = document.getElementById(awsDataId);
+ let createDiv = document.createElement("div");
+ createDiv.id = awsDataId+"_PI";
+ let piInformation = '';
- // function replaceSearchContactLookup() {
- // if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c') != null){
- // let contactHtmlString = '<img src="/img/s.gif" onclick="searchContact(\'allPage:allForm:contactId\',\'allPage:allForm:oppBlock2:UpdAddressId:Contacts__c\')" alt="Reference Document Number Lookup" class="lookupIcon" title="Reference Document Number Lookup (New Window)"/>';
- // let lookUpNode = htmlToElement(contactHtmlString);
- // console.log(lookUpNode);
- // let parentNode = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').parentNode;
- // parentNode.appendChild(lookUpNode);
- // if(contactInfoStr){
- // console.log('closePopup:'+contactInfoStr);
- // let contactInfo = JSON.parse(contactInfoStr);
- // let contactNodeId = 'allPage:allForm:oppBlock2:UpdAddressId:contactIdValue';
- // document.getElementById(contactNodeId).value = contactInfo.ContactId;
- // document.getElementById(closeField).value = contactInfo.Name;
- // }
- // }
- // }
+ if(PIData[awsDataId].lastName){
+ piInformation = '鑱旂郴浜�: '+PIData[awsDataId].lastName+
+ '\n鐢佃瘽: '+PIData[awsDataId].telephone+
+ '\n閭紪: '+PIData[awsDataId].zipCode+
+ '\n璇︾粏鍦板潃: '+PIData[awsDataId].detailedAddress
+ }else{
+ piInformation = '鑱旂郴浜�: null'+
+ '\n鐢佃瘽: '+PIData[awsDataId].telephone+
+ '\n閭紪: '+PIData[awsDataId].zipCode+
+ '\n璇︾粏鍦板潃: '+PIData[awsDataId].detailedAddress
+ }
+ //let piInformation = 'Name:'+contact['943114607025717249'].lastName +'\n' +'Phone:'+contact['943114607025717249'].phone
+ createDiv.innerText = piInformation;
+ let x=window.event.x;
+ let y=window.event.y;
+ createDiv.style.left=x;
+ createDiv.style.top=y;
+ createDiv.style.height='100px';
+ createDiv.style.width='120px';
+ createDiv.style.background="#dddddd";
+ createDiv.style.position = "absolute";
+ parentNode.appendChild(createDiv);
+ parentNode.style.position = "relative";
+ }
- function htmlToElement(html) {
- var template = document.createElement('template');
- html = html.trim(); // Never return a text node of whitespace as the result
- template.innerHTML = html;
- return template.content.firstChild;
- }
+ function hidePIDiv(awsDataId){
+ if(awsDataId.length == 0 || PIData[awsDataId]==null){
+ return
+ }
+ document.getElementById(awsDataId+'_PI').remove();
+ }
- //鑷畾涔塴ookup鏌ヨ
- // function searchContact(contactNodeId,field){
- // closeField = field;
- // let accountValue = "";
- // if (document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name')!=null) {
- // let accountNodeId = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name').id + '_lkid';
- // accountValue = document.getElementById(accountNodeId).value;
- // }
- // console.log(accountValue);
- // if(accountValue !='000000000000000'){
- // let baseUrl = "/apex/SearchContactPage";
- // let suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue;
- // let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no';
- // newSearchContactWindow = window.open(baseUrl+suffixUrl, 'Popup', newSearchContactParam);
- // if (window.focus) {
- // newSearchContactWindow.focus();
- // }
- // return false;
- // }else{
- // console.log('璇峰厛閫夋嫨瀹㈡埛鍐嶉�夋嫨鑱旂郴浜�')
- // }
- // }
+ // function replaceSearchContactLookup() {
+ // if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c') != null){
+ // let contactHtmlString = '<img src="/img/s.gif" onclick="searchContact(\'allPage:allForm:contactId\',\'allPage:allForm:oppBlock2:UpdAddressId:Contacts__c\')" alt="Reference Document Number Lookup" class="lookupIcon" title="Reference Document Number Lookup (New Window)"/>';
+ // let lookUpNode = htmlToElement(contactHtmlString);
+ // console.log(lookUpNode);
+ // let parentNode = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').parentNode;
+ // parentNode.appendChild(lookUpNode);
+ // if(contactInfoStr){
+ // console.log('closePopup:'+contactInfoStr);
+ // let contactInfo = JSON.parse(contactInfoStr);
+ // let contactNodeId = 'allPage:allForm:oppBlock2:UpdAddressId:contactIdValue';
+ // document.getElementById(contactNodeId).value = contactInfo.ContactId;
+ // document.getElementById(closeField).value = contactInfo.Name;
+ // }
+ // }
+ // }
- function closePopupWindow() {
- if (null != newSearchContactWindow) {
- newSearchContactWindow.close();
- }
- contactInfoStr = document.getElementById('allPage:allForm:contactId').value;
- console.log('closePopup:'+contactInfoStr);
- let contactInfo = JSON.parse(contactInfoStr);
- let contactNodeId = 'allPage:allForm:oppBlock2:UpdAddressId:contactIdValue';
- document.getElementById(contactNodeId).value = contactInfo.ContactId;
- document.getElementById(closeField).value = contactInfo.Name;
- }
- //2022 02 28 寮犲崕寤� display PI Data end
+ function htmlToElement(html) {
+ var template = document.createElement('template');
+ html = html.trim(); // Never return a text node of whitespace as the result
+ template.innerHTML = html;
+ return template.content.firstChild;
+ }
+
+ //鑷畾涔塴ookup鏌ヨ
+ // function searchContact(contactNodeId,field){
+ // closeField = field;
+ // let accountValue = "";
+ // if (document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name')!=null) {
+ // let accountNodeId = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name').id + '_lkid';
+ // accountValue = document.getElementById(accountNodeId).value;
+ // }
+ // console.log(accountValue);
+ // if(accountValue !='000000000000000'){
+ // let baseUrl = "/apex/SearchContactPage";
+ // let suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue;
+ // let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no';
+ // newSearchContactWindow = window.open(baseUrl+suffixUrl, 'Popup', newSearchContactParam);
+ // if (window.focus) {
+ // newSearchContactWindow.focus();
+ // }
+ // return false;
+ // }else{
+ // console.log('璇峰厛閫夋嫨瀹㈡埛鍐嶉�夋嫨鑱旂郴浜�')
+ // }
+ // }
+
+ function closePopupWindow() {
+ if (null != newSearchContactWindow) {
+ newSearchContactWindow.close();
+ }
+ contactInfoStr = document.getElementById('allPage:allForm:contactId').value;
+ console.log('closePopup:'+contactInfoStr);
+ let contactInfo = JSON.parse(contactInfoStr);
+ let contactNodeId = 'allPage:allForm:oppBlock2:UpdAddressId:contactIdValue';
+ document.getElementById(contactNodeId).value = contactInfo.ContactId;
+ document.getElementById(closeField).value = contactInfo.Name;
+ }
+ //2022 02 28 寮犲崕寤� display PI Data end
</script>
<script type="text/javascript">
-
- function DecryptAddress(){
- debugger
- let arr1 = [];let a1=false;
- let arr2 = [];let a2=false;
- j$('td.oraddress').each(function(i,e){
- let did = j$(e).attr('address-data-id');
- if (did) {
- arr1.push(did);
- }
+ function DecryptAddress() {
+ debugger;
+ let arr1 = [];
+ let a1 = false;
+ let arr2 = [];
+ let a2 = false;
+ j$('td.oraddress').each(function (i, e) {
+ let did = j$(e).attr('address-data-id');
+ if (did) {
+ arr1.push(did);
+ }
- did = j$(e).attr('contact-data-id');
- if (did) {
- arr2.push(did);
- }
- })
-
+ did = j$(e).attr('contact-data-id');
+ if (did) {
+ arr2.push(did);
+ }
+ });
+
if (arr1.length) {
b();
- AWSService.post(staticResource.searchUrl,{
- dataIds:arr1
- },function(data){
- ub();
- if(data && data.object && data.object.length > 0){
- for (let di in data.object) {
- if (data.object[di] && data.object[di].dataId) {
- addressAwsData[data.object[di].dataId] = data.object[di];
+ AWSService.post(
+ staticResource.searchUrl,
+ {
+ dataIds: arr1
+ },
+ function (data) {
+ ub();
+ if (data && data.object && data.object.length > 0) {
+ for (let di in data.object) {
+ if (data.object[di] && data.object[di].dataId) {
+ addressAwsData[data.object[di].dataId] =
+ data.object[di];
+ }
}
}
-
- }
- },staticResource.token)
+ },
+ staticResource.token
+ );
}
if (arr2.length) {
b();
- AWSService.post(staticResourceContact.searchUrl,{
- dataIds:arr2
- },function(data){
- ub();
- if(data && data.object && data.object.length > 0){
- for (let di in data.object) {
- if (data.object[di] && data.object[di].dataId) {
- addressAwsData[data.object[di].dataId] = data.object[di];
+ AWSService.post(
+ staticResourceContact.searchUrl,
+ {
+ dataIds: arr2
+ },
+ function (data) {
+ ub();
+ if (data && data.object && data.object.length > 0) {
+ for (let di in data.object) {
+ if (data.object[di] && data.object[di].dataId) {
+ addressAwsData[data.object[di].dataId] =
+ data.object[di];
+ }
}
}
-
- }
- },staticResourceContact.token)
+ },
+ staticResourceContact.token
+ );
}
}
</script>
<apex:form id="allForm">
- <apex:inputHidden id="tableValueFrontEnd" value="{!tableDataStr}"/>
- <apex:inputHidden value="{!contactId}" id="contactId"/>
- <apex:inputHidden value="{!insUpdDataStr}" id="insUpdDataStr"/>
- <div id="tab01">
+ <apex:inputHidden id="tableValueFrontEnd" value="{!tableDataStr}" />
+ <apex:inputHidden value="{!contactId}" id="contactId" />
+ <apex:inputHidden value="{!insUpdDataStr}" id="insUpdDataStr" />
+ <div id="tab01">
<!-- 椤甸潰鏁版嵁鍒濆鍖栨柟娉� -->
- <apex:actionFunction name="init" action="{!init}" rerender="oppBlock1,message,checEventFrame" onComplete="ub();"></apex:actionFunction>
+ <apex:actionFunction
+ name="init"
+ action="{!init}"
+ rerender="oppBlock1,message,checEventFrame"
+ onComplete="ub();"
+ ></apex:actionFunction>
<!-- 妫�绱㈡暟鎹煡璇㈡柟娉� -->
- <apex:actionFunction name="searchBtn" action="{!searchBtn}" rerender="oppBlock1,message,checEventFrame,tableValueFrontEnd" onComplete="ub();DecryptAddress();">
- <apex:param name="addressDataIds" assignTo="{!addressDataIds}" value=""></apex:param>
+ <apex:actionFunction
+ name="searchBtn"
+ action="{!searchBtn}"
+ rerender="oppBlock1,message,checEventFrame,tableValueFrontEnd"
+ onComplete="ub();DecryptAddress();"
+ >
+ <apex:param
+ name="addressDataIds"
+ assignTo="{!addressDataIds}"
+ value=""
+ ></apex:param>
</apex:actionFunction>
<!-- 閲囩敤鏂规硶 -->
<!--<actionFunction name="adoptSave" action="{!adoptSave}" rerender="oppBlock2,message" onComplete="ub();">
@@ -920,68 +954,150 @@
<apex:param name="isUpload" assignTo="{!isUpload}" value="" />
</actionFunction>-->
<!-- 淇濆瓨鍜屼慨鏀规柟娉� -->
- <apex:actionFunction name="save" action="{!save}" rerender="oppBlock2,message" onComplete="ub();Trans()"></apex:actionFunction>
+ <apex:actionFunction
+ name="save"
+ action="{!save}"
+ rerender="oppBlock2,message"
+ onComplete="ub();Trans()"
+ ></apex:actionFunction>
<!-- 鐐瑰嚮淇敼鎸夐挳鑾峰彇淇敼鏁版嵁鏂规硶 -->
- <apex:actionFunction name="onEditor" action="{!onEditor}" rerender="oppBlock2,checEventFrame,insUpdDataStr" onComplete="decrypt();ub();">
+ <apex:actionFunction
+ name="onEditor"
+ action="{!onEditor}"
+ rerender="oppBlock2,checEventFrame,insUpdDataStr"
+ onComplete="decrypt();ub();"
+ >
<apex:param name="UpdId" assignTo="{!UpdId}" value="" />
</apex:actionFunction>
<!-- 澶嶅埗鏂规硶 -->
- <apex:actionFunction name="onCopy" action="{!onCopy}" rerender="oppBlock2,checEventFrame," onComplete="decrypt();ub();">
+ <apex:actionFunction
+ name="onCopy"
+ action="{!onCopy}"
+ rerender="oppBlock2,checEventFrame,"
+ onComplete="decrypt();ub();"
+ >
<apex:param name="UpdId" assignTo="{!UpdId}" value="" />
</apex:actionFunction>
<!-- 杩斿洖鐖堕〉闈� -->
- <apex:actionFunction name="redirectPag" action="{!redirectPag}" rerender="true" onComplete="ub();"></apex:actionFunction>
- <apex:pageBlock id="searchBlock" tabStyle="Report">
- <table style="border-bottom-width: 0px; font-size:12px;width:100%">
- <tr>
- <td style="width: 15%">
- <font>绫� 鍨� </font>
+ <apex:actionFunction
+ name="redirectPag"
+ action="{!redirectPag}"
+ rerender="true"
+ onComplete="ub();"
+ ></apex:actionFunction>
+ <apex:pageBlock id="searchBlock" tabStyle="Report">
+ <table
+ style="
+ border-bottom-width: 0px;
+ font-size: 12px;
+ width: 100%;
+ "
+ >
+ <tr>
+ <td style="width: 15%">
+ <font>绫� 鍨� </font>
<!-- <apex:selectList id="numtextA1Id" value="{!numtextA1}" size="1" style="width:110px">
<apex:selectOptions value="{!optionType}"/>
</apex:selectList> -->
- <apex:inputField value="{!optionAddressClassification.Address_Classification__c}" id="AddressClassificationId"/>
+ <apex:inputField
+ value="{!optionAddressClassification.Address_Classification__c}"
+ id="AddressClassificationId"
+ />
</td>
<td style="width: 20%">
<font>瀹� 鎴� 鍚� </font>
- <apex:inputText id="txtNameId" value="{!txtName}"/>
- <a class="inlineEditUndoLink" title="娓呯┖" href="#" onclick="document.getElementById('allPage:allForm:searchBlock:txtNameId').value = '';document.getElementById('allPage:allForm:searchBlock:txtNameId').focus();" style="display: inline;">
- <img width="16px" height="16px" src="/img/s.gif" alt="娓呯┖" class="inlineEditUndo"/>
+ <apex:inputText id="txtNameId" value="{!txtName}" />
+ <a
+ class="inlineEditUndoLink"
+ title="娓呯┖"
+ href="#"
+ onclick="document.getElementById('allPage:allForm:searchBlock:txtNameId').value = '';document.getElementById('allPage:allForm:searchBlock:txtNameId').focus();"
+ style="display: inline"
+ >
+ <img
+ width="16px"
+ height="16px"
+ src="/img/s.gif"
+ alt="娓呯┖"
+ class="inlineEditUndo"
+ />
</a>
</td>
<td style="width: 20%">
<font>鍦� 鍧� </font>
- <apex:inputText id="txtAddressId" value="{!txtAddress}"/>
- <a class="inlineEditUndoLink" title="娓呯┖" href="#" onclick="document.getElementById('allPage:allForm:searchBlock:txtAddressId').value = '';document.getElementById('allPage:allForm:searchBlock:txtAddressId').focus(); " style="display: inline;">
- <img width="16px" height="16px" src="/s.gif" alt="娓呯┖" class="inlineEditUndo"/>
+ <apex:inputText
+ id="txtAddressId"
+ value="{!txtAddress}"
+ />
+ <a
+ class="inlineEditUndoLink"
+ title="娓呯┖"
+ href="#"
+ onclick="document.getElementById('allPage:allForm:searchBlock:txtAddressId').value = '';document.getElementById('allPage:allForm:searchBlock:txtAddressId').focus(); "
+ style="display: inline"
+ >
+ <img
+ width="16px"
+ height="16px"
+ src="/s.gif"
+ alt="娓呯┖"
+ class="inlineEditUndo"
+ />
</a>
</td>
<td style="width: 20%">
- <apex:commandButton onclick="searchBtnJs();return false;" rendered="true" value="妫�绱�" style="width:60px;" onComplete=""/>
+ <apex:commandButton
+ onclick="searchBtnJs();return false;"
+ rendered="true"
+ value="妫�绱�"
+ style="width: 60px"
+ onComplete=""
+ />
<!-- <apex:commandButton onclick="onAdoptJs();return false;" rendered="true" value="閲囩敤" style="width:60px;background:#98c1fbf7"/>
-->
- <apex:commandButton onclick="sendBackJs();return false;" rendered="true" value="杩斿洖" style="width:60px;"/>
+ <apex:commandButton
+ onclick="sendBackJs();return false;"
+ rendered="true"
+ value="杩斿洖"
+ style="width: 60px"
+ />
</td>
- <td style="width: 25%">
-
- </td>
+ <td style="width: 25%"> </td>
</tr>
</table>
</apex:pageBlock>
-
</div>
<div>
<apex:outputPanel id="message">
<apex:pageMessages />
</apex:outputPanel>
</div>
- <div id="tab02" style="overflow-x: auto; overflow-y: auto;">
+ <div id="tab02" style="overflow-x: auto; overflow-y: auto">
<apex:pageBlock id="oppBlock1" tabStyle="Report">
- <apex:pageblocksection title="鍦板潃鍒楄〃" id="edmpdDetails" rendered="true" columns="1" >
- <apex:outputPanel >
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L" >
+ <apex:pageblocksection
+ title="鍦板潃鍒楄〃"
+ id="edmpdDetails"
+ rendered="true"
+ columns="1"
+ >
+ <apex:outputPanel>
+ <table
+ class="list"
+ style="
+ border-bottom-width: 0px;
+ font-size: 11px;
+ border-spacing: 0;
+ "
+ border=""
+ id="tableHeader_L"
+ >
<thead>
- <tr class="headerRow" height="30px" align="center">
+ <tr
+ class="headerRow"
+ height="30px"
+ align="center"
+ >
<!--鏍囬 -->
<td style="">搴忓彿</td>
<td style="">绫诲瀷</td>
@@ -992,81 +1108,216 @@
<td style="">鐪�</td>
<td style="">甯�</td>
<td style="">璇︾粏鍦板潃</td>
- <td style="" colspan="3">
- 鎿嶄綔
- </td>
+ <td style="" colspan="3">鎿嶄綔</td>
</tr>
</thead>
<tbody>
<apex:variable value="{!0}" var="cnt" />
- <apex:repeat value="{!tableData}" var="or" id="oppTable">
- <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
- <td align="center" style="vertical-align: inherit;width:25px;border-width: 0px 1px 1px 0px;">
+ <apex:repeat
+ value="{!tableData}"
+ var="or"
+ id="oppTable"
+ >
+ <tr
+ class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}"
+ onmouseover="if (window.hiOn){hiOn(this);} "
+ onmouseout="if (window.hiOff){hiOff(this);} "
+ onblur="if (window.hiOff){hiOff(this);}"
+ onfocus="if (window.hiOn){hiOn(this);}"
+ >
+ <td
+ align="center"
+ style="
+ vertical-align: inherit;
+ width: 25px;
+ border-width: 0px 1px 1px 0px;
+ "
+ >
{!cnt+1}
</td>
- <td align="center" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
- <apex:outputText value="{!or.address.Address_Classification__c}" />
+ <td
+ align="center"
+ style="
+ vertical-align: inherit;
+ border-width: 0px 1px 1px 0px;
+ "
+ >
+ <apex:outputText
+ value="{!or.address.Address_Classification__c}"
+ />
</td>
- <td align="left" class="Customer__c" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
- <apex:outputfield value="{!or.address.Customer__c}" />
+ <td
+ align="left"
+ class="Customer__c"
+ style="
+ vertical-align: inherit;
+ border-width: 0px 1px 1px 0px;
+ "
+ >
+ <apex:outputfield
+ value="{!or.address.Customer__c}"
+ />
</td>
- <td align="left" class="oraddress" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" address-data-id="{!or.address.AWS_Data_Id__c}" contact-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}">
+ <td
+ align="left"
+ class="oraddress"
+ style="
+ vertical-align: inherit;
+ border-width: 0px 1px 1px 0px;
+ "
+ address-data-id="{!or.address.AWS_Data_Id__c}"
+ contact-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}"
+ >
<!-- <apex:outputfield value="{!or.address.Contacts__c}" id="{!or.address.Contacts__c}_{!or.address.Id}"/> -->
<!-- <a href="#" id="{!or.address.Id}" onmouseover="showPIDiv('{!or.address.Id}')" onmouseout="hidePIDiv('{!or.address.Id}')" aws-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}">{!or.address.Contacts__r.Name}</a> -->
- <a href="#" id="{!or.address.Id}" onmouseover="showPIDiv('{!or.address.Id}')" onmouseout="hidePIDiv('{!or.address.Id}')" aws-data-id="{!or.address.AWS_Data_Id__c}">{!or.address.ContactName__c}</a>
+ <a
+ href="#"
+ id="{!or.address.Id}"
+ onmouseover="showPIDiv('{!or.address.Id}')"
+ onmouseout="hidePIDiv('{!or.address.Id}')"
+ aws-data-id="{!or.address.AWS_Data_Id__c}"
+ >{!or.address.ContactName__c}</a
+ >
</td>
- <td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
- <apex:outputText value="{!or.address.Telephone__c}" />
+ <td
+ align="left"
+ style="
+ vertical-align: inherit;
+ border-width: 0px 1px 1px 0px;
+ "
+ >
+ <apex:outputText
+ value="{!or.address.Telephone__c}"
+ />
</td>
- <td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
- <apex:outputText value="{!or.address.ZipCode__c}" />
+ <td
+ align="left"
+ style="
+ vertical-align: inherit;
+ border-width: 0px 1px 1px 0px;
+ "
+ >
+ <apex:outputText
+ value="{!or.address.ZipCode__c}"
+ />
</td>
- <td align="center" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
- <apex:outputfield value="{!or.address.Province__c}" />
+ <td
+ align="center"
+ style="
+ vertical-align: inherit;
+ border-width: 0px 1px 1px 0px;
+ "
+ >
+ <apex:outputfield
+ value="{!or.address.Province__c}"
+ />
</td>
- <td align="center" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
- <apex:outputfield value="{!or.address.City__c}" />
+ <td
+ align="center"
+ style="
+ vertical-align: inherit;
+ border-width: 0px 1px 1px 0px;
+ "
+ >
+ <apex:outputfield
+ value="{!or.address.City__c}"
+ />
</td>
- <td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
- <apex:outputText value="{!or.address.Detailed_Address__c}" />
+ <td
+ align="left"
+ style="
+ vertical-align: inherit;
+ border-width: 0px 1px 1px 0px;
+ "
+ >
+ <apex:outputText
+ value="{!or.address.Detailed_Address__c}"
+ />
</td>
- <td align="center" style="vertical-align: inherit;width:30px;">
- <apex:commandButton value=" 缂栬緫 " onclick="onEditorJs('{!or.address.id}');return false;" style="background:#98c1fbf7;display:{!or.canEdit};"/>
+ <td
+ align="center"
+ style="
+ vertical-align: inherit;
+ width: 30px;
+ "
+ >
+ <apex:commandButton
+ value=" 缂栬緫 "
+ onclick="onEditorJs('{!or.address.id}');return false;"
+ style="background:#98c1fbf7;display:{!or.canEdit};"
+ />
</td>
- <td align="center" style="vertical-align: inherit;width:30px;">
- <apex:commandButton value=" 澶嶅埗 " onclick="onCopyJs('{!or.address.id}');return false;" style="background: #98c1fbf7;display:{!or.canCopy};"/>
+ <td
+ align="center"
+ style="
+ vertical-align: inherit;
+ width: 30px;
+ "
+ >
+ <apex:commandButton
+ value=" 澶嶅埗 "
+ onclick="onCopyJs('{!or.address.id}');return false;"
+ style="background: #98c1fbf7;display:{!or.canCopy};"
+ />
</td>
- <td align="center" style="vertical-align: inherit;width:30px;">
- <apex:commandButton value=" 閲囩敤 " onclick="onAdoptJs(event,JSON.parse('{!or.addressJson}'));return false;" style="background: #98c1fbf7;display:{!or.canAdopt};"/>
+ <td
+ align="center"
+ style="
+ vertical-align: inherit;
+ width: 30px;
+ "
+ >
+ <apex:commandButton
+ value=" 閲囩敤 "
+ onclick="onAdoptJs(event,JSON.parse('{!or.addressJson}'));return false;"
+ style="background: #98c1fbf7;display:{!or.canAdopt};"
+ />
</td>
</tr>
- <apex:variable value="{!cnt + 1}" var="cnt" />
+ <apex:variable
+ value="{!cnt + 1}"
+ var="cnt"
+ />
</apex:repeat>
</tbody>
<script>
- console.log('queryPI();')
+ console.log('queryPI();');
queryPI();
</script>
</table>
</apex:outputPanel>
</apex:pageblocksection>
</apex:pageBlock>
-
</div>
<div id="tab03">
<apex:pageBlock id="oppBlock2" tabStyle="Report">
<!-- <apex:inputHidden id="LastName_Encrypted__c" value="{!newCon.LastName_Encrypted__c}"/>
<apex:inputHidden id="Con_AWS_Data_Id__c" value="{!newCon.AWS_Data_Id__c}"/> -->
- <apex:inputHidden id="Add_AWS_Data_Id__c" value="{!insUpdData.AWS_Data_Id__c}"/>
+ <apex:inputHidden
+ id="Add_AWS_Data_Id__c"
+ value="{!insUpdData.AWS_Data_Id__c}"
+ />
<!-- zhj 鏂版柟妗堟敼閫� 2022-12-05 start -->
<!-- <apex:inputHidden id="Telephone_Encrypted__c" value="{!insUpdData.Telephone_Encrypted__c}"/>
<apex:inputHidden id="ContactName_Encrypted__c" value="{!insUpdData.ContactName_Encrypted__c}"/>
<apex:inputHidden id="ZipCode_Encrypted__c" value="{!insUpdData.ZipCode_Encrypted__c}"/>
<apex:inputHidden id="Detailed_Address_Encrypted__c" value="{!insUpdData.Detailed_Address_Encrypted__c}"/> -->
<!-- zhj 鏂版柟妗堟敼閫� 2022-12-05 end -->
- <apex:pageblocksection title="缂栬緫鍦板潃" id="UpdAddressId" rendered="true" columns="3">
- <apex:inputfield value="{!insUpdData.Address_Classification__c}" id="Address_Classification__c"/>
- <apex:inputfield value="{!insUpdData.Customer__c}" id="Customer__r_Name" required="false" />
+ <apex:pageblocksection
+ title="缂栬緫鍦板潃"
+ id="UpdAddressId"
+ rendered="true"
+ columns="3"
+ >
+ <apex:inputfield
+ value="{!insUpdData.Address_Classification__c}"
+ id="Address_Classification__c"
+ />
+ <apex:inputfield
+ value="{!insUpdData.Customer__c}"
+ id="Customer__r_Name"
+ required="false"
+ />
<!-- Before PIPL 20220308 -->
<!-- <apex:inputfield value="{!insUpdData.Contacts__c}" id="Contacts__c" required="false"/> -->
<!-- WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 start -->
@@ -1074,40 +1325,60 @@
<!-- <apex:inputText label="鑱旂郴浜�" disabled="true" value="{!contactNameValue}" id="Contacts__c">
</apex:inputText>
<apex:inputHidden id="contactIdValue" value="{!contactIdValue}"/> -->
- <apex:inputfield value="{!insUpdData.ContactName__c}" id="ContactName__c"/>
+ <apex:inputfield
+ value="{!insUpdData.ContactName__c}"
+ id="ContactName__c"
+ />
<!-- Add By Li Jun for PIPL 20220308 End -->
<!-- <apex:inputfield value="{!insUpdData.Create_Contacts__c}" id="Create_Contacts__c" required="false"/> -->
<!-- WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 end -->
- <apex:inputfield value="{!insUpdData.Province__c}" id="Province__r_Name" style="" />
- <apex:inputfield value="{!insUpdData.City__c}" id="City__r_name" />
- <apex:inputfield value="{!insUpdData.Telephone__c}" id="Telephone__c" />
- <apex:inputfield value="{!insUpdData.ZipCode__c}" id="ZipCode__c" />
+ <apex:inputfield
+ value="{!insUpdData.Province__c}"
+ id="Province__r_Name"
+ style=""
+ />
+ <apex:inputfield
+ value="{!insUpdData.City__c}"
+ id="City__r_name"
+ />
+ <apex:inputfield
+ value="{!insUpdData.Telephone__c}"
+ id="Telephone__c"
+ />
+ <apex:inputfield
+ value="{!insUpdData.ZipCode__c}"
+ id="ZipCode__c"
+ />
<!-- <apex:pageblockSectionItem /> -->
<!-- <apex:inputTextarea value="{!insUpdData.Detailed_Address__c}" id="Detailed_Address__c" style="resize:vertical;width: 90%" rows="3" cols="3"/> -->
- <apex:inputfield value="{!insUpdData.Detailed_Address__c}" id="Detailed_Address__c" style="resize:vertical;width: 98%"/>
+ <apex:inputfield
+ value="{!insUpdData.Detailed_Address__c}"
+ id="Detailed_Address__c"
+ style="resize: vertical; width: 98%"
+ />
<div id="errorMsg" class="errorMsg"></div>
</apex:pageblocksection>
- <div style="text-align: center;">
- <apex:commandButton immediate="true" value="淇濆瓨" onclick="savaJs();" rerender="dummy" />
+ <div style="text-align: center">
+ <apex:commandButton
+ immediate="true"
+ value="淇濆瓨"
+ onclick="savaJs();"
+ rerender="dummy"
+ />
</div>
<!-- <script>
replaceSearchContactLookup();
</script> -->
</apex:pageBlock>
- </div>
-
+ </div>
</apex:form>
<apex:outputPanel id="checEventFrame">
- <script type="text/javascript">
-
-
+ <script type="text/javascript">
j$("select option[value='鍔炰簨澶�']")[1].remove();
-
+
DecryptAddress();
-
</script>
</apex:outputPanel>
-
-</apex:page>
\ No newline at end of file
+</apex:page>
diff --git a/force-app/main/default/pages/StraightBackAddress.page-meta.xml b/force-app/main/default/pages/StraightBackAddress.page-meta.xml
index 5dc8817..75ff233 100644
--- a/force-app/main/default/pages/StraightBackAddress.page-meta.xml
+++ b/force-app/main/default/pages/StraightBackAddress.page-meta.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>45.0</apiVersion>
- <availableInTouch>true</availableInTouch>
+ <availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<label>StraightBackAddress</label>
</ApexPage>
diff --git a/force-app/main/default/permissionsets/Community_Consumable_LEX_PS.permissionset-meta.xml b/force-app/main/default/permissionsets/Community_Consumable_LEX_PS.permissionset-meta.xml
new file mode 100644
index 0000000..d26d5e1
--- /dev/null
+++ b/force-app/main/default/permissionsets/Community_Consumable_LEX_PS.permissionset-meta.xml
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
+ <classAccesses>
+ <apexClass>LexArriveGoodsController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexArriveGoodsMainController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexArriveGsDetailsController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexCancelRemoveBoxController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConInvoiceList</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConInvoiceViewController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConInvoicedetailsController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConsumableAccountController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConsumableAccountInfoController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConsumableAccountSOQL</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConsumableController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConsumableGoodsInfo</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConsumableOrderManageController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexDealerInquiryModifyStateController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexInventoryController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexInventoryListController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexInventoryViewController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexLicenceReminderController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexOutboundorderImportController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexOverdueStockController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexProductLimitEditController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexRemoveBoxController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSaleAndDeliveryController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSaleOrderController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSearchContractController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSearchHospitalController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSummonsCreatController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexTopPageController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexUpAccountProLimit</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexUtility</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>lexSearchAgencyHospitalController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <flowAccesses>
+ <enabled>true</enabled>
+ <flow>
+CommunityWeeklyReport;
+ </flow>
+ </flowAccesses>
+ <hasActivationRequired>false</hasActivationRequired>
+ <label>Community Consumable LEX PS</label>
+ <objectPermissions>
+ <allowCreate>true</allowCreate>
+ <allowDelete>false</allowDelete>
+ <allowEdit>false</allowEdit>
+ <allowRead>true</allowRead>
+ <modifyAllRecords>false</modifyAllRecords>
+ <object>Agency_Report_Header__c</object>
+ <viewAllRecords>false</viewAllRecords>
+ </objectPermissions>
+ <objectPermissions>
+ <allowCreate>true</allowCreate>
+ <allowDelete>false</allowDelete>
+ <allowEdit>false</allowEdit>
+ <allowRead>true</allowRead>
+ <modifyAllRecords>false</modifyAllRecords>
+ <object>Agency_Report__c</object>
+ <viewAllRecords>false</viewAllRecords>
+ </objectPermissions>
+ <userPermissions>
+ <enabled>true</enabled>
+ <name>ChatterEnabledForUser</name>
+ </userPermissions>
+ <userPermissions>
+ <enabled>true</enabled>
+ <name>ViewContent</name>
+ </userPermissions>
+</PermissionSet>
diff --git a/force-app/main/default/permissionsets/Community_LEX_PS.permissionset-meta.xml b/force-app/main/default/permissionsets/Community_LEX_PS.permissionset-meta.xml
index 449d434..0d9d229 100644
--- a/force-app/main/default/permissionsets/Community_LEX_PS.permissionset-meta.xml
+++ b/force-app/main/default/permissionsets/Community_LEX_PS.permissionset-meta.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" ?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
<classAccesses>
<apexClass>LexArriveGoodsController</apexClass>
@@ -13,7 +13,15 @@
<enabled>true</enabled>
</classAccesses>
<classAccesses>
+ <apexClass>LexBTReportController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
<apexClass>LexCancelRemoveBoxController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexCancelRemoveBoxControllerTest</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
@@ -26,6 +34,10 @@
</classAccesses>
<classAccesses>
<apexClass>LexConInvoicedetailsController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexConsumApply_FromQISCtl</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
@@ -53,7 +65,15 @@
<enabled>true</enabled>
</classAccesses>
<classAccesses>
+ <apexClass>LexContractAuthorizeController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
<apexClass>LexDealerInquiryModifyStateController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexEquipmentRentalApply_FromQISCtl</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
@@ -61,7 +81,23 @@
<enabled>true</enabled>
</classAccesses>
<classAccesses>
+ <apexClass>LexInventoryHeaderClearStatusController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexInventoryHeaderController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
<apexClass>LexInventoryListController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexInventoryListControllerTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexInventoryListTest</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
@@ -69,7 +105,51 @@
<enabled>true</enabled>
</classAccesses>
<classAccesses>
+ <apexClass>LexInventoryViewControllerTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexInventoryViewTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
<apexClass>LexLicenceReminderController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexLicenceReminderControllerTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexLostSubmitApprovalController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexMeetingCostsController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexNewAndEditBasePIPLController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexNewAndEditContactPIPLController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexNewAndEditLeadPIPLController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexNewAndEditReportPIPLController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexNewSICustomNewController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexNoReportApplicationController</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
@@ -81,11 +161,47 @@
<enabled>true</enabled>
</classAccesses>
<classAccesses>
+ <apexClass>LexPaymentPlanLoadController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexPrintInspectupReportController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
<apexClass>LexProductLimitEditController</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
+ <apexClass>LexProductLimitEditControllerTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexProductLimitEditTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
<apexClass>LexRemoveBoxController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexRemoveBoxControllerTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexRentalApplySetSelectSubstitute</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSIAbortBtnController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSINewQuoteEntryController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSISearchSetProductController</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
@@ -97,11 +213,35 @@
<enabled>true</enabled>
</classAccesses>
<classAccesses>
+ <apexClass>LexSearchAgencyHospitalTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
<apexClass>LexSearchContractController</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
<apexClass>LexSearchHospitalController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSearchProductController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSearchProductCsController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSearchProductIraiController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexSearchSetProductController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexStockCancelController</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
@@ -113,7 +253,23 @@
<enabled>true</enabled>
</classAccesses>
<classAccesses>
+ <apexClass>LexTopPageControllerTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexTransferApplyController</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
<apexClass>LexUpAccountProLimit</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexUpAccountProLimitControllerTest</apexClass>
+ <enabled>true</enabled>
+ </classAccesses>
+ <classAccesses>
+ <apexClass>LexUpAccountProLimitTest</apexClass>
<enabled>true</enabled>
</classAccesses>
<classAccesses>
@@ -121,13 +277,13 @@
<enabled>true</enabled>
</classAccesses>
<classAccesses>
- <apexClass>lexSearchAgencyHospitalController</apexClass>
+ <apexClass>LexUtilityTest</apexClass>
<enabled>true</enabled>
</classAccesses>
- <flowAccesses>
+ <classAccesses>
+ <apexClass>LexVisitReportCancelController</apexClass>
<enabled>true</enabled>
- <flow>CommunityWeeklyReport</flow>
- </flowAccesses>
+ </classAccesses>
<hasActivationRequired>false</hasActivationRequired>
<label>Community LEX PS</label>
<objectPermissions>
diff --git a/force-app/main/default/reports/ConsumableSalesReport.reportFolder-meta.xml b/force-app/main/default/reports/ConsumableSalesReport.reportFolder-meta.xml
new file mode 100644
index 0000000..e5795ac
--- /dev/null
+++ b/force-app/main/default/reports/ConsumableSalesReport.reportFolder-meta.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ReportFolder xmlns="http://soap.sforce.com/2006/04/metadata">
+ <folderShares>
+ <accessLevel>Manage</accessLevel>
+ <sharedTo>buli@deloitte.com.cn</sharedTo>
+ <sharedToType>User</sharedToType>
+ </folderShares>
+ <folderShares>
+ <accessLevel>View</accessLevel>
+ <sharedTo>ENG_PartnerALL</sharedTo>
+ <sharedToType>Group</sharedToType>
+ </folderShares>
+ <folderShares>
+ <accessLevel>View</accessLevel>
+ <sharedTo>ET_PartnerALL</sharedTo>
+ <sharedToType>Group</sharedToType>
+ </folderShares>
+ <name>Consumable Sales Report</name>
+</ReportFolder>
diff --git a/force-app/main/default/reports/ConsumableSalesReport/Consumable_Outstock_Invoice_Lex.report-meta.xml b/force-app/main/default/reports/ConsumableSalesReport/Consumable_Outstock_Invoice_Lex.report-meta.xml
new file mode 100644
index 0000000..3004e17
--- /dev/null
+++ b/force-app/main/default/reports/ConsumableSalesReport/Consumable_Outstock_Invoice_Lex.report-meta.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Report xmlns="http://soap.sforce.com/2006/04/metadata">
+ <columns>
+ <field>FK_NAME</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Report_Acc_Dep__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Product_bbname__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Shipment_amount__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.ProduceCompany__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Report_Product_Approbation__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Report_Product_Expiration__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Invoicedet1_OD_link__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Invoice_Unitprice__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Invoiced_Count__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.InvoicedProCost_RMB__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Invoice_Cost_RMB__c</field>
+ </columns>
+ <currency>CNY</currency>
+ <filter>
+ <criteriaItems>
+ <column>FK_CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_order__c.Order_Invoice</value>
+ </criteriaItems>
+ <language>en_US</language>
+ </filter>
+ <format>Tabular</format>
+ <name>娑堣�楀搧鍙戠エ鎶ヨ〃</name>
+ <params>
+ <name>co</name>
+ <value>1</value>
+ </params>
+ <reportType
+ >CustomEntity$Consumable_Orderdetails__c@Consumable_Orderdetails__c.Consumable_order__c</reportType>
+ <scope>organization</scope>
+ <showDetails>true</showDetails>
+ <showGrandTotal>true</showGrandTotal>
+ <showSubTotals>true</showSubTotals>
+ <timeFrameFilter>
+ <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
+ <interval>INTERVAL_CUSTOM</interval>
+ </timeFrameFilter>
+</Report>
diff --git a/force-app/main/default/reports/ConsumableSalesReport/CurrentMonthSalesRankByAccount.report-meta.xml b/force-app/main/default/reports/ConsumableSalesReport/CurrentMonthSalesRankByAccount.report-meta.xml
new file mode 100644
index 0000000..f91948e
--- /dev/null
+++ b/force-app/main/default/reports/ConsumableSalesReport/CurrentMonthSalesRankByAccount.report-meta.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Report xmlns="http://soap.sforce.com/2006/04/metadata">
+ <chart>
+ <backgroundColor1>#FFFFFF</backgroundColor1>
+ <backgroundColor2>#FFFFFF</backgroundColor2>
+ <backgroundFadeDir>Diagonal</backgroundFadeDir>
+ <chartSummaries>
+ <aggregate>Sum</aggregate>
+ <axisBinding>y</axisBinding>
+ <column>Consumable_Orderdetails__c.Sale_amount__c</column>
+ </chartSummaries>
+ <chartType>HorizontalBar</chartType>
+ <enableHoverLabels>false</enableHoverLabels>
+ <expandOthers>true</expandOthers>
+ <groupingColumn
+ >Consumable_Orderdetails__c.HospItal_Name__c</groupingColumn>
+ <location>CHART_BOTTOM</location>
+ <showAxisLabels>false</showAxisLabels>
+ <showPercentage>false</showPercentage>
+ <showTotal>false</showTotal>
+ <showValues>false</showValues>
+ <size>Medium</size>
+ <summaryAxisRange>Auto</summaryAxisRange>
+ <textColor>#000000</textColor>
+ <textSize>12</textSize>
+ <titleColor>#000000</titleColor>
+ <titleSize>18</titleSize>
+ </chart>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Sale_amount__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.OT_Code__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Used_date__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Order_ForCustomerText__c</field>
+ </columns>
+ <currency>CNY</currency>
+ <filter>
+ <booleanFilter>((1 OR 2) AND 3) AND 4 AND 5</booleanFilter>
+ <criteriaItems>
+ <column>CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_Orderdetails__c.Detail1_Sale</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_Orderdetails__c.Detail1_Shipment</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.Dealer_Info1_text__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>notContain</operator>
+ <value>TEST,濂ユ灄宸存柉</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.NotShow_data__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>0</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.HospItal_Name__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>notEqual</operator>
+ <value />
+ </criteriaItems>
+ <language>zh_CN</language>
+ </filter>
+ <format>Summary</format>
+ <groupingsDown>
+ <aggregateType>Sum</aggregateType>
+ <dateGranularity>Day</dateGranularity>
+ <field>Consumable_Orderdetails__c.HospItal_Name__c</field>
+ <sortByName>Consumable_Orderdetails__c.Sale_amount__c</sortByName>
+ <sortOrder>Desc</sortOrder>
+ <sortType>Aggregate</sortType>
+ </groupingsDown>
+ <name>鏈湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜鍖婚櫌</name>
+ <params>
+ <name>co</name>
+ <value>1</value>
+ </params>
+ <reportType>CustomEntity$Consumable_Orderdetails__c</reportType>
+ <scope>organization</scope>
+ <showDetails>false</showDetails>
+ <showGrandTotal>true</showGrandTotal>
+ <showSubTotals>true</showSubTotals>
+ <sortColumn>Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
+ <sortOrder>Desc</sortOrder>
+ <timeFrameFilter>
+ <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
+ <interval>INTERVAL_CURFY</interval>
+ </timeFrameFilter>
+</Report>
diff --git a/force-app/main/default/reports/ConsumableSalesReport/CurrentMonthSalesRankByProduct.report-meta.xml b/force-app/main/default/reports/ConsumableSalesReport/CurrentMonthSalesRankByProduct.report-meta.xml
new file mode 100644
index 0000000..9d1ef26
--- /dev/null
+++ b/force-app/main/default/reports/ConsumableSalesReport/CurrentMonthSalesRankByProduct.report-meta.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Report xmlns="http://soap.sforce.com/2006/04/metadata">
+ <chart>
+ <backgroundColor1>#FFFFFF</backgroundColor1>
+ <backgroundColor2>#FFFFFF</backgroundColor2>
+ <backgroundFadeDir>Diagonal</backgroundFadeDir>
+ <chartSummaries>
+ <aggregate>Sum</aggregate>
+ <axisBinding>y</axisBinding>
+ <column>Consumable_Orderdetails__c.Sale_amount__c</column>
+ </chartSummaries>
+ <chartType>HorizontalBar</chartType>
+ <enableHoverLabels>false</enableHoverLabels>
+ <expandOthers>true</expandOthers>
+ <groupingColumn
+ >Consumable_Orderdetails__c.Product_bbname__c</groupingColumn>
+ <location>CHART_BOTTOM</location>
+ <showAxisLabels>true</showAxisLabels>
+ <showPercentage>false</showPercentage>
+ <showTotal>false</showTotal>
+ <showValues>false</showValues>
+ <size>Medium</size>
+ <summaryAxisRange>Auto</summaryAxisRange>
+ <textColor>#000000</textColor>
+ <textSize>12</textSize>
+ <titleColor>#000000</titleColor>
+ <titleSize>18</titleSize>
+ </chart>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Sale_amount__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.OT_Code__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Used_date__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.HospItal_Code__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.HospItal_Name__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Order_ForCustomerText__c</field>
+ </columns>
+ <currency>CNY</currency>
+ <filter>
+ <booleanFilter>((1 OR 2) AND 3) AND 4 AND 5</booleanFilter>
+ <criteriaItems>
+ <column>CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_Orderdetails__c.Detail1_Sale</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_Orderdetails__c.Detail1_Shipment</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.Dealer_Info1_text__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>notContain</operator>
+ <value>TEST,濂ユ灄宸存柉</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.NotShow_data__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>0</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.Product_bbname__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>notEqual</operator>
+ <value />
+ </criteriaItems>
+ <language>zh_CN</language>
+ </filter>
+ <format>Summary</format>
+ <groupingsDown>
+ <aggregateType>Sum</aggregateType>
+ <dateGranularity>Day</dateGranularity>
+ <field>Consumable_Orderdetails__c.Product_bbname__c</field>
+ <sortByName>Consumable_Orderdetails__c.Sale_amount__c</sortByName>
+ <sortOrder>Desc</sortOrder>
+ <sortType>Aggregate</sortType>
+ </groupingsDown>
+ <name>鏈湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜浜у搧</name>
+ <params>
+ <name>co</name>
+ <value>1</value>
+ </params>
+ <reportType>CustomEntity$Consumable_Orderdetails__c</reportType>
+ <scope>organization</scope>
+ <showDetails>false</showDetails>
+ <showGrandTotal>true</showGrandTotal>
+ <showSubTotals>true</showSubTotals>
+ <sortColumn>Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
+ <sortOrder>Desc</sortOrder>
+ <timeFrameFilter>
+ <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
+ <interval>INTERVAL_CURFY</interval>
+ </timeFrameFilter>
+</Report>
diff --git a/force-app/main/default/reports/ConsumableSalesReport/LastMonthSalesByAccount1.report-meta.xml b/force-app/main/default/reports/ConsumableSalesReport/LastMonthSalesByAccount1.report-meta.xml
new file mode 100644
index 0000000..7e5510d
--- /dev/null
+++ b/force-app/main/default/reports/ConsumableSalesReport/LastMonthSalesByAccount1.report-meta.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Report xmlns="http://soap.sforce.com/2006/04/metadata">
+ <chart>
+ <backgroundColor1>#FFFFFF</backgroundColor1>
+ <backgroundColor2>#FFFFFF</backgroundColor2>
+ <backgroundFadeDir>Diagonal</backgroundFadeDir>
+ <chartSummaries>
+ <aggregate>Sum</aggregate>
+ <axisBinding>y</axisBinding>
+ <column>Consumable_Orderdetails__c.Sale_amount__c</column>
+ </chartSummaries>
+ <chartType>HorizontalBar</chartType>
+ <enableHoverLabels>false</enableHoverLabels>
+ <expandOthers>true</expandOthers>
+ <groupingColumn
+ >Consumable_Orderdetails__c.HospItal_Name__c</groupingColumn>
+ <location>CHART_BOTTOM</location>
+ <showAxisLabels>true</showAxisLabels>
+ <showPercentage>false</showPercentage>
+ <showTotal>false</showTotal>
+ <showValues>false</showValues>
+ <size>Medium</size>
+ <summaryAxisRange>Auto</summaryAxisRange>
+ <textColor>#000000</textColor>
+ <textSize>12</textSize>
+ <titleColor>#000000</titleColor>
+ <titleSize>18</titleSize>
+ </chart>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Sale_amount__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.OT_Code__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Used_date__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Order_ForCustomerText__c</field>
+ </columns>
+ <currency>CNY</currency>
+ <filter>
+ <booleanFilter>((1 OR 2) AND 3) AND 4 AND 5</booleanFilter>
+ <criteriaItems>
+ <column>CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_Orderdetails__c.Detail1_Sale</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_Orderdetails__c.Detail1_Shipment</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.Dealer_Info1_text__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>notContain</operator>
+ <value>TEST,濂ユ灄宸存柉</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.NotShow_data__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>0</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.HospItal_Name__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>notEqual</operator>
+ <value />
+ </criteriaItems>
+ <language>zh_CN</language>
+ </filter>
+ <format>Summary</format>
+ <groupingsDown>
+ <aggregateType>Sum</aggregateType>
+ <dateGranularity>Day</dateGranularity>
+ <field>Consumable_Orderdetails__c.HospItal_Name__c</field>
+ <sortByName>Consumable_Orderdetails__c.Sale_amount__c</sortByName>
+ <sortOrder>Desc</sortOrder>
+ <sortType>Aggregate</sortType>
+ </groupingsDown>
+ <name>涓婃湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜鍖婚櫌</name>
+ <params>
+ <name>co</name>
+ <value>1</value>
+ </params>
+ <reportType>CustomEntity$Consumable_Orderdetails__c</reportType>
+ <scope>organization</scope>
+ <showDetails>false</showDetails>
+ <showGrandTotal>true</showGrandTotal>
+ <showSubTotals>true</showSubTotals>
+ <sortColumn>Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
+ <sortOrder>Desc</sortOrder>
+ <timeFrameFilter>
+ <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
+ <interval>INTERVAL_CUSTOM</interval>
+ </timeFrameFilter>
+</Report>
diff --git a/force-app/main/default/reports/ConsumableSalesReport/LastMonthSalesByProduct.report-meta.xml b/force-app/main/default/reports/ConsumableSalesReport/LastMonthSalesByProduct.report-meta.xml
new file mode 100644
index 0000000..9876a83
--- /dev/null
+++ b/force-app/main/default/reports/ConsumableSalesReport/LastMonthSalesByProduct.report-meta.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Report xmlns="http://soap.sforce.com/2006/04/metadata">
+ <chart>
+ <backgroundColor1>#FFFFFF</backgroundColor1>
+ <backgroundColor2>#FFFFFF</backgroundColor2>
+ <backgroundFadeDir>Diagonal</backgroundFadeDir>
+ <chartSummaries>
+ <aggregate>Sum</aggregate>
+ <axisBinding>y</axisBinding>
+ <column>Consumable_Orderdetails__c.Sale_amount__c</column>
+ </chartSummaries>
+ <chartType>HorizontalBar</chartType>
+ <enableHoverLabels>false</enableHoverLabels>
+ <expandOthers>true</expandOthers>
+ <groupingColumn
+ >Consumable_Orderdetails__c.Product_bbname__c</groupingColumn>
+ <location>CHART_BOTTOM</location>
+ <showAxisLabels>false</showAxisLabels>
+ <showPercentage>false</showPercentage>
+ <showTotal>false</showTotal>
+ <showValues>false</showValues>
+ <size>Medium</size>
+ <summaryAxisRange>Auto</summaryAxisRange>
+ <textColor>#000000</textColor>
+ <textSize>12</textSize>
+ <titleColor>#000000</titleColor>
+ <titleSize>18</titleSize>
+ </chart>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Sale_amount__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.OT_Code__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Used_date__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.HospItal_Code__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.HospItal_Name__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Order_ForCustomerText__c</field>
+ </columns>
+ <currency>CNY</currency>
+ <filter>
+ <booleanFilter>((1 OR 2) AND 3) AND 4 AND 5</booleanFilter>
+ <criteriaItems>
+ <column>CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_Orderdetails__c.Detail1_Sale</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_Orderdetails__c.Detail1_Shipment</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.Dealer_Info1_text__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>notContain</operator>
+ <value>TEST,濂ユ灄宸存柉</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.NotShow_data__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>0</value>
+ </criteriaItems>
+ <criteriaItems>
+ <column>Consumable_Orderdetails__c.Product_bbname__c</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>notEqual</operator>
+ <value />
+ </criteriaItems>
+ <language>zh_CN</language>
+ </filter>
+ <format>Summary</format>
+ <groupingsDown>
+ <aggregateType>Sum</aggregateType>
+ <dateGranularity>Day</dateGranularity>
+ <field>Consumable_Orderdetails__c.Product_bbname__c</field>
+ <sortByName>Consumable_Orderdetails__c.Sale_amount__c</sortByName>
+ <sortOrder>Desc</sortOrder>
+ <sortType>Aggregate</sortType>
+ </groupingsDown>
+ <name>涓婃湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜浜у搧</name>
+ <params>
+ <name>co</name>
+ <value>1</value>
+ </params>
+ <reportType>CustomEntity$Consumable_Orderdetails__c</reportType>
+ <scope>organization</scope>
+ <showDetails>false</showDetails>
+ <showGrandTotal>true</showGrandTotal>
+ <showSubTotals>true</showSubTotals>
+ <sortColumn>Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
+ <sortOrder>Desc</sortOrder>
+ <timeFrameFilter>
+ <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
+ <interval>INTERVAL_CUSTOM</interval>
+ </timeFrameFilter>
+</Report>
diff --git a/force-app/main/default/reports/ConsumableSalesReport/Report_Outbound_Lex.report-meta.xml b/force-app/main/default/reports/ConsumableSalesReport/Report_Outbound_Lex.report-meta.xml
new file mode 100644
index 0000000..76cfcbc
--- /dev/null
+++ b/force-app/main/default/reports/ConsumableSalesReport/Report_Outbound_Lex.report-meta.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Report xmlns="http://soap.sforce.com/2006/04/metadata">
+ <columns>
+ <field>FK_NAME</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Product_bbname__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Shipment_amount__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.ProduceCompany__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Report_Product_Approbation__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Report_Product_Expiration__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Consumable_Orderdetails__c.Invoiced_Procount__c</field>
+ </columns>
+ <columns>
+ <field>Consumable_Orderdetails__c.Product_OutDate__c</field>
+ </columns>
+ <currency>CNY</currency>
+ <description>鍑哄簱鎶ヨ〃</description>
+ <filter>
+ <criteriaItems>
+ <column>FK_CUST_RECORDTYPE</column>
+ <columnToColumn>false</columnToColumn>
+ <isUnlocked>true</isUnlocked>
+ <operator>equals</operator>
+ <value>Consumable_order__c.Sale,Consumable_order__c.Shipment</value>
+ </criteriaItems>
+ <language>en_US</language>
+ </filter>
+ <format>Tabular</format>
+ <name>娑堣�楀搧鍑哄簱鎶ヨ〃</name>
+ <params>
+ <name>co</name>
+ <value>1</value>
+ </params>
+ <reportType
+ >CustomEntity$Consumable_Orderdetails__c@Consumable_Orderdetails__c.Consumable_order__c</reportType>
+ <scope>organization</scope>
+ <showDetails>true</showDetails>
+ <showGrandTotal>true</showGrandTotal>
+ <showSubTotals>true</showSubTotals>
+ <timeFrameFilter>
+ <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
+ <interval>INTERVAL_CUSTOM</interval>
+ </timeFrameFilter>
+</Report>
diff --git a/force-app/main/default/reports/ConsumableSalesReport/WeeklyReportForAgency.report-meta.xml b/force-app/main/default/reports/ConsumableSalesReport/WeeklyReportForAgency.report-meta.xml
new file mode 100644
index 0000000..c566588
--- /dev/null
+++ b/force-app/main/default/reports/ConsumableSalesReport/WeeklyReportForAgency.report-meta.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Report xmlns="http://soap.sforce.com/2006/04/metadata">
+ <columns>
+ <field>Agency_Report__c.Report_Date__c</field>
+ </columns>
+ <columns>
+ <field>Agency_Report__c.Department_Cateogy_text__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Agency_Report__c.ConsumptionOfConsumables__c</field>
+ </columns>
+ <columns>
+ <field>Agency_Report__c.ProductCcategory__c</field>
+ </columns>
+ <columns>
+ <aggregateTypes>Sum</aggregateTypes>
+ <field>Agency_Report__c.warlocksNumber__c</field>
+ </columns>
+ <currency>CNY</currency>
+ <format>Summary</format>
+ <groupingsDown>
+ <dateGranularity>Day</dateGranularity>
+ <field>Agency_Report__c.UseProduct1__c</field>
+ <sortOrder>Asc</sortOrder>
+ </groupingsDown>
+ <name>缁忛攢鍟嗗懆鎶ユ椿鍔ㄤ竴瑙�</name>
+ <params>
+ <name>co</name>
+ <value>1</value>
+ </params>
+ <reportType
+ >CustomEntityCustomEntity$Agency_Report_Header__c$Agency_Report__c</reportType>
+ <scope>organization</scope>
+ <showDetails>true</showDetails>
+ <showGrandTotal>true</showGrandTotal>
+ <showSubTotals>true</showSubTotals>
+ <sortColumn>Agency_Report__c.Report_Date__c</sortColumn>
+ <sortOrder>Desc</sortOrder>
+ <timeFrameFilter>
+ <dateColumn>Agency_Report_Header__c.Week__c</dateColumn>
+ <interval>INTERVAL_LAST60</interval>
+ </timeFrameFilter>
+</Report>
diff --git a/force-app/main/default/reports/Consumable_KC/CurrentMonthSalesRankByAccount.report-meta.xml b/force-app/main/default/reports/Consumable_KC/CurrentMonthSalesRankByAccount.report-meta.xml
deleted file mode 100644
index 26719f3..0000000
--- a/force-app/main/default/reports/Consumable_KC/CurrentMonthSalesRankByAccount.report-meta.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Report xmlns="http://soap.sforce.com/2006/04/metadata">
- <chart>
- <backgroundColor1>#FFFFFF</backgroundColor1>
- <backgroundColor2>#FFFFFF</backgroundColor2>
- <backgroundFadeDir>Diagonal</backgroundFadeDir>
- <chartSummaries>
- <aggregate>Sum</aggregate>
- <axisBinding>y</axisBinding>
- <column>Consumable_Orderdetails__c.Sale_amount__c</column>
- </chartSummaries>
- <chartType>HorizontalBar</chartType>
- <enableHoverLabels>false</enableHoverLabels>
- <expandOthers>true</expandOthers>
- <groupingColumn
- >Consumable_Orderdetails__c.HospItal_Name__c</groupingColumn>
- <location>CHART_BOTTOM</location>
- <showAxisLabels>false</showAxisLabels>
- <showPercentage>false</showPercentage>
- <showTotal>false</showTotal>
- <showValues>false</showValues>
- <size>Medium</size>
- <summaryAxisRange>Auto</summaryAxisRange>
- <textColor>#000000</textColor>
- <textSize>12</textSize>
- <titleColor>#000000</titleColor>
- <titleSize>18</titleSize>
- </chart>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Sale_amount__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.OT_Code__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Used_date__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Order_ForCustomerText__c</field>
- </columns>
- <currency>CNY</currency>
- <filter>
- <booleanFilter>((1 OR 2) AND 3) AND 4 AND 5</booleanFilter>
- <criteriaItems>
- <column>CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_Orderdetails__c.Detail1_Sale</value>
- </criteriaItems>
- <criteriaItems>
- <column>CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_Orderdetails__c.Detail1_Shipment</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.Dealer_Info1_text__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>notContain</operator>
- <value>TEST,濂ユ灄宸存柉</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.NotShow_data__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>0</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.HospItal_Name__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>notEqual</operator>
- <value />
- </criteriaItems>
- <language>zh_CN</language>
- </filter>
- <format>Summary</format>
- <groupingsDown>
- <aggregateType>Sum</aggregateType>
- <dateGranularity>Day</dateGranularity>
- <field>Consumable_Orderdetails__c.HospItal_Name__c</field>
- <sortByName>Consumable_Orderdetails__c.Sale_amount__c</sortByName>
- <sortOrder>Desc</sortOrder>
- <sortType>Aggregate</sortType>
- </groupingsDown>
- <name>鏈湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜鍖婚櫌</name>
- <params>
- <name>co</name>
- <value>1</value>
- </params>
- <reportType>CustomEntity$Consumable_Orderdetails__c</reportType>
- <scope>organization</scope>
- <showDetails>false</showDetails>
- <showGrandTotal>true</showGrandTotal>
- <showSubTotals>true</showSubTotals>
- <sortColumn>Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
- <sortOrder>Desc</sortOrder>
- <timeFrameFilter>
- <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
- <interval>INTERVAL_CURFY</interval>
- </timeFrameFilter>
-</Report>
diff --git a/force-app/main/default/reports/Consumable_KC/CurrentMonthSalesRankByProduct.report-meta.xml b/force-app/main/default/reports/Consumable_KC/CurrentMonthSalesRankByProduct.report-meta.xml
deleted file mode 100644
index a001ef7..0000000
--- a/force-app/main/default/reports/Consumable_KC/CurrentMonthSalesRankByProduct.report-meta.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Report xmlns="http://soap.sforce.com/2006/04/metadata">
- <chart>
- <backgroundColor1>#FFFFFF</backgroundColor1>
- <backgroundColor2>#FFFFFF</backgroundColor2>
- <backgroundFadeDir>Diagonal</backgroundFadeDir>
- <chartSummaries>
- <aggregate>Sum</aggregate>
- <axisBinding>y</axisBinding>
- <column>Consumable_Orderdetails__c.Sale_amount__c</column>
- </chartSummaries>
- <chartType>HorizontalBar</chartType>
- <enableHoverLabels>false</enableHoverLabels>
- <expandOthers>true</expandOthers>
- <groupingColumn
- >Consumable_Orderdetails__c.Product_bbname__c</groupingColumn>
- <location>CHART_BOTTOM</location>
- <showAxisLabels>true</showAxisLabels>
- <showPercentage>false</showPercentage>
- <showTotal>false</showTotal>
- <showValues>false</showValues>
- <size>Medium</size>
- <summaryAxisRange>Auto</summaryAxisRange>
- <textColor>#000000</textColor>
- <textSize>12</textSize>
- <titleColor>#000000</titleColor>
- <titleSize>18</titleSize>
- </chart>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Sale_amount__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.OT_Code__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Used_date__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.HospItal_Code__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.HospItal_Name__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Order_ForCustomerText__c</field>
- </columns>
- <currency>CNY</currency>
- <filter>
- <booleanFilter>((1 OR 2) AND 3) AND 4 AND 5</booleanFilter>
- <criteriaItems>
- <column>CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_Orderdetails__c.Detail1_Sale</value>
- </criteriaItems>
- <criteriaItems>
- <column>CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_Orderdetails__c.Detail1_Shipment</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.Dealer_Info1_text__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>notContain</operator>
- <value>TEST,濂ユ灄宸存柉</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.NotShow_data__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>0</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.Product_bbname__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>notEqual</operator>
- <value />
- </criteriaItems>
- <language>zh_CN</language>
- </filter>
- <format>Summary</format>
- <groupingsDown>
- <aggregateType>Sum</aggregateType>
- <dateGranularity>Day</dateGranularity>
- <field>Consumable_Orderdetails__c.Product_bbname__c</field>
- <sortByName>Consumable_Orderdetails__c.Sale_amount__c</sortByName>
- <sortOrder>Desc</sortOrder>
- <sortType>Aggregate</sortType>
- </groupingsDown>
- <name>鏈湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜浜у搧</name>
- <params>
- <name>co</name>
- <value>1</value>
- </params>
- <reportType>CustomEntity$Consumable_Orderdetails__c</reportType>
- <scope>organization</scope>
- <showDetails>false</showDetails>
- <showGrandTotal>true</showGrandTotal>
- <showSubTotals>true</showSubTotals>
- <sortColumn>Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
- <sortOrder>Desc</sortOrder>
- <timeFrameFilter>
- <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
- <interval>INTERVAL_CURFY</interval>
- </timeFrameFilter>
-</Report>
diff --git a/force-app/main/default/reports/Consumable_KC/LastMonthSalesByAccount1.report-meta.xml b/force-app/main/default/reports/Consumable_KC/LastMonthSalesByAccount1.report-meta.xml
deleted file mode 100644
index 4de40a3..0000000
--- a/force-app/main/default/reports/Consumable_KC/LastMonthSalesByAccount1.report-meta.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Report xmlns="http://soap.sforce.com/2006/04/metadata">
- <chart>
- <backgroundColor1>#FFFFFF</backgroundColor1>
- <backgroundColor2>#FFFFFF</backgroundColor2>
- <backgroundFadeDir>Diagonal</backgroundFadeDir>
- <chartSummaries>
- <aggregate>Sum</aggregate>
- <axisBinding>y</axisBinding>
- <column>Consumable_Orderdetails__c.Sale_amount__c</column>
- </chartSummaries>
- <chartType>HorizontalBar</chartType>
- <enableHoverLabels>false</enableHoverLabels>
- <expandOthers>true</expandOthers>
- <groupingColumn
- >Consumable_Orderdetails__c.HospItal_Name__c</groupingColumn>
- <location>CHART_BOTTOM</location>
- <showAxisLabels>true</showAxisLabels>
- <showPercentage>false</showPercentage>
- <showTotal>false</showTotal>
- <showValues>false</showValues>
- <size>Medium</size>
- <summaryAxisRange>Auto</summaryAxisRange>
- <textColor>#000000</textColor>
- <textSize>12</textSize>
- <titleColor>#000000</titleColor>
- <titleSize>18</titleSize>
- </chart>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Sale_amount__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.OT_Code__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Used_date__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Order_ForCustomerText__c</field>
- </columns>
- <currency>CNY</currency>
- <filter>
- <booleanFilter>((1 OR 2) AND 3) AND 4 AND 5</booleanFilter>
- <criteriaItems>
- <column>CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_Orderdetails__c.Detail1_Sale</value>
- </criteriaItems>
- <criteriaItems>
- <column>CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_Orderdetails__c.Detail1_Shipment</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.Dealer_Info1_text__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>notContain</operator>
- <value>TEST,濂ユ灄宸存柉</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.NotShow_data__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>0</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.HospItal_Name__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>notEqual</operator>
- <value />
- </criteriaItems>
- <language>zh_CN</language>
- </filter>
- <format>Summary</format>
- <groupingsDown>
- <aggregateType>Sum</aggregateType>
- <dateGranularity>Day</dateGranularity>
- <field>Consumable_Orderdetails__c.HospItal_Name__c</field>
- <sortByName>Consumable_Orderdetails__c.Sale_amount__c</sortByName>
- <sortOrder>Desc</sortOrder>
- <sortType>Aggregate</sortType>
- </groupingsDown>
- <name>涓婃湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜鍖婚櫌</name>
- <params>
- <name>co</name>
- <value>1</value>
- </params>
- <reportType>CustomEntity$Consumable_Orderdetails__c</reportType>
- <scope>organization</scope>
- <showDetails>false</showDetails>
- <showGrandTotal>true</showGrandTotal>
- <showSubTotals>true</showSubTotals>
- <sortColumn>Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
- <sortOrder>Desc</sortOrder>
- <timeFrameFilter>
- <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
- <interval>INTERVAL_CUSTOM</interval>
- </timeFrameFilter>
-</Report>
diff --git a/force-app/main/default/reports/Consumable_KC/LastMonthSalesByProduct.report-meta.xml b/force-app/main/default/reports/Consumable_KC/LastMonthSalesByProduct.report-meta.xml
deleted file mode 100644
index 948e2de..0000000
--- a/force-app/main/default/reports/Consumable_KC/LastMonthSalesByProduct.report-meta.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Report xmlns="http://soap.sforce.com/2006/04/metadata">
- <chart>
- <backgroundColor1>#FFFFFF</backgroundColor1>
- <backgroundColor2>#FFFFFF</backgroundColor2>
- <backgroundFadeDir>Diagonal</backgroundFadeDir>
- <chartSummaries>
- <aggregate>Sum</aggregate>
- <axisBinding>y</axisBinding>
- <column>Consumable_Orderdetails__c.Sale_amount__c</column>
- </chartSummaries>
- <chartType>HorizontalBar</chartType>
- <enableHoverLabels>false</enableHoverLabels>
- <expandOthers>true</expandOthers>
- <groupingColumn
- >Consumable_Orderdetails__c.Product_bbname__c</groupingColumn>
- <location>CHART_BOTTOM</location>
- <showAxisLabels>false</showAxisLabels>
- <showPercentage>false</showPercentage>
- <showTotal>false</showTotal>
- <showValues>false</showValues>
- <size>Medium</size>
- <summaryAxisRange>Auto</summaryAxisRange>
- <textColor>#000000</textColor>
- <textSize>12</textSize>
- <titleColor>#000000</titleColor>
- <titleSize>18</titleSize>
- </chart>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Sale_amount__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.OT_Code__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Used_date__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.HospItal_Code__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.HospItal_Name__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Order_ForCustomerText__c</field>
- </columns>
- <currency>CNY</currency>
- <filter>
- <booleanFilter>((1 OR 2) AND 3) AND 4 AND 5</booleanFilter>
- <criteriaItems>
- <column>CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_Orderdetails__c.Detail1_Sale</value>
- </criteriaItems>
- <criteriaItems>
- <column>CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_Orderdetails__c.Detail1_Shipment</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.Dealer_Info1_text__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>notContain</operator>
- <value>TEST,濂ユ灄宸存柉</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.NotShow_data__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>0</value>
- </criteriaItems>
- <criteriaItems>
- <column>Consumable_Orderdetails__c.Product_bbname__c</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>notEqual</operator>
- <value />
- </criteriaItems>
- <language>zh_CN</language>
- </filter>
- <format>Summary</format>
- <groupingsDown>
- <aggregateType>Sum</aggregateType>
- <dateGranularity>Day</dateGranularity>
- <field>Consumable_Orderdetails__c.Product_bbname__c</field>
- <sortByName>Consumable_Orderdetails__c.Sale_amount__c</sortByName>
- <sortOrder>Desc</sortOrder>
- <sortType>Aggregate</sortType>
- </groupingsDown>
- <name>涓婃湀 缁忛攢鍟嗗嚭璐�/閿�鍞姤琛ㄦ寜浜у搧</name>
- <params>
- <name>co</name>
- <value>1</value>
- </params>
- <reportType>CustomEntity$Consumable_Orderdetails__c</reportType>
- <scope>organization</scope>
- <showDetails>false</showDetails>
- <showGrandTotal>true</showGrandTotal>
- <showSubTotals>true</showSubTotals>
- <sortColumn>Consumable_Orderdetails__c.Sale_amount__c</sortColumn>
- <sortOrder>Desc</sortOrder>
- <timeFrameFilter>
- <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
- <interval>INTERVAL_CUSTOM</interval>
- </timeFrameFilter>
-</Report>
diff --git a/force-app/main/default/reports/Consumable_KC/WeeklyReportForAgency.report-meta.xml b/force-app/main/default/reports/Consumable_KC/WeeklyReportForAgency.report-meta.xml
deleted file mode 100644
index affe051..0000000
--- a/force-app/main/default/reports/Consumable_KC/WeeklyReportForAgency.report-meta.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Report xmlns="http://soap.sforce.com/2006/04/metadata">
- <columns>
- <field>Agency_Report__c.Report_Date__c</field>
- </columns>
- <columns>
- <field>Agency_Report__c.Department_Cateogy_text__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Agency_Report__c.ConsumptionOfConsumables__c</field>
- </columns>
- <columns>
- <field>Agency_Report__c.ProductCcategory__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Agency_Report__c.warlocksNumber__c</field>
- </columns>
- <currency>CNY</currency>
- <format>Summary</format>
- <groupingsDown>
- <dateGranularity>Day</dateGranularity>
- <field>Agency_Report__c.UseProduct1__c</field>
- <sortOrder>Asc</sortOrder>
- </groupingsDown>
- <name>缁忛攢鍟嗗懆鎶ユ椿鍔ㄤ竴鏍�</name>
- <params>
- <name>co</name>
- <value>1</value>
- </params>
- <reportType
- >CustomEntityCustomEntity$Agency_Report_Header__c$Agency_Report__c</reportType>
- <scope>organization</scope>
- <showDetails>true</showDetails>
- <showGrandTotal>true</showGrandTotal>
- <showSubTotals>true</showSubTotals>
- <sortColumn>Agency_Report__c.Report_Date__c</sortColumn>
- <sortOrder>Desc</sortOrder>
- <timeFrameFilter>
- <dateColumn>Agency_Report_Header__c.Week__c</dateColumn>
- <interval>INTERVAL_LAST60</interval>
- </timeFrameFilter>
-</Report>
diff --git a/force-app/main/default/reports/Store_Custom_ReportLink/Consumable_Outstock_Invoice_Lex.report-meta.xml b/force-app/main/default/reports/Store_Custom_ReportLink/Consumable_Outstock_Invoice_Lex.report-meta.xml
deleted file mode 100644
index 5924eef..0000000
--- a/force-app/main/default/reports/Store_Custom_ReportLink/Consumable_Outstock_Invoice_Lex.report-meta.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Report xmlns="http://soap.sforce.com/2006/04/metadata">
- <columns>
- <field>FK_NAME</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Report_Acc_Dep__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Product_bbname__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Shipment_amount__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.ProduceCompany__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Report_Product_Approbation__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Report_Product_Expiration__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Invoicedet1_OD_link__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Invoice_Unitprice__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Invoiced_Count__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.InvoicedProCost_RMB__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Invoice_Cost_RMB__c</field>
- </columns>
- <currency>CNY</currency>
- <filter>
- <criteriaItems>
- <column>FK_CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_order__c.Order_Invoice</value>
- </criteriaItems>
- <language>en_US</language>
- </filter>
- <format>Tabular</format>
- <name>娑堣�楀搧鍙戠エ鎶ヨ〃</name>
- <params>
- <name>co</name>
- <value>1</value>
- </params>
- <reportType
- >CustomEntity$Consumable_Orderdetails__c@Consumable_Orderdetails__c.Consumable_order__c</reportType>
- <scope>organization</scope>
- <showDetails>true</showDetails>
- <showGrandTotal>true</showGrandTotal>
- <showSubTotals>true</showSubTotals>
- <timeFrameFilter>
- <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
- <interval>INTERVAL_CUSTOM</interval>
- </timeFrameFilter>
-</Report>
diff --git a/force-app/main/default/reports/Store_Custom_ReportLink/Report_Outbound_Lex.report-meta.xml b/force-app/main/default/reports/Store_Custom_ReportLink/Report_Outbound_Lex.report-meta.xml
deleted file mode 100644
index 9e8b6d8..0000000
--- a/force-app/main/default/reports/Store_Custom_ReportLink/Report_Outbound_Lex.report-meta.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Report xmlns="http://soap.sforce.com/2006/04/metadata">
- <columns>
- <field>FK_NAME</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Product_bbname__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Asset_Model_No__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Delivery_List_RMB__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Shipment_Count__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Shipment_amount__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.ProduceCompany__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Report_Product_Approbation__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Report_Product_Expiration__c</field>
- </columns>
- <columns>
- <aggregateTypes>Sum</aggregateTypes>
- <field>Consumable_Orderdetails__c.Invoiced_Procount__c</field>
- </columns>
- <columns>
- <field>Consumable_Orderdetails__c.Product_OutDate__c</field>
- </columns>
- <currency>CNY</currency>
- <description>鍑哄簱鎶ヨ〃</description>
- <filter>
- <criteriaItems>
- <column>FK_CUST_RECORDTYPE</column>
- <columnToColumn>false</columnToColumn>
- <isUnlocked>true</isUnlocked>
- <operator>equals</operator>
- <value>Consumable_order__c.Sale,Consumable_order__c.Shipment</value>
- </criteriaItems>
- <language>en_US</language>
- </filter>
- <format>Tabular</format>
- <name>娑堣�楀搧鍑哄簱鎶ヨ〃</name>
- <params>
- <name>co</name>
- <value>1</value>
- </params>
- <reportType
- >CustomEntity$Consumable_Orderdetails__c@Consumable_Orderdetails__c.Consumable_order__c</reportType>
- <scope>organization</scope>
- <showDetails>true</showDetails>
- <showGrandTotal>true</showGrandTotal>
- <showSubTotals>true</showSubTotals>
- <timeFrameFilter>
- <dateColumn>Consumable_Orderdetails__c.Product_OutDate__c</dateColumn>
- <interval>INTERVAL_CUSTOM</interval>
- </timeFrameFilter>
-</Report>
diff --git a/force-app/main/default/sites/Consumable.site-meta.xml b/force-app/main/default/sites/Consumable.site-meta.xml
index 9eb8396..e4c1c1d 100644
--- a/force-app/main/default/sites/Consumable.site-meta.xml
+++ b/force-app/main/default/sites/Consumable.site-meta.xml
@@ -21,13 +21,13 @@
<indexPage>CommunitiesLanding</indexPage>
<masterLabel>Consumable绯荤粺</masterLabel>
<referrerPolicyOriginWhenCrossOrigin
- >true</referrerPolicyOriginWhenCrossOrigin>
+ >true</referrerPolicyOriginWhenCrossOrigin>
<requireHttps>true</requireHttps>
<selfRegPage>CommunitiesSelfReg</selfRegPage>
<serverIsDown>SNA_Consumable1_sf_default_cdn_Cpit8</serverIsDown>
<siteAdmin>buli@deloitte.com.cn</siteAdmin>
<siteGuestRecordDefaultOwner
- >buli@deloitte.com.cn</siteGuestRecordDefaultOwner>
+ >buli@deloitte.com.cn</siteGuestRecordDefaultOwner>
<siteType>ChatterNetwork</siteType>
<subdomain>ocm</subdomain>
<urlPathPrefix>consumable</urlPathPrefix>
diff --git a/force-app/main/default/sites/Consumable_2.site-meta.xml b/force-app/main/default/sites/Consumable_2.site-meta.xml
new file mode 100644
index 0000000..97a3fc7
--- /dev/null
+++ b/force-app/main/default/sites/Consumable_2.site-meta.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
+ <active>false</active>
+ <allowGuestPaymentsApi>false</allowGuestPaymentsApi>
+ <allowHomePage>false</allowHomePage>
+ <allowStandardAnswersPages>false</allowStandardAnswersPages>
+ <allowStandardIdeasPages>false</allowStandardIdeasPages>
+ <allowStandardLookups>false</allowStandardLookups>
+ <allowStandardPortalPages>true</allowStandardPortalPages>
+ <allowStandardSearch>false</allowStandardSearch>
+ <authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
+ <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
+ <browserXssProtection>true</browserXssProtection>
+ <clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
+ <contentSniffingProtection>true</contentSniffingProtection>
+ <cspUpgradeInsecureRequests>true</cspUpgradeInsecureRequests>
+ <enableAuraRequests>true</enableAuraRequests>
+ <fileNotFoundPage>FileNotFound</fileNotFoundPage>
+ <genericErrorPage>Exception</genericErrorPage>
+ <inMaintenancePage>InMaintenance</inMaintenancePage>
+ <indexPage>CommunitiesLanding</indexPage>
+ <masterLabel>Consumable绯荤粺2</masterLabel>
+ <referrerPolicyOriginWhenCrossOrigin
+ >true</referrerPolicyOriginWhenCrossOrigin>
+ <requireHttps>true</requireHttps>
+ <selfRegPage>CommunitiesSelfReg</selfRegPage>
+ <serverIsDown>SNA_Consumable_21_sf_default_cdn_hOQ4J</serverIsDown>
+ <siteAdmin>buli@deloitte.com.cn</siteAdmin>
+ <siteGuestRecordDefaultOwner
+ >buli@deloitte.com.cn</siteGuestRecordDefaultOwner>
+ <siteType>ChatterNetwork</siteType>
+ <subdomain>ocm</subdomain>
+ <urlPathPrefix>consumable2</urlPathPrefix>
+</CustomSite>
diff --git a/force-app/main/default/sites/Partner2.site-meta.xml b/force-app/main/default/sites/Partner2.site-meta.xml
new file mode 100644
index 0000000..6cab271
--- /dev/null
+++ b/force-app/main/default/sites/Partner2.site-meta.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
+ <active>true</active>
+ <allowGuestPaymentsApi>false</allowGuestPaymentsApi>
+ <allowHomePage>false</allowHomePage>
+ <allowStandardAnswersPages>false</allowStandardAnswersPages>
+ <allowStandardIdeasPages>false</allowStandardIdeasPages>
+ <allowStandardLookups>false</allowStandardLookups>
+ <allowStandardPortalPages>true</allowStandardPortalPages>
+ <allowStandardSearch>false</allowStandardSearch>
+ <authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
+ <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
+ <browserXssProtection>true</browserXssProtection>
+ <clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
+ <contentSniffingProtection>true</contentSniffingProtection>
+ <cspUpgradeInsecureRequests>true</cspUpgradeInsecureRequests>
+ <enableAuraRequests>true</enableAuraRequests>
+ <fileNotFoundPage>FileNotFound</fileNotFoundPage>
+ <genericErrorPage>Exception</genericErrorPage>
+ <inMaintenancePage>InMaintenance</inMaintenancePage>
+ <indexPage>CommunitiesLanding</indexPage>
+ <masterLabel>Partner2</masterLabel>
+ <referrerPolicyOriginWhenCrossOrigin
+ >true</referrerPolicyOriginWhenCrossOrigin>
+ <requireHttps>true</requireHttps>
+ <selfRegPage>CommunitiesSelfReg</selfRegPage>
+ <serverIsDown>SNA_New_Partner_Sales1_sf_default_cdn_VxHsN</serverIsDown>
+ <siteAdmin>buli@deloitte.com.cn</siteAdmin>
+ <siteGuestRecordDefaultOwner
+ >buli@deloitte.com.cn</siteGuestRecordDefaultOwner>
+ <siteType>ChatterNetwork</siteType>
+ <subdomain>ocm</subdomain>
+ <urlPathPrefix>partner2</urlPathPrefix>
+</CustomSite>
diff --git a/force-app/main/default/sites/Partner_Sales.site-meta.xml b/force-app/main/default/sites/Partner_Sales.site-meta.xml
new file mode 100644
index 0000000..2afaf27
--- /dev/null
+++ b/force-app/main/default/sites/Partner_Sales.site-meta.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
+ <active>true</active>
+ <allowGuestPaymentsApi>false</allowGuestPaymentsApi>
+ <allowHomePage>false</allowHomePage>
+ <allowStandardAnswersPages>false</allowStandardAnswersPages>
+ <allowStandardIdeasPages>false</allowStandardIdeasPages>
+ <allowStandardLookups>false</allowStandardLookups>
+ <allowStandardPortalPages>true</allowStandardPortalPages>
+ <allowStandardSearch>false</allowStandardSearch>
+ <authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
+ <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
+ <browserXssProtection>false</browserXssProtection>
+ <clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
+ <contentSniffingProtection>false</contentSniffingProtection>
+ <cspUpgradeInsecureRequests>true</cspUpgradeInsecureRequests>
+ <enableAuraRequests>true</enableAuraRequests>
+ <fileNotFoundPage>FileNotFound</fileNotFoundPage>
+ <genericErrorPage>Exception</genericErrorPage>
+ <inMaintenancePage>CommunitiesLogin</inMaintenancePage>
+ <inactiveIndexPage>CommunitiesLogin</inactiveIndexPage>
+ <indexPage>CommunitiesLanding</indexPage>
+ <masterLabel>Partner Sales</masterLabel>
+ <referrerPolicyOriginWhenCrossOrigin
+ >false</referrerPolicyOriginWhenCrossOrigin>
+ <requireHttps>true</requireHttps>
+ <selfRegPage>CommunitiesSelfReg</selfRegPage>
+ <serverIsDown>SNA_Partner_Sales1_sf_default_cdn_zOZJ2</serverIsDown>
+ <siteAdmin>sb04@sb.com</siteAdmin>
+ <siteGuestRecordDefaultOwner>sb04@sb.com</siteGuestRecordDefaultOwner>
+ <siteType>ChatterNetwork</siteType>
+ <subdomain>ocm</subdomain>
+ <urlPathPrefix>partner</urlPathPrefix>
+</CustomSite>
diff --git a/force-app/main/default/sites/Site.site-meta.xml b/force-app/main/default/sites/Site.site-meta.xml
new file mode 100644
index 0000000..e13ecb3
--- /dev/null
+++ b/force-app/main/default/sites/Site.site-meta.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
+ <active>true</active>
+ <allowGuestPaymentsApi>false</allowGuestPaymentsApi>
+ <allowHomePage>false</allowHomePage>
+ <allowStandardAnswersPages>false</allowStandardAnswersPages>
+ <allowStandardIdeasPages>false</allowStandardIdeasPages>
+ <allowStandardLookups>false</allowStandardLookups>
+ <allowStandardPortalPages>true</allowStandardPortalPages>
+ <allowStandardSearch>false</allowStandardSearch>
+ <authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
+ <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
+ <browserXssProtection>false</browserXssProtection>
+ <clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
+ <contentSniffingProtection>false</contentSniffingProtection>
+ <cspUpgradeInsecureRequests>true</cspUpgradeInsecureRequests>
+ <enableAuraRequests>true</enableAuraRequests>
+ <fileNotFoundPage>FileNotFound</fileNotFoundPage>
+ <genericErrorPage>Exception</genericErrorPage>
+ <inMaintenancePage>CommunitiesLogin</inMaintenancePage>
+ <inactiveIndexPage>CommunitiesLogin</inactiveIndexPage>
+ <indexPage>TopPage</indexPage>
+ <masterLabel>娑堣�楀搧绠$悊绯荤粺</masterLabel>
+ <referrerPolicyOriginWhenCrossOrigin
+ >false</referrerPolicyOriginWhenCrossOrigin>
+ <requireHttps>true</requireHttps>
+ <selfRegPage>CommunitiesSelfReg</selfRegPage>
+ <siteAdmin>sb04@sb.com</siteAdmin>
+ <siteGuestRecordDefaultOwner>sb04@sb.com</siteGuestRecordDefaultOwner>
+ <siteType>ChatterNetwork</siteType>
+ <subdomain>ocm</subdomain>
+ <urlPathPrefix>customer</urlPathPrefix>
+</CustomSite>
diff --git a/force-app/main/default/sites/Site2.site-meta.xml b/force-app/main/default/sites/Site2.site-meta.xml
new file mode 100644
index 0000000..aba2aeb
--- /dev/null
+++ b/force-app/main/default/sites/Site2.site-meta.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
+ <active>true</active>
+ <allowGuestPaymentsApi>false</allowGuestPaymentsApi>
+ <allowHomePage>false</allowHomePage>
+ <allowStandardAnswersPages>false</allowStandardAnswersPages>
+ <allowStandardIdeasPages>false</allowStandardIdeasPages>
+ <allowStandardLookups>false</allowStandardLookups>
+ <allowStandardPortalPages>true</allowStandardPortalPages>
+ <allowStandardSearch>false</allowStandardSearch>
+ <authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
+ <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
+ <browserXssProtection>true</browserXssProtection>
+ <clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
+ <contentSniffingProtection>true</contentSniffingProtection>
+ <cspUpgradeInsecureRequests>true</cspUpgradeInsecureRequests>
+ <enableAuraRequests>true</enableAuraRequests>
+ <fileNotFoundPage>FileNotFound</fileNotFoundPage>
+ <genericErrorPage>Exception</genericErrorPage>
+ <inMaintenancePage>InMaintenance</inMaintenancePage>
+ <indexPage>CommunitiesLanding</indexPage>
+ <masterLabel>鐢靛瓙绛炬敹绯荤粺</masterLabel>
+ <referrerPolicyOriginWhenCrossOrigin
+ >true</referrerPolicyOriginWhenCrossOrigin>
+ <requireHttps>true</requireHttps>
+ <selfRegPage>CommunitiesSelfReg</selfRegPage>
+ <serverIsDown>SNA_Site3_sf_default_cdn_qqC8x</serverIsDown>
+ <siteAdmin>it_prectech@olympus.com.cn</siteAdmin>
+ <siteGuestRecordDefaultOwner>olympus@proto.1</siteGuestRecordDefaultOwner>
+ <siteType>ChatterNetwork</siteType>
+ <subdomain>ocm</subdomain>
+ <urlPathPrefix>eSignSystem</urlPathPrefix>
+</CustomSite>
diff --git a/force-app/main/default/sites/extsurvey.site-meta.xml b/force-app/main/default/sites/extsurvey.site-meta.xml
new file mode 100644
index 0000000..d56e183
--- /dev/null
+++ b/force-app/main/default/sites/extsurvey.site-meta.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
+ <active>false</active>
+ <allowGuestPaymentsApi>false</allowGuestPaymentsApi>
+ <allowHomePage>false</allowHomePage>
+ <allowStandardAnswersPages>false</allowStandardAnswersPages>
+ <allowStandardIdeasPages>false</allowStandardIdeasPages>
+ <allowStandardLookups>false</allowStandardLookups>
+ <allowStandardPortalPages>true</allowStandardPortalPages>
+ <allowStandardSearch>false</allowStandardSearch>
+ <authorizationRequiredPage>Unauthorized</authorizationRequiredPage>
+ <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
+ <browserXssProtection>false</browserXssProtection>
+ <clickjackProtectionLevel>AllowAllFraming</clickjackProtectionLevel>
+ <contentSniffingProtection>false</contentSniffingProtection>
+ <cspUpgradeInsecureRequests>true</cspUpgradeInsecureRequests>
+ <enableAuraRequests>true</enableAuraRequests>
+ <fileNotFoundPage>FileNotFound</fileNotFoundPage>
+ <genericErrorPage>Exception</genericErrorPage>
+ <inMaintenancePage>InMaintenance</inMaintenancePage>
+ <indexPage>genjinbaobiao</indexPage>
+ <masterLabel>澶栭儴璋冩煡闂嵎</masterLabel>
+ <referrerPolicyOriginWhenCrossOrigin
+ >false</referrerPolicyOriginWhenCrossOrigin>
+ <requireHttps>true</requireHttps>
+ <siteAdmin>sb21@sunbridge.com</siteAdmin>
+ <siteGuestRecordDefaultOwner>olympus@proto.1</siteGuestRecordDefaultOwner>
+ <siteType>Visualforce</siteType>
+ <subdomain>ocmquestionnaire</subdomain>
+</CustomSite>
diff --git a/force-app/main/default/staticresources/lexdatatable.css b/force-app/main/default/staticresources/lexdatatable.css
index 1b80c8f..97cb13c 100644
--- a/force-app/main/default/staticresources/lexdatatable.css
+++ b/force-app/main/default/staticresources/lexdatatable.css
@@ -18,7 +18,7 @@
.slds-table th,
.slds-table td {
- font-size: 16px;
+ font-size: 14px;
}
diff --git a/force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger b/force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger
index 51c8bd0..0fedc68 100644
--- a/force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger
+++ b/force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger
@@ -1,63 +1,66 @@
-trigger ConsumableOrderDetail2Trigger on Consumable_order_details2__c (after insert, after update, after delete) {
+trigger ConsumableOrderDetail2Trigger on Consumable_order_details2__c(after insert, after update, after delete) {
Set<String> orderSet = new Set<String>();
-
+
if (StaticParameter.EscapeOrderDetail2Trigger) {
- return ;
+ return;
}
- if (trigger.isInsert){
- for (Consumable_order_details2__c local : Trigger.New) {
- if (local.Consumable_order_minor__c!=null &&
- local.Dealer_Returned__c == false)
- orderSet.add(local.Consumable_order_minor__c);
+ if (Trigger.isInsert) {
+ for (Consumable_order_details2__c local : Trigger.New) {
+ if (local.Consumable_order_minor__c != null && local.Dealer_Returned__c == false)
+ orderSet.add(local.Consumable_order_minor__c);
}
}
- if (trigger.isUpdate){
- for (Consumable_order_details2__c local : Trigger.New) {
+ if (Trigger.isUpdate) {
+ for (Consumable_order_details2__c local : Trigger.New) {
//if (local.Consumable_order_minor__c!=null &&
// local.Dealer_Arrive__c != Trigger.oldMap.get(local.Id).get('Dealer_Arrive__c'))
- if (local.Consumable_order_minor__c!=null) orderSet.add(local.Consumable_order_minor__c);
+ if (local.Consumable_order_minor__c != null)
+ orderSet.add(local.Consumable_order_minor__c);
}
}
- if (trigger.isDelete){
+ if (Trigger.isDelete) {
for (Consumable_order_details2__c local : Trigger.old) {
- if (local.Consumable_order_minor__c!=null) orderSet.add(local.Consumable_order_minor__c);
+ if (local.Consumable_order_minor__c != null)
+ orderSet.add(local.Consumable_order_minor__c);
}
}
-
- if (orderSet.size()>0){
+ if (orderSet.size() > 0) {
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇挎崲 SQL start by 寮犵帀灞�
- list<Consumable_order_details2__c> allresults =
- [SELECT Consumable_order_minor__c, Deliver_date__c,
- Dealer_Returned__c, Dealer_Arrive__c, RemoveBox_No__c,Cancellation_Date__c
+ list<Consumable_order_details2__c> allresults = [
+ SELECT Consumable_order_minor__c, Deliver_date__c, Dealer_Returned__c, Dealer_Arrive__c, RemoveBox_No__c, Cancellation_Date__c
FROM Consumable_order_details2__c
- WHERE Consumable_order_minor__c in :orderSet ];
+ WHERE Consumable_order_minor__c IN :orderSet
+ ];
// 2018骞�8鏈�9鏃� HWAG-B3D9UV end by 寮犵帀灞�
-
+
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇挎崲涓嬮潰鍘熸湁SQL 浣跨敤 map 瀹屾垚璧嬪�� start by 寮犵帀灞�
- map<string,Integer> orderSetResults = new map<string,Integer>();
- for(Consumable_order_details2__c results1 : allresults){
- if(results1.Dealer_Arrive__c == false || results1.Dealer_Returned__c== true
- || (results1.RemoveBox_No__c !=null && results1.RemoveBox_No__c !=1)){
+ map<string, Integer> orderSetResults = new Map<string, Integer>();
+ for (Consumable_order_details2__c results1 : allresults) {
+ if (
+ results1.Dealer_Arrive__c == false ||
+ results1.Dealer_Returned__c == true ||
+ (results1.RemoveBox_No__c != null &&
+ results1.RemoveBox_No__c != 1)
+ ) {
continue;
}
string Consumable_order_minor_str = String.valueOf(results1.Consumable_order_minor__c);
- if(orderSetResults.containsKey(Consumable_order_minor_str)){
- orderSetResults.put(Consumable_order_minor_str,
- orderSetResults.get(Consumable_order_minor_str)+1);
- }else{
- orderSetResults.put(Consumable_order_minor_str,1);
+ if (orderSetResults.containsKey(Consumable_order_minor_str)) {
+ orderSetResults.put(Consumable_order_minor_str, orderSetResults.get(Consumable_order_minor_str) + 1);
+ } else {
+ orderSetResults.put(Consumable_order_minor_str, 1);
}
}
List<Consumable_Order__c> consumableOrderlist = new List<Consumable_Order__c>();
- for (String strOrder:orderSet){
- Integer cnt =0;
+ for (String strOrder : orderSet) {
+ Integer cnt = 0;
for (string key : orderSetResults.keySet()) {
- if(key.equals(strOrder)){
+ if (key.equals(strOrder)) {
cnt = orderSetResults.get(key);
break;
}
@@ -69,7 +72,7 @@
consumableOrderlist.add(consumableOrder);
}
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇挎崲涓嬮潰鍘熸湁SQL 浣跨敤 map 瀹屾垚璧嬪�� end end by 寮犵帀灞�
-
+
/* 2018骞�8鏈�9鏃� HWAG-B3D9UV 鍘熸湁SQL 涓庤祴鍊� start by 寮犵帀灞�
AggregateResult[] results = [SELECT Consumable_order_minor__c,count(Id) cnt
FROM Consumable_order_details2__c
@@ -95,61 +98,57 @@
}
2018骞�8鏈�9鏃� HWAG-B3D9UV 鍘熸湁SQL 涓庤祴鍊� end by 寮犵帀灞�
*/
- if (consumableOrderlist.size() > 0){
- update consumableOrderlist;
+ if (consumableOrderlist.size() > 0) {
+ update consumableOrderlist;
}
//鏇存柊娑堣�楀搧璁㈠崟鐨勫彂璐ф棩鏈�
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇挎崲涓嬮潰鍘熸湁SQL 浣跨敤 map 瀹屾垚璧嬪�� start by 寮犵帀灞�
- Set<string> resultsKeySet = new Set<String>();
- map<string,Date> DeliverdateResults = new map<string,Date>();//鏈�鏂板彂璐ф椂闂�
- map<string,Date> DeliverdateminResults = new map<string,Date>();//鏈�鏃╁彂璐ф椂闂�
- for(Consumable_order_details2__c results1 : allresults){
- if(results1.Dealer_Arrive__c == true || results1.Dealer_Returned__c== true){
+ Set<string> resultsKeySet = new Set<String>();
+ map<string, Date> DeliverdateResults = new Map<string, Date>(); //鏈�鏂板彂璐ф椂闂�
+ map<string, Date> DeliverdateminResults = new Map<string, Date>(); //鏈�鏃╁彂璐ф椂闂�
+ for (Consumable_order_details2__c results1 : allresults) {
+ if (results1.Dealer_Arrive__c == true || results1.Dealer_Returned__c == true) {
continue;
}
string Consumable_order_minor_str = String.valueOf(results1.Consumable_order_minor__c);
- if(DeliverdateResults.containsKey(Consumable_order_minor_str)){
- if(DeliverdateResults.get(Consumable_order_minor_str)
- < results1.Deliver_date__c
- ){
- DeliverdateResults.put(Consumable_order_minor_str,results1.Deliver_date__c);
+ if (DeliverdateResults.containsKey(Consumable_order_minor_str)) {
+ if (DeliverdateResults.get(Consumable_order_minor_str) < results1.Deliver_date__c) {
+ DeliverdateResults.put(Consumable_order_minor_str, results1.Deliver_date__c);
resultsKeySet.add(Consumable_order_minor_str);
}
- }else{
- DeliverdateResults.put(Consumable_order_minor_str,results1.Deliver_date__c);
+ } else {
+ DeliverdateResults.put(Consumable_order_minor_str, results1.Deliver_date__c);
resultsKeySet.add(Consumable_order_minor_str);
}
//鑾峰彇鏈�鏃╁彂璐ф椂闂� pk part1 start
- if(DeliverdateminResults.containsKey(Consumable_order_minor_str)){
- if(DeliverdateminResults.get(Consumable_order_minor_str)
- > results1.Deliver_date__c
- ){
- DeliverdateminResults.put(Consumable_order_minor_str,results1.Deliver_date__c);
+ if (DeliverdateminResults.containsKey(Consumable_order_minor_str)) {
+ if (DeliverdateminResults.get(Consumable_order_minor_str) > results1.Deliver_date__c) {
+ DeliverdateminResults.put(Consumable_order_minor_str, results1.Deliver_date__c);
resultsKeySet.add(Consumable_order_minor_str);
}
- }else{
- DeliverdateminResults.put(Consumable_order_minor_str,results1.Deliver_date__c);
+ } else {
+ DeliverdateminResults.put(Consumable_order_minor_str, results1.Deliver_date__c);
resultsKeySet.add(Consumable_order_minor_str);
}
//鑾峰彇鏈�鏃╁彂璐ф椂闂� pk part1 end
}
-
+
//涓や釜DeliverdateResults.keySet()锛孌eliverdateminResults.keySet() 鍚堝苟浣滀负涓�涓狶ist 锛岄亶鍘哃ist
//鑾峰彇鏈�鏃╁彂璐ф椂闂� pk part2 start
consumableOrderlist = new List<Consumable_Order__c>();
- for(string temp : resultsKeySet){
+ for (string temp : resultsKeySet) {
Consumable_Order__c consumableOrder1 = new Consumable_Order__c();
consumableOrder1.Id = temp;
- if(DeliverdateResults.get(temp)!=null){
+ if (DeliverdateResults.get(temp) != null) {
consumableOrder1.Shipment_Date__c = DeliverdateResults.get(temp);
}
- if(DeliverdateminResults.get(temp)!=null){
+ if (DeliverdateminResults.get(temp) != null) {
consumableOrder1.First_Delivery__c = DeliverdateResults.get(temp);
}
consumableOrderlist.add(consumableOrder1);
}
-
+
//鑾峰彇鏈�鏃╁彂璐ф椂闂� pk part2 end
// List<Consumable_Order__c> consumableOrderminlist = new List<Consumable_Order__c>();//鏈�鏃╁彂璐ф椂闂�
// for (string key : DeliverdateminResults.keySet()) {
@@ -160,9 +159,9 @@
// consumableOrderminlist.add(consumableOrder1);
// }
// }
-
+
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇挎崲涓嬮潰鍘熸湁SQL 浣跨敤 map 瀹屾垚璧嬪�� end by 寮犵帀灞�
-
+
//鑾峰彇鏃╁彂璐ф棩鏈� start
// system.debug('DeliverdateResults==============' + DeliverdateResults);
// system.debug('璧板埌鏈�鏃╁彂璐ф棩鏈�');
@@ -194,7 +193,7 @@
// }
// if(consumableOrderminlist.size() > 0){
- // update consumableOrderminlist;
+ // update consumableOrderminlist;
// }
// system.debug('DeliverdateResults==============' + DeliverdateResults);
// //鑾峰彇鏈�鏃╁彂璐ф棩鏈� end
@@ -217,31 +216,29 @@
}
}
2018骞�8鏈�9鏃� HWAG-B3D9UV 鍘熸湁SQL 涓庤祴鍊� end by 寮犵帀灞� */
- if (consumableOrderlist.size() > 0){
- update consumableOrderlist;
+ if (consumableOrderlist.size() > 0) {
+ update consumableOrderlist;
}
-
+
//鏇存柊寰呯‘璁ゆ敹璐ф暟閲�
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇挎崲涓嬮潰鍘熸湁SQL 浣跨敤 map 瀹屾垚璧嬪�� start by 寮犵帀灞�
- map<string,Integer> resultsMap2 = new map<string,Integer>();
- for(Consumable_order_details2__c results1 : allresults){
- if(results1.Dealer_Arrive__c == true || results1.Dealer_Returned__c== true ||
- results1.Cancellation_Date__c!=null){
+ map<string, Integer> resultsMap2 = new Map<string, Integer>();
+ for (Consumable_order_details2__c results1 : allresults) {
+ if (results1.Dealer_Arrive__c == true || results1.Dealer_Returned__c == true || results1.Cancellation_Date__c != null) {
continue;
}
string Consumable_order_minor_str = String.valueOf(results1.Consumable_order_minor__c);
- if(resultsMap2.containsKey(Consumable_order_minor_str)){
- resultsMap2.put(Consumable_order_minor_str,
- resultsMap2.get(Consumable_order_minor_str)+1);
- }else{
- resultsMap2.put(Consumable_order_minor_str,1);
+ if (resultsMap2.containsKey(Consumable_order_minor_str)) {
+ resultsMap2.put(Consumable_order_minor_str, resultsMap2.get(Consumable_order_minor_str) + 1);
+ } else {
+ resultsMap2.put(Consumable_order_minor_str, 1);
}
}
consumableOrderlist = new List<Consumable_Order__c>();
- for (String strOrder:orderSet){
- Integer cnt =0;
+ for (String strOrder : orderSet) {
+ Integer cnt = 0;
for (string key : resultsMap2.keySet()) {
- if(key.equals(strOrder)){
+ if (key.equals(strOrder)) {
cnt = resultsMap2.get(key);
break;
}
@@ -250,12 +247,14 @@
Consumable_Order__c consumableOrder2 = new Consumable_Order__c();
consumableOrder2.Id = strOrder;
consumableOrder2.Delivery_detail_count__c = cnt;
- if(consumableOrder2.Delivery_detail_count__c == 0){consumableOrder2.More_than_seven_days__c = 0;}
+ if (consumableOrder2.Delivery_detail_count__c == 0) {
+ consumableOrder2.More_than_seven_days__c = 0;
+ }
consumableOrderlist.add(consumableOrder2);
}
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇挎崲涓嬮潰鍘熸湁SQL 浣跨敤 map 瀹屾垚璧嬪�� end by 寮犵帀灞�
-
+
/* 2018骞�8鏈�9鏃� HWAG-B3D9UV 鍘熸湁SQL 涓庤祴鍊� start by 寮犵帀灞�
AggregateResult[] results2 = [SELECT Consumable_order_minor__c,count(Id) cnt
FROM Consumable_order_details2__c
@@ -280,22 +279,24 @@
consumableOrderlist.add(consumableOrder2);
}
2018骞�8鏈�9鏃� HWAG-B3D9UV 鍘熸湁SQL 涓庤祴鍊� end by 寮犵帀灞� */
- if (consumableOrderlist.size() > 0){
- update consumableOrderlist;
+ if (consumableOrderlist.size() > 0) {
+ update consumableOrderlist;
}
}
-
+ //Back up by DTT - Li Jun 2023-06-14 Start for reduce soql times
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鑾峰彇鎵�鏈夌殑record ID start by 寮犵帀灞�
- List<RecordType> allrtList = [select Id,DeveloperName from RecordType where SobjectType = 'Consumable_orderdetails__c'];
+ //List<RecordType> allrtList = [select Id,DeveloperName from RecordType where SobjectType = 'Consumable_orderdetails__c'];
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鑾峰彇鎵�鏈夌殑record ID end by 寮犵帀灞�
+ //Back up by DTT - Li Jun 2023-06-14 Start
//鍒拌揣鍜岃繑鍝佹椂,鐢熸垚鎴栦慨鏀规秷璐瑰搧璁㈣揣鏄庣粏
Set<String> arrivedSet = new Set<String>();
Set<String> returnSet = new Set<String>();
- if (trigger.isUpdate || trigger.isInsert || trigger.isDelete){
- if (trigger.isUpdate || trigger.isInsert){
+ if (Trigger.isUpdate || Trigger.isInsert || Trigger.isDelete) {
+ if (Trigger.isUpdate || Trigger.isInsert) {
for (Consumable_order_details2__c detail2 : Trigger.New) {
Consumable_order_details2__c oldDetail2 = null;
- if (Trigger.isUpdate) oldDetail2 = Trigger.oldMap.get(detail2.Id);
+ if (Trigger.isUpdate)
+ oldDetail2 = Trigger.oldMap.get(detail2.Id);
if (detail2.Consumable_Arrived_order__c != null) {
arrivedSet.add(detail2.Consumable_Arrived_order__c);
}
@@ -305,8 +306,8 @@
}
}
}
- if (trigger.isDelete){
- for (Consumable_order_details2__c det2 : Trigger.old) {
+ if (Trigger.isDelete) {
+ for (Consumable_order_details2__c det2 : Trigger.old) {
if (det2.Consumable_Arrived_order__c != null) {
arrivedSet.add(det2.Consumable_Arrived_order__c);
}
@@ -317,15 +318,25 @@
}
}
System.debug('arrivedSet +++++' + arrivedSet);
- // 2018骞�8鏈�14鏃� HWAG-B3D9UV 鍦ㄨ繘琛孨FM110澶勭悊鏃� 璺宠繃arrivedset start by 寮犵帀灞�
+ // 2018骞�8鏈�14鏃� HWAG-B3D9UV 鍦ㄨ繘琛孨FM110澶勭悊鏃� 璺宠繃arrivedset start by 寮犵帀灞�
if (StaticParameter.EscapeConsumableOrderDetail2Trigger) {
- return ;
+ return;
}
- // 2018骞�8鏈�14鏃� HWAG-B3D9UV 鍦ㄨ繘琛孨FM110澶勭悊鏃� 璺宠繃arrivedset start by 寮犵帀灞�
+ // 2018骞�8鏈�14鏃� HWAG-B3D9UV 鍦ㄨ繘琛孨FM110澶勭悊鏃� 璺宠繃arrivedset start by 寮犵帀灞�
if (arrivedSet.size() > 0) {
- Map<Id, Consumable_order__c> arrivedMap = new Map<Id, Consumable_order__c>([select Id, RecordType.DeveloperName, Name from Consumable_order__c where Id in :arrivedSet]);
- List<Consumable_orderdetails__c> detail1List = [select Id, Name, Asset_Model_No__c, Consumable_count__c, Consumable_order__c from Consumable_orderdetails__c where Consumable_order__c in :arrivedSet];
- Map<String,Consumable_orderdetails__c> detail1Map = new Map<String,Consumable_orderdetails__c>();
+ Map<Id, Consumable_order__c> arrivedMap = new Map<Id, Consumable_order__c>(
+ [
+ SELECT Id, RecordType.DeveloperName, Name
+ FROM Consumable_order__c
+ WHERE Id IN :arrivedSet
+ ]
+ );
+ List<Consumable_orderdetails__c> detail1List = [
+ SELECT Id, Name, Asset_Model_No__c, Consumable_count__c, Consumable_order__c
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c IN :arrivedSet
+ ];
+ Map<String, Consumable_orderdetails__c> detail1Map = new Map<String, Consumable_orderdetails__c>();
for (Consumable_orderdetails__c detail1 : detail1List) {
String key = '' + detail1.Consumable_order__c + detail1.Asset_Model_No__c;
detail1Map.put(key, detail1);
@@ -338,71 +349,86 @@
}
}
- AggregateResult[] results = [select Consumable_Arrived_order__c, Asset_Model_No__c, count(bar_code__c) recordCount
- from Consumable_order_details2__c
- where Consumable_Arrived_order__c in :arrivedSet
- and Dealer_Arrive__c = true
- //and Dealer_Returned__c <> true
- AND (RemoveBox_No__c=null or RemoveBox_No__c=1)
- group by Consumable_Arrived_order__c, Asset_Model_No__c];
+ AggregateResult[] results = [
+ SELECT Consumable_Arrived_order__c, Asset_Model_No__c, count(bar_code__c) recordCount
+ FROM Consumable_order_details2__c
+ WHERE
+ Consumable_Arrived_order__c IN :arrivedSet
+ AND Dealer_Arrive__c = TRUE
+ //and Dealer_Returned__c <> true
+ AND (RemoveBox_No__c = NULL
+ OR RemoveBox_No__c = 1)
+ GROUP BY Consumable_Arrived_order__c, Asset_Model_No__c
+ ];
Map<String, Integer> keyCount = new Map<String, Integer>();
-
- for(AggregateResult ar: results){
+
+ for (AggregateResult ar : results) {
String key = '' + ar.get('Consumable_Arrived_order__c') + ar.get('Asset_Model_No__c');
keyCount.put(key, Integer.valueOf(ar.get('recordCount')));
}
+ //Back up by DTT - Li Jun 2023-06-14 Start
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇夸唬涓嬮潰SQL select start by 寮犵帀灞�
- List<RecordType> rtList = new List<RecordType>();
- for(RecordType rtl : allrtList){
- if('Detail1_Arrival'.equals(rtl.DeveloperName)){
- rtList.add(rtl);
- }
- }
+ // List<RecordType> rtList = new List<RecordType>();
+ // for(RecordType rtl : allrtList){
+ // if('Detail1_Arrival'.equals(rtl.DeveloperName)){
+ // rtList.add(rtl);
+ // }
+ // }
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇夸唬涓嬮潰SQL select end by 寮犵帀灞�
+ //Back up by DTT - Li Jun 2023-06-14 End
/* 2018骞�8鏈�9鏃� HWAG-B3D9UV 鍘熻幏鍙� recordtype start by 寮犵帀灞�
List<RecordType> rtList = [select Id from RecordType where DeveloperName = 'Detail1_Arrival' and SobjectType = 'Consumable_orderdetails__c'];
2018骞�8鏈�9鏃� HWAG-B3D9UV 鍘熻幏鍙� recordtype end by 寮犵帀灞� */
- Id recordTypeId = null;
- if (rtList.size() > 0) recordTypeId = rtList[0].Id;
-
- results = [select Consumable_order__c, count(Id) noCount
- from Consumable_orderdetails__c
- where Consumable_order__c in :arrivedSet
- group by Consumable_order__c];
+ //Back up by DTT - Li Jun 2023-06-14 Start
+ // Id recordTypeId = null;
+ // if (rtList.size() > 0) recordTypeId = rtList[0].Id;
+ //Back up by DTT - Li Jun 2023-06-14 End
+ Id recordtypeId = Schema.SObjectType.Consumable_Orderdetails__c.getRecordTypeInfosByDeveloperName()
+ .get('Detail1_Arrival')
+ .getRecordTypeId();
+ results = [
+ SELECT Consumable_order__c, count(Id) noCount
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c IN :arrivedSet
+ GROUP BY Consumable_order__c
+ ];
System.debug('results +++++' + results);
Map<Id, Integer> noCount = new Map<Id, Integer>();
- for(AggregateResult ar: results){
- noCount.put((Id)ar.get('Consumable_order__c'), Integer.valueOf(ar.get('noCount')));
+ for (AggregateResult ar : results) {
+ noCount.put((Id) ar.get('Consumable_order__c'), Integer.valueOf(ar.get('noCount')));
}
System.debug('noCount +++++' + noCount);
Map<String, Consumable_orderdetails__c> upsertMap = new Map<String, Consumable_orderdetails__c>();
Map<String, Consumable_orderdetails__c> deletetMap = new Map<String, Consumable_orderdetails__c>();
Map<String, String> assetModelNoMap = new Map<String, String>();
- if (trigger.isUpdate || trigger.isInsert){
- for (Consumable_order_details2__c detail2 : Trigger.New) {
+ if (Trigger.isUpdate || Trigger.isInsert) {
+ for (Consumable_order_details2__c detail2 : Trigger.New) {
//Dataloader銇у垵鏈熷湪搴櫥閷层倰銇椼仧銇傘仺銆併儑銉笺偪淇銇屽叆銇c仧銇ㄣ亶銇槑绱�1銇屾洿鏂般仌銈屻仾銇勩��
- //if (trigger.isUpdate && detail2.ManualRegisteredStock__c == true) continue;
- if (detail2.Consumable_Arrived_order__c == null) continue;
+ //if (trigger.isUpdate && detail2.ManualRegisteredStock__c == true) continue;
+ if (detail2.Consumable_Arrived_order__c == null)
+ continue;
String key = '' + detail2.Consumable_Arrived_order__c + detail2.Asset_Model_No__c;
//if (upsertMap.get(key) != null) continue;
Integer count = keyCount.get(key);
Consumable_orderdetails__c detail1 = detail1Map.get(key);
- if (detail1 == null) detail1 = new Consumable_orderdetails__c();
+ if (detail1 == null)
+ detail1 = new Consumable_orderdetails__c();
detail1.Consumable_Arrivecount__c = count;
if (detail1.Id == null) {
Consumable_order__c co = arrivedMap.get(detail2.Consumable_Arrived_order__c);
Integer index = noCount.get(co.Id);
- if (index == null) index = 0;
- if(assetModelNoMap.containsKey(detail2.Asset_Model_No__c)){
+ if (index == null)
+ index = 0;
+ if (assetModelNoMap.containsKey(detail2.Asset_Model_No__c)) {
continue;
- }else{
+ } else {
assetModelNoMap.put(detail2.Asset_Model_No__c, detail2.Asset_Model_No__c);
noCount.put(co.Id, index + 1);
}
noCount.put(co.Id, index + 1);
- String newName = co.Name+'-';
+ String newName = co.Name + '-';
System.debug('index +++++' + index);
if (index < 99) {
newName += '0';
@@ -419,80 +445,83 @@
detail1.RecordTypeId = recordTypeId;
//detail1.Consumable_principal__c = co.Id;
detail1.Intra_Trade_List_RMB__c = detail2.Intra_Trade_List_RMB__c;
-
}
upsertMap.put(key, detail1);
}
}
- if (trigger.isUpdate){
- for (Consumable_order_details2__c detail2 : Trigger.old) {
- //Dataloader銇у垵鏈熷湪搴櫥閷层倰銇椼仧銇傘仺銆併儑銉笺偪淇銇屽叆銇c仧銇ㄣ亶銇槑绱�1銇屾洿鏂般仌銈屻仾銇勩��
- //if (detail2.ManualRegisteredStock__c == true) continue;
- if (detail2.Consumable_Arrived_order__c == null) continue;
- String key = '' + detail2.Consumable_Arrived_order__c + detail2.Asset_Model_No__c;
- //if (upsertMap.get(key) != null) continue;
- Integer count = keyCount.get(key);
- Consumable_orderdetails__c detail1 = detail1Map.get(key);
- if ((count == null || count ==0) && detail1 !=null){
- //delete detail1;
- deletetMap.put(key,detail1);
- continue;
- }
- if (detail1 == null) continue;
- detail1.Consumable_Arrivecount__c = count;
-
- if (detail1.Id == null) {
- Consumable_order__c co = arrivedMap.get(detail2.Consumable_Arrived_order__c);
- Integer index = noCount.get(co.Id);
- if (index == null) index = 0;
- System.debug('indexUp +++++' + index);
- noCount.put(co.Id, index + 1);
- System.debug('noCountUp +++++' + noCount);
- String newName = co.Name+'-';
- if (index < 99) {
- newName += '0';
- }
- if (index < 9) {
- newName += '0';
- }
- newName += String.valueOf(index + 1);
- System.debug('newNameUp +++++' + newName);
- detail1.Name = newName;
- //detail1.Asset_Model_No__c = detail2.Asset_Model_No__c;
- detail1.Consumable_product__c = detail2.Consumable_product__c;
- detail1.Consumable_order__c = co.Id;
- detail1.RecordTypeId = recordTypeId;
- //detail1.Consumable_principal__c = co.Id;
- detail1.Intra_Trade_List_RMB__c = detail2.Intra_Trade_List_RMB__c;
-
-
- }
- upsertMap.put(key, detail1);
- }
- }
-
- if (trigger.isDelete){
+ if (Trigger.isUpdate) {
for (Consumable_order_details2__c detail2 : Trigger.old) {
- if (detail2.Consumable_Arrived_order__c == null) continue;
+ //Dataloader銇у垵鏈熷湪搴櫥閷层倰銇椼仧銇傘仺銆併儑銉笺偪淇銇屽叆銇c仧銇ㄣ亶銇槑绱�1銇屾洿鏂般仌銈屻仾銇勩��
+ //if (detail2.ManualRegisteredStock__c == true) continue;
+ if (detail2.Consumable_Arrived_order__c == null)
+ continue;
String key = '' + detail2.Consumable_Arrived_order__c + detail2.Asset_Model_No__c;
//if (upsertMap.get(key) != null) continue;
Integer count = keyCount.get(key);
Consumable_orderdetails__c detail1 = detail1Map.get(key);
- if ((count == null || count ==0) && detail1 !=null){
+ if ((count == null || count == 0) && detail1 != null) {
//delete detail1;
- deletetMap.put(key,detail1);
+ deletetMap.put(key, detail1);
continue;
}
- if (detail1 == null) detail1 = new Consumable_orderdetails__c();
+ if (detail1 == null)
+ continue;
detail1.Consumable_Arrivecount__c = count;
if (detail1.Id == null) {
Consumable_order__c co = arrivedMap.get(detail2.Consumable_Arrived_order__c);
Integer index = noCount.get(co.Id);
- if (index == null) index = 0;
+ if (index == null)
+ index = 0;
+ System.debug('indexUp +++++' + index);
noCount.put(co.Id, index + 1);
- String newName = co.Name+'-';
+ System.debug('noCountUp +++++' + noCount);
+ String newName = co.Name + '-';
+ if (index < 99) {
+ newName += '0';
+ }
+ if (index < 9) {
+ newName += '0';
+ }
+ newName += String.valueOf(index + 1);
+ System.debug('newNameUp +++++' + newName);
+ detail1.Name = newName;
+ //detail1.Asset_Model_No__c = detail2.Asset_Model_No__c;
+ detail1.Consumable_product__c = detail2.Consumable_product__c;
+ detail1.Consumable_order__c = co.Id;
+ detail1.RecordTypeId = recordTypeId;
+ //detail1.Consumable_principal__c = co.Id;
+ detail1.Intra_Trade_List_RMB__c = detail2.Intra_Trade_List_RMB__c;
+ }
+ upsertMap.put(key, detail1);
+ }
+ }
+
+ if (Trigger.isDelete) {
+ for (Consumable_order_details2__c detail2 : Trigger.old) {
+ if (detail2.Consumable_Arrived_order__c == null)
+ continue;
+ String key = '' + detail2.Consumable_Arrived_order__c + detail2.Asset_Model_No__c;
+ //if (upsertMap.get(key) != null) continue;
+ Integer count = keyCount.get(key);
+ Consumable_orderdetails__c detail1 = detail1Map.get(key);
+ if ((count == null || count == 0) && detail1 != null) {
+ //delete detail1;
+ deletetMap.put(key, detail1);
+ continue;
+ }
+ if (detail1 == null)
+ detail1 = new Consumable_orderdetails__c();
+ detail1.Consumable_Arrivecount__c = count;
+
+ if (detail1.Id == null) {
+ Consumable_order__c co = arrivedMap.get(detail2.Consumable_Arrived_order__c);
+ Integer index = noCount.get(co.Id);
+ if (index == null)
+ index = 0;
+ noCount.put(co.Id, index + 1);
+ String newName = co.Name + '-';
if (index < 99) {
newName += '0';
}
@@ -507,31 +536,39 @@
detail1.RecordTypeId = recordTypeId;
//detail1.Consumable_principal__c = co.Id;
detail1.Intra_Trade_List_RMB__c = detail2.Intra_Trade_List_RMB__c;
-
}
upsertMap.put(key, detail1);
}
}
Database.upsert(upsertMap.values(), true);
- if(deletetMap.size()>0){
- Database.delete(deletetMap.values(),true);
+ if (deletetMap.size() > 0) {
+ Database.delete(deletetMap.values(), true);
}
-
}
}
- // 2018骞�8鏈�14鏃� HWAG-B3D9UV 鍦ㄨ繘琛孨FM110澶勭悊鏃� 璺宠繃returnSet start by 寮犵帀灞�
-
- if (trigger.isUpdate || trigger.isInsert){
- if (StaticParameter.EscapeConsumableOrderDetail2Trigger) {
- return ;
- }
// 2018骞�8鏈�14鏃� HWAG-B3D9UV 鍦ㄨ繘琛孨FM110澶勭悊鏃� 璺宠繃returnSet start by 寮犵帀灞�
+
+ if (Trigger.isUpdate || Trigger.isInsert) {
+ if (StaticParameter.EscapeConsumableOrderDetail2Trigger) {
+ return;
+ }
+ // 2018骞�8鏈�14鏃� HWAG-B3D9UV 鍦ㄨ繘琛孨FM110澶勭悊鏃� 璺宠繃returnSet start by 寮犵帀灞�
if (returnSet.size() > 0) {
- Map<Id, Consumable_order__c> returnMap = new Map<Id, Consumable_order__c>([select Id, RecordType.DeveloperName, Name from Consumable_order__c where Id in :returnSet]);
- List<Consumable_orderdetails__c> detail1List = [select Id, Name, Asset_Model_No__c, Consumable_count__c, Consumable_order__c from Consumable_orderdetails__c where Consumable_order__c in :returnSet];
- Map<String,Consumable_orderdetails__c> detail1Map = new Map<String,Consumable_orderdetails__c>();
-
+ Map<Id, Consumable_order__c> returnMap = new Map<Id, Consumable_order__c>(
+ [
+ SELECT Id, RecordType.DeveloperName, Name
+ FROM Consumable_order__c
+ WHERE Id IN :returnSet
+ ]
+ );
+ List<Consumable_orderdetails__c> detail1List = [
+ SELECT Id, Name, Asset_Model_No__c, Consumable_count__c, Consumable_order__c
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c IN :returnSet
+ ];
+ Map<String, Consumable_orderdetails__c> detail1Map = new Map<String, Consumable_orderdetails__c>();
+
for (Consumable_orderdetails__c detail1 : detail1List) {
String key = '' + detail1.Consumable_order__c + detail1.Asset_Model_No__c;
detail1Map.put(key, detail1);
@@ -544,40 +581,45 @@
}
}
- AggregateResult[] results = [select Consumable_Return_order__c, Asset_Model_No__c, count(Id) recordCount
- from Consumable_order_details2__c
- where Consumable_Return_order__c in :returnSet
- and Dealer_Returned__c = true
- group by Consumable_Return_order__c, Asset_Model_No__c];
+ AggregateResult[] results = [
+ SELECT Consumable_Return_order__c, Asset_Model_No__c, count(Id) recordCount
+ FROM Consumable_order_details2__c
+ WHERE Consumable_Return_order__c IN :returnSet AND Dealer_Returned__c = TRUE
+ GROUP BY Consumable_Return_order__c, Asset_Model_No__c
+ ];
Map<String, Integer> keyCount = new Map<String, Integer>();
- for(AggregateResult ar: results){
+ for (AggregateResult ar : results) {
String key = '' + ar.get('Consumable_Return_order__c') + ar.get('Asset_Model_No__c');
keyCount.put(key, Integer.valueOf(ar.get('recordCount')));
}
-
+ //Back up by DTT - Li Jun 2023-06-14 Start for reduce soql times
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇夸唬涓嬮潰SQL select start by 寮犵帀灞�
- List<RecordType> rtList = new List<RecordType>();
- for(RecordType rtl : allrtList){
- if('Detail1_ReturnGoods'.equals(rtl.DeveloperName)){
- rtList.add(rtl);
- }
- }
+ // List<RecordType> rtList = new List<RecordType>();
+ // for(RecordType rtl : allrtList){
+ // if('Detail1_ReturnGoods'.equals(rtl.DeveloperName)){
+ // rtList.add(rtl);
+ // }
+ // }
// 2018骞�8鏈�9鏃� HWAG-B3D9UV 鏇夸唬涓嬮潰SQL select end by 寮犵帀灞�
-
+ //Back up by DTT - Li Jun 2023-06-14 End
/* 2018骞�8鏈�9鏃� HWAG-B3D9UV 鍘熻幏鍙� recordtype start by 寮犵帀灞�
List<RecordType> rtList = [select Id from RecordType where DeveloperName = 'Detail1_ReturnGoods' and SobjectType = 'Consumable_orderdetails__c'];
2018骞�8鏈�9鏃� HWAG-B3D9UV 鍘熻幏鍙� recordtype end by 寮犵帀灞� */
- Id recordTypeId = null;
- if (rtList.size() > 0) recordTypeId = rtList[0].Id;
+ Id recordTypeId = Schema.SObjectType.Consumable_Orderdetails__c.getRecordTypeInfosByDeveloperName()
+ .get('Detail1_ReturnGoods')
+ .getRecordTypeId();
+ //if (rtList.size() > 0) recordTypeId = rtList[0].Id;
- results = [select Consumable_order__c, count(Id) noCount
- from Consumable_orderdetails__c
- where Consumable_order__c in :returnSet
- group by Consumable_order__c];
+ results = [
+ SELECT Consumable_order__c, count(Id) noCount
+ FROM Consumable_orderdetails__c
+ WHERE Consumable_order__c IN :returnSet
+ GROUP BY Consumable_order__c
+ ];
Map<Id, Integer> noCount = new Map<Id, Integer>();
- for(AggregateResult ar: results){
- noCount.put((Id)ar.get('Consumable_order__c'), Integer.valueOf(ar.get('noCount')));
+ for (AggregateResult ar : results) {
+ noCount.put((Id) ar.get('Consumable_order__c'), Integer.valueOf(ar.get('noCount')));
}
Map<String, Consumable_orderdetails__c> upsertMap = new Map<String, Consumable_orderdetails__c>();
@@ -592,25 +634,35 @@
for (Consumable_order_details2__c detail2 : Trigger.New) {
Consumable_order_details2__c oldDetail2 = null;
- if (detail2.Consumable_Return_order__c == null) continue;
+ if (detail2.Consumable_Return_order__c == null)
+ continue;
String key = '' + detail2.Consumable_Return_order__c + detail2.Asset_Model_No__c;
- if(Trigger.isUpdate) oldDetail2 = Trigger.oldMap.get(detail2.Id);
+ if (Trigger.isUpdate)
+ oldDetail2 = Trigger.oldMap.get(detail2.Id);
if (oldDetail2 != null) {
if (keyCount.containsKey(key)) {
returnCount += 1;
if (oldDetail2.Consumable_Sale_order__c != null) {
- Integer sCount = updatedSaleCount.containsKey(''+oldDetail2.Consumable_Sale_order__c+detail2.Asset_Model_No__c) ? updatedSaleCount.get(''+oldDetail2.Consumable_Sale_order__c+detail2.Asset_Model_No__c) : 0;
+ Integer sCount = updatedSaleCount.containsKey(
+ '' + oldDetail2.Consumable_Sale_order__c + detail2.Asset_Model_No__c
+ )
+ ? updatedSaleCount.get('' + oldDetail2.Consumable_Sale_order__c + detail2.Asset_Model_No__c)
+ : 0;
sCount += 1;
- updatedSaleCount.put(''+oldDetail2.Consumable_Sale_order__c+detail2.Asset_Model_No__c, sCount);
+ updatedSaleCount.put('' + oldDetail2.Consumable_Sale_order__c + detail2.Asset_Model_No__c, sCount);
updatedSaleId.add(oldDetail2.Consumable_Sale_order__c);
}
if (oldDetail2.Consumable_Shipment_order__c != null) {
- Integer sCount = updatedShipmentCount.containsKey(''+oldDetail2.Consumable_Shipment_order__c+detail2.Asset_Model_No__c) ? updatedShipmentCount.get(''+oldDetail2.Consumable_Shipment_order__c+detail2.Asset_Model_No__c) : 0;
+ Integer sCount = updatedShipmentCount.containsKey(
+ '' + oldDetail2.Consumable_Shipment_order__c + detail2.Asset_Model_No__c
+ )
+ ? updatedShipmentCount.get('' + oldDetail2.Consumable_Shipment_order__c + detail2.Asset_Model_No__c)
+ : 0;
sCount += 1;
-
- updatedShipmentCount.put(''+oldDetail2.Consumable_Shipment_order__c+detail2.Asset_Model_No__c, sCount);
+
+ updatedShipmentCount.put('' + oldDetail2.Consumable_Shipment_order__c + detail2.Asset_Model_No__c, sCount);
updatedShipmentId.add(oldDetail2.Consumable_Shipment_order__c);
}
/*if (oldDetail2.Invoice_No__c != null) {
@@ -628,20 +680,23 @@
}*/
}
}
- if (upsertMap.get(key) != null) continue;
+ if (upsertMap.get(key) != null)
+ continue;
Integer count = keyCount.get(key);
Consumable_orderdetails__c detail1 = detail1Map.get(key);
- if (detail1 == null) detail1 = new Consumable_orderdetails__c();
+ if (detail1 == null)
+ detail1 = new Consumable_orderdetails__c();
detail1.RrturnPro_count__c = count;
if (detail1.Id == null) {
Consumable_order__c co = returnMap.get(detail2.Consumable_Return_order__c);
Integer index = noCount.get(co.Id);
- if (index == null) index = 0;
+ if (index == null)
+ index = 0;
noCount.put(co.Id, index + 1);
- String newName = co.Name+'-';
+ String newName = co.Name + '-';
if (index < 99) {
newName += '0';
}
@@ -656,47 +711,47 @@
detail1.RecordTypeId = recordTypeId;
//detail1.Consumable_principal__c = co.Id;
detail1.Intra_Trade_List_RMB__c = detail2.Intra_Trade_List_RMB__c;
-
}
upsertMap.put(key, detail1);
}
Database.upsert(upsertMap.values(), true);
// 2018骞�8鏈�8鏃� HWAG-B3D9UV 鍑忓皯 select 鏁伴噺 start by 寮犵帀灞�
- List<Consumable_orderdetails__c> Consumable_orderdetailsList =
- [select Id, Name, Asset_Model_No__c, RrturnPro_count__c,
- Consumable_order__c,Invoicedet1_OD_link__c
- from Consumable_orderdetails__c
- where Consumable_order__c in :updatedSaleId
- or Consumable_order__c in :updatedShipmentId
- or Consumable_order__c in :updatedConInvoiceId];
-
- List<Consumable_orderdetails__c> detail1SaleList
- = new List<Consumable_orderdetails__c>();
-
- for (Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList){
- if(updatedSaleId.contains(orderdetails.id)
- && 'Sale'.equals(orderdetails.Consumable_order__r.RecordType.DeveloperName)){
+ List<Consumable_orderdetails__c> Consumable_orderdetailsList = [
+ SELECT Id, Name, Asset_Model_No__c, RrturnPro_count__c, Consumable_order__c, Invoicedet1_OD_link__c
+ FROM Consumable_orderdetails__c
+ WHERE
+ Consumable_order__c IN :updatedSaleId
+ OR Consumable_order__c IN :updatedShipmentId
+ OR Consumable_order__c IN :updatedConInvoiceId
+ ];
+
+ List<Consumable_orderdetails__c> detail1SaleList = new List<Consumable_orderdetails__c>();
+
+ for (Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList) {
+ if (updatedSaleId.contains(orderdetails.id) && 'Sale'.equals(orderdetails.Consumable_order__r.RecordType.DeveloperName)) {
detail1SaleList.add(orderdetails);
}
}
- List<Consumable_orderdetails__c> detail1ShipmentList
- = new List<Consumable_orderdetails__c>();
+ List<Consumable_orderdetails__c> detail1ShipmentList = new List<Consumable_orderdetails__c>();
- for (Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList){
- if(updatedShipmentId.contains(orderdetails.id)
- && 'Shipment'.equals(orderdetails.Consumable_order__r.RecordType.DeveloperName)){
+ for (Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList) {
+ if (
+ updatedShipmentId.contains(orderdetails.id) &&
+ 'Shipment'.equals(orderdetails.Consumable_order__r.RecordType.DeveloperName)
+ ) {
detail1ShipmentList.add(orderdetails);
}
}
- List<Consumable_orderdetails__c> detail1ConInvoiceList
- = new List<Consumable_orderdetails__c>();
+ List<Consumable_orderdetails__c> detail1ConInvoiceList = new List<Consumable_orderdetails__c>();
- for (Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList){
- if(updatedConInvoiceId.contains(orderdetails.id)
- && 'Order_Invoice'.equals(orderdetails.Consumable_order__r.RecordType.DeveloperName)){
+ for (Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList) {
+ if (
+ updatedConInvoiceId.contains(orderdetails.id) &&
+ 'Order_Invoice'.equals(orderdetails.Consumable_order__r.RecordType.DeveloperName)
+ ) {
detail1ConInvoiceList.add(orderdetails);
}
}
@@ -724,23 +779,31 @@
List<Consumable_orderdetails__c> updateData = new List<Consumable_orderdetails__c>();
for (Consumable_orderdetails__c detail1Sale : detail1SaleList) {
- Integer count = updatedSaleCount.get(''+detail1Sale.Consumable_order__c+detail1Sale.Asset_Model_No__c);
+ Integer count = updatedSaleCount.get('' + detail1Sale.Consumable_order__c + detail1Sale.Asset_Model_No__c);
if (count != null) {
detail1Sale.RrturnPro_count__c += count;
updateData.add(detail1Sale);
}
-
}
for (Consumable_orderdetails__c detail1Shipment : detail1ShipmentList) {
- Integer count = updatedShipmentCount.get(''+detail1Shipment.Consumable_order__c+detail1Shipment.Asset_Model_No__c);
+ Integer count = updatedShipmentCount.get('' + detail1Shipment.Consumable_order__c + detail1Shipment.Asset_Model_No__c);
if (count != null) {
detail1Shipment.RrturnPro_count__c += count;
updateData.add(detail1Shipment);
}
}
for (Consumable_orderdetails__c detail1ConInvoice : detail1ConInvoiceList) {
- Integer count = updatedConInvoiceCount.get(''+detail1ConInvoice.Consumable_order__c+detail1ConInvoice.Invoicedet1_OD_link__c+detail1ConInvoice.Asset_Model_No__c);
- if (count != null && (detail1ConInvoice.Invoicedet1_OD_link__c == shipmentIdMap.get(''+detail1ConInvoice.Invoicedet1_OD_link__c+detail1ConInvoice.Asset_Model_No__c)) ) {
+ Integer count = updatedConInvoiceCount.get(
+ '' +
+ detail1ConInvoice.Consumable_order__c +
+ detail1ConInvoice.Invoicedet1_OD_link__c +
+ detail1ConInvoice.Asset_Model_No__c
+ );
+ if (
+ count != null &&
+ (detail1ConInvoice.Invoicedet1_OD_link__c ==
+ shipmentIdMap.get('' + detail1ConInvoice.Invoicedet1_OD_link__c + detail1ConInvoice.Asset_Model_No__c))
+ ) {
detail1ConInvoice.RrturnPro_count__c += count;
//updateData.add(detail1ConInvoice);
}
@@ -748,6 +811,5 @@
Database.upsert(updateData, true);
}
-
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger-meta.xml b/force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger-meta.xml
index eebd71b..b571e13 100644
--- a/force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger-meta.xml
+++ b/force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger-meta.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" ?>
<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>40.0</apiVersion>
+ <apiVersion>50.0</apiVersion>
<status>Active</status>
</ApexTrigger>
diff --git a/force-app/main/default/triggers/ConsumableOrderTrigger.trigger b/force-app/main/default/triggers/ConsumableOrderTrigger.trigger
index b572b6d..82df0d7 100644
--- a/force-app/main/default/triggers/ConsumableOrderTrigger.trigger
+++ b/force-app/main/default/triggers/ConsumableOrderTrigger.trigger
@@ -1,112 +1,104 @@
-trigger ConsumableOrderTrigger on Consumable_order__c (before insert, before update) {
- // CHAN-CBYBBF 銆愬鎵樸�戠粡閿�鍟咵T璐﹀彿鏄剧ず鐣岄潰缁存姢-骞夸笢姹囨櫒 start
- // 娉ㄩ噴璺宠繃 鍙戣揣鏃惰璁$畻 SAP鍚堝悓鍙�
- // if (StaticParameter.EscapeConsumableOrderDetail2Trigger) {
- // return;
- // }
- // CHAN-CBYBBF 銆愬鎵樸�戠粡閿�鍟咵T璐﹀彿鏄剧ず鐣岄潰缁存姢-骞夸笢姹囨櫒 end
- //add by rentx 20210618 start
- if (StaticParameter.ConsumableOrderTrigger) {
- return;
- }
- //ad by rentx 20210618 end
- Set<String> contactIdSet = new Set<String>();
- Map<String, String> rprIdList = new Map<String, String>();
- Map<String, String> contactIdMap = new Map<String, String>();
- List<Statu_Achievements__c> sAlist = new List<Statu_Achievements__c>();
- if (Trigger.isBefore) {
- Account contactdet = null;
- List<Account> contactList = new List<Account>();
- Consumable_order__c old = null;
- for (Consumable_order__c local : Trigger.New) {
- if(String.isNotBlank(local.Order_effective_contact__c)) {
- contactIdSet.add(local.Order_effective_contact__c);
- }
- }
- // contactList = [SELECT Id, Name, Business_Assistant__c FROM Account WHERE Id in :contactIdSet];
- // for(Account acc :contactList){
- // if(String.isNotBlank(acc.Business_Assistant__c)){
- // contactIdMap.put(acc.Id, acc.Business_Assistant__c);
- // }
- // }
+trigger ConsumableOrderTrigger on Consumable_order__c(before insert, before update) {
+ // CHAN-CBYBBF 銆愬鎵樸�戠粡閿�鍟咵T璐﹀彿鏄剧ず鐣岄潰缁存姢-骞夸笢姹囨櫒 start
+ // 娉ㄩ噴璺宠繃 鍙戣揣鏃惰璁$畻 SAP鍚堝悓鍙�
+ // if (StaticParameter.EscapeConsumableOrderDetail2Trigger) {
+ // return;
+ // }
+ // CHAN-CBYBBF 銆愬鎵樸�戠粡閿�鍟咵T璐﹀彿鏄剧ず鐣岄潰缁存姢-骞夸笢姹囨櫒 end
+ //add by rentx 20210618 start
+ if (StaticParameter.ConsumableOrderTrigger) {
+ return;
+ }
+ //ad by rentx 20210618 end
+ Set<String> contactIdSet = new Set<String>();
+ Map<String, String> rprIdList = new Map<String, String>();
+ Map<String, String> contactIdMap = new Map<String, String>();
+ List<Statu_Achievements__c> sAlist = new List<Statu_Achievements__c>();
+ if (Trigger.isBefore) {
+ Account contactdet = null;
+ List<Account> contactList = new List<Account>();
+ Consumable_order__c old = null;
+ for (Consumable_order__c local : Trigger.New) {
+ if (String.isNotBlank(local.Order_effective_contact__c)) {
+ contactIdSet.add(local.Order_effective_contact__c);
+ }
+ }
+ // contactList = [SELECT Id, Name, Business_Assistant__c FROM Account WHERE Id in :contactIdSet];
+ // for(Account acc :contactList){
+ // if(String.isNotBlank(acc.Business_Assistant__c)){
+ // contactIdMap.put(acc.Id, acc.Business_Assistant__c);
+ // }
+ // }
- Map<String,List<Statu_Achievements__c> > sAmap = new Map<String,List<Statu_Achievements__c> >();
- Map<String,String> zMaps = new Map<String,String>();
+ Map<String, List<Statu_Achievements__c>> sAmap = new Map<String, List<Statu_Achievements__c>>();
+ Map<String, String> zMaps = new Map<String, String>();
- for (Consumable_order__c local : Trigger.New) {
- if(String.isNotBlank(local.Opportunity__c) && String.isNotBlank(local.name)) {
- zMaps.put(local.Opportunity__c,local.name);
- }
- }
+ for (Consumable_order__c local : Trigger.New) {
+ if (String.isNotBlank(local.Opportunity__c) && String.isNotBlank(local.name)) {
+ zMaps.put(local.Opportunity__c, local.name);
+ }
+ }
+ sAlist = [SELECT ContractNO__c, Opportunity__c FROM Statu_Achievements__c WHERE Opportunity__c = :zMaps.keySet()];
+ for (Statu_Achievements__c sa : sAlist) {
+ List<Statu_Achievements__c> ssList = sAmap.get(zMaps.get(sa.Opportunity__c));
+ if (ssList == null) {
+ ssList = new List<Statu_Achievements__c>();
+ }
+ ssList.add(sa);
+ sAmap.put(zMaps.get(sa.Opportunity__c), ssList);
+ }
- sAlist = [SELECT ContractNO__c,Opportunity__c FROM Statu_Achievements__c WHERE Opportunity__c = :zMaps.keySet()];
+ // sAlist = [SELECT ContractNO__c FROM Statu_Achievements__c WHERE Opportunity__c = :opps];
+ // sAmap.put(name,sAlist);
- for(Statu_Achievements__c sa : sAlist) {
- List<Statu_Achievements__c> ssList = sAmap.get(zMaps.get(sa.Opportunity__c));
- if(ssList == null) {
- ssList = new List<Statu_Achievements__c>();
- }
- ssList.add(sa);
- sAmap.put(zMaps.get(sa.Opportunity__c),ssList);
- }
+ for (Consumable_order__c local : Trigger.New) {
+ if (Trigger.isInsert) {
+ rprIdList.put(local.Id, local.Id);
+ }
+ if (Trigger.isUpdate) {
+ old = Trigger.oldMap.get(local.Id);
+ }
+ if ((Trigger.isInsert || old.Order_status__c != local.Order_status__c) && local.Order_status__c == '鎵瑰噯') {
+ if (local.Order_date__c < Date.newInstance(2022, 4, 1)) {
+ local.addError('4/1涔嬪墠鐨勮鍗曞彧鑳介┏鍥炲苟閲嶆柊鎻愪氦銆�');
+ continue;
+ }
+ }
+ // 銆屾秷鑰楀搧璁㈠崟銆嶃伀銇仯銇熴仺銇嶃�併儹銈般偆銉炽儲銉笺偠銉笺亱銈夈儣銉偦銈圭敤銇笂鍙搞倰瑷畾
+ if ((Trigger.isInsert || old.Order_status__c != local.Order_status__c) && local.Order_status__c == '闄勪欢涓婁紶瀹屾垚') {
+ //if (contactdet == null) {
+ // contactdet = [SELECT Id, Name, Business_Assistant__c FROM Account WHERE Id = :local.Order_effective_contact__c];
+ //}
+ if (local.Business_Assistant__c == null) {
+ local.addError('鍚堝悓娌℃湁鏈夋晥鐨勮惀涓氬姪鐞嗐��');
+ continue;
+ } else {
+ local.SalesManager__c = local.Business_Assistant__c;
+ }
+ // 闋呯洰銇柊瑕忚拷鍔犮仐銇熴亸銇亜銆丄PI鍚嶃倐澶夋洿銇椼仧銇忋仾銇勩�併儵銉欍儷鍚嶃倰澶夋洿銆乁ser.鏈嶅姟鈫掍慨鐞�.鏈嶅姟
+ //local.SalesManager__c = contactdet.SalesManager__c == null ? contactdet.Id : contactdet.SalesManager__c;
+ //local.BuchangApprovalManagerSales__c = loginUser.BuchangApprovalManager__c == null ? loginUser.Id : loginUser.BuchangApprovalManager__c;
+ //local.ZongjianApprovalManager__c = loginUser.ZongjianApprovalManager__c == null ? loginUser.Id : loginUser.ZongjianApprovalManager__c;
+ //local.TongkuoZongjian__c = loginUser.TongkuoZongjian__c == null ? loginUser.Id : loginUser.TongkuoZongjian__c;
+ }
- // sAlist = [SELECT ContractNO__c FROM Statu_Achievements__c WHERE Opportunity__c = :opps];
- // sAmap.put(name,sAlist);
+ //鏇存柊or鎻掑叆 鍓�
+ if (Trigger.isInsert || Trigger.isUpdate) {
+ List<String> cNList = new List<String>();
+ List<Statu_Achievements__c> sas = sAmap.get(local.name);
- for (Consumable_order__c local : Trigger.New) {
- if (Trigger.isInsert) {
- rprIdList.put(local.Id, local.Id);
- }
- if (Trigger.isUpdate) {
- old = Trigger.oldMap.get(local.Id);
- }
- if ((Trigger.isInsert
- || old.Order_status__c != local.Order_status__c)
- && local.Order_status__c == '鎵瑰噯'
- ) {
- if(local.Order_date__c < Date.newInstance(2022, 04, 01)) {
- local.addError('4/1涔嬪墠鐨勮鍗曞彧鑳介┏鍥炲苟閲嶆柊鎻愪氦銆�');
- continue;
- }
- }
- // 銆屾秷鑰楀搧璁㈠崟銆嶃伀銇仯銇熴仺銇嶃�併儹銈般偆銉炽儲銉笺偠銉笺亱銈夈儣銉偦銈圭敤銇笂鍙搞倰瑷畾
- if ((Trigger.isInsert
- || old.Order_status__c != local.Order_status__c)
- && local.Order_status__c == '闄勪欢涓婁紶瀹屾垚'
- ) {
- //if (contactdet == null) {
- // contactdet = [SELECT Id, Name, Business_Assistant__c FROM Account WHERE Id = :local.Order_effective_contact__c];
- //}
- if(local.Business_Assistant__c == null) {
- local.addError('鍚堝悓娌℃湁鏈夋晥鐨勮惀涓氬姪鐞嗐��');
- continue;
- }else{
- local.SalesManager__c = local.Business_Assistant__c;
- }
- // 闋呯洰銇柊瑕忚拷鍔犮仐銇熴亸銇亜銆丄PI鍚嶃倐澶夋洿銇椼仧銇忋仾銇勩�併儵銉欍儷鍚嶃倰澶夋洿銆乁ser.鏈嶅姟鈫掍慨鐞�.鏈嶅姟
- //local.SalesManager__c = contactdet.SalesManager__c == null ? contactdet.Id : contactdet.SalesManager__c;
- //local.BuchangApprovalManagerSales__c = loginUser.BuchangApprovalManager__c == null ? loginUser.Id : loginUser.BuchangApprovalManager__c;
- //local.ZongjianApprovalManager__c = loginUser.ZongjianApprovalManager__c == null ? loginUser.Id : loginUser.ZongjianApprovalManager__c;
- //local.TongkuoZongjian__c = loginUser.TongkuoZongjian__c == null ? loginUser.Id : loginUser.TongkuoZongjian__c;
- }
+ if (sas != null) {
+ for (Statu_Achievements__c sa : sas) {
+ //淇濆瓨鍚堝悓缂栧彿
+ cNList.add(sa.ContractNO__c);
+ }
- //鏇存柊or鎻掑叆 鍓�
- if(Trigger.isInsert || Trigger.isUpdate ) {
- List<String> cNList = new List<String>();
- List<Statu_Achievements__c> sas = sAmap.get(local.name);
-
- if(sas != null) {
- for (Statu_Achievements__c sa : sas) {
- //淇濆瓨鍚堝悓缂栧彿
- cNList.add(sa.ContractNO__c);
- }
-
- //鎷兼帴鍚堝悓缂栧彿
- String cNs = String.join(cNList,',');
- local.ContractNo__c = cNs;
- }
- }
- }
- }
-}
\ No newline at end of file
+ //鎷兼帴鍚堝悓缂栧彿
+ String cNs = String.join(cNList, ',');
+ local.ContractNo__c = cNs;
+ }
+ }
+ }
+ }
+}
diff --git a/force-app/main/default/triggers/ContentDocumentLink.trigger b/force-app/main/default/triggers/ContentDocumentLink.trigger
index fca83c5..12b8b8f 100644
--- a/force-app/main/default/triggers/ContentDocumentLink.trigger
+++ b/force-app/main/default/triggers/ContentDocumentLink.trigger
@@ -1,5 +1,7 @@
-trigger ContentDocumentLink on ContentDocumentLink (before delete, after insert) {
-
+trigger ContentDocumentLink on ContentDocumentLink(before delete, after insert) {
+ if ((!Test.isRunningTest()) && UserInfo.getUserId() == System.Label.ByPassTrigger) {
+ return;
+ }
system.debug('enter ContentDocumentLink');
system.debug('Trigger.new = ' + (List<ContentDocumentLink>) Trigger.new);
system.debug('Trigger.old = ' + (List<ContentDocumentLink>) Trigger.old);
@@ -41,7 +43,6 @@
// }
// }
-
if (rentalIds.size() > 0) {
List<Consumable_order__c> rentalList = new List<Consumable_order__c>();
for (Consumable_order__c ra : [SELECT Id FROM Consumable_order__c WHERE Id IN :rentalIds]) {
@@ -65,4 +66,5 @@
// System.debug('rentaldelList = ' + rentaldelList);
// ControllerUtil.delConsumableAccessoriesInvoiceSet(rentaldelList);
// }
-}
\ No newline at end of file
+
+}
diff --git a/force-app/main/default/triggers/ContentDocumentTrigger.trigger b/force-app/main/default/triggers/ContentDocumentTrigger.trigger
index ed34043..f78e2b7 100644
--- a/force-app/main/default/triggers/ContentDocumentTrigger.trigger
+++ b/force-app/main/default/triggers/ContentDocumentTrigger.trigger
@@ -1,4 +1,7 @@
trigger ContentDocumentTrigger on ContentDocument(before delete) {
+ if ((!Test.isRunningTest()) && UserInfo.getUserId() == System.Label.ByPassTrigger) {
+ return;
+ }
System.debug('enter ContentDocumentTrigger');
// system.debug('Trigger.new = ' + (List<ContentDocument>) Trigger.new);
// system.debug('Trigger.old = ' + (List<ContentDocument>) Trigger.old);
@@ -61,4 +64,4 @@
System.debug('rentaldelList = ' + rentaldelList);
ControllerUtil.delConsumableAccessoriesInvoiceSet(rentaldelList);
}
-}
\ No newline at end of file
+}
diff --git a/manifest/LEXC00basecmp.xml b/manifest/LEXC00basecmp.xml
index 0baef91..1fe2b78 100644
--- a/manifest/LEXC00basecmp.xml
+++ b/manifest/LEXC00basecmp.xml
@@ -1,18 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
- <types>
- <members>AccountGif</members>
- <members>LexCustomDataTable</members>
- <members>lexdatatable</members>
- <members>Olympus_Logo</members>
- <members>SNA_Demo1_sf_default_cdn_PqhAN</members>
- <members>SNA_Partner_Sales1_sf_default_cdn_JaBaQ</members>
- <name>StaticResource</name>
- </types>
- <types>
- <members>LicenceReminderDate__c</members>
- <members>NoteStay__c</members>
- <name>CustomObject</name>
- </types>
- <version>57.0</version>
+ <fullName>01_LEXCommunity_BaesCmp</fullName>
+ <types>
+ <members>OlympusCommunityLoginBG</members>
+ <members>OlympusCommunityLogo</members>
+ <name>ContentAsset</name>
+ </types>
+ <types>
+ <members>LicenceReminderDate__c.ReminderDays__c</members>
+ <members>NoteStay__c.IsStay__c</members>
+ <name>CustomField</name>
+ </types>
+ <types>
+ <members>LicenceReminderDate__c</members>
+ <members>NoteStay__c</members>
+ <name>CustomObject</name>
+ </types>
+ <types>
+ <members>AccountGif</members>
+ <members>LexCustomDataTable</members>
+ <members>Olympus_Logo</members>
+ <members>SNA_Demo1_sf_default_cdn_PqhAN</members>
+ <members>SNA_Partner_Sales1_sf_default_cdn_JaBaQ</members>
+ <members>lexdatatable</members>
+ <name>StaticResource</name>
+ </types>
+ <version>50.0</version>
</Package>
diff --git a/manifest/LEXC01packagelexcommunitynew.xml b/manifest/LEXC01packagelexcommunitynew.xml
index 6f55697..1ad35f9 100644
--- a/manifest/LEXC01packagelexcommunitynew.xml
+++ b/manifest/LEXC01packagelexcommunitynew.xml
@@ -1,38 +1,71 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
+ <fullName>02_LEXCommunity_New_6%2E0</fullName>
<types>
+ <members>Batch_FixAttachmentToFiles</members>
+ <members>Batch_FixAttachmentToFilesTest</members>
<members>LexArriveGoodsMainController</members>
+ <members>LexArriveGoodsMainControllerTest</members>
<members>LexArriveGsDetailsController</members>
+ <members>LexArriveGsDetailsControllerTest</members>
<members>LexCancelRemoveBoxController</members>
+ <members>LexCancelRemoveBoxControllerTest</members>
<members>LexConInvoiceList</members>
+ <members>LexConInvoiceListTest</members>
<members>LexConInvoiceViewController</members>
+ <members>LexConInvoiceViewControllerTest</members>
<members>LexConInvoicedetailsController</members>
+ <members>LexConInvoicedetailsControllerTest</members>
<members>LexConsumableAccountController</members>
+ <members>LexConsumableAccountControllerTest</members>
<members>LexConsumableAccountInfoController</members>
+ <members>LexConsumableAccountInfoControllerTest</members>
<members>LexConsumableAccountSOQL</members>
+ <members>LexConsumableAccountSOQLTest</members>
<members>LexConsumableController</members>
+ <members>LexConsumableControllerTest</members>
<members>LexConsumableGoodsInfo</members>
+ <members>LexConsumableGoodsInfoTest</members>
<members>LexConsumableOrderManageController</members>
- <members>LexDealerInquiryModifyStateController</members>
+ <members>LexConsumableOrderManageControllerTest</members>
<members>LexInventoryController</members>
+ <members>LexInventoryControllerTest</members>
<members>LexInventoryListController</members>
+ <members>LexInventoryListControllerTest</members>
<members>LexInventoryViewController</members>
+ <members>LexInventoryViewControllerTest</members>
<members>LexLicenceReminderController</members>
+ <members>LexLicenceReminderControllerTest</members>
<members>LexOutboundorderImportController</members>
+ <members>LexOutboundorderImportControllerTest</members>
<members>LexOverdueStockController</members>
+ <members>LexOverdueStockControllerTest</members>
<members>LexProductLimitEditController</members>
+ <members>LexProductLimitEditControllerTest</members>
<members>LexRemoveBoxController</members>
+ <members>LexRemoveBoxControllerTest</members>
<members>LexSaleAndDeliveryController</members>
+ <members>LexSaleAndDeliveryControllerTest</members>
<members>LexSaleOrderController</members>
+ <members>LexSaleOrderControllerTest</members>
<members>LexSearchContractController</members>
+ <members>LexSearchContractControllerTest</members>
<members>LexSearchHospitalController</members>
+ <members>LexSearchHospitalControllerTest</members>
<members>LexSummonsCreatController</members>
+ <members>LexSummonsCreatControllerTest</members>
<members>LexTopPageController</members>
+ <members>LexTopPageControllerTest</members>
<members>LexUpAccountProLimit</members>
+ <members>LexUpAccountProLimitControllerTest</members>
<members>LexUtility</members>
+ <members>LexUtilityTest</members>
<members>LookupSearchResult</members>
+ <members>LookupSearchResultTest</members>
<members>ResponseBodyLWC</members>
+ <members>ResponseBodyLWCTest</members>
<members>lexSearchAgencyHospitalController</members>
+ <members>lexSearchAgencyHospitalControllerTest</members>
<name>ApexClass</name>
</types>
<types>
@@ -44,7 +77,10 @@
<types>
<members>boxorpieceType</members>
<members>commonToast</members>
+ <members>customAccountUrlComp</members>
+ <members>customDeleteReasonComp</members>
<members>customLightningDatatable</members>
+ <members>customMydrComp</members>
<members>customOutboundCountComp</members>
<members>customOutputGood</members>
<members>customShipmentAmountComp</members>
@@ -69,7 +105,6 @@
<members>lexCustomInventoryColor</members>
<members>lexCustomLightningDatatable</members>
<members>lexCustomTableInput</members>
- <members>lexDealerInquiryModifyState</members>
<members>lexInventory</members>
<members>lexLicenceReminder</members>
<members>lexLookup</members>
@@ -86,20 +121,13 @@
<members>lexinventoryViewLWC</members>
<members>lwcDatatableUtility</members>
<members>myCustomTypeDatatable</members>
- <members>paginator</members>
<members>navigateToRecord</members>
+ <members>paginator</members>
<name>LightningComponentBundle</name>
</types>
<types>
- <members>View_Weekly_Report</members>
- <members>LexConInvoiceViewReport</members>
- <members>LexArrivegsDetailsPageHelpText</members>
- <members>invoiceStart</members>
- <name>customlabel</name>
- </types>
- <types>
- <members>Community_LEX_PS</members>
+ <members>Community_Consumable_LEX_PS</members>
<name>PermissionSet</name>
</types>
- <version>57.0</version>
+ <version>50.0</version>
</Package>
diff --git a/manifest/LEXC02packagelexcommunityupdate.xml b/manifest/LEXC02packagelexcommunityupdate.xml
index a9d7929..9481c04 100644
--- a/manifest/LEXC02packagelexcommunityupdate.xml
+++ b/manifest/LEXC02packagelexcommunityupdate.xml
@@ -1,24 +1,34 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
- <fullName>DEVLexCommunityUpdate</fullName>
- <description>1. Update Class 2. New LWC</description>
+ <fullName>03_LEXCommunity_Update1%2E0</fullName>
<types>
<members>ArriveGoodsController</members>
<members>ArriveGoodsControllerTest</members>
+ <members>ArriveGoodsControllerTestV2</members>
+ <members>DealerInquiryModifyStateController</members>
+ <members>DealerInquiryModifyStateControllerTest</members>
<members>LexArriveGoodsController</members>
+ <members>LexArriveGoodsControllerTest</members>
+ <members>LexArriveGoodsControllerTest1</members>
<name>ApexClass</name>
+ </types>
+ <types>
+ <members>DealerInquiryModifyState</members>
+ <name>ApexPage</name>
+ </types>
+ <types>
+ <members>ConsumableOrderDetail2Trigger</members>
+ <name>ApexTrigger</name>
+ </types>
+ <types>
+ <members>CreateTarget</members>
+ <members>RetrospectiveWeeklyReport</members>
+ <members>WeeklyReport</members>
+ <name>AuraDefinitionBundle</name>
</types>
<types>
<members>lexArriveGoods</members>
<name>LightningComponentBundle</name>
</types>
- <types>
- <members>RetrospectiveWeeklyReport</members>
- <name>AuraDefinitionBundle</name>
- </types>
- <types>
- <members>Community_LEX_PS</members>
- <name>PermissionSet</name>
- </types>
- <version>57.0</version>
+ <version>50.0</version>
</Package>
diff --git a/manifest/LEXC03Dahsboard.xml b/manifest/LEXC03Dahsboard.xml
new file mode 100644
index 0000000..806674f
--- /dev/null
+++ b/manifest/LEXC03Dahsboard.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Package xmlns="http://soap.sforce.com/2006/04/metadata">
+ <types>
+ <members>ConsumableSalesDashboard</members>
+ <members
+ >Consumable Sales Dashboard/ezyQWhsDlQfrUPdIMqUmGsdMeWiYAH2</members>
+ <name>Dashboard</name>
+ </types>
+ <version>50.0</version>
+</Package>
diff --git a/manifest/LEXC03report.xml b/manifest/LEXC03report.xml
new file mode 100644
index 0000000..2be306e
--- /dev/null
+++ b/manifest/LEXC03report.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Package xmlns="http://soap.sforce.com/2006/04/metadata">
+ <types>
+ <members
+ >Consumable Sales Report/Consumable_Outstock_Invoice_Lex</members>
+ <members>Consumable Sales Report/Report_Outbound_Lex</members>
+ <members
+ >Consumable Sales Report/CurrentMonthSalesRankByProduct</members>
+ <members>Consumable Sales Report/WeeklyReportForAgency</members>
+ <members>Consumable Sales Report/LastMonthSalesByProduct</members>
+ <members>Consumable Sales Report/LastMonthSalesByAccount1</members>
+ <members
+ >Consumable Sales Report/CurrentMonthSalesRankByAccount</members>
+ <members>ConsumableSalesReport</members>
+ <name>Report</name>
+ </types>
+ <version>50.0</version>
+</Package>
diff --git a/manifest/LEXC03reportanddashboard.xml b/manifest/LEXC03reportanddashboard.xml
deleted file mode 100644
index 564751f..0000000
--- a/manifest/LEXC03reportanddashboard.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Package xmlns="http://soap.sforce.com/2006/04/metadata">
- <types>
- <members>LEX</members>
- <members>LEX/ezyQWhsDlQfrUPdIMqUmGsdMeWiYAH</members>
- <name>Dashboard</name>
- </types>
- <version>50.0</version>
-</Package>
diff --git a/manifest/LEXC04packagecommdeploy.xml b/manifest/LEXC04packagecommdeploy.xml
index 39703ba..86eff7f 100644
--- a/manifest/LEXC04packagecommdeploy.xml
+++ b/manifest/LEXC04packagecommdeploy.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
- <members>Consumable</members>
+ <members>*</members>
<name>CustomSite</name>
</types>
<types>
- <members>Consumable1</members>
+ <members>*</members>
<name>ExperienceBundle</name>
</types>
<types>
- <members>Consumable绯荤粺</members>
+ <members>*</members>
<name>Network</name>
</types>
<version>50.0</version>
--
Gitblit v1.9.1